mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Build an installer for Puzzles.
[originally from svn r7319]
This commit is contained in:
14
Buildscr
14
Buildscr
@ -24,9 +24,11 @@ delegate osx
|
|||||||
return puzzles/Puzzles.dmg
|
return puzzles/Puzzles.dmg
|
||||||
enddelegate
|
enddelegate
|
||||||
|
|
||||||
# Build the Windows binaries and the CHM file.
|
# Build the Windows binaries and installer, and the CHM file.
|
||||||
in puzzles do make -f Makefile.doc clean
|
in puzzles do make -f Makefile.doc clean
|
||||||
in puzzles do make -f Makefile.doc chm
|
in puzzles do make -f Makefile.doc chm
|
||||||
|
in puzzles do make -f Makefile.doc # build help file for installer
|
||||||
|
in puzzles do perl winiss.pl $(revision) wingames.lst > puzzles.iss
|
||||||
delegate windows
|
delegate windows
|
||||||
# Ignore the poorly controlled return value from HHC, and instead
|
# Ignore the poorly controlled return value from HHC, and instead
|
||||||
# just test that the output file was generated.
|
# just test that the output file was generated.
|
||||||
@ -34,13 +36,16 @@ delegate windows
|
|||||||
# FIXME: Cygwin alternative?
|
# FIXME: Cygwin alternative?
|
||||||
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
|
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
|
||||||
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc VER=-DREVISION=$(revision)'
|
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc VER=-DREVISION=$(revision)'
|
||||||
|
# Build installer.
|
||||||
|
in puzzles do iscc puzzles.iss
|
||||||
return puzzles/puzzles.chm
|
return puzzles/puzzles.chm
|
||||||
return puzzles/*.exe
|
return puzzles/*.exe
|
||||||
|
return puzzles/Output/setup.exe
|
||||||
enddelegate
|
enddelegate
|
||||||
|
|
||||||
# Build the help file and the HTML docs.
|
# Build the help file and the HTML docs.
|
||||||
in puzzles do make -f Makefile.doc clean
|
in puzzles do make -f Makefile.doc clean # remove CHM-target HTML
|
||||||
in puzzles do make -f Makefile.doc
|
in puzzles do make -f Makefile.doc # and rebuild help file...
|
||||||
in puzzles do mkdir doc
|
in puzzles do mkdir doc
|
||||||
in puzzles do mkdir devel
|
in puzzles do mkdir devel
|
||||||
in puzzles/doc do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../puzzles.but
|
in puzzles/doc do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../puzzles.but
|
||||||
@ -51,7 +56,7 @@ in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-in
|
|||||||
# excludes the command-line auxiliary utilities such as solosolver,
|
# excludes the command-line auxiliary utilities such as solosolver,
|
||||||
# and nullgame.exe) into a subdirectory for easy access.
|
# and nullgame.exe) into a subdirectory for easy access.
|
||||||
in puzzles do mkdir winbin
|
in puzzles do mkdir winbin
|
||||||
in puzzles do mv `cat wingames.lst` winbin
|
in puzzles do mv `cut -f1 -d: wingames.lst` winbin
|
||||||
|
|
||||||
# Make a zip file of the Windows binaries and help files.
|
# 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 winbin/*.exe puzzles.chm puzzles.hlp puzzles.cnt
|
||||||
@ -77,6 +82,7 @@ deliver puzzles/puzzles.chm $@
|
|||||||
deliver puzzles/puzzles.hlp $@
|
deliver puzzles/puzzles.hlp $@
|
||||||
deliver puzzles/puzzles.cnt $@
|
deliver puzzles/puzzles.cnt $@
|
||||||
deliver puzzles/puzzles.zip $@
|
deliver puzzles/puzzles.zip $@
|
||||||
|
deliver puzzles/Output/setup.exe puzzles-r$(revision)-installer.exe
|
||||||
# This one isn't in the puzzles subdir, because makedist.sh left it
|
# This one isn't in the puzzles subdir, because makedist.sh left it
|
||||||
# one level up.
|
# one level up.
|
||||||
deliver puzzles*.tar.gz $@
|
deliver puzzles*.tar.gz $@
|
||||||
|
@ -15,5 +15,5 @@ GAMES += blackbox
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
blackbox.exe
|
blackbox.exe:Black Box
|
||||||
!end
|
!end
|
||||||
|
@ -17,5 +17,5 @@ GAMES += bridges
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
bridges.exe
|
bridges.exe:Bridges
|
||||||
!end
|
!end
|
||||||
|
2
cube.R
2
cube.R
@ -15,5 +15,5 @@ GAMES += cube
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
cube.exe
|
cube.exe:Cube
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += dominosa
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
dominosa.exe
|
dominosa.exe:Dominosa
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += fifteen
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
fifteen.exe
|
fifteen.exe:Fifteen
|
||||||
!end
|
!end
|
||||||
|
2
flip.R
2
flip.R
@ -17,5 +17,5 @@ GAMES += flip
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
flip.exe
|
flip.exe:Flip
|
||||||
!end
|
!end
|
||||||
|
@ -20,5 +20,5 @@ GAMES += galaxies
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
galaxies.exe
|
galaxies.exe:Galaxies
|
||||||
!end
|
!end
|
||||||
|
2
guess.R
2
guess.R
@ -15,5 +15,5 @@ GAMES += guess
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
guess.exe
|
guess.exe:Guess
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += inertia
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
inertia.exe
|
inertia.exe:Inertia
|
||||||
!end
|
!end
|
||||||
|
@ -20,5 +20,5 @@ GAMES += lightup
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
lightup.exe
|
lightup.exe:Light Up
|
||||||
!end
|
!end
|
||||||
|
2
loopy.R
2
loopy.R
@ -17,5 +17,5 @@ GAMES += loopy
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
loopy.exe
|
loopy.exe:Loopy
|
||||||
!end
|
!end
|
||||||
|
2
map.R
2
map.R
@ -20,5 +20,5 @@ GAMES += map
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
map.exe
|
map.exe:Map
|
||||||
!end
|
!end
|
||||||
|
2
mines.R
2
mines.R
@ -20,5 +20,5 @@ GAMES += mines
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
mines.exe
|
mines.exe:Mines
|
||||||
!end
|
!end
|
||||||
|
2
net.R
2
net.R
@ -19,5 +19,5 @@ GAMES += net
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
netgame.exe
|
netgame.exe:Net
|
||||||
!end
|
!end
|
||||||
|
@ -17,5 +17,5 @@ GAMES += netslide
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
netslide.exe
|
netslide.exe:Netslide
|
||||||
!end
|
!end
|
||||||
|
@ -18,5 +18,5 @@ GAMES += pattern
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
pattern.exe
|
pattern.exe:Pattern
|
||||||
!end
|
!end
|
||||||
|
2
pegs.R
2
pegs.R
@ -17,5 +17,5 @@ GAMES += pegs
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
pegs.exe
|
pegs.exe:Pegs
|
||||||
!end
|
!end
|
||||||
|
2
rect.R
2
rect.R
@ -15,5 +15,5 @@ GAMES += rect
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
rect.exe
|
rect.exe:Rectangles
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += samegame
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
samegame.exe
|
samegame.exe:Same Game
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += sixteen
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
sixteen.exe
|
sixteen.exe:Sixteen
|
||||||
!end
|
!end
|
||||||
|
2
slant.R
2
slant.R
@ -20,5 +20,5 @@ GAMES += slant
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
slant.exe
|
slant.exe:Slant
|
||||||
!end
|
!end
|
||||||
|
2
solo.R
2
solo.R
@ -18,5 +18,5 @@ GAMES += solo
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
solo.exe
|
solo.exe:Solo
|
||||||
!end
|
!end
|
||||||
|
2
tents.R
2
tents.R
@ -20,5 +20,5 @@ GAMES += tents
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
tents.exe
|
tents.exe:Tents
|
||||||
!end
|
!end
|
||||||
|
@ -15,5 +15,5 @@ GAMES += twiddle
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
twiddle.exe
|
twiddle.exe:Twiddle
|
||||||
!end
|
!end
|
||||||
|
@ -23,5 +23,5 @@ GAMES += unequal
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
unequal.exe
|
unequal.exe:Unequal
|
||||||
!end
|
!end
|
||||||
|
@ -17,5 +17,5 @@ GAMES += untangle
|
|||||||
!end
|
!end
|
||||||
|
|
||||||
!begin >wingames.lst
|
!begin >wingames.lst
|
||||||
untangle.exe
|
untangle.exe:Untangle
|
||||||
!end
|
!end
|
||||||
|
2
website.url
Normal file
2
website.url
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[InternetShortcut]
|
||||||
|
URL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/
|
64
winiss.pl
Executable file
64
winiss.pl
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
# Perl script to generate an Inno Setup installer script for
|
||||||
|
# Puzzles. This has to be scripted so that it can read wingames.lst
|
||||||
|
# and automatically adjust to the current available set of puzzles.
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
#
|
||||||
|
# $ ./winiss.pl 1234 wingames.lst > puzzles.iss
|
||||||
|
#
|
||||||
|
# where `1234' is the revision number which will be encoded in the
|
||||||
|
# installer's version indicators.
|
||||||
|
|
||||||
|
$rev = shift @ARGV;
|
||||||
|
($revclean=$rev) =~ s/M$//;
|
||||||
|
$lst = shift @ARGV;
|
||||||
|
open LST, "<", $lst;
|
||||||
|
while (<LST>) {
|
||||||
|
chomp;
|
||||||
|
split /:/;
|
||||||
|
push @exes, $_[0];
|
||||||
|
$names{$_[0]} = $_[1];
|
||||||
|
}
|
||||||
|
close LST;
|
||||||
|
|
||||||
|
print '; -*- no -*-'."\n";
|
||||||
|
print ';'."\n";
|
||||||
|
print '; -- Inno Setup installer script for Puzzles.'."\n";
|
||||||
|
print ''."\n";
|
||||||
|
print '[Setup]'."\n";
|
||||||
|
print 'AppName=Simon Tatham\'s Portable Puzzle Collection'."\n";
|
||||||
|
print 'AppVerName=Puzzles revision '.$rev."\n";
|
||||||
|
print 'VersionInfoTextVersion=Revision '.$rev."\n";
|
||||||
|
print 'AppVersion=r'.$rev."\n";
|
||||||
|
print 'VersionInfoVersion=0.0.'.$revclean.'.0'."\n";
|
||||||
|
print 'AppPublisher=Simon Tatham'."\n";
|
||||||
|
print 'AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/puzzles/'."\n";
|
||||||
|
print 'DefaultDirName={pf}\Simon Tatham\'s Portable Puzzle Collection'."\n";
|
||||||
|
print 'DefaultGroupName=Simon Tatham\'s Puzzles'."\n";
|
||||||
|
# print 'SetupIconFile=fixmethinkoneup.ico'."\n";
|
||||||
|
# print 'UninstallDisplayIcon={app}\fixmethinkoneup.exe'."\n";
|
||||||
|
print 'ChangesAssociations=no'."\n";
|
||||||
|
print 'Compression=zip/9'."\n";
|
||||||
|
print 'AllowNoIcons=yes'."\n";
|
||||||
|
print ''."\n";
|
||||||
|
print '[Files]'."\n";
|
||||||
|
for $exe (@exes) {
|
||||||
|
print 'Source: "'.$exe.'"; DestDir: "{app}"; Flags: promptifolder replacesameversion uninsrestartdelete'."\n";
|
||||||
|
}
|
||||||
|
print 'Source: "website.url"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
|
||||||
|
print 'Source: "puzzles.chm"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
|
||||||
|
print 'Source: "puzzles.hlp"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
|
||||||
|
print 'Source: "puzzles.cnt"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
|
||||||
|
print 'Source: "LICENCE"; DestDir: "{app}"; Flags: uninsrestartdelete'."\n";
|
||||||
|
print ''."\n";
|
||||||
|
print '[Icons]'."\n";
|
||||||
|
for $exe (@exes) {
|
||||||
|
print 'Name: "{group}\\'.$names{$exe}.'"; Filename: "{app}\\'.$exe.'"'."\n";
|
||||||
|
}
|
||||||
|
print '; We have to fall back from the .chm to the older .hlp file on some Windows'."\n";
|
||||||
|
print '; versions.'."\n";
|
||||||
|
print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.chm"; MinVersion: 4.1,5.0'."\n";
|
||||||
|
print 'Name: "{group}\Puzzles Manual"; Filename: "{app}\puzzles.hlp"; OnlyBelowVersion: 4.1,5.0'."\n";
|
||||||
|
print 'Name: "{group}\Puzzles Web Site"; Filename: "{app}\website.url"'."\n";
|
Reference in New Issue
Block a user