Skip to content

Commit 47450d8

Browse files
committed
windows installer stuff
1 parent d082a9e commit 47450d8

File tree

4 files changed

+280
-3
lines changed

4 files changed

+280
-3
lines changed

spwn-lang/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spwn-lang/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "spwn-lang"
2+
name = "spwn"
33
version = "0.1.0"
44
authors = ["Spu7Nix <[email protected]>"]
55
edition = "2018"
@@ -24,4 +24,6 @@ core-foundation-sys = "0.8.2"
2424
libc = "0.2.81"
2525

2626
# [target.'cfg(target_os = "windows")'.dependencies]
27-
# named_pipe = "0.4.1"
27+
# named_pipe = "0.4.1"
28+
29+
# heat dir libraries -o wix/libraries.wxs -scom -frag -srd -sreg -gg -cg libraries -dr LIB_DIR -suid

spwn-lang/wix/libraries.wxs

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
4+
<?if $(var.Platform) = x64 ?>
5+
<?define Win64 = "yes" ?>
6+
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
7+
<?else ?>
8+
<?define Win64 = "no" ?>
9+
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
10+
<?endif ?>
11+
12+
13+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
14+
<Fragment>
15+
<DirectoryRef Id="LIB_DIR">
16+
<Directory Id="gamescene" Name="gamescene" />
17+
<Directory Id="std" Name="std" />
18+
</DirectoryRef>
19+
</Fragment>
20+
<Fragment>
21+
<ComponentGroup Id="libraries">
22+
<Component Id="lib.spwn" Directory="gamescene" Win64='$(var.Win64)' Guid="{93C2084D-FB32-4685-94DE-A2A3918B384D}">
23+
<File Id="lib.spwn" KeyPath="yes" Source="libraries\gamescene\lib.spwn" />
24+
</Component>
25+
<Component Id="array.spwn" Directory="std" Win64='$(var.Win64)' Guid="{FC812848-8D60-4047-8475-2A1EFC997757}">
26+
<File Id="array.spwn" KeyPath="yes" Source="libraries\std\array.spwn" />
27+
</Component>
28+
<Component Id="block.spwn" Directory="std" Win64='$(var.Win64)' Guid="{4F6E1920-1AEE-41F9-9610-2D0A782277D1}">
29+
<File Id="block.spwn" KeyPath="yes" Source="libraries\std\block.spwn" />
30+
</Component>
31+
<Component Id="color.spwn" Directory="std" Win64='$(var.Win64)' Guid="{AAAABC51-99EC-4212-81E9-BCB88C380EC6}">
32+
<File Id="color.spwn" KeyPath="yes" Source="libraries\std\color.spwn" />
33+
</Component>
34+
<Component Id="constants.spwn" Directory="std" Win64='$(var.Win64)' Guid="{A0D08FA0-59E8-4707-B714-5976F00F36E8}">
35+
<File Id="constants.spwn" KeyPath="yes" Source="libraries\std\constants.spwn" />
36+
</Component>
37+
<Component Id="control_flow.spwn" Directory="std" Win64='$(var.Win64)' Guid="{EB45B03B-8F1B-43FD-A83B-7399F6D4E50E}">
38+
<File Id="control_flow.spwn" KeyPath="yes" Source="libraries\std\control_flow.spwn" />
39+
</Component>
40+
<Component Id="counter.spwn" Directory="std" Win64='$(var.Win64)' Guid="{183C561F-7D9F-42C6-9B1A-DD982A38BA0D}">
41+
<File Id="counter.spwn" KeyPath="yes" Source="libraries\std\counter.spwn" />
42+
</Component>
43+
<Component Id="events.spwn" Directory="std" Win64='$(var.Win64)' Guid="{23FBC369-8824-491D-985C-6772847D0DFE}">
44+
<File Id="events.spwn" KeyPath="yes" Source="libraries\std\events.spwn" />
45+
</Component>
46+
<Component Id="fileio.spwn" Directory="std" Win64='$(var.Win64)' Guid="{FAC3D891-E851-49CE-A06C-04AF9EED3057}">
47+
<File Id="fileio.spwn" KeyPath="yes" Source="libraries\std\fileio.spwn" />
48+
</Component>
49+
<Component Id="general_triggers.spwn" Directory="std" Win64='$(var.Win64)' Guid="{72C4811C-D589-42D2-A2D1-ED92689E721D}">
50+
<File Id="general_triggers.spwn" KeyPath="yes" Source="libraries\std\general_triggers.spwn" />
51+
</Component>
52+
<Component Id="group.spwn" Directory="std" Win64='$(var.Win64)' Guid="{D0CB4DF3-8CF2-41A7-8934-83A80AFBB7D4}">
53+
<File Id="group.spwn" KeyPath="yes" Source="libraries\std\group.spwn" />
54+
</Component>
55+
<Component Id="item.spwn" Directory="std" Win64='$(var.Win64)' Guid="{4E5CB2E4-4C38-4DD5-8017-AB953600155E}">
56+
<File Id="item.spwn" KeyPath="yes" Source="libraries\std\item.spwn" />
57+
</Component>
58+
<Component Id="lib.spwn_1" Directory="std" Win64='$(var.Win64)' Guid="{28E262ED-A6D0-4160-9717-5D5B573939DB}">
59+
<File Id="lib.spwn_1" KeyPath="yes" Source="libraries\std\lib.spwn" />
60+
</Component>
61+
<Component Id="util.spwn" Directory="std" Win64='$(var.Win64)' Guid="{10DD3DE1-58A3-48F1-A459-C24D2F4CC47D}">
62+
<File Id="util.spwn" KeyPath="yes" Source="libraries\std\util.spwn" />
63+
</Component>
64+
</ComponentGroup>
65+
</Fragment>
66+
</Wix>

spwn-lang/wix/main.wxs

Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
<?xml version='1.0' encoding='windows-1252'?>
2+
<!--
3+
Copyright (C) 2017 Christopher R. Field.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<!--
19+
Please do not remove these pre-processor If-Else blocks. These are used with
20+
the `cargo wix` subcommand to automatically determine the installation
21+
destination for 32-bit versus 64-bit installers. Removal of these lines will
22+
cause installation errors.
23+
-->
24+
<?if $(var.Platform) = x64 ?>
25+
<?define Win64 = "yes" ?>
26+
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
27+
<?else ?>
28+
<?define Win64 = "no" ?>
29+
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
30+
<?endif ?>
31+
32+
33+
34+
35+
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
36+
37+
<Product Id='*' Name='spwn' UpgradeCode='1890CFF1-7537-4D34-A49E-74B194D35006' Manufacturer='Spu7Nix' Language='1033'
38+
Codepage='1252' Version='$(var.Version)'>
39+
40+
<Package Id='*' Keywords='Installer' Manufacturer='Spu7Nix' InstallerVersion='450' Languages='1033' Compressed='yes'
41+
InstallScope='perMachine' SummaryCodepage='1252' Platform='$(var.Platform)' />
42+
43+
<MajorUpgrade Schedule='afterInstallInitialize'
44+
DowngradeErrorMessage='A newer version of [ProductName] is already installed. Setup will now exit.' />
45+
46+
<Media Id='1' Cabinet='media1.cab' EmbedCab='yes' DiskPrompt='CD-ROM #1' />
47+
<Property Id='DiskPrompt' Value='spwn Installation' />
48+
49+
50+
<Directory Id='TARGETDIR' Name='SourceDir'>
51+
<Directory Id='$(var.PlatformProgramFilesFolder)' Name='PFiles'>
52+
<Directory Id='APPLICATIONFOLDER' Name='spwn'>
53+
54+
<!--
55+
Enabling the license sidecar file in the installer is a four step process:
56+
57+
1. Uncomment the `Component` tag and its contents.
58+
2. Change the value for the `Source` attribute in the `File` tag to a path
59+
to the file that should be included as the license sidecar file. The path
60+
can, and probably should be, relative to this file.
61+
3. Change the value for the `Name` attribute in the `File` tag to the
62+
desired name for the file when it is installed alongside the `bin` folder
63+
in the installation directory. This can be omitted if the desired name is
64+
the same as the file name.
65+
4. Uncomment the `ComponentRef` tag with the Id attribute value of "License"
66+
further down in this file.
67+
-->
68+
<!--
69+
<Component Id='License' Guid='*' Win64='$(var.Win64)'>
70+
<File Id='LicenseFile' Name='ChangeMe' DiskId='1' Source='C:\Path\To\File' KeyPath='yes'/>
71+
</Component>
72+
-->
73+
74+
75+
<Component Id='Path' Guid='219B13D5-2811-43A4-89CA-E0AD28B5BEA9' Win64='$(var.Win64)' KeyPath='yes'>
76+
<Environment Id='PATH' Name='PATH' Value='[Bin]' Permanent='no' Part='last' Action='set' System='yes' />
77+
</Component>
78+
<Component Id='binary0' Guid='*' Win64='$(var.Win64)'>
79+
<File Id='exe0' Name='spwn.exe' DiskId='1' Source='target\$(var.Profile)\spwn.exe' KeyPath='yes' />
80+
</Component>
81+
82+
83+
<!-- this is incredibly stupid
84+
i hate wix -->
85+
86+
87+
88+
<Directory Id="LIB_DIR" Name="libraries"/>
89+
90+
91+
92+
93+
94+
95+
96+
97+
98+
99+
100+
</Directory>
101+
</Directory>
102+
</Directory>
103+
104+
105+
106+
<Feature Id='Binaries' Title='Application' Description='Installs all binaries and the license.' Level='1'
107+
ConfigurableDirectory='APPLICATIONFOLDER' AllowAdvertise='no' Display='expand' Absent='disallow'>
108+
109+
<!--
110+
Uncomment the following `ComponentRef` tag to add the license
111+
sidecar file to the installer.
112+
-->
113+
<!--<ComponentRef Id='License'/>-->
114+
115+
<ComponentRef Id='binary0' />
116+
117+
<Feature Id='Environment' Title='PATH Environment Variable'
118+
Description='Add the install location of the [ProductName] executable to the PATH system environment variable. This allows the [ProductName] executable to be called from any location.'
119+
Level='1' Absent='allow'>
120+
<ComponentRef Id='Path' />
121+
</Feature>
122+
</Feature>
123+
124+
<Feature Id="Libraries" Level="1">
125+
126+
<ComponentGroupRef Id='libraries' />
127+
128+
</Feature>
129+
130+
131+
132+
133+
<SetProperty Id='ARPINSTALLLOCATION' Value='[APPLICATIONFOLDER]' After='CostFinalize' />
134+
135+
136+
<!--
137+
Uncomment the following `Icon` and `Property` tags to change the product icon.
138+
139+
The product icon is the graphic that appears in the Add/Remove
140+
Programs control panel for the application.
141+
-->
142+
<!--<Icon Id='ProductICO' SourceFile='wix\Product.ico'/>-->
143+
<!--<Property Id='ARPPRODUCTICON' Value='ProductICO' />-->
144+
145+
146+
<!--
147+
Adding a URL to Add/Remove Programs control panel listing for the
148+
application is a two step process:
149+
150+
1. Uncomment the following `Property` tag with the "ARPHELPLINK" Id
151+
attribute value.
152+
2. Change the value for `Value` attribute of the following
153+
`Property` tag to a valid URL.
154+
-->
155+
<!--<Property Id='ARPHELPLINK' Value='ChangeMe'/>-->
156+
157+
<UI>
158+
<UIRef Id='WixUI_FeatureTree' />
159+
160+
<!--
161+
Enabling the EULA dialog in the installer is a three step process:
162+
163+
1. Comment out or remove the two `Publish` tags that follow the
164+
`WixVariable` tag.
165+
2. Uncomment the `<WixVariable Id='WixUILicenseRtf' Value='Path\to\Eula.rft'>` tag futher down
166+
3. Replace the `Value` attribute of the `WixVariable` tag with
167+
the path to a RTF file that will be used as the EULA and
168+
displayed in the license agreement dialog.
169+
-->
170+
<Publish Dialog='WelcomeDlg' Control='Next' Event='NewDialog' Value='CustomizeDlg' Order='99'>1</Publish>
171+
<Publish Dialog='CustomizeDlg' Control='Back' Event='NewDialog' Value='WelcomeDlg' Order='99'>1</Publish>
172+
173+
</UI>
174+
175+
176+
<!--
177+
Enabling the EULA dialog in the installer requires uncommenting
178+
the following `WixUILicenseRTF` tag and changing the `Value`
179+
attribute.
180+
-->
181+
<!-- <WixVariable Id='WixUILicenseRtf' Value='Relative\Path\to\Eula.rtf'/> -->
182+
183+
184+
<!--
185+
Uncomment the next `WixVaraible` tag to customize the installer's
186+
Graphical User Interface (GUI) and add a custom banner image across
187+
the top of each screen. See the WiX Toolset documentation for details
188+
about customization.
189+
190+
The banner BMP dimensions are 493 x 58 pixels.
191+
-->
192+
<!--<WixVariable Id='WixUIBannerBmp' Value='wix\Banner.bmp'/>-->
193+
194+
195+
<!--
196+
Uncomment the next `WixVariable` tag to customize the installer's
197+
Graphical User Interface (GUI) and add a custom image to the first
198+
dialog, or screen. See the WiX Toolset documentation for details about
199+
customization.
200+
201+
The dialog BMP dimensions are 493 x 312 pixels.
202+
-->
203+
<!--<WixVariable Id='WixUIDialogBmp' Value='wix\Dialog.bmp'/>-->
204+
205+
</Product>
206+
207+
208+
209+
</Wix>

0 commit comments

Comments
 (0)