X Tutup
Skip to content

Commit 2fa3de9

Browse files
committed
Resolve PR feedback
1 parent cb599af commit 2fa3de9

File tree

3 files changed

+27
-7
lines changed

3 files changed

+27
-7
lines changed

.github/workflows/releases.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ jobs:
132132
ZIP_FILE: ${{ steps.download_exe.outputs.zip }}
133133
run: |
134134
name="$(basename "$ZIP_FILE" ".zip")"
135-
printf "::set-output name=msi::%s\n" "$name.msi"
136-
msbuild .\build\windows\gh.wixproj /p:SourceDir="$PWD" /p:OutputPath="$PWD" /p:OutputName="$name" /p:ProductVersion="${GITHUB_REF#refs/tags/}"
135+
msbuild .\build\windows\gh.wixproj /p:SourceDir="$PWD" /p:OutputPath="$PWD" /p:OutputName="$name" /p:ProductVersion="${GITHUB_REF#refs/tags/v}"
137136
- name: Obtain signing cert
138137
id: obtain_cert
139138
env:

build/windows/gh.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
$(DefineConstants);
1414
ProductVersion=$(ProductVersion);
1515
</DefineConstants>
16+
<SuppressIces Condition="'$(Platform)' == 'arm' Or '$(Platform)' == 'arm64'">ICE39</SuppressIces>
1617
<DefineSolutionProperties>false</DefineSolutionProperties>
1718
<WixTargetsPath Condition="'$(WixTargetsPath)' == ''">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
1819
</PropertyGroup>

build/windows/gh.wxs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,27 @@
55
<?endif?>
66

77
<!-- Define a unique UpgradeCode per platform -->
8-
<?define UpgradeCode=8CFB9531-B959-4E1B-AA2E-4AF0FFCC4AF4?>
8+
<?if $(var.Platform) = "x64"?>
9+
<?define InstallerVersion = "200"?>
10+
<?define UpgradeCode = "8CFB9531-B959-4E1B-AA2E-4AF0FFCC4AF4"?>
11+
<?define ProgramFilesFolder = "ProgramFiles64Folder"?>
12+
<?elseif $(var.Platform) = "x86"?>
13+
<?define InstallerVersion = "200"?>
14+
<?define UpgradeCode = "767EC5D2-C8F0-4912-9901-45E21F59A284"?>
15+
<?define ProgramFilesFolder = "ProgramFilesFolder"?>
16+
<?elseif $(var.Platform) = "arm64"?>
17+
<?define InstallerVersion = "500"?>
18+
<?define UpgradeCode = "5D15E95C-F979-41B0-826C-C33C8CB5A7EB"?>
19+
<?define ProgramFilesFolder = "ProgramFiles64Folder"?>
20+
<?elseif $(var.Platform) = "arm"?>
21+
<?define InstallerVersion = "500"?>
22+
<?define UpgradeCode = "DDDE52AA-42DA-404B-9238-77DC86117CFF"?>
23+
<?define ProgramFilesFolder = "ProgramFilesFolder"?>
24+
<?endif?>
925

1026
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
1127
<Product Id="*" Name="GitHub CLI" Version="$(var.ProductVersion)" Language="1033" Manufacturer="GitHub, Inc." UpgradeCode="$(var.UpgradeCode)">
12-
<Package Compressed="yes" InstallerVersion="200" InstallScope="perMachine"/>
28+
<Package Compressed="yes" InstallerVersion="$(var.InstallerVersion)" InstallScope="perMachine"/>
1329
<MediaTemplate EmbedCab="yes"/>
1430

1531
<!-- Remove older product(s) early but within the transaction -->
@@ -21,7 +37,7 @@
2137
</Upgrade>
2238

2339
<Directory Id="TARGETDIR" Name="SourceDir">
24-
<Directory Id="ProgramFiles64Folder" Name="Program Files">
40+
<Directory Id="$(var.ProgramFilesFolder)" Name="Program Files">
2541
<Directory Id="INSTALLDIR" Name="GitHub CLI"/>
2642
</Directory>
2743
</Directory>
@@ -35,15 +51,19 @@
3551
<!-- @Guid will be automatically and durably assigned based on key path -->
3652
<Component Directory="INSTALLDIR">
3753
<File Name="gh.exe"/>
54+
<Environment Id="Path" Action="set" Name="PATH" Part="last" System="yes" Value="[INSTALLDIR]"/>
3855
</Component>
3956

4057
<!-- Persist the INSTALLDIR and restore it in subsequent installs -->
4158
<Component Directory="INSTALLDIR">
4259
<RegistryValue Root="HKLM" Key="SOFTWARE\GitHub\CLI" Name="InstallDir" Type="string" Value="[INSTALLDIR]"/>
4360
</Component>
4461

45-
<Component Id="Env" Guid="94FAAC3D-4478-431C-8497-FBA55DCFB249" Directory="TARGETDIR">
46-
<Environment Id="Path" Action="set" Name="PATH" Part="last" System="yes" Value="[INSTALLDIR]"/>
62+
<Component Id="OlderX86Env" Guid="50C15744-A674-404B-873C-6B58957E2A32" Directory="TARGETDIR" Win64="no">
63+
<Condition><![CDATA[OLDERX86VERSIONDETECTED]]></Condition>
64+
65+
<!-- Clean up the old x86 package default directory from the user environment -->
66+
<Environment Id="OlderX86Path" Action="remove" Name="PATH" Part="last" System="no" Value="[ProgramFilesFolder]GitHub CLI\"/>
4767
</Component>
4868
</Feature>
4969

0 commit comments

Comments
 (0)
X Tutup