Testing building msi with wix
This commit is contained in:
parent
9e0b41505c
commit
3c78ff5ad4
2 changed files with 60 additions and 3 deletions
17
.github/workflows/windows.yaml
vendored
17
.github/workflows/windows.yaml
vendored
|
@ -53,6 +53,7 @@ jobs:
|
|||
mkdir work/install
|
||||
Copy-Item -Recurse -Verbose syng work/install/syng
|
||||
Copy-Item -Verbose requirements-client.txt work/install/requirements.txt
|
||||
Copy-Item -Verbose resources/windows/syng.wxs work/install/syng.wxs
|
||||
Copy-Item -Verbose resources/icons/syng.ico work/install/
|
||||
Copy-Item -Verbose syng/static/background.png work/install/
|
||||
Copy-Item -Verbose syng/static/background20perc.png work/install/
|
||||
|
@ -85,9 +86,19 @@ jobs:
|
|||
|
||||
- name: Bundle Syng (install)
|
||||
run:
|
||||
pyinstaller -D -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' -n syng syng/main.py
|
||||
pyinstaller -D --contents-directory data -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' -n syng syng/main.py
|
||||
working-directory: ./work/install
|
||||
|
||||
# build msi
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
- name: Install WiX
|
||||
run: dotnet tool install --global wix
|
||||
- name: Build WiX on Windows
|
||||
run: wix build .\syng.wxs
|
||||
working-directory: ./work/install
|
||||
|
||||
|
||||
- name: Upload artifact (portable)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
@ -97,5 +108,5 @@ jobs:
|
|||
- name: Upload artifact (install)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Syng Version ${{ env.VERSION }}
|
||||
path: work/install/dist
|
||||
name: Syng Version ${{ env.VERSION }} Installer
|
||||
path: work/install/syng.msi
|
||||
|
|
46
resources/windows/syng.wxs
Normal file
46
resources/windows/syng.wxs
Normal file
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||
<Package Language="1033"
|
||||
Manufacturer="Syng Rocks"
|
||||
Name="Syng"
|
||||
Scope="perUserOrMachine"
|
||||
UpgradeCode="092e7e0b-5042-47a1-9673-544d9722f8df"
|
||||
Version="2.1.0">
|
||||
<MajorUpgrade DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit." />
|
||||
<Icon Id="syng.ico" SourceFile="syng.ico"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="syng.ico" />
|
||||
<StandardDirectory Id="TARGETDIR">
|
||||
<Directory Id="ProgramFilesFolder">
|
||||
<Directory Id="INSTALLFOLDER" Name="syng">
|
||||
<Component Id="ProductComponent">
|
||||
<File KeyPath="yes" Source="dist\syng.exe" Name="syng.exe"></File>
|
||||
<Shortcut Id="startmenuShortcut"
|
||||
Directory="ProgramMenuDir"
|
||||
Name="syng"
|
||||
WorkingDirectory='INSTALLFOLDER'
|
||||
Icon="syng.ico"
|
||||
IconIndex="0"
|
||||
Advertise="yes" />
|
||||
<Shortcut Id="desktopShortcut"
|
||||
Directory="DesktopFolder"
|
||||
Name="syng"
|
||||
WorkingDirectory='INSTALLFOLDER'
|
||||
Icon="syng.ico"
|
||||
IconIndex="0"
|
||||
Advertise="yes" />
|
||||
</Component>
|
||||
<Directory Name="data">
|
||||
<Files Include="dist\data\**">
|
||||
</Files>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</StandardDirectory>
|
||||
<Directory Id="ProgramMenuFolder" Name="Programs">
|
||||
<Directory Id="ProgramMenuDir" Name="syng"/>
|
||||
</Directory>
|
||||
<StandardDirectory Id="DesktopFolder"/>
|
||||
<Feature Id="syng">
|
||||
<ComponentRef Id="ProductComponent" />
|
||||
</Feature></Package>
|
||||
</Wix>
|
Loading…
Add table
Reference in a new issue