9 set input=%1 |
9 set input=%1 |
10 if "%1" == "" GOTO ARGMISSING |
10 if "%1" == "" GOTO ARGMISSING |
11 |
11 |
12 set sys_def_path=%1 |
12 set sys_def_path=%1 |
13 |
13 |
|
14 REM Publishing target options. Possible values are "mode" or "ditaot". Default is "mode". |
|
15 REM Set the default publishing target to be mode |
|
16 set publishing_target=mode |
|
17 |
|
18 REM Process arg 2 as publishing target if the user has specified it |
|
19 if not "%2" == "" ( |
|
20 if not "%2" == "mode" ( |
|
21 if not "%2" == "ditaot" ( |
|
22 GOTO INVALIDPUBLISHINGTARGETARG |
|
23 ) |
|
24 set publishing_target=ditaot |
|
25 ) |
|
26 ) |
|
27 |
14 set python_home=%sbs_home%\win32\python252 |
28 set python_home=%sbs_home%\win32\python252 |
15 set PATH=%python_home%;%PATH% |
29 set PATH=%python_home%;%PATH% |
|
30 set current_drive=%cd:~0,2% |
16 |
31 |
17 set input=%EPOCROOT%epoc32\release\doxygen\dita |
32 set input=%current_drive%%EPOCROOT%epoc32\release\doxygen\dita |
18 set maps_output=%EPOCROOT%epoc32\release\doxygen\maps |
33 rem set maps_output=%current_drive%%EPOCROOT%epoc32\release\doxygen\maps |
19 set dita_output=%EPOCROOT%epoc32\release\doxygen\ditareference |
34 rem set dita_output=%current_drive%%EPOCROOT%epoc32\release\doxygen\ditareference |
20 |
35 |
21 set ANT_OPTS=-Xmx512m |
36 set ANT_OPTS=-Xmx512m |
22 set ant_home=%sbs_home%\ant |
37 set ant_home=%sbs_home%\ant |
23 set ant_path=%ant_home%\bin\ant.bat |
38 set ant_path=%ant_home%\bin\ant.bat |
24 set build_file=%sbs_home%\CxxApiRef2Dita\build.xml |
39 set build_file=%sbs_home%\CxxApiRef2Dita\build.xml |
25 |
40 |
26 set map_creator_path=%sbs_home%\bin\MapCreator\mapcreator.exe |
41 set map_creator_path=%sbs_home%\bin\MapCreator\mapcreator.exe |
27 set component_map_creator_path=%sbs_home%\python\doxygen\component_map_creator.py |
42 set component_map_creator_path=%sbs_home%\python\doxygen\component_map_creator.py |
28 set guidiser_path=%sbs_home%\python\doxygen\guidiser.py |
43 set guidiser_path=%sbs_home%\python\doxygen\guidiser.py |
29 set filerenamer_path=%sbs_home%\python\doxygen\filerenamer.py |
44 set filerenamer_path=%sbs_home%\python\doxygen\filerenamer.py |
30 set index_creator_path=%sbs_home%\python\doxygen\indexcreator.py |
45 set linkinserter_path=%sbs_home%\python\doxygen\linkinserter.py |
31 |
46 |
|
47 rem md %maps_output% |
|
48 rem md %dita_output% |
|
49 call :TRY "python %component_map_creator_path% %current_drive%%EPOCROOT%epoc32\build %input%" |
|
50 call :TRY "%map_creator_path% %sys_def_path% -o %input%\toc.ditamap %input%" |
32 |
51 |
33 md %maps_output% |
52 rem call :TRY "python %guidiser_path% -p %publishing_target% -l 10 %maps_output%" |
34 md %dita_output% |
53 call :TRY "python %guidiser_path% -p %publishing_target% -l 10 %input%" |
35 call %map_creator_path% %sys_def_path% -o %maps_output%\toc.ditamap |
54 rem call :TRY "python %guidiser_path% -p %publishing_target% -l 10 %dita_output%\transformed" |
36 call python %component_map_creator_path% %EPOCROOT%epoc32\build %maps_output% |
55 rem call :TRY "python %filerenamer_path% -p %publishing_target% -l 10 %maps_output%" |
37 rem call python %index_creator_path% %input% %output%\maps\index.ditamap |
56 call :TRY "python %filerenamer_path% -p %publishing_target% -l 10 %input%" |
38 |
57 rem call :TRY "python %filerenamer_path% -p %publishing_target% -l 10 %dita_output%\transformed" |
39 call %ant_path% -f %build_file% -Dinput="%input%" -Doutput="%dita_output%" |
58 rem call :TRY "python %linkinserter_path% %input%" |
40 |
59 rem call :TRY "python %linkinserter_path% %dita_output%\transformed" |
41 call python %guidiser_path% %maps_output% |
60 rem call :TRY "%ant_path% -f %build_file% -Dinput="%input%" -Doutput="%dita_output%"" |
42 call python %guidiser_path% %input% |
61 GOTO EOF |
43 call python %guidiser_path% %dita_output%\transformed |
|
44 |
|
45 call python %filerenamer_path% %maps_output% |
|
46 call python %filerenamer_path% %input% |
|
47 call python %filerenamer_path% %dita_output%\transformed |
|
48 |
|
49 |
|
50 goto EOF |
|
51 |
62 |
52 :ARGMISSING |
63 :ARGMISSING |
53 echo Error Arguments missing were 1.system_defintion.xml path:[%1] |
64 echo Error Arguments missing were 1.system_defintion.xml path:[%1] |
54 echo EPOC source tree os the directory containing v3 system definition |
65 echo. |
55 echo and package definitions |
66 goto USAGE |
|
67 |
|
68 :INVALIDPUBLISHINGTARGETARG |
|
69 echo Error invalid publishing target, possible values are "mode" or "ditaot". Invalid arg was "%2". |
|
70 echo. |
|
71 goto USAGE |
|
72 |
|
73 :USAGE |
|
74 echo Usage: orb_proces_cxx.bat SYSTEM_DEFINITION_PATH [PUBLISHING_TARGET] |
|
75 echo Post process for Doxygen extension to sbs. |
|
76 echo. |
|
77 echo SYSTEM_DEFINITION_PATH EPOC source tree os the directory containing v3 system definition and package definitions |
|
78 echo PUBLISHING_TARGET [mode], ditaot |
|
79 echo. |
56 goto EOF |
80 goto EOF |
57 |
81 |
|
82 :TRY |
|
83 echo %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% orb_process_cxx.bat is running %1 |
|
84 call %~1 |
|
85 IF %ERRORLEVEL%==0 echo %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% orb_process_cxx.bat SUCCEEDED running %1 |
|
86 IF ERRORLEVEL 1 echo %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% orb_process_cxx.bat FAILED running %1 |
|
87 echo --------------------- |
58 :EOF |
88 :EOF |