mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-20 07:31:30 -07:00
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.
This commit is contained in:
32
Buildscr
32
Buildscr
@ -55,30 +55,31 @@ in puzzles do make -f Makefile.doc # build help files for installer
|
||||
in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs
|
||||
in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss
|
||||
ifneq "$(VISUAL_STUDIO)" "yes" then
|
||||
in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl clean
|
||||
in puzzles with clangcl64 do Platform=x64 make -f Makefile.clangcl VER=-DVER=$(Version) XFLAGS='-Wwrite-strings -Werror'
|
||||
in puzzles with clangcl64 do mkdir win64 && Platform=x64 make -f Makefile.clangcl BUILDDIR=win64/ VER=-DVER=$(Version) XFLAGS='-Wwrite-strings -Werror'
|
||||
in puzzles with clangcl32 do mkdir win32 && Platform=x86 make -f Makefile.clangcl BUILDDIR=win32/ VER=-DVER=$(Version) XFLAGS='-Wwrite-strings -Werror'
|
||||
# Code-sign the binaries, if the local bob config provides a script
|
||||
# to do so. We assume here that the script accepts an -i option to
|
||||
# provide a 'more info' URL, and an optional -n option to provide a
|
||||
# program name, and that it can take multiple .exe filename
|
||||
# arguments and sign them all in place.
|
||||
ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
|
||||
ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ win64/*.exe win32/*.exe
|
||||
# Build installers.
|
||||
in puzzles with wixonlinux do candle -arch x64 puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
|
||||
ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi
|
||||
in puzzles with wixonlinux do candle -arch x64 puzzles.wxs -dWin64=yes -dBindir=win64/ && light -ext WixUIExtension -sval puzzles.wixobj
|
||||
in puzzles with wixonlinux do candle -arch x86 puzzles.wxs -dWin64=no -dBindir=win32/ && light -ext WixUIExtension -sval puzzles.wixobj -o puzzles32.msi
|
||||
ifneq "$(cross_winsigncode)" "" in puzzles do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi puzzles32.msi
|
||||
else
|
||||
delegate windows
|
||||
in puzzles with visualstudio do/win nmake -f Makefile.vc clean
|
||||
in puzzles with visualstudio do/win nmake -f Makefile.vc VER=-DVER=$(Version)
|
||||
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
|
||||
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/puzzles/ win64/*.exe
|
||||
# Build installers.
|
||||
in puzzles with wix do/win candle puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
|
||||
in puzzles with wix do/win candle puzzles.wxs -dWin64=yes -dBindir=win64/ && light -ext WixUIExtension -sval puzzles.wixobj
|
||||
in puzzles with innosetup do/win iscc puzzles.iss
|
||||
return puzzles/*.exe
|
||||
return puzzles/win64/*.exe
|
||||
return puzzles/puzzles.msi
|
||||
enddelegate
|
||||
endif
|
||||
in puzzles do chmod +x *.exe
|
||||
in puzzles do chmod +x win32/*.exe win64/*.exe
|
||||
|
||||
# Build the Pocket PC binaries and CAB.
|
||||
#
|
||||
@ -125,11 +126,13 @@ in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-in
|
||||
# gamedesc.txt, which is generated by mkfiles.pl and helpfully
|
||||
# excludes the command-line auxiliary utilities such as solosolver,
|
||||
# and nullgame.exe) into a subdirectory for easy access.
|
||||
in puzzles do mkdir winbin
|
||||
in puzzles do mv `cut -f2 -d: gamedesc.txt` winbin
|
||||
in puzzles do mkdir winbin64 winbin32
|
||||
in puzzles/win64 do mv `cut -f2 -d: ../gamedesc.txt` ../winbin64
|
||||
in puzzles/win32 do mv `cut -f2 -d: ../gamedesc.txt` ../winbin32
|
||||
|
||||
# Make a zip file of the Windows binaries and help files.
|
||||
in puzzles do zip -j puzzles.zip winbin/*.exe puzzles.chm puzzles.hlp puzzles.cnt
|
||||
in puzzles do zip -j puzzles.zip winbin64/*.exe puzzles.chm puzzles.hlp puzzles.cnt
|
||||
in puzzles do zip -j puzzles32.zip winbin32/*.exe puzzles.chm puzzles.hlp puzzles.cnt
|
||||
|
||||
# Create the source archive. (That writes the archive into the
|
||||
# _parent_ directory, so be careful when we deliver it.)
|
||||
@ -177,7 +180,8 @@ in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-
|
||||
|
||||
# Phew, we're done. Deliver everything!
|
||||
deliver puzzles/icons/*-web.png $@
|
||||
deliver puzzles/winbin/*.exe $@
|
||||
deliver puzzles/winbin64/*.exe $@
|
||||
deliver puzzles/winbin32/*.exe w32/$@
|
||||
deliver puzzles/.htaccess $@
|
||||
deliver puzzles/doc/*.html doc/$@
|
||||
deliver puzzles/devel/*.html devel/$@
|
||||
@ -186,7 +190,9 @@ deliver puzzles/puzzles.chm $@
|
||||
deliver puzzles/puzzles.hlp $@
|
||||
deliver puzzles/puzzles.cnt $@
|
||||
deliver puzzles/puzzles.zip $@
|
||||
deliver puzzles/puzzles32.zip w32/$@
|
||||
deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi
|
||||
deliver puzzles/puzzles32.msi w32/puzzles-$(Version)-32bit-installer.msi
|
||||
deliver puzzles/*.jar java/$@
|
||||
deliver puzzles/js/*.js js/$@
|
||||
deliver puzzles/jstest/*.html jstest/$@
|
||||
|
@ -638,7 +638,7 @@ if (defined $makefiles{'clangcl'}) {
|
||||
print "\t\$(RC) \$(RCFLAGS) ".$d->{deps}->[0]." -o ".$d->{obj}."\n\n";
|
||||
} else {
|
||||
$deflist = join "", map { " /D$_" } @{$d->{defs}};
|
||||
print "\t\$(CC) /Fo\$(BUILDDIR)".$d->{obj}." \$(COMPAT) \$(CFLAGS) \$(XFLAGS)$deflist /c \$<\n\n";
|
||||
print "\t\$(CC) /Fo".$d->{obj}." \$(COMPAT) \$(CFLAGS) \$(XFLAGS)$deflist /c \$<\n\n";
|
||||
}
|
||||
}
|
||||
print "\nclean:\n".
|
||||
|
20
winwix.mc
20
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>
|
||||
|
Reference in New Issue
Block a user