Skip to content

Commit 3b1bb2c

Browse files
committed
Build - further automate windows build process
Still more work to be done here!
1 parent 8dfc4f9 commit 3b1bb2c

File tree

4 files changed

+36
-28
lines changed

4 files changed

+36
-28
lines changed

app/gui/qt/wix/BUILD_MSI.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# How to build an MSI installer using WiX
2+
3+
1. Build `sonic-pi.exe` and run it to test.
4+
2. Copy wix directory to top level sonic-pi directory
5+
3. Remove files in `etc` and `app\gui` you don't want to include in the msi
6+
- `app\gui` should likely only have the `release` and `theme` dirs, everything else can go
7+
4. Generate the wixobj files
8+
- `wix\gen_wix.bat`
9+
5. Update version number
10+
- edit wix\sonic-pi.wxs
11+
- change version number (from X.Y.Z)
12+
6. Remove duplicate info
13+
- edit `wix\gui.wxs`
14+
- remove sonic-pi.exe component and componentref (both have identical IDs)
15+
7. Build the msi!
16+
- `wix\gen_msi.bat`
17+
8. Your MSI should be found in the `wix` dir.
18+

app/gui/qt/wix/gen_msi.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cd %~dp0
2+
cd ..
3+
4+
candle wix\sonic-pi.wxs etc.wxs gui.wxs server.wxs -ext WixUtilExtension
5+
light sonic-pi.wixobj etc.wixobj gui.wixobj server.wixobj -ext WixUtilExtension -ext WixUIExtension -o wix\Sonic-Pi.msi -b etc -b app\gui -b app\server

app/gui/qt/wix/gen_wix.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
cd %~dp0
2+
cd ..
3+
4+
heat dir etc -gg -g1 -sfrag -dr SonicPi -cg ETC -out etc.wxs
5+
heat dir app\gui -gg -g1 -sfrag -dr AppDir -cg GUI -out gui.wxs
6+
heat dir app\server -gg -g1 -sfrag -dr AppDir -cg SERVER -out server.wxs
7+
8+
echo Update version number in wix\sonic-pi.wxs
9+
echo Remove duplicate sonic-pi.exe info from wix\gui.wxs
10+
echo Then run gen_msi.bat

app/gui/qt/wix/sonic-pi.wxs

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,16 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:firewall="http://schemas.microsoft.com/wix/FirewallExtension">
33

4-
<!-- so you want to be a WiXard?
5-
6-
1. Copy wix directory to top level sonic-pi directory
7-
8-
2. Generate the wixobj files
9-
heat dir etc -gg -g1 -sfrag -dr SonicPi -cg ETC -out wix\etc.wxs
10-
heat dir app\gui -gg -g1 -sfrag -dr AppDir -cg GUI -out wix\gui.wxs
11-
heat dir app\server -gg -g1 -sfrag -dr AppDir -cg SERVER -out wix\server.wxs
12-
13-
3. Update version number
14-
- edit wix\sonic-pi.wxs
15-
- change version number (from X.Y.Z)
16-
17-
4. Remove duplicate info
18-
- edit wix\gui.wxs
19-
- remove sonic-pi.exe component and componentref (both have identical IDs)
20-
21-
5. Prepare the candle?!?
22-
candle wix\sonic-pi.wxs wix\etc.wxs wix\gui.wxs wix\server.wxs -ext WixUtilExtension
23-
24-
6. Build the msi!
25-
light sonic-pi.wixobj etc.wixobj gui.wixobj server.wixobj -ext WixUtilExtension -ext WixUIExtension -o wix\Sonic-Pi.msi -b etc -b app\gui -b app\server
26-
27-
-->
28-
294
<Product Id="*" Name="Sonic Pi" Language="1033" Version="X.Y.Z" Manufacturer="Sonic Pi" UpgradeCode="ECA5D03B-CEBD-4672-A0A2-176CBCBA4429">
305
<Package Description="Sonic Pi Installer" Comments="Sonic Pi Installer" InstallScope="perMachine" InstallerVersion="200" Compressed="yes" />
316
<Property Id="REINSTALLMODE" Value="amus"/>
327
<Property Id="MSIFASTINSTALL" Value="1" />
338
<MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallInitialize"/>
349
<Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
3510

36-
<WixVariable Id="WixUILicenseRtf" Value="LICENSE.rtf" />
37-
<WixVariable Id="WixUIBannerBmp" Value="wix_ui_banner.bmp" />
38-
<WixVariable Id="WixUIDialogBmp" Value="wix_ui_dialog.bmp" />
11+
<WixVariable Id="WixUILicenseRtf" Value="wix\LICENSE.rtf" />
12+
<WixVariable Id="WixUIBannerBmp" Value="wix\wix_ui_banner.bmp" />
13+
<WixVariable Id="WixUIDialogBmp" Value="wix\wix_ui_dialog.bmp" />
3914
<Property Id='ARPCONTACT'>https://in-thread.sonic-pi.net</Property>
4015
<Property Id='ARPHELPLINK'>https://in-thread.sonic-pi.net</Property>
4116
<Property Id='ARPURLINFOABOUT'>http://sonic-pi.net</Property>

0 commit comments

Comments
 (0)