Skip to content

Commit 11bd5fa

Browse files
authored
Support for product version supplied by AppVeyor (#12)
* Set version of binaries based on CS_VERSION environment variable * Use AppVeyor supplied product version * Automatically generate ProductCode GUID * Convert version (CS_VERSION) to number (CS_VERSION_NUM)
1 parent 1595967 commit 11bd5fa

25 files changed

+123
-47
lines changed

ClassicShellSrc/ClassicExplorer/ClassicExplorer.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ END
266266
//
267267

268268
VS_VERSION_INFO VERSIONINFO
269-
FILEVERSION 4,3,1,0
270-
PRODUCTVERSION 4,3,1,0
269+
FILEVERSION _PRODUCT_VERSION
270+
PRODUCTVERSION _PRODUCT_VERSION
271271
FILEFLAGSMASK 0x3fL
272272
#ifdef _DEBUG
273273
FILEFLAGS 0x1L
@@ -284,12 +284,12 @@ BEGIN
284284
BEGIN
285285
VALUE "CompanyName", "IvoSoft"
286286
VALUE "FileDescription", "Adds classic Windows Explorer features"
287-
VALUE "FileVersion", "4, 3, 1, 0"
287+
VALUE "FileVersion", _PRODUCT_VERSION_STR
288288
VALUE "InternalName", "ClassicExplorer.dll"
289289
VALUE "LegalCopyright", "Copyright (C) 2009-2016, Ivo Beltchev"
290290
VALUE "OriginalFilename", "ClassicExplorer.dll"
291291
VALUE "ProductName", "Classic Shell"
292-
VALUE "ProductVersion", "4, 3, 1, 0"
292+
VALUE "ProductVersion", _PRODUCT_VERSION_STR
293293
END
294294
END
295295
BLOCK "VarFileInfo"

ClassicShellSrc/ClassicExplorer/ClassicExplorer.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,27 @@
7474
</ImportGroup>
7575
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
7676
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
77+
<Import Project="..\Version.props" />
7778
</ImportGroup>
7879
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
7980
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81+
<Import Project="..\Version.props" />
8082
</ImportGroup>
8183
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
8284
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
85+
<Import Project="..\Version.props" />
8386
</ImportGroup>
8487
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="PropertySheets">
8588
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
89+
<Import Project="..\Version.props" />
8690
</ImportGroup>
8791
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
8892
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
93+
<Import Project="..\Version.props" />
8994
</ImportGroup>
9095
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
9196
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97+
<Import Project="..\Version.props" />
9298
</ImportGroup>
9399
<PropertyGroup Label="UserMacros" />
94100
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

ClassicShellSrc/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ IDI_APPICON ICON "..\\..\\ClassicShellSetup\\Clas
6262
//
6363

6464
VS_VERSION_INFO VERSIONINFO
65-
FILEVERSION 4,3,1,0
66-
PRODUCTVERSION 4,3,1,0
65+
FILEVERSION _PRODUCT_VERSION
66+
PRODUCTVERSION _PRODUCT_VERSION
6767
FILEFLAGSMASK 0x17L
6868
#ifdef _DEBUG
6969
FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
8080
BEGIN
8181
VALUE "CompanyName", "IvoSoft"
8282
VALUE "FileDescription", "Classic Explorer Settings"
83-
VALUE "FileVersion", "4, 3, 1, 0"
83+
VALUE "FileVersion", _PRODUCT_VERSION_STR
8484
VALUE "InternalName", "ClassicExplorerSettings"
8585
VALUE "LegalCopyright", "Copyright (C) 2009-2016, Ivo Beltchev"
8686
VALUE "OriginalFilename", "ClassicExplorerSettings.exe"
8787
VALUE "ProductName", "Classic Shell"
88-
VALUE "ProductVersion", "4, 3, 1, 0"
88+
VALUE "ProductVersion", _PRODUCT_VERSION_STR
8989
END
9090
END
9191
BLOCK "VarFileInfo"

ClassicShellSrc/ClassicExplorer/ClassicExplorerSettings/ClassicExplorerSettings.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@
4444
</ImportGroup>
4545
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
4646
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
47+
<Import Project="..\..\Version.props" />
4748
</ImportGroup>
4849
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
4950
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
51+
<Import Project="..\..\Version.props" />
5052
</ImportGroup>
5153
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
5254
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
55+
<Import Project="..\..\Version.props" />
5356
</ImportGroup>
5457
<PropertyGroup Label="UserMacros" />
5558
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

ClassicShellSrc/ClassicIE/ClassicIE.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ END
5454
//
5555

5656
VS_VERSION_INFO VERSIONINFO
57-
FILEVERSION 4,3,1,0
58-
PRODUCTVERSION 4,3,1,0
57+
FILEVERSION _PRODUCT_VERSION
58+
PRODUCTVERSION _PRODUCT_VERSION
5959
FILEFLAGSMASK 0x17L
6060
#ifdef _DEBUG
6161
FILEFLAGS 0x1L
@@ -72,12 +72,12 @@ BEGIN
7272
BEGIN
7373
VALUE "CompanyName", "IvoSoft"
7474
VALUE "FileDescription", "Classic IE"
75-
VALUE "FileVersion", "4, 3, 1, 0"
75+
VALUE "FileVersion", _PRODUCT_VERSION_STR
7676
VALUE "InternalName", "ClassicIE"
7777
VALUE "LegalCopyright", "Copyright (C) 2009-2016, Ivo Beltchev"
7878
VALUE "OriginalFilename", "ClassicIE.exe"
7979
VALUE "ProductName", "Classic Shell"
80-
VALUE "ProductVersion", "4, 3, 1, 0"
80+
VALUE "ProductVersion", _PRODUCT_VERSION_STR
8181
END
8282
END
8383
BLOCK "VarFileInfo"

ClassicShellSrc/ClassicIE/ClassicIE.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,27 @@
7474
</ImportGroup>
7575
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
7676
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
77+
<Import Project="..\Version.props" />
7778
</ImportGroup>
7879
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
7980
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81+
<Import Project="..\Version.props" />
8082
</ImportGroup>
8183
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
8284
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
85+
<Import Project="..\Version.props" />
8386
</ImportGroup>
8487
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="PropertySheets">
8588
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
89+
<Import Project="..\Version.props" />
8690
</ImportGroup>
8791
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
8892
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
93+
<Import Project="..\Version.props" />
8994
</ImportGroup>
9095
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
9196
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97+
<Import Project="..\Version.props" />
9298
</ImportGroup>
9399
<PropertyGroup Label="UserMacros" />
94100
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

ClassicShellSrc/ClassicIE/ClassicIEDLL/ClassicIEDLL.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ END
5454
//
5555

5656
VS_VERSION_INFO VERSIONINFO
57-
FILEVERSION 4,3,1,0
58-
PRODUCTVERSION 4,3,1,0
57+
FILEVERSION _PRODUCT_VERSION
58+
PRODUCTVERSION _PRODUCT_VERSION
5959
FILEFLAGSMASK 0x3fL
6060
#ifdef _DEBUG
6161
FILEFLAGS 0x1L
@@ -72,12 +72,12 @@ BEGIN
7272
BEGIN
7373
VALUE "CompanyName", "IvoSoft"
7474
VALUE "FileDescription", "Customizations for the title bar and status bar of IE"
75-
VALUE "FileVersion", "4, 3, 1, 0"
75+
VALUE "FileVersion", _PRODUCT_VERSION_STR
7676
VALUE "InternalName", "ClassicIEDLL.dll"
7777
VALUE "LegalCopyright", "Copyright (C) 2009-2016, Ivo Beltchev"
7878
VALUE "OriginalFilename", "ClassicIEDLL.dll"
7979
VALUE "ProductName", "Classic Shell"
80-
VALUE "ProductVersion", "4, 3, 1, 0"
80+
VALUE "ProductVersion", _PRODUCT_VERSION_STR
8181
END
8282
END
8383
BLOCK "VarFileInfo"

ClassicShellSrc/ClassicIE/ClassicIEDLL/ClassicIEDLL.vcxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,27 @@
7474
</ImportGroup>
7575
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|Win32'" Label="PropertySheets">
7676
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
77+
<Import Project="..\..\Version.props" />
7778
</ImportGroup>
7879
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
7980
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
81+
<Import Project="..\..\Version.props" />
8082
</ImportGroup>
8183
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
8284
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
85+
<Import Project="..\..\Version.props" />
8386
</ImportGroup>
8487
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Setup|x64'" Label="PropertySheets">
8588
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
89+
<Import Project="..\..\Version.props" />
8690
</ImportGroup>
8791
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
8892
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
93+
<Import Project="..\..\Version.props" />
8994
</ImportGroup>
9095
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
9196
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
97+
<Import Project="..\..\Version.props" />
9298
</ImportGroup>
9399
<PropertyGroup Label="UserMacros" />
94100
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">

ClassicShellSrc/ClassicShellSetup/BuildInstaller.bat

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
@REM !!!!! CHANGE THE GUIDS WHEN CHANGING THE VERSION !!!!!
2-
SET CS_VERSION=4.3.1
3-
SET CS_VERSION_STR=4_3_1
4-
SET CS_VERSION_NUM=40301
5-
SET CS_GUID32=8A99142D-5D6E-40b6-AF88-8BD46F0C5CB4
6-
SET CS_GUID64=CABCE573-0A86-42fa-A52A-C7EA61D5BE08
7-
81
REM ********* Build Help
92
@setlocal EnableDelayedExpansion
103
@if %CS_HAS_HELP%==1 (
@@ -35,6 +28,12 @@ del /Q Temp\*.*
3528

3629
@if not exist ..\Localization\%CS_LANG_FOLDER%\ClassicShellText-%CS_LANG_NAME%.wxl exit /b 1
3730

31+
@REM Convvert CS_VERSION (X.Y.Z) into number (XXYYZZZZ)
32+
@set CS_VERSION_NUM=0
33+
@for /f "tokens=1,2,3 delims=." %%A in ("%CS_VERSION%") do (
34+
@set /a "CS_VERSION_NUM=%%A<<24|%%B<<16|%%C"
35+
)
36+
3837
REM ********* Build 32-bit MSI
3938
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%
4039
@if ERRORLEVEL 1 exit /b 1

ClassicShellSrc/ClassicShellSetup/ClassicShellSetup.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ IDI_APPICON ICON "ClassicShell.ico"
6262
//
6363

6464
VS_VERSION_INFO VERSIONINFO
65-
FILEVERSION 4,3,1,0
66-
PRODUCTVERSION 4,3,1,0
65+
FILEVERSION _PRODUCT_VERSION
66+
PRODUCTVERSION _PRODUCT_VERSION
6767
FILEFLAGSMASK 0x17L
6868
#ifdef _DEBUG
6969
FILEFLAGS 0x1L
@@ -80,12 +80,12 @@ BEGIN
8080
BEGIN
8181
VALUE "CompanyName", "IvoSoft"
8282
VALUE "FileDescription", "Adds classic shell features to Windows 7 and Windows 8"
83-
VALUE "FileVersion", "4, 3, 1, 0"
83+
VALUE "FileVersion", _PRODUCT_VERSION_STR
8484
VALUE "InternalName", "ClassicShellSetup"
8585
VALUE "LegalCopyright", "Copyright (C) 2009-2016, Ivo Beltchev"
8686
VALUE "OriginalFilename", "ClassicShellSetup.exe"
8787
VALUE "ProductName", "Classic Shell"
88-
VALUE "ProductVersion", "4, 3, 1, 0"
88+
VALUE "ProductVersion", _PRODUCT_VERSION_STR
8989
END
9090
END
9191
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)