-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_wix.ps1
35 lines (24 loc) · 1.18 KB
/
build_wix.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$env:Path = 'C:\Program Files (x86)\WiX Toolset v3.11\bin;' + $env:Path
Push-Location wix
# heat command from wix toolset. Scans a source for "harvesting". Arguments:
# dir dist == specify we want to harvest a directory ("dir {source}"), source = PyInstaller's "dist" output
# -srd == suppress harvesting the root directory as an element NOT SURE IF NEEDED
# -cg <ComponentGroupName>
# -gg == Generate GUIDS
# -out dist.wxs == output
# Arguments stolen from DCSPresetManager
# os.path.join(wix_bin, 'heat.exe'), 'dir', r'dist\DCSPresetManager',
# '-ke', '-srd', '-v', '-ag',
# '-cg', 'RootDataGroup',
# '-dr', 'RootData',
# '-t', r'wix\appShortcut.xsl',
# '-out', r'build\wix\src.wix'
heat dir ..\dist\PDFrotate -sw5150 -ke -srd -v -ag -cg RootDataGroup -dr RootData -t shortcut.xsl -out dist.wxs
if (-not $?) { throw "heat failed" }
# "Compile" the XML
candle pdfrotate.wxs dist.wxs
if (-not $?) { throw "candle failed" }
# "Link" the XML
light -out pdf_rotate_installer -b ..\dist\PDFrotate .\pdfrotate.wixobj .\dist.wixobj
if (-not $?) { throw "light failed" }
Pop-Location