aboutsummaryrefslogtreecommitdiff
path: root/winwix.mc
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-11-26 20:12:15 +0000
committerSimon Tatham <anakin@pobox.com>2017-11-26 21:11:35 +0000
commit3cf09c261591b939df53c5357ab471c5b3076d22 (patch)
tree8fa78fec6ef452ecaa3649ca0bc8b25f12036a52 /winwix.mc
parentee8ea9b9785964694cb2b3ad77c3fb2460f49510 (diff)
downloadpuzzles-3cf09c261591b939df53c5357ab471c5b3076d22.zip
puzzles-3cf09c261591b939df53c5357ab471c5b3076d22.tar.gz
puzzles-3cf09c261591b939df53c5357ab471c5b3076d22.tar.bz2
puzzles-3cf09c261591b939df53c5357ab471c5b3076d22.tar.xz
Reinstate 32-bit Windows builds of Puzzles.
I've built a set of 32-bit binaries, a 32-bit zip file and a 32-bit MSI, all delivered into a 'w32' output directory.
Diffstat (limited to 'winwix.mc')
-rw-r--r--winwix.mc20
1 files changed, 13 insertions, 7 deletions
diff --git a/winwix.mc b/winwix.mc
index 4a72c09..58dbdbe 100644
--- a/winwix.mc
+++ b/winwix.mc
@@ -12,6 +12,12 @@ has 'descfile' => (required => 1);
<?xml version="1.0" encoding="utf-8"?>
+<?if $(var.Win64) = yes ?>
+ <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
+<?else ?>
+ <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
+<?endif ?>
+
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
% # Product tag. The Id component is set to "*", which causes WiX to
@@ -61,7 +67,7 @@ has 'descfile' => (required => 1);
% # (individual files or shortcuts or additions to PATH) that are
% # installed.
<Directory Id="TARGETDIR" Name="SourceDir">
- <Directory Id="ProgramFiles64Folder" Name="PFiles">
+ <Directory Id="$(var.PlatformProgramFilesFolder)" Name="PFiles">
<Directory Id="INSTALLDIR" Name="Simon Tatham's Portable Puzzle Collection">
% # The following components all install things in the main
@@ -71,12 +77,12 @@ has 'descfile' => (required => 1);
% # the more obscure things like LICENCE are just there for
% # the sake of being _somewhere_ and don't rate a shortcut.
-<%method file_component ($filename, $shortcutname)>
+<%method file_component ($prefix, $filename, $shortcutname)>
% my $filename_id = file_component_name($filename);
<Component Id="File_Component_<% $filename_id %>"
Guid="<% invent_guid('file:' . $filename) %>">
<File Id="File_<% $filename_id %>"
- Source="<% $filename %>" KeyPath="yes">
+ Source="<% $prefix %><% $filename %>" KeyPath="yes">
% if (defined $shortcutname) {
<Shortcut Id="startmenu_<% $filename_id %>"
Directory="ProgramMenuDir" WorkingDirectory="INSTALLDIR"
@@ -87,12 +93,12 @@ has 'descfile' => (required => 1);
</%method>
% for my $exe (@exes) {
-<% $.file_component($exe, $names{$exe}) %>
+<% $.file_component('$(var.Bindir)', $exe, $names{$exe}) %>
% }
-<% $.file_component("puzzles.chm", "Puzzles Manual") %>
-<% $.file_component("website.url", "Puzzles Web Site") %>
-<% $.file_component("LICENCE") %>
+<% $.file_component('', "puzzles.chm", "Puzzles Manual") %>
+<% $.file_component('', "website.url", "Puzzles Web Site") %>
+<% $.file_component('', "LICENCE") %>
</Directory>
</Directory>