mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -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
|
||||
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 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
|
||||
# Ignore the poorly controlled return value from HHC, and instead
|
||||
# just test that the output file was generated.
|
||||
@ -34,13 +36,16 @@ delegate windows
|
||||
# FIXME: Cygwin alternative?
|
||||
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
|
||||
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/*.exe
|
||||
return puzzles/Output/setup.exe
|
||||
enddelegate
|
||||
|
||||
# Build the help file and the HTML docs.
|
||||
in puzzles do make -f Makefile.doc clean
|
||||
in puzzles do make -f Makefile.doc
|
||||
in puzzles do make -f Makefile.doc clean # remove CHM-target HTML
|
||||
in puzzles do make -f Makefile.doc # and rebuild help file...
|
||||
in puzzles do mkdir doc
|
||||
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
|
||||
@ -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,
|
||||
# and nullgame.exe) into a subdirectory for easy access.
|
||||
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.
|
||||
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.cnt $@
|
||||
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
|
||||
# one level up.
|
||||
deliver puzzles*.tar.gz $@
|
||||
|
@ -15,5 +15,5 @@ GAMES += blackbox
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
blackbox.exe
|
||||
blackbox.exe:Black Box
|
||||
!end
|
||||
|
@ -17,5 +17,5 @@ GAMES += bridges
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
bridges.exe
|
||||
bridges.exe:Bridges
|
||||
!end
|
||||
|
2
cube.R
2
cube.R
@ -15,5 +15,5 @@ GAMES += cube
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
cube.exe
|
||||
cube.exe:Cube
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += dominosa
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
dominosa.exe
|
||||
dominosa.exe:Dominosa
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += fifteen
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
fifteen.exe
|
||||
fifteen.exe:Fifteen
|
||||
!end
|
||||
|
2
flip.R
2
flip.R
@ -17,5 +17,5 @@ GAMES += flip
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
flip.exe
|
||||
flip.exe:Flip
|
||||
!end
|
||||
|
@ -20,5 +20,5 @@ GAMES += galaxies
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
galaxies.exe
|
||||
galaxies.exe:Galaxies
|
||||
!end
|
||||
|
2
guess.R
2
guess.R
@ -15,5 +15,5 @@ GAMES += guess
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
guess.exe
|
||||
guess.exe:Guess
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += inertia
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
inertia.exe
|
||||
inertia.exe:Inertia
|
||||
!end
|
||||
|
@ -20,5 +20,5 @@ GAMES += lightup
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
lightup.exe
|
||||
lightup.exe:Light Up
|
||||
!end
|
||||
|
2
loopy.R
2
loopy.R
@ -17,5 +17,5 @@ GAMES += loopy
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
loopy.exe
|
||||
loopy.exe:Loopy
|
||||
!end
|
||||
|
2
mines.R
2
mines.R
@ -20,5 +20,5 @@ GAMES += mines
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
mines.exe
|
||||
mines.exe:Mines
|
||||
!end
|
||||
|
2
net.R
2
net.R
@ -19,5 +19,5 @@ GAMES += net
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
netgame.exe
|
||||
netgame.exe:Net
|
||||
!end
|
||||
|
@ -17,5 +17,5 @@ GAMES += netslide
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
netslide.exe
|
||||
netslide.exe:Netslide
|
||||
!end
|
||||
|
@ -18,5 +18,5 @@ GAMES += pattern
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
pattern.exe
|
||||
pattern.exe:Pattern
|
||||
!end
|
||||
|
2
pegs.R
2
pegs.R
@ -17,5 +17,5 @@ GAMES += pegs
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
pegs.exe
|
||||
pegs.exe:Pegs
|
||||
!end
|
||||
|
2
rect.R
2
rect.R
@ -15,5 +15,5 @@ GAMES += rect
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
rect.exe
|
||||
rect.exe:Rectangles
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += samegame
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
samegame.exe
|
||||
samegame.exe:Same Game
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += sixteen
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
sixteen.exe
|
||||
sixteen.exe:Sixteen
|
||||
!end
|
||||
|
2
slant.R
2
slant.R
@ -20,5 +20,5 @@ GAMES += slant
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
slant.exe
|
||||
slant.exe:Slant
|
||||
!end
|
||||
|
2
solo.R
2
solo.R
@ -18,5 +18,5 @@ GAMES += solo
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
solo.exe
|
||||
solo.exe:Solo
|
||||
!end
|
||||
|
2
tents.R
2
tents.R
@ -20,5 +20,5 @@ GAMES += tents
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
tents.exe
|
||||
tents.exe:Tents
|
||||
!end
|
||||
|
@ -15,5 +15,5 @@ GAMES += twiddle
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
twiddle.exe
|
||||
twiddle.exe:Twiddle
|
||||
!end
|
||||
|
@ -23,5 +23,5 @@ GAMES += unequal
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
unequal.exe
|
||||
unequal.exe:Unequal
|
||||
!end
|
||||
|
@ -17,5 +17,5 @@ GAMES += untangle
|
||||
!end
|
||||
|
||||
!begin >wingames.lst
|
||||
untangle.exe
|
||||
untangle.exe:Untangle
|
||||
!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