aboutsummaryrefslogtreecommitdiff
path: root/src/msi/sok.wxs
blob: 70993908042be76e03929358fcbbab1976ec02d8 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<?xml version='1.0' encoding='utf-8'?>
<!--
Generate MSI installer for Windows.

Setup:

    apt-get install wixl

Build (using sok.msi build target):

    ninja sok.msi

Dependencies:

* `SDL2-devel` (from libsdl.org)
* `SDL2_ttf-devel` (from libsdl.org)

Example (generate by hand):
    
    # generate sok.msi
    wixl -o sok.msi \
      -D BUILD_DIR=../../build-w64 \
      -D SDL_LIB_DIR=/usr/local/x86_64-w64-mingw32/bin \
      sok.wxs

GUIDs (wget -qO- https://www.uuidgenerator.net/api/guid/10):
# 0aca3163-98b4-4302-9dad-9dfaac254620
3a68235a-03d2-4751-ab4a-1914a97792fc
10951342-4abb-4c51-b91c-94c8643f9c91
57dc91da-cde4-4299-b5dc-b93bd563e9b1
29055d07-9129-4b70-a9e8-b000e8d7c872
adc88948-391e-48cf-8067-b002dcba4411
912b4ea2-aefd-46d3-b494-d7527be0938a
0394899f-a5bb-458e-9b29-3d80f6083b5e
5ce91cfa-9397-4ecb-a719-e189c92d4dad

-->
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
  <Product
    Name='Pablotron Sokoban'
    Id='3626b379-ca7b-4fae-990e-b00cdeb0f2d7'
    UpgradeCode='dd702ed3-2b65-4d05-bc99-205aafbb8c37'
    Language='1033'
    Codepage='1252'
    Version='1.0'
    Manufacturer='Pablotron'
  >
    <Package
      Id='*'
      Keywords='Installer'
      Description="Pablotron Sokoban installer."
      Comments='Pablotron Sokoban installer.'
      Manufacturer='Pablotron'
      InstallerVersion='100'
      Languages='1033'
      Compressed='yes'
      SummaryCodepage='1252'
    />

    <Media
      Id='1'
      Cabinet='sok.cab'
      EmbedCab='yes'
      DiskPrompt="CD-ROM #1"
    />

    <Icon
      Id='sok.ico'
      SourceFile='$(var.SRC_ROOT_DIR)/assets/sok.ico'
    />

    <Property
      Id='DiskPrompt'
      Value="Pablotron Sokoban 1.0 Installation [1]"
    />

    <Property Id='ARPPRODUCTICON' Value='sok.ico'/>

    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramMenuFolder' Name='Programs'>
        <Directory Id='ProgramMenuDir' Name='Pablotron Sokoban'>
          <Component Id='ProgramMenuDir' Guid='*'>
            <RemoveFolder Id='ProgramMenuDir' On='uninstall'/>
            <RegistryValue
              Root='HKCU'
              Key='Software\[Manufacturer]\[ProductName]'
              Type='string'
              Value=''
              KeyPath='yes'
            />
          </Component>
        </Directory>
      </Directory>

      <Directory Id='DesktopFolder' Name='Desktop'/>

      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id='Pablotron' Name='Pablotron'>
          <Directory Id='INSTALLDIR' Name='Sokoban'>
            <Component Id='cmp-sok-exe' Guid='*'>
              <File
                Id='file-sok-exe'
                Name='sok.exe'
                DiskId='1'
                Source='$(var.BUILD_DIR)/sok.exe'
                KeyPath='yes'
              >
                <!-- programs menu shortcut -->
                <Shortcut
                  Id='shortcut-menu-sok-exe'
                  Directory='ProgramMenuDir'
                  Name='Sokoban'
                  WorkingDirectory='INSTALLDIR'
                  Icon='sok.ico'
                  IconIndex='0'
                  Advertise='yes'
                />

                <!-- desktop shortcut -->
                <Shortcut
                  Id='shortcut-desktop-sok-exe'
                  Directory='DesktopFolder'
                  Name='Pablotron Sokoban'
                  WorkingDirectory='INSTALLDIR'
                  Icon='sok.ico'
                  IconIndex='0'
                  Advertise='yes'
                />
              </File>
            </Component>

            <Component Id='cmp-readme-txt' Guid='*'>
              <File
                Id='file-readme-txt'
                Name='readme.txt'
                DiskId='1'
                Source='$(var.SRC_ROOT_DIR)/src/msi/readme.txt'
                KeyPath='yes'
              >
                <Shortcut
                  Id='shortcut-menu-readme-txt'
                  Directory='ProgramMenuDir'
                  Name='Pablotron Sokoban Manual'
                  WorkingDirectory='INSTALLDIR'
                />
              </File>
            </Component>

            <Component Id='cmp-solve-exe' Guid='*'>
              <File
                Id='file-solve-exe'
                Name='solve.exe'
                DiskId='1'
                Source='$(var.BUILD_DIR)/solve.exe'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-text-exe' Guid='*'>
              <File
                Id='file-text-exe'
                Name='text.exe'
                DiskId='1'
                Source='$(var.BUILD_DIR)/text.exe'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-libfreetype-dll' Guid='*'>
              <File
                Id='file-libfreetype-6-dll'
                Name='libfreetype-6.dll'
                DiskId='1'
                Source='$(var.SDL_LIB_DIR)/libfreetype-6.dll'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-sdl2-ttf-dll' Guid='*'>
              <File
                Id='file-sdl2-ttf-dll'
                Name='SDL2_ttf.dll'
                DiskId='1'
                Source='$(var.SDL_LIB_DIR)/SDL2_ttf.dll'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-sdl2-mixer-dll' Guid='*'>
              <File
                Id='file-sdl2-mixer-dll'
                Name='SDL2_mixer.dll'
                DiskId='1'
                Source='$(var.SDL_LIB_DIR)/SDL2_mixer.dll'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-sdl2-dll' Guid='*'>
              <File
                Id='file-sdl2-dll'
                Name='SDL2.dll'
                DiskId='1'
                Source='$(var.SDL_LIB_DIR)/SDL2.dll'
                KeyPath='yes'
              />
            </Component>

            <Component Id='cmp-zlib1-dll' Guid='*'>
              <File
                Id='file-zlib1-dll'
                Name='zlib1.dll'
                DiskId='1'
                Source='$(var.SDL_LIB_DIR)/zlib1.dll'
                KeyPath='yes'
              />
            </Component>
          </Directory>
        </Directory>
      </Directory>
    </Directory>

    <Feature Id='Complete' Level='1'>
      <ComponentRef Id='cmp-sok-exe'/>
      <ComponentRef Id='cmp-readme-txt'/>
      <ComponentRef Id='cmp-solve-exe'/>
      <ComponentRef Id='cmp-text-exe'/>
      <ComponentRef Id='cmp-libfreetype-dll'/>
      <ComponentRef Id='cmp-sdl2-ttf-dll'/>
      <ComponentRef Id='cmp-sdl2-mixer-dll'/>
      <ComponentRef Id='cmp-sdl2-dll'/>
      <ComponentRef Id='cmp-zlib1-dll'/>
    </Feature>
  </Product>
</Wix>