forked from cisco/ChezScheme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor windows installers and fix vcredist
- Separate 64 and 32 bit MSIs - Add wix bundle to combine MSIs into single installer - Use basic wix UI - Use merge modules to install vcredist package - Add script to locate vcredist merge modules - Fix installer status text by adding WixUI_ErrorProgressText ref Merge modules seems to be the preferred method for installing the redistributable package, which should decrease the package size and speed up installation. This commit also addresses a bug where the installer does not work when VC redistributable is not already installed. The 32 and 64 bit components were split into separate MSIs because Windows Installer only officially supports packages containing a single architecture. A package bundle is then created containing both MSIs so only a single file needs to be distributed. There seemed to be no trivial way to get the path to the vcredist merge modules bundled with visual studio so I added a script (locate-vcredist.bat) that handles this. It will need to be updated in the future for compatibility with newer VS platform toolsets. Some paths and name were changed, here's a summary: 32-bit install path: C:\Program Files (x86)\Chez Scheme 9.4.1\ 64-bit install path: C:\Program Files\Chez Scheme 9.4.1\ installer file name: ChezScheme.exe installer product name: Chez Scheme 9.4.1 x64
- Loading branch information
Showing
10 changed files
with
244 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/*.wixobj | ||
/*.wixpdb | ||
/Chez Scheme.msi | ||
*.exe | ||
*.msi | ||
*.wixobj | ||
*.wixpdb | ||
/vcredist.wxs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?define ProductName = "Chez Scheme"?> | ||
<?define Manufacturer = "Cisco Systems, Inc."?> | ||
<?define UpgradeCode = "f1d9058d-fb72-4896-862d-f332388cf392"?> | ||
|
||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" | ||
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"> | ||
<Bundle Name="$(var.ProductName) $(var.Version)" | ||
Version="$(var.Version)" | ||
Manufacturer="$(var.Manufacturer)" | ||
UpgradeCode="$(var.UpgradeCode)"> | ||
|
||
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"> | ||
<bal:WixStandardBootstrapperApplication | ||
LicenseFile="license.rtf" | ||
LogoFile="cs.png" | ||
SuppressOptionsUI="yes" /> | ||
</BootstrapperApplicationRef> | ||
|
||
<Chain> | ||
<MsiPackage SourceFile="ChezScheme32.msi" Cache="yes" /> | ||
<MsiPackage InstallCondition="VersionNT64" SourceFile="ChezScheme64.msi" Cache="yes" /> | ||
</Chain> | ||
</Bundle> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@call "../c/vs.bat" x86 | ||
|
||
@IF "%VisualStudioVersion%"=="" ( GOTO error-undefined-vs ) | ||
|
||
@IF "%VisualStudioVersion%"=="14.0" ( | ||
SET "Path32=%CommonProgramFiles(x86)%\Merge Modules\Microsoft_VC140_CRT_x86.msm" | ||
SET "Path64=%CommonProgramFiles(x86)%\Merge Modules\Microsoft_VC140_CRT_x64.msm" | ||
) | ||
|
||
@IF "%VisualStudioVersion%"=="15.0" ( | ||
@IF EXIST "%VCINSTALLDIR%Redist\MSVC\14.10.25008" ( | ||
@SET "Path32=%VCINSTALLDIR%Redist\MSVC\14.10.25008\MergeModules\Microsoft_VC150_CRT_x86.msm" | ||
@SET "Path64=%VCINSTALLDIR%Redist\MSVC\14.10.25008\MergeModules\Microsoft_VC150_CRT_x64.msm" | ||
) | ||
|
||
@IF EXIST "%VCINSTALLDIR%Redist\MSVC\14.11.25325" ( | ||
@SET "Path32=%VCINSTALLDIR%Redist\MSVC\14.11.25325\MergeModules\Microsoft_VC141_CRT_x86.msm" | ||
@SET "Path64=%VCINSTALLDIR%Redist\MSVC\14.11.25325\MergeModules\Microsoft_VC141_CRT_x64.msm" | ||
) | ||
) | ||
|
||
@DEL vcredist.wxs >nul 2>&1 | ||
|
||
IF "%Path32%"=="" ( GOTO error-unknown-vs ) | ||
IF NOT EXIST "%Path32%" ( GOTO error-32-doesnt-exist ) | ||
IF NOT EXIST "%Path64%" ( GOTO error-64-doesnt-exist ) | ||
|
||
@( | ||
@ECHO ^<?xml version="1.0" encoding="utf-8"?^> | ||
@ECHO ^<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"^> | ||
@ECHO ^<Fragment^> | ||
@ECHO ^<DirectoryRef Id="TARGETDIR"^> | ||
@ECHO ^<Merge Id="VCRedist64Merge" SourceFile="%Path64%" Language="0" DiskId="1" /^> | ||
@ECHO ^</DirectoryRef^> | ||
@ECHO ^</Fragment^> | ||
@ECHO ^<Fragment^> | ||
@ECHO ^<DirectoryRef Id="TARGETDIR"^> | ||
@ECHO ^<Merge Id="VCRedist32Merge" SourceFile="%Path32%" Language="0" DiskId="1" /^> | ||
@ECHO ^</DirectoryRef^> | ||
@ECHO ^</Fragment^> | ||
@ECHO ^<Fragment^> | ||
@ECHO ^<Feature Id="VCRedist64" Title="Visual C++ Runtime (64-bit)" AllowAdvertise="no" Display="hidden" Level="1"^> | ||
@ECHO ^<MergeRef Id="VCRedist64Merge" /^> | ||
@ECHO ^</Feature^> | ||
@ECHO ^</Fragment^> | ||
@ECHO ^<Fragment^> | ||
@ECHO ^<Feature Id="VCRedist32" Title="Visual C++ Runtime (32-bit)" AllowAdvertise="no" Display="hidden" Level="1"^> | ||
@ECHO ^<MergeRef Id="VCRedist32Merge" /^> | ||
@ECHO ^</Feature^> | ||
@ECHO ^</Fragment^> | ||
@ECHO ^</Wix^> | ||
) > vcredist.wxs | ||
|
||
@ECHO Built vcredist.wxs | ||
@EXIT /b 0 | ||
|
||
:error-undefined-vs | ||
@ECHO Error building vcredist.wxs: Visual Studio version not defined. | ||
@EXIT /b 1 | ||
|
||
:error-unknown-vs | ||
@ECHO Error building vcredist.wxs: Unexpected Visual Studio version. | ||
@EXIT /b 1 | ||
|
||
:error-32-doesnt-exist | ||
@ECHO Error building vcredist.wxs: Merge Module couldn't be found: | ||
@ECHO %Path32% | ||
@EXIT /b 1 | ||
|
||
:error-64-doesnt-exist | ||
@ECHO Error building vcredist.wxs: Merge Module couldn't be found: | ||
@ECHO %Path64% | ||
@EXIT /b 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,84 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?define ProductName = "Chez Scheme Version $(var.Version)"?> | ||
|
||
<?define ProductName = "Chez Scheme"?> | ||
<?define Manufacturer = "Cisco Systems, Inc."?> | ||
|
||
<?if $(sys.BUILDARCH)="x86"?> | ||
<?define UpgradeCode="e183c83e-1216-446f-bee1-f25db3297efa"?> | ||
<?define PlatformProgramFilesFolder="ProgramFilesFolder"?> | ||
<?elseif $(sys.BUILDARCH)="x64"?> | ||
<?define UpgradeCode="07a89f71-9c12-4e7d-b618-f7c255337640"?> | ||
<?define PlatformProgramFilesFolder="ProgramFiles64Folder"?> | ||
<?else?> | ||
<?error Unsupported value of sys.BUILDARCH=$(sys.BUILDARCH)?> | ||
<?endif?> | ||
|
||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<Product | ||
Name="$(var.ProductName)" | ||
Id="49f75024-1225-42e4-aa8d-15ddb60a13d2" | ||
UpgradeCode="e183c83e-1216-446f-bee1-f25db3297efa" | ||
Name="$(var.ProductName) $(var.Version) $(sys.BUILDARCH)" | ||
Id="*" | ||
UpgradeCode="$(var.UpgradeCode)" | ||
Language="1033" | ||
Codepage="1252" | ||
Version="$(var.Version)" | ||
Manufacturer="$(var.Manufacturer)"> | ||
<Package | ||
InstallerVersion="301" | ||
Keywords="Installer" | ||
Description="$(var.ProductName) Installer" | ||
Manufacturer="$(var.Manufacturer)" | ||
InstallScope="perMachine" | ||
Languages="1033" | ||
Compressed="yes" | ||
SummaryCodepage="1252"/> | ||
|
||
<MajorUpgrade | ||
AllowDowngrades="no" | ||
DowngradeErrorMessage="A newer version is already installed." | ||
AllowSameVersionUpgrades="yes" /> | ||
|
||
<MediaTemplate EmbedCab="yes"/> | ||
<Directory Id="TARGETDIR" Name="SourceDir"> | ||
<Directory Id="ProgramFilesFolder" Name="Program Files"> | ||
<Directory Id="APPLICATIONFOLDER" Name="$(var.ProductName)"> | ||
|
||
<Directory Id="TARGETDIR" Name="SourceDir" DiskId="1"> | ||
<Directory Id="$(var.PlatformProgramFilesFolder)"> | ||
<Directory Id="APPLICATIONFOLDER" Name="$(var.ProductName) $(var.Version)"> | ||
<Directory Id="D_bin" Name="bin"/> | ||
<Directory Id="D_boot" Name="boot"/> | ||
<Directory Id="D_examples" Name="examples"/> | ||
</Directory> | ||
</Directory> | ||
<Directory Id="ProgramMenuFolder"> | ||
<Directory Id="D_shortcuts" Name="$(var.ProductName)"/> | ||
<Directory Id="D_shortcuts" Name="$(var.ProductName) $(var.Version)"/> | ||
</Directory> | ||
</Directory> | ||
|
||
<Feature Id="Examples" Level="1" Title="Chez Scheme examples"> | ||
<ComponentGroupRef Id="examples"/> | ||
</Feature> | ||
<Feature Id="i3nt" Level="1" Title="Chez Scheme 32-bit nonthreaded"> | ||
<ComponentGroupRef Id="i3nt"/> | ||
</Feature> | ||
<Feature Id="ti3nt" Level="1" Title="Chez Scheme 32-bit threaded"> | ||
<ComponentGroupRef Id="ti3nt"/> | ||
</Feature> | ||
<Feature Id="a6nt" Level="1" Title="Chez Scheme 64-bit nonthreaded"> | ||
<ComponentGroupRef Id="a6nt"/> | ||
<Condition Level="0">NOT VersionNT64</Condition> | ||
</Feature> | ||
<Feature Id="ta6nt" Level="1" Title="Chez Scheme 64-bit threaded"> | ||
<ComponentGroupRef Id="ta6nt"/> | ||
<Condition Level="0">NOT VersionNT64</Condition> | ||
</Feature> | ||
|
||
<?if $(sys.BUILDARCH)="x86"?> | ||
<Feature Id="i3nt" Level="1" Title="Chez Scheme 32-bit nonthreaded"> | ||
<ComponentGroupRef Id="i3nt"/> | ||
</Feature> | ||
<Feature Id="ti3nt" Level="1" Title="Chez Scheme 32-bit threaded"> | ||
<ComponentGroupRef Id="ti3nt"/> | ||
</Feature> | ||
<FeatureRef Id="VCRedist32"/> | ||
<?endif?> | ||
|
||
<?if $(sys.BUILDARCH)="x64"?> | ||
<Feature Id="a6nt" Level="1" Title="Chez Scheme 64-bit nonthreaded"> | ||
<ComponentGroupRef Id="a6nt"/> | ||
</Feature> | ||
<Feature Id="ta6nt" Level="1" Title="Chez Scheme 64-bit threaded"> | ||
<ComponentGroupRef Id="ta6nt"/> | ||
</Feature> | ||
<FeatureRef Id="VCRedist64"/> | ||
<?endif?> | ||
|
||
<Icon Id="cs.ico" SourceFile="../c/cs.ico"/> | ||
<Property Id="VCRUNTIME_X86_DLL"> | ||
<ComponentSearch | ||
Id="vcruntime_x86" | ||
Guid="E8E39D3B-4F35-36D8-B892-4B28336FE041"/> | ||
</Property> | ||
<Property Id="VCRUNTIME_X64_DLL"> | ||
<ComponentSearch | ||
Id="vcruntime_x64" | ||
Guid="B33258FD-750C-3B42-8BE4-535B48E97DB4"/> | ||
</Property> | ||
<Binary Id="vcredist_x86" SourceFile="vc_redist.x86.exe"/> | ||
<CustomAction | ||
Id="vcredist_x86_CA" | ||
BinaryKey="vcredist_x86" | ||
Impersonate="yes" | ||
Execute="deferred" | ||
ExeCommand="/quiet" | ||
Return="check"/> | ||
<Binary Id="vcredist_x64" SourceFile="vc_redist.x64.exe"/> | ||
<CustomAction | ||
Id="vcredist_x64_CA" | ||
BinaryKey="vcredist_x64" | ||
Impersonate="yes" | ||
Execute="deferred" | ||
ExeCommand="/quiet" | ||
Return="check"/> | ||
<InstallExecuteSequence> | ||
<Custom Action="vcredist_x86_CA" Before="InstallFinalize"> | ||
NOT VCRUNTIME_X86_DLL | ||
</Custom> | ||
<Custom Action="vcredist_x64_CA" Before="InstallFinalize"> | ||
NOT VCRUNTIME_X64_DLL AND VersionNT64 | ||
</Custom> | ||
</InstallExecuteSequence> | ||
<Property Id="ARPPRODUCTICON" Value="cs.ico"/> | ||
<UIRef Id="WixUI_Advanced"/> | ||
<WixVariable Id="WixUILicenseRtf" Value="license.rtf"/> | ||
<Property Id="ApplicationFolderName" Value="$(var.ProductName)"/> | ||
<Property Id="WixAppFolder" Value="WixPerMachineFolder"/> | ||
|
||
<UIRef Id="SimpleUI"/> | ||
</Product> | ||
</Wix> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
<Fragment> | ||
<UI Id="SimpleUI"> | ||
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> | ||
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> | ||
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> | ||
|
||
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> | ||
<Property Id="WixUI_Mode" Value="Minimal" /> | ||
|
||
<DialogRef Id="ErrorDlg" /> | ||
<DialogRef Id="FatalError" /> | ||
<DialogRef Id="FilesInUse" /> | ||
<DialogRef Id="MsiRMFilesInUse" /> | ||
<DialogRef Id="PrepareDlg" /> | ||
<DialogRef Id="ProgressDlg" /> | ||
<DialogRef Id="ResumeDlg" /> | ||
<DialogRef Id="UserExit" /> | ||
|
||
<Dialog Id="SimpleWelcomeDlg" Width="370" Height="270" Title="!(loc.WelcomeDlg_Title)"> | ||
<Control Id="Next" Type="PushButton" ElevationShield="yes" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&Install" > | ||
<Publish Property="WixUI_InstallMode" Value="Update">Installed AND PATCH</Publish> | ||
</Control> | ||
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> | ||
<Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> | ||
</Control> | ||
<Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" /> | ||
<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Disabled="yes" Text="!(loc.WixUIBack)" /> | ||
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> | ||
<Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="The Setup Wizard will install [ProductName] on your computer. Click Install to continue or Cancel to exit the Setup Wizard." > | ||
<Condition Action="show">NOT Installed OR NOT PATCH</Condition> | ||
<Condition Action="hide">Installed AND PATCH</Condition> | ||
</Control> | ||
<Control Id="PatchDescription" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeUpdateDlgDescriptionUpdate)" > | ||
<Condition Action="show">Installed AND PATCH</Condition> | ||
<Condition Action="hide">NOT Installed OR NOT PATCH</Condition> | ||
</Control> | ||
<Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" /> | ||
</Dialog> | ||
|
||
<InstallUISequence> | ||
<Show Dialog="SimpleWelcomeDlg" Before="ProgressDlg" Overridable="yes">NOT Installed OR PATCH</Show> | ||
</InstallUISequence> | ||
|
||
<Publish Dialog="SimpleWelcomeDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish> | ||
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish> | ||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> | ||
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> | ||
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> | ||
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> | ||
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish> | ||
|
||
<Property Id="ARPNOMODIFY" Value="1" /> | ||
</UI> | ||
<UIRef Id="WixUI_ErrorProgressText" /> | ||
<UIRef Id="WixUI_Common" /> | ||
</Fragment> | ||
</Wix> |
Binary file not shown.
Binary file not shown.