@@ -83,8 +83,9 @@ FOR /F "usebackq tokens=1* delims==" %%A IN (`CALL GetVersion.cmd %Mode%`) DO SE
83
83
REM Restore NuGet packages.
84
84
nuget restore Source\ORTS.sln || GOTO :error
85
85
86
- REM Recreate Program directory for output.
86
+ REM Recreate Program directory for output and delete previous build files .
87
87
CALL :recreate " Program" || GOTO :error
88
+ CALL :delete " OpenRails-%Mode% *" || GOTO :error
88
89
89
90
REM Build main program.
90
91
REM Disable warning CS1591 "Missing XML comment for publicly visible type or member".
@@ -126,11 +127,14 @@ IF NOT "%Mode%" == "Unstable" (
126
127
NET stop ClickToRunSvc
127
128
NET start ClickToRunSvc
128
129
129
- REM Recreate Documentation folder for output.
130
- CALL :recreate " Program\Documentation" || GOTO :error
130
+ REM Create the documentation folders for output.
131
+ CALL :create " Program\Documentation" || GOTO :error
132
+ CALL :create " Program\Documentation\Online" || GOTO :error
133
+ CALL :create " Program\Documentation\es" || GOTO :error
131
134
132
135
REM Compile the documentation.
133
136
FOR %%E IN (doc docx docm xls xlsx xlsm odt) DO FOR %%F IN (" Source\Documentation\*.%%E " ) DO ECHO %%~F && OfficeToPDF.exe /bookmarks /print " %%~F " " Program\Documentation\%%~nF .pdf" || GOTO :error
137
+ FOR %%E IN (doc docx docm xls xlsx xlsm odt) DO FOR %%F IN (" Source\Documentation\Online\*.%%E " ) DO ECHO %%~F && OfficeToPDF.exe /bookmarks /print " %%~F " " Program\Documentation\Online\%%~nF .pdf" || GOTO :error
134
138
> " Source\Documentation\Manual\version.py" ECHO version = '%OpenRails_Version% ' || GOTO :error
135
139
>> " Source\Documentation\Manual\version.py" ECHO release = '%OpenRails_Revision% ' || GOTO :error
136
140
PUSHD " Source\Documentation\Manual" && CALL make.bat clean & POPD || GOTO :error
@@ -139,13 +143,13 @@ IF NOT "%Mode%" == "Unstable" (
139
143
REM Copy the documentation.
140
144
FOR %%F IN (" Source\Documentation\*.pdf" ) DO CALL :copy " %%~F " " Program\Documentation\%%~nF .pdf" || GOTO :error
141
145
CALL :copy " Source\Documentation\Manual\_build\latex\Manual.pdf" " Program\Documentation\Manual.pdf" || GOTO :error
142
- CALL :create " Program\Documentation\es"
143
146
CALL :copy " Source\Documentation\Manual\es\Manual.pdf" " Program\Documentation\es\Manual.pdf" || GOTO :error
144
147
ROBOCOPY /MIR /NJH /NJS " Source\Documentation\SampleFiles" " Program\Documentation\SampleFiles"
145
148
IF %ERRORLEVEL% GEQ 8 GOTO :error
146
149
147
150
REM Copy the documentation separately.
148
151
FOR %%F IN (" Program\Documentation\*.pdf" ) DO CALL :copy " %%~F " " OpenRails-%Mode% -%%~nxF " || GOTO :error
152
+ FOR %%F IN (" Program\Documentation\Online\*.pdf" ) DO CALL :copy " %%~F " " OpenRails-%Mode% -%%~nxF " || GOTO :error
149
153
)
150
154
151
155
IF " %Mode% " == " Stable" (
@@ -161,8 +165,7 @@ IF "%Mode%" == "Stable" (
161
165
)
162
166
163
167
REM Create binary and source zips.
164
- CALL :delete " OpenRails-%Mode% *.zip" || GOTO :error
165
- PUSHD " Program" && 7za.exe a -r -tzip -x^^! *.xml " ..\OpenRails-%Mode% .zip" . && POPD || GOTO :error
168
+ PUSHD " Program" && 7za.exe a -r -tzip -x^^! *.xml -x^^! Online " ..\OpenRails-%Mode% .zip" . && POPD || GOTO :error
166
169
7za.exe a -r -tzip -x^^! .* -x^^! obj -x^^! lib -x^^! _build -x^^! *.bak " OpenRails-%Mode% -Source.zip" " Source" || GOTO :error
167
170
168
171
ENDLOCAL
0 commit comments