diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2015-06-01 21:38:39 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2015-06-01 21:38:39 +0300 |
commit | 5a8c7f505eb3e899d1d4dc5796e9e16ded231b47 (patch) | |
tree | 66001c59e21c99f98d4da156c3e8a0f856e17398 /installer | |
parent | e6b17b561d9743a27e515058c29f88b72111bc38 (diff) |
Update the Mumble installer to work with a versioned directory hierarchy.
This commit updates the Mumble installer to install all binaries except
mumble.exe into a "versioned root".
For example, a typical Mumble installation would look something like this
(rooted the install target, typically "C:\Program Files (x86)\Mumble"):
/mumble.exe
/Versions/1.3.0/mumble_app.dll
/Versions/1.3.0/mumble_ol.dll
/Versions/1.3.0/mumble_ol_x64.dll
/Versions/1.3.0/mumble_ol_helper.exe
/Versions/1.3.0/mumble_ol_helper_x64.exe
/Versions/1.3.0/mumble-g15-helper.exe
/Versions/1.3.0/[various runtime DLLs, D3DCompiler, MSVCRT, etc.]
This also changes the installer to disable use of the Windows restart
manager.
The Windows restart manager does not work too well when the Mumble
overlay is in use. In this case, the restart manager will prompt users
to restart all applications that the overlay is injected into.
Users see this as a big list of programs that they must close to
upgrade Mumble.
This can be very scary for anyone that does not know about the
inner workings of the Mumble overlay, and are new to Mumble.
It is an instant red flag for people, and they will associate
Mumble with malware, or be afraid that it will actually touch
anything in those programs and make them unusable in some fashion.
The combination of disabling the restart manager and the new
versioned directory hierarchy removes nearly all of the cases
where a user sees a "file in use" dialog when running the Mumble
installer.
The overlay DLLs will not trigger the "files in use" dialog anymore,
because upgrading to a newer version of Mumble will cause the new
overlay DLLs to be installed in a distinct directory.
The removal of the old overlay files will also not trigger the
"files in use" dialog. Their removal will simply be scheduled
on the next restart of the computer.
This commit also includes a forceful termination of "mumble.exe"
when performing an upgrade of the Mumble installation. This is done
because the removal of the restart manager functionality in the
installer unfortunately also removes the ability to have the restart
manager quit Mumble on upgrade.
With the implementation of the versioned directory hierarchy, there
is a problem with the placement of some of our dependencies, at least
when Mumble and Murmur are installed at the same time.
The "murmur.exe" executable expects dbghelp.dll, msvcr120.dll and
msvcp120.dll to be next to "murmur.exe". However, with this new
directory hierarchy for the client, those DLLs live in the versioned
root instead.
To remedy this, we include two copies of these dependencies. If Murmur
is not chosen during installation, only Mumble's copies are installed
in the versioned root. If Murmur is selected, the DLLs will also be
installed next to murmur.exe.
Diffstat (limited to 'installer')
-rw-r--r-- | installer/Files.wxs | 129 | ||||
-rw-r--r-- | installer/Product.wxs | 41 | ||||
-rw-r--r-- | installer/Settings.wxi | 4 |
3 files changed, 115 insertions, 59 deletions
diff --git a/installer/Files.wxs b/installer/Files.wxs index 1becd1355..d25e09ab6 100644 --- a/installer/Files.wxs +++ b/installer/Files.wxs @@ -2,31 +2,14 @@ <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include "Settings.wxi" ?> - <!-- Mumble --> + <!-- Mumble Version Specific --> <Fragment> - <DirectoryRef Id="INSTALLDIR"> - <Component Id="MumbleDesktopShortcutComponent" Guid="$(var.MumbleDesktopShortcutGuid)" KeyPath="yes"> - <Shortcut Id="MumbleDesktopShortcut" - Directory="DesktopFolder" - Name="Mumble" - WorkingDirectory="INSTALLDIR" - Target="[INSTALLDIR]mumble.exe"> - <ShortcutProperty Key="System.AppUserModel.ID" Value="net.sourceforge.mumble.Mumble" /> - </Shortcut> - </Component> - - <Component Id="mumble.exe" Guid="$(var.MumbleExeGuid)"> - <File Id="mumble.exe" Source="$(var.SourceDir)\release\mumble.exe" KeyPath="yes"> - <Shortcut Id="MumbleShortcut" Directory="ApplicationProgramsFolder" Name="Mumble" WorkingDirectory="INSTALLDIR"> - <ShortcutProperty Key="System.AppUserModel.ID" Value="net.sourceforge.mumble.Mumble" /> - </Shortcut> - </File> + <?ifdef VersionSubDir ?> + <DirectoryRef Id="VersionFolder"> + <?else ?> + <DirectoryRef Id="INSTALLDIR"> + <?endif ?> - <RegistryValue Root="HKCR" Key="mumble" Value="URL:Mumble" Type="string" /> - <RegistryValue Root="HKCR" Key="mumble" Name="URL Protocol" Value="" Type="string" /> - <RegistryValue Root="HKCR" Key="mumble\DefaultIcon" Value="[#mumble.exe]" Type="string" /> - <RegistryValue Root="HKCR" Key="mumble\shell\open\command" Value="[#mumble.exe] "%1"" Type="string" /> - </Component> <?ifdef StaticBuild ?> <Component Id="mumble_app.dll"> <File Source="$(var.SourceDir)\release\mumble_app.dll" KeyPath="yes" /> @@ -85,6 +68,61 @@ </Component> <?endif ?> + <?ifdef RedistDirVC12 ?> + <Component Id="msvcp120.dll"> + <File Source="$(var.RedistDirVC12)\msvcp120.dll" KeyPath="yes" /> + </Component> + <Component Id="msvcr120.dll"> + <File Source="$(var.RedistDirVC12)\msvcr120.dll" KeyPath="yes" /> + </Component> + <?endif ?> + + <Component Id="dbghelp.dll"> + <File Source="$(var.DebugToolsDir)\dbghelp.dll" KeyPath="yes" /> + </Component> + + <?ifdef D3DCompilerDLL ?> + <Component Id="d3dcompiler_43.dll"> + <File Source="$(var.System32x86Dir)\d3dcompiler_43.dll" KeyPath="yes" /> + </Component> + <Component Id="d3dcompiler_47.dll"> + <File Source="$(var.Win81SDKDir)\Redist\D3D\x64\d3dcompiler_47.dll" KeyPath="yes" /> + </Component> + <?endif ?> + + <?ifdef VersionSubDir ?> + </DirectoryRef> + <?else ?> + </DirectoryRef> + <?endif ?> + </Fragment> + + <!-- Mumble --> + <Fragment> + <DirectoryRef Id="INSTALLDIR"> + <Component Id="MumbleDesktopShortcutComponent" Guid="$(var.MumbleDesktopShortcutGuid)" KeyPath="yes"> + <Shortcut Id="MumbleDesktopShortcut" + Directory="DesktopFolder" + Name="Mumble" + WorkingDirectory="INSTALLDIR" + Target="[INSTALLDIR]mumble.exe"> + <ShortcutProperty Key="System.AppUserModel.ID" Value="net.sourceforge.mumble.Mumble" /> + </Shortcut> + </Component> + + <Component Id="mumble.exe" Guid="$(var.MumbleExeGuid)"> + <File Id="mumble.exe" Source="$(var.SourceDir)\release\mumble.exe" KeyPath="yes"> + <Shortcut Id="MumbleShortcut" Directory="ApplicationProgramsFolder" Name="Mumble" WorkingDirectory="INSTALLDIR"> + <ShortcutProperty Key="System.AppUserModel.ID" Value="net.sourceforge.mumble.Mumble" /> + </Shortcut> + </File> + + <RegistryValue Root="HKCR" Key="mumble" Value="URL:Mumble" Type="string" /> + <RegistryValue Root="HKCR" Key="mumble" Name="URL Protocol" Value="" Type="string" /> + <RegistryValue Root="HKCR" Key="mumble\DefaultIcon" Value="[#mumble.exe]" Type="string" /> + <RegistryValue Root="HKCR" Key="mumble\shell\open\command" Value="[#mumble.exe] "%1"" Type="string" /> + </Component> + <Component Id="MurmurDesktopShortcutComponent" Guid="$(var.MurmurDesktopShortcutGuid)" KeyPath="yes"> <Shortcut Id="MurmurDesktopShortcut" Directory="DesktopFolder" @@ -107,6 +145,20 @@ <File Source="$(var.SourceDir)\src\murmur\Murmur.ice" KeyPath="yes" /> </Component> + <?ifdef VersionSubDir ?> + <?ifdef RedistDirVC12 ?> + <Component Id="Murmur_msvcp120.dll"> + <File Id="Murmur_msvcp120.dll" Source="$(var.RedistDirVC12)\msvcp120.dll" KeyPath="yes" /> + </Component> + <Component Id="Murmur_msvcr120.dll"> + <File Id="Murmur_msvcr120.dll" Source="$(var.RedistDirVC12)\msvcr120.dll" KeyPath="yes" /> + </Component> + <?endif ?> + <Component Id="Murmur_dbghelp.dll"> + <File Id="Murmur_dbghelp.dll" Source="$(var.DebugToolsDir)\dbghelp.dll" KeyPath="yes" /> + </Component> + <?endif ?> + <?ifndef StaticBuild ?> <Component Id="qt.conf"> <File Source="$(var.SourceDir)\scripts\qt.conf" KeyPath="yes" /> @@ -129,33 +181,12 @@ <File Source="$(var.SourceDir)\installer\qt.txt" KeyPath="yes" /> </Component> - <Component Id="dbghelp.dll"> - <File Source="$(var.DebugToolsDir)\dbghelp.dll" KeyPath="yes" /> - </Component> - <?ifdef IntelCppDir ?> <Component Id="libmmd.dll"> <File Source="$(var.IntelCppDir)\libmmd.dll" KeyPath="yes" /> </Component> <?endif ?> - <?ifdef RedistDirVC12 ?> - <Component Id="msvcp120.dll"> - <File Source="$(var.RedistDirVC12)\msvcp120.dll" KeyPath="yes" /> - </Component> - <Component Id="msvcr120.dll"> - <File Source="$(var.RedistDirVC12)\msvcr120.dll" KeyPath="yes" /> - </Component> - <?endif ?> - - <?ifdef D3DCompilerDLL ?> - <Component Id="d3dcompiler_43.dll"> - <File Source="$(var.System32x86Dir)\d3dcompiler_43.dll" KeyPath="yes" /> - </Component> - <Component Id="d3dcompiler_47.dll"> - <File Source="$(var.Win81SDKDir)\Redist\D3D\x64\d3dcompiler_47.dll" KeyPath="yes" /> - </Component> - <?endif ?> </DirectoryRef> </Fragment> @@ -364,7 +395,15 @@ <!-- Directory tree --> <Fragment> <DirectoryRef Id="INSTALLDIR"> - <Directory Id="PluginFolder" Name="plugins" /> + <?ifdef VersionSubDir ?> + <Directory Id="VersionContainerFolder" Name="Versions"> + <Directory Id="VersionFolder" Name="$(var.VersionSubDir)"> + <Directory Id="PluginFolder" Name="plugins" /> + </Directory> + </Directory> + <?else ?> + <Directory Id="PluginFolder" Name="plugins" /> + <?endif ?> <?ifndef StaticBuild ?> <Directory Id="QtPluginFolder" Name="QtPlugins"> <Directory Id="QtPluginIconEnginesFolder" Name="iconengines" /> diff --git a/installer/Product.wxs b/installer/Product.wxs index af19483cd..05746d5e7 100644 --- a/installer/Product.wxs +++ b/installer/Product.wxs @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" + xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <?include "Settings.wxi" ?> <Product Id="*" Name="$(var.ProductName) $(var.ProductVersion)" Language="!(loc.LANG)" Version="$(var.ProductVersion)" Manufacturer="$(var.ProductManufacturer)" UpgradeCode="$(var.ProductUpgradeCode)"> @@ -15,6 +16,8 @@ <ProgressText Action="NSISUninstall">Uninstalling old version</ProgressText> </UI> + <util:CloseApplication Id="CloseMumble" RebootPrompt="no" EndSessionMessage="yes" Target="mumble.exe" /> + <Property Id="WixShellExecTarget" Value="[#mumble.exe]" /> <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" /> <UI> @@ -41,6 +44,7 @@ <Property Id="ARPURLINFOABOUT" Value="http://www.mumble.info/" /> <Property Id="ARPURLUPDATEINFO" Value="http://www.mumble.info/" /> <Property Id='ARPPRODUCTICON'>mumble.ico</Property> + <Property Id="MSIRESTARTMANAGERCONTROL" Value="Disable" /> <WixVariable Id="WixUILicenseRtf" Value="$(var.SourceDir)\installer\gpl.rtf" /> <WixVariable Id="WixUIBannerBmp" Value="$(var.SourceDir)\installer\bannrbmp.bmp" /> @@ -116,8 +120,6 @@ <ComponentRef Id="Changes.txt" /> <ComponentRef Id="qt.txt" /> - <ComponentRef Id="dbghelp.dll" /> - <?ifndef StaticBuild ?> <?ifdef ProtoBufDir ?> <ComponentRef Id="libprotobuf.dll" /> @@ -130,16 +132,6 @@ <?ifdef IntelCppDir ?> <ComponentRef Id="libmmd.dll"/> <?endif ?> - - <?ifdef RedistDirVC12 ?> - <ComponentRef Id="msvcp120.dll" /> - <ComponentRef Id="msvcr120.dll" /> - <?endif ?> - - <?ifdef D3DCompilerDLL ?> - <ComponentRef Id="d3dcompiler_43.dll" /> - <ComponentRef Id="d3dcompiler_47.dll" /> - <?endif ?> </ComponentGroup> <Feature Id="Mumble" Title="!(loc.MUMBLE_SEC_MUMBLE)" Description="!(loc.DESC_SectionMumble)" Level="1" AllowAdvertise="no" ConfigurableDirectory="INSTALLDIR" Display="expand"> @@ -176,6 +168,18 @@ <ComponentRef Id="mumble_g15_helper.exe" /> <?endif ?> + <?ifdef RedistDirVC12 ?> + <ComponentRef Id="msvcp120.dll" /> + <ComponentRef Id="msvcr120.dll" /> + <?endif ?> + + <ComponentRef Id="dbghelp.dll" /> + + <?ifdef D3DCompilerDLL ?> + <ComponentRef Id="d3dcompiler_43.dll" /> + <ComponentRef Id="d3dcompiler_47.dll" /> + <?endif ?> + <Feature Id="MumbleDesktopShortcutFeature" Title="!(loc.MUMBLE_SEC_DesktopShortcut)" Description="!(loc.DESC_DesktopShortcut)" InstallDefault="followParent" AllowAdvertise="no"> <ComponentRef Id="MumbleDesktopShortcutComponent" /> </Feature> @@ -196,7 +200,15 @@ <ComponentRef Id="murmur.exe" /> <ComponentRef Id="murmur.ini" /> <ComponentRef Id="Murmur.ice" /> - + + <?ifdef VersionSubDir ?> + <?ifdef RedistDirVC12 ?> + <ComponentRef Id="Murmur_msvcp120.dll" /> + <ComponentRef Id="Murmur_msvcr120.dll" /> + <?endif ?> + <ComponentRef Id="Murmur_dbghelp.dll" /> + <?endif ?> + <Feature Id="MurmurDesktopShortcutFeature" Title="!(loc.MUMBLE_SEC_DesktopShortcut)" Description="!(loc.DESC_DesktopShortcut)" InstallDefault="followParent" AllowAdvertise="no"> <ComponentRef Id="MurmurDesktopShortcutComponent" /> </Feature> @@ -220,6 +232,7 @@ <AppSearch Sequence='1' /> <Custom Action="SetNSISPath" After="AppSearch">NSISINSTALL</Custom> <Custom Action='NSISUninstall' After='InstallInitialize'>NSISINSTALL AND NOT Installed</Custom> + <Custom Action="WixCloseApplications" Before="InstallValidate">WIX_UPGRADE_DETECTED</Custom> </InstallExecuteSequence> </Product> </Wix> diff --git a/installer/Settings.wxi b/installer/Settings.wxi index 4d9dc8e43..07a45607b 100644 --- a/installer/Settings.wxi +++ b/installer/Settings.wxi @@ -155,4 +155,8 @@ <?define D3DCompilerDLL = true ?> <?endif ?> + <?ifdef env.MumbleVersionSubDir ?> + <?define VersionSubDir = "$(env.MumbleVersionSubDir)" ?> + <?endif ?> + </Include> |