@@ -5,17 +5,18 @@ SET CS_VERSION_NUM=40301
5
5
SET CS_GUID32 = 8A99142D-5D6E-40b6-AF88-8BD46F0C5CB4
6
6
SET CS_GUID64 = CABCE573-0A86-42fa-A52A-C7EA61D5BE08
7
7
8
- SET CS_ERROR = 0
9
-
10
8
REM ********* Build Help
9
+ @ setlocal EnableDelayedExpansion
11
10
@ if %CS_HAS_HELP% == 1 (
11
+ SET CS_ERROR = 0
12
12
if NOT %CS_LANG_FOLDER% == English mklink /J ..\Localization\%CS_LANG_FOLDER% \images ..\Localization\English\images
13
13
hhc ..\Localization\%CS_LANG_FOLDER% \ClassicShell.hhp
14
14
@ REM looks like hhc returns 0 for error, > 0 for success
15
15
@ if NOT ERRORLEVEL 1 @ SET CS_ERROR = 1
16
16
if NOT %CS_LANG_FOLDER% == English rmdir ..\Localization\%CS_LANG_FOLDER% \images
17
- @ if % CS_ERROR% == 1 goto end
17
+ @ if ! CS_ERROR! == 1 exit /b 1
18
18
)
19
+ @ endlocal
19
20
@ if %CS_HAS_HELP% == 0 (
20
21
copy /Y ..\Localization\English\ClassicShell.chm ..\Localization\%CS_LANG_FOLDER% \ClassicShell.chm
21
22
)
@@ -24,63 +25,61 @@ REM ********* Build Help
24
25
@ if %CS_HAS_README% == 0 copy /Y ..\Localization\English\ClassicShellReadme.rtf ..\Localization\%CS_LANG_FOLDER%
25
26
26
27
@ if _%CS_LANG_NAME% == _ echo Unrecognized language '%CS_LANG_FOLDER% '
27
- @ if _%CS_LANG_NAME% == _ goto end
28
+ @ if _%CS_LANG_NAME% == _ exit /b 1
28
29
29
30
SET CS_INSTALLER_NAME = ClassicShellSetup_%CS_VERSION_STR% -%CS_LANG_NAME_SHORT%
30
31
if %CS_LANG_NAME_SHORT% == en SET CS_INSTALLER_NAME = ClassicShellSetup_%CS_VERSION_STR%
31
32
32
33
md Temp
33
34
del /Q Temp\*.*
34
35
35
- @ if not exist ..\Localization\%CS_LANG_FOLDER% \ClassicShellText-%CS_LANG_NAME% .wxl goto end
36
+ @ if not exist ..\Localization\%CS_LANG_FOLDER% \ClassicShellText-%CS_LANG_NAME% .wxl exit /b 1
36
37
37
38
REM ********* Build 32-bit MSI
38
39
candle ClassicShellSetup.wxs -out Temp\ClassicShellSetup32.wixobj -ext WixUIExtension -ext WixUtilExtension -dx64=0 -dCS_LANG_FOLDER=%CS_LANG_FOLDER% -dCS_LANG_NAME=%CS_LANG_NAME%
39
- @ if ERRORLEVEL 1 goto end
40
+ @ if ERRORLEVEL 1 exit /b 1
40
41
41
42
@ REM We need to suppress ICE38 and ICE43 because they apply only to per-user installation. We only support per-machine installs
42
43
@ REM We need to suppress ICE09 because the helper DLLs need to go into the system directory (for safety reasons)
43
44
light Temp\ClassicShellSetup32.wixobj -out Temp\ClassicShellSetup32.msi -ext WixUIExtension -ext WixUtilExtension -loc ..\Localization\%CS_LANG_FOLDER% \ClassicShellText-%CS_LANG_NAME% .wxl -loc ..\Localization\%CS_LANG_FOLDER% \WixUI_%CS_LANG_NAME% .wxl -sice:ICE38 -sice:ICE43 -sice:ICE09
44
- @ if ERRORLEVEL 1 goto end
45
+ @ if ERRORLEVEL 1 exit /b 1
45
46
46
47
47
48
REM ********* Build 64-bit MSI
48
49
candle ClassicShellSetup.wxs -out Temp\ClassicShellSetup64.wixobj -ext WixUIExtension -ext WixUtilExtension -dx64=1 -dCS_LANG_FOLDER=%CS_LANG_FOLDER% -dCS_LANG_NAME=%CS_LANG_NAME%
49
- @ if ERRORLEVEL 1 goto end
50
+ @ if ERRORLEVEL 1 exit /b 1
50
51
51
52
@ REM We need to suppress ICE38 and ICE43 because they apply only to per-user installation. We only support per-machine installs
52
53
@ REM We need to suppress ICE09 because the helper DLLs need to go into the system directory (for safety reasons)
53
54
light Temp\ClassicShellSetup64.wixobj -out Temp\ClassicShellSetup64.msi -ext WixUIExtension -ext WixUtilExtension -loc ..\Localization\%CS_LANG_FOLDER% \ClassicShellText-%CS_LANG_NAME% .wxl -loc ..\Localization\%CS_LANG_FOLDER% \WixUI_%CS_LANG_NAME% .wxl -sice:ICE38 -sice:ICE43 -sice:ICE09
54
- @ if ERRORLEVEL 1 goto end
55
+ @ if ERRORLEVEL 1 exit /b 1
55
56
56
57
57
58
REM ********* Build MSI Checksums
58
59
start /wait ClassicShellUtility\Release\ClassicShellUtility.exe crcmsi Temp
59
- @ if ERRORLEVEL 1 goto end
60
+ @ if ERRORLEVEL 1 exit /b 1
60
61
61
62
REM ********* Build bootstrapper
62
63
for /f " usebackq tokens=*" %%i in (`" %ProgramFiles(x86)% \Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -property installationPath`) do set MSBuildDir = %%i \MSBuild\15.0\Bin\
63
64
64
- " %MSBuildDir% MSBuild.exe" ClassicShellSetup.sln /t:Rebuild /p:Configuration=" Release" /p:Platform=" Win32"
65
- @ if ERRORLEVEL 1 goto end
65
+ " %MSBuildDir% MSBuild.exe" ClassicShellSetup.sln /m / t:Rebuild /p:Configuration=" Release" /p:Platform=" Win32" /verbosity:minimal
66
+ @ if ERRORLEVEL 1 exit /b 1
66
67
67
68
md Final
68
69
69
70
del Final\%CS_INSTALLER_NAME% .exe
70
71
copy /B Release\ClassicShellSetup.exe Final\%CS_INSTALLER_NAME% .exe
71
72
73
+ if defined APPVEYOR (
74
+ appveyor PushArtifact Release\ClassicShellSetup.exe -FileName %CS_INSTALLER_NAME% .exe
75
+ )
76
+
72
77
md Output\Releases
73
78
copy /B Final\%CS_INSTALLER_NAME% .exe Output\Releases\%CS_INSTALLER_NAME% .exe
74
79
75
80
76
-
77
-
78
-
79
- @ goto EOF
80
- :end
81
- @ SET CS_ERROR = 1
82
- pause
83
- :EOF
84
81
SET CS_LANG_FOLDER =
85
82
SET CS_LANG_NAME =
86
83
SET CS_LANG_NAME_SHORT =
84
+
85
+ exit /b 0
0 commit comments