Skip to content

Commit 1595967

Browse files
authored
Support for AppVeyor builds (#11)
* Remove pause to be automated build friendly * Use 7-Zip instead of WinRar * Enable parallel builds * Build improvements * Push final installer to AppVeyor * AppVeyor config
1 parent d969272 commit 1595967

File tree

6 files changed

+58
-46
lines changed

6 files changed

+58
-46
lines changed

ClassicShellSrc/BUILDME.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Visual Studio 2017 (Community Edition is enough)
1111
- Visual C++ ATL support
1212
HTML Help Workshop
1313
WiX 3.7
14-
WinRAR
14+
7-Zip
1515
It is possible to convert the projects to newer versions of Visual Studio and newer SDKs.
1616
Newer versions of WiX will probably work fine.
1717

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
REM ***** Collect PDBs
22

33
del Final\ClassicShellPDB_%CS_VERSION_STR%.zip
4-
"C:\Program Files\WinRAR\winrar" a -afzip -ep1 Final\ClassicShellPDB_%CS_VERSION_STR%.zip Output\PDB32 Output\PDB64
4+
cd Output
5+
7z a ..\Final\ClassicShellPDB_%CS_VERSION_STR%.zip PDB32 PDB64
6+
cd ..
57

68
cd ..
79

810
REM ***** Collect Sources
911

1012
del ClassicShellSetup\Final\ClassicShellSrc_%CS_VERSION_STR%.zip
11-
"C:\Program Files\WinRAR\winrar" a -afzip -ep1 -ed -r -x*.intermediate.manifest -x*.embed.manifest -x*_i.h -xWebsite\ ClassicShellSetup\Final\ClassicShellSrc_%CS_VERSION_STR%.zip *.h *.cpp *.rc *.vcproj *.ini *.def *.ico *.idl *.rgs *.jpg *.manifest *.wxl *.wxs *.sln *.bat *.bmp *.txt *.html *.rtf *.gif *.png *.hhp *.hhc ??-??.dll
13+
7z a -r -x!*.intermediate.manifest -x!*.embed.manifest -x!*_i.h -x!Website\ ClassicShellSetup\Final\ClassicShellSrc_%CS_VERSION_STR%.zip *.h *.cpp *.rc *.vcproj *.ini *.def *.ico *.idl *.rgs *.jpg *.manifest *.wxl *.wxs *.sln *.bat *.bmp *.txt *.html *.rtf *.gif *.png *.hhp *.hhc ??-??.dll
1214

1315
REM ***** Collect Localization files
1416

1517
del ClassicShellSetup\Final\ClassicShellLoc.zip
16-
"C:\Program Files\WinRAR\winrar" a -afzip -ep1 -ed -r -x*WixUI_en-us.wxl -x*.adml -x*.admx -x*LocComments.txt ClassicShellSetup\Final\ClassicShellLoc.zip Localization\English ClassicExplorer\ExplorerL10N.ini ClassicStartMenu\StartMenuL10N.ini ClassicStartMenu\StartMenuHelper\StartMenuHelperL10N.ini Localization\English\ClassicShellText-en-US.wxl Localization\English\ClassicShellEULA.rtf
18+
cd Localization
19+
7z a -r -x!en-US -x!*WixUI_en-us.wxl -x!*.adml -x!*.admx -x!*LocComments.txt ..\ClassicShellSetup\Final\ClassicShellLoc.zip English ..\ClassicExplorer\ExplorerL10N.ini ..\ClassicStartMenu\StartMenuL10N.ini ..\ClassicStartMenu\StartMenuHelper\StartMenuHelperL10N.ini English\ClassicShellText-en-US.wxl English\ClassicShellEULA.rtf
20+
cd ..
1721

1822
cd ClassicShellSetup

ClassicShellSrc/ClassicShellSetup/BuildBinaries.bat

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@SET CS_ERROR=0
2-
31
md Output
42
del /Q /S Output\*.*
53
md Output\x64
@@ -9,19 +7,18 @@ md Output\PDB64
97
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\
108

119
REM ********* Build 64-bit solution
12-
"%MSBuildDir%MSBuild.exe" ..\ClassicShell.sln /t:Rebuild /p:Configuration="Setup" /p:Platform="x64"
13-
@if ERRORLEVEL 1 goto end
14-
10+
"%MSBuildDir%MSBuild.exe" ..\ClassicShell.sln /m /t:Rebuild /p:Configuration="Setup" /p:Platform="x64" /verbosity:minimal
11+
@if ERRORLEVEL 1 exit /b 1
1512

1613
REM ********* Build 32-bit solution (must be after 64-bit)
17-
"%MSBuildDir%MSBuild.exe" ..\ClassicShell.sln /t:Rebuild /p:Configuration="Setup" /p:Platform="Win32"
18-
@if ERRORLEVEL 1 goto end
14+
"%MSBuildDir%MSBuild.exe" ..\ClassicShell.sln /m /t:Rebuild /p:Configuration="Setup" /p:Platform="Win32" /verbosity:minimal
15+
@if ERRORLEVEL 1 exit /b 1
1916

2017

2118
REM ********* Make en-US.dll
2219
cd ..
2320
start /wait ClassicShellSetup\ClassicShellUtility\Release\ClassicShellUtility.exe makeEN ClassicExplorer\Setup\ClassicExplorer32.dll ClassicStartMenu\Setup\ClassicStartMenuDLL.dll ClassicIE\Setup\ClassicIEDLL_32.dll ClassicShellUpdate\Release\ClassicShellUpdate.exe
24-
@if ERRORLEVEL 1 goto end
21+
@if ERRORLEVEL 1 exit /b 1
2522

2623
start /wait ClassicShellSetup\ClassicShellUtility\Release\ClassicShellUtility.exe extract en-US.dll en-US.csv
2724
copy en-US.dll Localization\English
@@ -112,18 +109,15 @@ REM ********* Build ADMX
112109
del Output\PolicyDefinitions.zip
113110
cd ..\Localization\English
114111
..\..\ClassicStartMenu\Setup\ClassicStartMenu.exe -saveadmx en-US
115-
@if ERRORLEVEL 1 goto end
112+
@if ERRORLEVEL 1 exit /b 1
116113
..\..\ClassicExplorer\Setup\ClassicExplorerSettings.exe -saveadmx en-US
117-
@if ERRORLEVEL 1 goto end
114+
@if ERRORLEVEL 1 exit /b 1
118115
..\..\ClassicIE\Setup\ClassicIE_32.exe -saveadmx en-US
119-
@if ERRORLEVEL 1 goto end
120-
"C:\Program Files\WinRAR\winrar" a -afzip -ep ..\..\ClassicShellSetup\Output\PolicyDefinitions.zip *.admx PolicyDefinitions.rtf
121-
"C:\Program Files\WinRAR\winrar" a -afzip -ep -apen-US ..\..\ClassicShellSetup\Output\PolicyDefinitions.zip *.adml
116+
@if ERRORLEVEL 1 exit /b 1
117+
md en-US
118+
copy /B *.adml en-US
119+
7z a ..\..\ClassicShellSetup\Output\PolicyDefinitions.zip *.admx en-US\*.adml PolicyDefinitions.rtf
120+
rd /Q /S en-US
122121
cd ..\..\ClassicShellSetup
123122

124-
125-
@goto EOF
126-
:end
127-
@SET CS_ERROR=1
128-
pause
129-
:EOF
123+
exit /b 0

ClassicShellSrc/ClassicShellSetup/BuildInstaller.bat

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ SET CS_VERSION_NUM=40301
55
SET CS_GUID32=8A99142D-5D6E-40b6-AF88-8BD46F0C5CB4
66
SET CS_GUID64=CABCE573-0A86-42fa-A52A-C7EA61D5BE08
77

8-
SET CS_ERROR=0
9-
108
REM ********* Build Help
9+
@setlocal EnableDelayedExpansion
1110
@if %CS_HAS_HELP%==1 (
11+
SET CS_ERROR=0
1212
if NOT %CS_LANG_FOLDER%==English mklink /J ..\Localization\%CS_LANG_FOLDER%\images ..\Localization\English\images
1313
hhc ..\Localization\%CS_LANG_FOLDER%\ClassicShell.hhp
1414
@REM looks like hhc returns 0 for error, >0 for success
1515
@if NOT ERRORLEVEL 1 @SET CS_ERROR=1
1616
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
1818
)
19+
@endlocal
1920
@if %CS_HAS_HELP%==0 (
2021
copy /Y ..\Localization\English\ClassicShell.chm ..\Localization\%CS_LANG_FOLDER%\ClassicShell.chm
2122
)
@@ -24,63 +25,61 @@ REM ********* Build Help
2425
@if %CS_HAS_README%==0 copy /Y ..\Localization\English\ClassicShellReadme.rtf ..\Localization\%CS_LANG_FOLDER%
2526

2627
@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
2829

2930
SET CS_INSTALLER_NAME=ClassicShellSetup_%CS_VERSION_STR%-%CS_LANG_NAME_SHORT%
3031
if %CS_LANG_NAME_SHORT%==en SET CS_INSTALLER_NAME=ClassicShellSetup_%CS_VERSION_STR%
3132

3233
md Temp
3334
del /Q Temp\*.*
3435

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
3637

3738
REM ********* Build 32-bit MSI
3839
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
4041

4142
@REM We need to suppress ICE38 and ICE43 because they apply only to per-user installation. We only support per-machine installs
4243
@REM We need to suppress ICE09 because the helper DLLs need to go into the system directory (for safety reasons)
4344
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
4546

4647

4748
REM ********* Build 64-bit MSI
4849
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
5051

5152
@REM We need to suppress ICE38 and ICE43 because they apply only to per-user installation. We only support per-machine installs
5253
@REM We need to suppress ICE09 because the helper DLLs need to go into the system directory (for safety reasons)
5354
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
5556

5657

5758
REM ********* Build MSI Checksums
5859
start /wait ClassicShellUtility\Release\ClassicShellUtility.exe crcmsi Temp
59-
@if ERRORLEVEL 1 goto end
60+
@if ERRORLEVEL 1 exit /b 1
6061

6162
REM ********* Build bootstrapper
6263
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\
6364

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
6667

6768
md Final
6869

6970
del Final\%CS_INSTALLER_NAME%.exe
7071
copy /B Release\ClassicShellSetup.exe Final\%CS_INSTALLER_NAME%.exe
7172

73+
if defined APPVEYOR (
74+
appveyor PushArtifact Release\ClassicShellSetup.exe -FileName %CS_INSTALLER_NAME%.exe
75+
)
76+
7277
md Output\Releases
7378
copy /B Final\%CS_INSTALLER_NAME%.exe Output\Releases\%CS_INSTALLER_NAME%.exe
7479

7580

76-
77-
78-
79-
@goto EOF
80-
:end
81-
@SET CS_ERROR=1
82-
pause
83-
:EOF
8481
SET CS_LANG_FOLDER=
8582
SET CS_LANG_NAME=
8683
SET CS_LANG_NAME_SHORT=
84+
85+
exit /b 0
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
@cd %~dp0
2+
13
@call BuildBinaries.bat
2-
@if %CS_ERROR%==1 goto end
4+
@if ERRORLEVEL 1 exit /b 1
35

46
@call _BuildEnglish.bat
5-
@if %CS_ERROR%==1 goto end
7+
@if ERRORLEVEL 1 exit /b 1
68

79
call BuildArchives.bat
810

9-
:end
11+
@exit /b 0

appveyor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 4.4.{build}
2+
pull_requests:
3+
do_not_increment_build_number: true
4+
branches:
5+
only:
6+
- master
7+
image: Visual Studio 2017
8+
shallow_clone: true
9+
install:
10+
- cmd: set PATH=C:\Program Files (x86)\WiX Toolset v3.11\bin;C:\Program Files (x86)\HTML Help Workshop;%PATH%
11+
build_script:
12+
- cmd: ClassicShellSrc\ClassicShellSetup\__MakeFinal.bat
13+
test: off

0 commit comments

Comments
 (0)