Skip to content

Commit

Permalink
- adding TARGET to build-windows-installer.sh
Browse files Browse the repository at this point in the history
- adding TARGET to main.wxs
  • Loading branch information
KaiKorla committed Jul 21, 2024
1 parent 25de46b commit 11ddef6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/build-windows-installer.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
WXS_FILE="wix/main.wxs"
TARGET="x86_64-pc-windows-msvc"
VERSION=$(cat VERSION)

# install latest wix
Expand All @@ -9,4 +10,4 @@ dotnet tool install --global wix
wix extension add WixToolset.UI.wixext

# build the installer
wix build -pdbtype none -arch x64 -d PackageVersion=$VERSION $WXS_FILE -o halloy-installer.msi -ext WixToolset.UI.wixext
wix build -pdbtype none -arch x64 -d PackageVersion=$VERSION $WXS_FILE -d Target=$TARGET -o halloy-installer.msi -ext WixToolset.UI.wixext
4 changes: 2 additions & 2 deletions wix/main.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<ComponentGroup Id="MainComponents" Directory="INSTALLFOLDER">

<Component>
<File Id="Application" DiskId="1" Source="target/release/halloy.exe" KeyPath="yes">
<File Id="Application" DiskId="1" Source="target/$(Target)/release/halloy.exe" KeyPath="yes">
<Shortcut
Id="ApplicationStartMenuShortcutInFile"
Name="halloy.exe"
Expand All @@ -47,7 +47,7 @@
<RegistryValue Root="HKCR" Key="Halloy" Name="EditFlags" Value="2" Type="integer" />
<RegistryValue Root="HKCR" Key="Halloy" Name="FriendlyTypeName" Value="Web URL" Type="string" />
<RegistryValue Root="HKCR" Key="Halloy" Name="URL Protocol" Value="" Type="string" />
<RegistryValue Root="HKCR" Key="Halloy\DefaultIcon" Value="[INSTALLFOLDER]Halloy.exe,1" Type="string" />
<RegistryValue Root="HKCR" Key="Halloy\DefaultIcon" Value="[INSTALLFOLDER]halloy.exe,1" Type="string" />
<RegistryValue Root="HKCR" Key="Halloy\shell" Type="string" Value="open" />
<RegistryValue Root="HKCR" Key="Halloy\shell\open\command" Type="string" Value="&quot;[INSTALLFOLDER]Halloy.exe&quot; &quot;%1&quot;" />

Expand Down

0 comments on commit 11ddef6

Please sign in to comment.