diff options
author | sr55 <[email protected]> | 2020-08-29 17:31:23 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2020-08-29 17:31:44 +0100 |
commit | 05c6fd6e68cab550ce89045545ae2037c343fd06 (patch) | |
tree | 4ac6c091dadacc54d2a687ccfd7b10ef5b9e4825 | |
parent | c1f01154c451f6e59160c1ebcc683cb873906a7a (diff) |
WinGui: MSI installer improvements.
- Use a seperate install directory from the NSIS installer. It will by default install into a "HandBrakeTeam" folder in program files directory rather than "HandBrake".
- Add support for Nightly vs Release Builds
#522
-rw-r--r-- | win/CS/HandBrake.Installer/Product.wxs | 163 | ||||
-rw-r--r-- | win/CS/build.xml | 53 |
2 files changed, 120 insertions, 96 deletions
diff --git a/win/CS/HandBrake.Installer/Product.wxs b/win/CS/HandBrake.Installer/Product.wxs index 22e2d2b1b..6962ecadb 100644 --- a/win/CS/HandBrake.Installer/Product.wxs +++ b/win/CS/HandBrake.Installer/Product.wxs @@ -11,7 +11,19 @@ <?define packagePath = "..\HandBrakeWPF\bin\x64\Release" ?> - <Product Id="*" Name="HandBrake" Language="1033" Version="1.4.0.0" Manufacturer="HandBrake Team" UpgradeCode="fd19ef0e-77c4-47a6-b1e4-4cea0b3a4c93"> + <?if $(var.Configuration)=Debug ?> + <?define msiProductId = "fd19ef0e-77c4-47a6-b1e4-4cea0b3a4c94" ?> + <?define productName = "HandBrake Nightly" ?> + <?define installDir = "Nightly" ?> + <?define ToastActivatorCLSID = "" ?> + <?else ?> + <?define msiProductId = "fd19ef0e-77c4-47a6-b1e4-4cea0b3a4c93" ?> + <?define productName = "HandBrake" ?> + <?define installDir = "HandBrake" ?> + <?define ToastActivatorCLSID = "" ?> + <?endif ?> + + <Product Id="$(var.msiProductId)" Name="$(var.productName)" Language="1033" Version="1.4.0.0" Manufacturer="HandBrake Team" UpgradeCode="$(var.msiProductId)"> <Package InstallerVersion="200" Platform="x64" Compressed="yes" InstallScope="perMachine" /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> @@ -24,7 +36,7 @@ <Property Id="ARPHELPLINK" Value="https://www.handbrake.fr/docs"/> <Property Id="ARPURLINFOABOUT" Value="https://www.handbrake.fr"/> <Property Id="ARPNOREPAIR" Value="1"/> - <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" /> + <Property Id="WIXUI_INSTALLDIR" Value="APPDIR" /> <UIRef Id="WixUI_InstallDir" /> @@ -50,81 +62,81 @@ <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFiles64Folder"> - <Directory Id="INSTALLDIR" Name="HandBrake"> - - <Component Win64="yes" Id="ApplicationFiles" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42181"> - <!-- Core Application --> - <File Source="$(var.packagePath)\HandBrake.exe" /> - <File Source="$(var.packagePath)\HandBrake.exe.config"/> - <File Source="$(var.packagePath)\HandBrake.Worker.exe" /> - <File Source="$(var.packagePath)\HandBrake.Worker.exe.config"/> - <File Source="$(var.packagePath)\HandBrake.Interop.dll"/> - <File Source="$(var.packagePath)\hb.dll"/> - <File Source="$(var.packagePath)\portable.ini.template"/> - - <!-- 3rd Party Libraries --> - <File Source="$(var.packagePath)\Caliburn.Micro.dll"/> - <File Source="$(var.packagePath)\Caliburn.Micro.Platform.Core.dll"/> - <File Source="$(var.packagePath)\Caliburn.Micro.Platform.dll"/> - <File Source="$(var.packagePath)\GongSolutions.WPF.DragDrop.dll"/> - <File Source="$(var.packagePath)\Ookii.Dialogs.Wpf.dll"/> - <File Source="$(var.packagePath)\System.Windows.Interactivity.dll"/> - <File Source="$(var.packagePath)\Newtonsoft.Json.dll"/> - - </Component> - - <Directory Id="de_lang" Name="de"> - <Component Win64="yes" Id="de_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42182"> - <File Id="de_lang" Source="$(var.packagePath)\de\HandBrake.resources.dll" /> + <Directory Id="INSTALLDIR" Name="HandBrakeTeam"> + <Directory Id="APPDIR" Name="$(var.installDir)"> + + <Component Win64="yes" Id="ApplicationFiles" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42181"> + <!-- Core Application --> + <File Source="$(var.packagePath)\HandBrake.exe" /> + <File Source="$(var.packagePath)\HandBrake.exe.config"/> + <File Source="$(var.packagePath)\HandBrake.Worker.exe" /> + <File Source="$(var.packagePath)\HandBrake.Worker.exe.config"/> + <File Source="$(var.packagePath)\HandBrake.Interop.dll"/> + <File Source="$(var.packagePath)\hb.dll"/> + <File Source="$(var.packagePath)\portable.ini.template"/> + + <!-- 3rd Party Libraries --> + <File Source="$(var.packagePath)\Caliburn.Micro.dll"/> + <File Source="$(var.packagePath)\Caliburn.Micro.Platform.Core.dll"/> + <File Source="$(var.packagePath)\Caliburn.Micro.Platform.dll"/> + <File Source="$(var.packagePath)\GongSolutions.WPF.DragDrop.dll"/> + <File Source="$(var.packagePath)\Ookii.Dialogs.Wpf.dll"/> + <File Source="$(var.packagePath)\System.Windows.Interactivity.dll"/> + <File Source="$(var.packagePath)\Newtonsoft.Json.dll"/> </Component> - </Directory> - - <Directory Id="es_lang" Name="es"> - <Component Win64="yes" Id="es_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42183"> - <File Id="es_lang" Source="$(var.packagePath)\es\HandBrake.resources.dll" /> - </Component> - </Directory> - - <Directory Id="fr_lang" Name="fr"> - <Component Win64="yes" Id="fr_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42184"> - <File Id="fr_lang" Source="$(var.packagePath)\fr\HandBrake.resources.dll" /> - </Component> - </Directory> - - <Directory Id="ja_lang" Name="ja"> - <Component Win64="yes" Id="ja_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42185"> - <File Id="ja_lang" Source="$(var.packagePath)\ja\HandBrake.resources.dll" /> - </Component> - </Directory> - - <Directory Id="ko_lang" Name="ko"> - <Component Win64="yes" Id="ko_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42186"> - <File Id="ko_lang" Source="$(var.packagePath)\ko\HandBrake.resources.dll" /> - </Component> - </Directory> - - <Directory Id="ru_lang" Name="ru"> - <Component Win64="yes" Id="ru_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42187"> - <File Id="ru_lang" Source="$(var.packagePath)\ru\HandBrake.resources.dll" /> - </Component> - </Directory> - <Directory Id="tr_lang" Name="tr"> - <Component Win64="yes" Id="tr_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42188"> - <File Id="tr_lang" Source="$(var.packagePath)\tr\HandBrake.resources.dll" /> - </Component> + <Directory Id="de_lang" Name="de"> + <Component Win64="yes" Id="de_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42182"> + <File Id="de_lang" Source="$(var.packagePath)\de\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="es_lang" Name="es"> + <Component Win64="yes" Id="es_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42183"> + <File Id="es_lang" Source="$(var.packagePath)\es\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="fr_lang" Name="fr"> + <Component Win64="yes" Id="fr_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42184"> + <File Id="fr_lang" Source="$(var.packagePath)\fr\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="ja_lang" Name="ja"> + <Component Win64="yes" Id="ja_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42185"> + <File Id="ja_lang" Source="$(var.packagePath)\ja\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="ko_lang" Name="ko"> + <Component Win64="yes" Id="ko_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42186"> + <File Id="ko_lang" Source="$(var.packagePath)\ko\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="ru_lang" Name="ru"> + <Component Win64="yes" Id="ru_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42187"> + <File Id="ru_lang" Source="$(var.packagePath)\ru\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="tr_lang" Name="tr"> + <Component Win64="yes" Id="tr_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42188"> + <File Id="tr_lang" Source="$(var.packagePath)\tr\HandBrake.resources.dll" /> + </Component> + </Directory> + + <Directory Id="zh_lang" Name="zh"> + <Component Win64="yes" Id="zh_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42189"> + <File Id="zh_lang" Source="$(var.packagePath)\zh\HandBrake.resources.dll" /> + </Component> + </Directory> </Directory> - - <Directory Id="zh_lang" Name="zh"> - <Component Win64="yes" Id="zh_lang" Guid="cbae29e7-6d39-49bb-8c76-0305c3d42189"> - <File Id="zh_lang" Source="$(var.packagePath)\zh\HandBrake.resources.dll" /> - </Component> - </Directory> - </Directory> <Directory Id="ProgramMenuFolder"> - <Directory Id="DIR_Shortcuts" Name="HandBrake" /> + <Directory Id="DIR_Shortcuts" Name="$(var.productName)" /> </Directory> </Directory> @@ -135,22 +147,21 @@ <Component Id="AppShortcuts" Win64="yes"> <!-- Shortcuts for the shell --> - <Shortcut Id="SCUT_Shortcuts_Shell" Name="HandBrake" Target="[#HandBrake.exe]" WorkingDirectory="APPLICATIONROOTDIRECTORY"> + <Shortcut Id="SCUT_Shortcuts_Shell" Name="$(var.productName)" Target="[#HandBrake.exe]" WorkingDirectory="APPLICATIONROOTDIRECTORY"> <!--AUMID--> - <ShortcutProperty Key="System.AppUserModel.ID" Value="HandBrakeTeam.HandBrake"/> + <ShortcutProperty Key="System.AppUserModel.ID" Value="HandBrakeTeam.$(var.productName)"/> <!--COM CLSID--> <ShortcutProperty Key="System.AppUserModel.ToastActivatorCLSID" Value="{cbae29e7-6d39-49bb-8c76-0305c3d42181}"/> </Shortcut> <!-- Uninstall shortcut --> - <Shortcut Id="SCUT_Shortcuts_Uninstall" Name="Uninstall HandBrake" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]"/> + <Shortcut Id="SCUT_Shortcuts_Uninstall" Name="Uninstall $(var.productName)" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]"/> <RemoveFolder Id="REMOVE_Shortcuts" On="uninstall" /> - <RegistryValue Root="HKCU" Key="Software\HandBakeTeam\HandBrake" Name="installedShortcut" Type="integer" Value="1" KeyPath="yes" /> + <RegistryValue Root="HKCU" Key="Software\HandBakeTeam\$(var.installDir)" Name="installedShortcut" Type="integer" Value="1" KeyPath="yes" /> </Component> </DirectoryRef> - <!-- Installer Feature Set --> <Feature Id="DefaultFeature" Level="1"> <ComponentRef Id="ApplicationFiles"/> diff --git a/win/CS/build.xml b/win/CS/build.xml index f496711d9..663cd1ac9 100644 --- a/win/CS/build.xml +++ b/win/CS/build.xml @@ -19,8 +19,8 @@ <!-- Setup -->
<PropertyGroup>
- <Configuration>Release</Configuration>
- <Platform Condition="'$(Platform)'==''">x64</Platform>
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
@@ -31,24 +31,27 @@ <ProjectsToBuild Include="HandBrake.Installer\*wixproj" Exclude="$(MSBuildProjectFile)"/>
</ItemGroup>
- <!-- Dependencies -->
- <PropertyGroup>
- <NightlyDependsOn>BuildRelease;NightlyPostBuild;CodeSign</NightlyDependsOn>
- <InstallDependsOn>BuildRelease;ReleasePostBuild;CodeSign</InstallDependsOn>
- </PropertyGroup>
-
<!-- Builds /t: -->
<Target Name="Nightly" DependsOnTargets="$(NightlyDependsOn)"/>
<Target Name="Release" DependsOnTargets="$(InstallDependsOn)"/>
- <!-- Build All Components (WPF, Interop, Interop) -->
- <Target Name="BuildRelease">
- <Message Text="Project File Name = $(Platform)" />
- <MSBuild Projects ="@(ProjectsToBuild)"
- ContinueOnError ="false"
- Properties="Configuration=$(Configuration);Platform=$(Platform)" >
- <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
- </MSBuild>
+ <!-- Dependencies -->
+ <PropertyGroup>
+ <NightlyDependsOn>SetupForNightly;BuildRelease;NightlyPostBuild;CodeSign</NightlyDependsOn>
+ <InstallDependsOn>SetupForRelease;BuildRelease;ReleasePostBuild;CodeSign</InstallDependsOn>
+ </PropertyGroup>
+
+ <!-- Setup -->
+ <Target Name="SetupForNightly">
+ <PropertyGroup>
+ <Configuration>Debug</Configuration>
+ </PropertyGroup>
+ </Target>
+
+ <Target Name="SetupForRelease">
+ <PropertyGroup>
+ <Configuration>Release</Configuration>
+ </PropertyGroup>
</Target>
<!-- Code Signing Configuration -->
@@ -59,18 +62,28 @@ <PropertyGroup Condition="'$(SignTimestampServer)'!=''">
<SignTimestamp Condition="'$(SignTimestampServer)'!=''" >/t</SignTimestamp>
</PropertyGroup>
-
+
<PropertyGroup Condition="'$(SignThumbprint)'!=''">
<SignType>/sha1</SignType>
<SignEnabled>true</SignEnabled>
</PropertyGroup>
-
- <PropertyGroup Condition="'$(PfxFile)'!=''">
+
+ <PropertyGroup Condition="'$(PfxFile)'!=''">
<SignType>/f</SignType>
<SignPwd Condition="'$(PfxPwd)'!=''">/p</SignPwd>
<SignEnabled>true</SignEnabled>
</PropertyGroup>
+ <!-- Build All Components (WPF, Interop, Interop) -->
+ <Target Name="BuildRelease">
+ <Message Text="Project File Name = $(Platform)" />
+ <MSBuild Projects ="@(ProjectsToBuild)"
+ ContinueOnError ="false"
+ Properties="Configuration=$(Configuration);Platform=$(Platform)" >
+ <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/>
+ </MSBuild>
+ </Target>
+
<!-- Post Build Events -->
<Target Name="NightlyPostBuild">
<Exec Command="copy $(MSBuildProjectDirectory)\HandBrakeWPF\Installer\MakeNightly64.nsi $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x64\Release /Y" />
@@ -89,7 +102,7 @@ <Exec Command="xcopy $(MSBuildProjectDirectory)\doc $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x64\Release\doc /I /Y" />
<Exec Command="makensis $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x64\Release\Installer64.nsi" />
- <Exec Command="copy $(MSBuildProjectDirectory)\HandBrake.Installer\bin\$(Platform)\$(Configuration)\HandBrake.msi $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x64\Release\HandBrake-Nightly-x86_64-Win_GUI.msi /Y" />
+ <Exec Command="copy $(MSBuildProjectDirectory)\HandBrake.Installer\bin\$(Platform)\$(Configuration)\HandBrake.msi $(MSBuildProjectDirectory)\HandBrakeWPF\bin\x64\Release\HandBrake-Version-x86_64-Win_GUI.msi /Y" />
</Target>
<Target Name="CodeSign" Condition="'$(SignEnabled)' == 'true'">
|