diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-25 09:04:51 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-04-25 09:05:12 +0200 |
commit | 5eb094b301815f686db857624d78e345ce06c6f7 (patch) | |
tree | 3073a672899156e1959aab96024c403684727fe4 /installer | |
parent | installer: hardcode to 0.0.1 for now (diff) | |
download | wireguard-windows-5eb094b301815f686db857624d78e345ce06c6f7.tar.xz wireguard-windows-5eb094b301815f686db857624d78e345ce06c6f7.zip |
installer: Use more clever shortcut installation and dirtier upgrades
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'installer')
-rw-r--r-- | installer/build.bat | 4 | ||||
-rw-r--r-- | installer/wireguard.wxs | 24 |
2 files changed, 10 insertions, 18 deletions
diff --git a/installer/build.bat b/installer/build.bat index 1dc1da61..f6ef95af 100644 --- a/installer/build.bat +++ b/installer/build.bat @@ -5,8 +5,8 @@ rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved. for /f "tokens=3" %%a in ('findstr /r "[0-9.]*" ..\version.h') do set WIREGUARD_VERSION=%%a set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=% -rem While our version numbers remain whonky, just hardcode this to 0.0.1. -set WIREGUARD_VERSION=0.0.1 +rem While our version numbers remain whonky, just hardcode this to a version that makes msi always replace. +set WIREGUARD_VERSION=0.0.0.1 set STARTDIR=%cd% set OLDWIX=%WIX% diff --git a/installer/wireguard.wxs b/installer/wireguard.wxs index 96754ebf..ba416e2c 100644 --- a/installer/wireguard.wxs +++ b/installer/wireguard.wxs @@ -30,14 +30,17 @@ <Property Id="ARPPRODUCTICON" Value="icon.ico"/> <Property Id="ARPURLINFOABOUT" Value="https://www.wireguard.com/"/> + <Property Id="ARPNOREPAIR" Value="yes" /> + <Property Id="ARPNOMODIFY" Value="yes" /> <Property Id="DISABLEADVTSHORTCUTS" Value="yes"/> <!-- Upgrading --> <MajorUpgrade - AllowDowngrades="no" DowngradeErrorMessage="A newer version of [ProductName] is already installed." - Schedule="afterInstallExecute"/> + AllowDowngrades="no" AllowSameVersionUpgrades="yes" + DowngradeErrorMessage="A newer version of [ProductName] is already installed." + Schedule="afterInstallExecute" /> <Property Id="INSTALLFOLDERPREV"> <ComponentSearch Id="WireGuardExecutable" Guid="c3508d23-3362-47ce-9220-321bdb1a1acc"/> </Property> @@ -69,24 +72,13 @@ --> <ComponentGroup Id="WireGuardComponents"> <Component Directory="INSTALLFOLDER" Id="WireGuardExecutable" Guid="c3508d23-3362-47ce-9220-321bdb1a1acc"> - <File Source="..\wireguard.exe" KeyPath="yes"/> + <File Source="..\wireguard.exe" KeyPath="yes"> + <Shortcut Id="WireGuardStartMenuShortcut" Directory="ProgramMenuFolder" Name="WireGuard" Description="WireGuard: Fast, Modern, Secure VPN Tunnel" WorkingDirectory="INSTALLFOLDER" Advertise="yes" /> + </File> <ServiceControl Id="RemoveWireGuardManagerService" Name="WireGuardManager" Remove="both" Stop="both"></ServiceControl> <ServiceControl Id="RemoveWireGuardTunnelServices" Name="WireGuardTunnel$test" Remove="both" Stop="both"></ServiceControl> <!-- TODO: "test" is just a temporary hack. We need to enumerate all services that are "WireGuardTunnel$*" and remove those. --> </Component> - - <Component Directory="INSTALLFOLDER" Id="WireGuardStartMenuShortcut"> - <Shortcut - Id="WireGuardStartMenuShortcut" - Directory="ProgramMenuFolder" - Name="WireGuard" - Description="WireGuard: Fast, Modern, Secure VPN Tunnel" - Target="[INSTALLFOLDER]wireguard.exe" - WorkingDirectory="INSTALLFOLDER" - Icon="icon.ico"/> - <RemoveFolder Id="WireGuardStartMenuShortcut" Directory="ProgramMenuFolder" On="uninstall"/> - <RegistryValue Root="HKCU" Key="SOFTWARE\WireGuard" Name="StartMenuShortcut" Type="integer" Value="1" KeyPath="yes"/> - </Component> </ComponentGroup> <!-- |