hints system changes and more Mac packaging
update file headers add "#-PRE" and "#-POST" keywords (no default) so hints file can wrap Makefile.* add make var with name of makefile (e.g. MAKEFILE_TOP) so hints file can be conditional on the file add skeletel Mac Qt packaging target add missing aux file generation for Mac Term packaging
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
#
|
#
|
||||||
# SCCS Id: @(#)linux 3.5 2007/12/15
|
# NetHack 3.5 linux $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
#-PRE
|
||||||
# Linux hints file
|
# Linux hints file
|
||||||
# This hints file provides a single-user tty build for Linux, specifically
|
# This hints file provides a single-user tty build for Linux, specifically
|
||||||
# for Ubuntu dapper.
|
# for Ubuntu dapper.
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#
|
#
|
||||||
# SCCS Id: @(#)linux 3.5 2007/12/16
|
# NetHack 3.5 linux-x11 $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
#-PRE
|
||||||
# Linux hints file
|
# Linux hints file
|
||||||
# This hints file provides a single-user x11 build for Linux, specifically
|
# This hints file provides a single-user x11 build for Linux, specifically
|
||||||
# for Ubuntu dapper.
|
# for Ubuntu dapper.
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#
|
#
|
||||||
# SCCS Id: @(#)macosx 3.5 2007/12/12
|
# NetHack 3.5 macosx $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
#-PRE
|
||||||
# Mac OS X (Darwin) hints file
|
# Mac OS X (Darwin) hints file
|
||||||
# This is for Mac OS X 10.4.10 (Darwin 8.10). If this doesn't work for some
|
# This is for Mac OS X 10.4.10 (Darwin 8.10). If this doesn't work for some
|
||||||
# other version of either Darwin or Mac OS X, make a new file for that OS,
|
# other version of either Darwin or Mac OS X, make a new file for that OS,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SCCS Id: @(#)macosx.sh 3.5 2007/12/12
|
# NetHack 3.5 macosx.sh $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
@@ -105,6 +105,73 @@ xgroup2)
|
|||||||
# RecordType: dsRecTypeStandard:Groups
|
# RecordType: dsRecTypeStandard:Groups
|
||||||
# SMBSID: S-1-5-21-100
|
# SMBSID: S-1-5-21-100
|
||||||
|
|
||||||
|
xdescplist) SVSDOT=`util/makedefs --svs .`
|
||||||
|
cat <<E_O_M;
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IFPkgDescriptionDeleteWarning</key>
|
||||||
|
<string></string>
|
||||||
|
<key>IFPkgDescriptionDescription</key>
|
||||||
|
<string>NetHack $SVSDOT for the MacOS X Terminal
|
||||||
|
</string>
|
||||||
|
<key>IFPkgDescriptionTitle</key>
|
||||||
|
<string>NetHack</string>
|
||||||
|
<key>IFPkgDescriptionVersion</key>
|
||||||
|
<string>$SVSDOT</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
E_O_M
|
||||||
|
;;
|
||||||
|
|
||||||
|
xinfoplist) SVSDOT=`util/makedefs --svs .`
|
||||||
|
cat <<E_O_M;
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string>NetHack $SVSDOT for the MacOS X Terminal</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>org.nethack.term</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>NetHack</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$SVSDOT</string>
|
||||||
|
<key>IFMajorVersion</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>IFMinorVersion</key>
|
||||||
|
<integer>3</integer>
|
||||||
|
<key>IFPkgFlagAllowBackRev</key>
|
||||||
|
<true/>
|
||||||
|
<key>IFPkgFlagAuthorizationAction</key>
|
||||||
|
<string>RootAuthorization</string>
|
||||||
|
<key>IFPkgFlagDefaultLocation</key>
|
||||||
|
<string>/usr/games</string>
|
||||||
|
<key>IFPkgFlagInstallFat</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFlagIsRequired</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFlagOverwritePermissions</key>
|
||||||
|
<true/>
|
||||||
|
<key>IFPkgFlagRelocatable</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFlagRestartAction</key>
|
||||||
|
<string>NoRestart</string>
|
||||||
|
<key>IFPkgFlagRootVolumeOnly</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFlagUpdateInstalledLanguages</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFlagUseUserMask</key>
|
||||||
|
<false/>
|
||||||
|
<key>IFPkgFormatVersion</key>
|
||||||
|
<real>0.10000000149011612</real>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
E_O_M
|
||||||
|
;;
|
||||||
|
|
||||||
*) echo "Unknown command $cmd"
|
*) echo "Unknown command $cmd"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#
|
#
|
||||||
# SCCS Id: @(#)macosx 3.5 2007/12/12
|
# NetHack 3.5 macosx10.5 $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
#-PRE
|
||||||
# Mac OS X (Darwin) hints file
|
# Mac OS X (Darwin) hints file
|
||||||
# This is for Mac OS X 10.5.3 (Darwin 9.3). If this doesn't work for some
|
# This is for Mac OS X 10.5.3 (Darwin 9.3). If this doesn't work for some
|
||||||
# other version of either Darwin or Mac OS X, make a new file for that OS,
|
# other version of either Darwin or Mac OS X, make a new file for that OS,
|
||||||
@@ -173,6 +174,8 @@ endif # !WANT_SOURCE_INSTALL
|
|||||||
# Install.Qt mentions a patch for macos - it's not there (it seems to be in the Qt binary
|
# Install.Qt mentions a patch for macos - it's not there (it seems to be in the Qt binary
|
||||||
# package under the docs directory).
|
# package under the docs directory).
|
||||||
|
|
||||||
|
#-POST
|
||||||
|
ifdef MAKEFILE_TOP
|
||||||
###
|
###
|
||||||
### Packaging
|
### Packaging
|
||||||
###
|
###
|
||||||
@@ -188,10 +191,11 @@ PKGR=$(DEVUTIL)/PackageMaker.app/Contents/MacOS/PackageMaker
|
|||||||
SVS=$(shell $(NHSROOT)/util/makedefs --svs)
|
SVS=$(shell $(NHSROOT)/util/makedefs --svs)
|
||||||
|
|
||||||
build_tty_pkg:
|
build_tty_pkg:
|
||||||
if defined(WANT_WIN_X11) || defined(WANT_WIN_QT)
|
ifneq (,$(WANT_WIN_X11)$(WANT_WIN_QT))
|
||||||
$(error "build_tty_pkg only works for a tty-only build)
|
-echo build_tty_pkg only works for a tty-only build
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
$(MAKE) build_package_root
|
$(MAKE) build_package_root
|
||||||
rm -rf RESOURCES
|
rm -rf RESOURCES
|
||||||
mkdir RESOURCES
|
mkdir RESOURCES
|
||||||
enscript --language=rtf -o - < dat/license >RESOURCES/License.rtf
|
enscript --language=rtf -o - < dat/license >RESOURCES/License.rtf
|
||||||
@@ -201,8 +205,8 @@ else
|
|||||||
$(PKGR) --root PKGROOT --info Info.plist -e RESOURCES -v -o NetHack-$(SVS)-mac-Term.pkg
|
$(PKGR) --root PKGROOT --info Info.plist -e RESOURCES -v -o NetHack-$(SVS)-mac-Term.pkg
|
||||||
hdiutil create -verbose -srcfolder NetHack-$(SVS)-mac-Term.pkg Nethack-$(SVS)-mac-Term.dmg
|
hdiutil create -verbose -srcfolder NetHack-$(SVS)-mac-Term.pkg Nethack-$(SVS)-mac-Term.dmg
|
||||||
|
|
||||||
SVS:=$(shell util/makedefs -svs)
|
SVS=$(shell util/makedefs --svs)
|
||||||
SVSDOT:=$(shell util/makedefs -svs .)
|
SVSDOT=$(shell util/makedefs --svs .)
|
||||||
|
|
||||||
build_package_root:
|
build_package_root:
|
||||||
cd src/.. # make sure we are at TOP
|
cd src/.. # make sure we are at TOP
|
||||||
@@ -219,6 +223,46 @@ build_package_root:
|
|||||||
touch PKGROOT/perm PKGROOT/record PKGROOT/logfile
|
touch PKGROOT/perm PKGROOT/record PKGROOT/logfile
|
||||||
# XXX may need postinstall script to get perms right for sgid, etc.
|
# XXX may need postinstall script to get perms right for sgid, etc.
|
||||||
mkdir PKGROOT/save
|
mkdir PKGROOT/save
|
||||||
|
# XXX what about a news file?
|
||||||
|
endif # end of build_tty_pkg
|
||||||
|
endif # WANT_WIN_TTY for packaging
|
||||||
|
|
||||||
endif
|
ifdef WANT_WIN_QT
|
||||||
endif
|
# XXX untested and incomplete (see below)
|
||||||
|
build_qt_pkg:
|
||||||
|
ifneq (,$(WANT_WIN_X11)$(WANT_WIN_TTY))
|
||||||
|
-echo build_qt_pkg only works for a qt-only build
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
$(MAKE) build_package_root
|
||||||
|
rm -rf NetHackQt
|
||||||
|
mkdir -p NetHackQt/NetHackQt.app/nethackdir/save
|
||||||
|
mkdir NetHackQt/Documentation
|
||||||
|
cp doc/Guidebook.txt doc/nethack.txt doc/recover.txt NetHackQt/Documentation
|
||||||
|
|
||||||
|
osacompile -o NetHackQt/NetHackQt.app/nethackdir/NetHackRecover.app \
|
||||||
|
win/macosx/NetHackRecover.applescript
|
||||||
|
cp win/macosx/recover.pl NetHackQt/NetHackQt.app/nethackdir
|
||||||
|
|
||||||
|
mkdir -p NetHackQt/NetHackQt.app/Contents/Frameworks
|
||||||
|
cp $(QTDIR)/libqt-mt.3.dylib NetHackQt/NetHackQt.app/Contents/Frameworks
|
||||||
|
|
||||||
|
mkdir NetHackQt/NetHackQt.app/Contents/MacOS
|
||||||
|
mv PKGROOT/nethack NetHackQt/NetHackQt.app/Contents/MacOS
|
||||||
|
|
||||||
|
mv PKGROOT/lib/nethackdir NetHackQt/NetHackQt.app/nethackdir
|
||||||
|
|
||||||
|
# XXX still missing:
|
||||||
|
#NetHackQt/NetHackQt.app
|
||||||
|
# /Contents
|
||||||
|
# Info.plist
|
||||||
|
# Resources/nethack.icns
|
||||||
|
#NetHackQt/Documentation
|
||||||
|
#NetHackQtRecover.txt
|
||||||
|
#NetHack Defaults.txt
|
||||||
|
#changes.patch XXX is this still needed? why isn't it part of the tree?
|
||||||
|
# doesn't go here
|
||||||
|
hdiutil create -verbose -srcfolder NetHackQt NetHack-$(SVS)-macosx-qt.dmg
|
||||||
|
endif # end of build_qt_pkg
|
||||||
|
endif # WANT_WIN_QT for packaging
|
||||||
|
endif # MAKEFILE_TOP
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#
|
#
|
||||||
# SCCS Id: @(#)unix 3.5 2007/12/12
|
# NetHack 3.5 unix $Date$ $Revision$
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
|
#-PRE
|
||||||
# unix hints file
|
# unix hints file
|
||||||
# This hints file provides the legacy configuration that NetHack has shipped
|
# This hints file provides the legacy configuration that NetHack has shipped
|
||||||
# with historically - this means you will most likely need to hand edit .h
|
# with historically - this means you will most likely need to hand edit .h
|
||||||
|
|||||||
@@ -1,23 +1,42 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# NetHack 3.5 mkmkfile.sh $Date$ $Revision$
|
# NetHack 3.5 mkmkfile.sh $Date$ $Revision$
|
||||||
# SCCS Id: @(#)macosx 3.5 2007/12/12
|
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
|
|
||||||
# build one makefile
|
# build one makefile
|
||||||
# args are:
|
# args are:
|
||||||
# $1 basefile
|
# $1 basefile
|
||||||
# $2 install path
|
# $2 basefile tag
|
||||||
# $3 hints file
|
# $3 install path
|
||||||
|
# $4 hints file
|
||||||
|
|
||||||
echo "#" > $2
|
echo "#" > $3
|
||||||
echo "# This file is generated automatically. Do not edit." >> $2
|
echo "# This file is generated automatically. Do not edit." >> $3
|
||||||
echo "# Your changes will be lost. See sys/unix/NewInstall.unx." >> $2
|
echo "# Your changes will be lost. See sys/unix/NewInstall.unx." >> $3
|
||||||
echo "###" >> $2
|
echo "# Identify this file:" >> $3
|
||||||
echo "### Start $3" >> $2
|
echo "MAKEFILE_$2=1" >> $3
|
||||||
echo "###" >> $2
|
echo "" >> $3
|
||||||
cat $3 >> $2
|
|
||||||
echo "### end of file" >> $2
|
echo "###" >> $3
|
||||||
echo "### Start $1" >> $2
|
echo "### Start $4 PRE" >> $3
|
||||||
cat $1 >> $2
|
echo "###" >> $3
|
||||||
echo "### end of file" >> $2
|
awk '/^#-PRE/,/^#-POST/{ \
|
||||||
|
if(index($0, "#-PRE") == 1) print "# (new segment at source line",NR,")"; \
|
||||||
|
if(index($0, "#-P") != 1) print}' $4 >> $3
|
||||||
|
echo "### end $4 PRE" >> $3
|
||||||
|
echo "" >> $3
|
||||||
|
|
||||||
|
echo "###" >> $3
|
||||||
|
echo "### Start $1" >> $3
|
||||||
|
echo "###" >> $3
|
||||||
|
cat $1 >> $3
|
||||||
|
echo "### end of file" >> $3
|
||||||
|
echo "" >> $3
|
||||||
|
|
||||||
|
echo "###" >> $3
|
||||||
|
echo "### Start $4 POST" >> $3
|
||||||
|
echo "###" >> $3
|
||||||
|
awk '/^#-POST/,/^#-PRE/{ \
|
||||||
|
if(index($0, "#-POST") == 1) print "# (new segment at source line",NR,")"; \
|
||||||
|
if(index($0, "#-P") != 1) print}' $4 >> $3
|
||||||
|
echo "### end $4 POST" >> $3
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# NetHack 3.5 setup.sh $Date$ $Revision$
|
# NetHack 3.5 setup.sh $Date$ $Revision$
|
||||||
# SCCS Id: @(#)setup.sh 3.5 2007/12/12
|
|
||||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||||
# NetHack may be freely redistributed. See license for details.
|
# NetHack may be freely redistributed. See license for details.
|
||||||
#
|
#
|
||||||
@@ -18,8 +17,8 @@ x) hints=/dev/null
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
/bin/sh ./mkmkfile.sh Makefile.top ../../Makefile $hints
|
/bin/sh ./mkmkfile.sh Makefile.top TOP ../../Makefile $hints
|
||||||
/bin/sh ./mkmkfile.sh Makefile.dat ../../dat/Makefile $hints
|
/bin/sh ./mkmkfile.sh Makefile.dat DAT ../../dat/Makefile $hints
|
||||||
/bin/sh ./mkmkfile.sh Makefile.doc ../../doc/Makefile $hints
|
/bin/sh ./mkmkfile.sh Makefile.doc DOC ../../doc/Makefile $hints
|
||||||
/bin/sh ./mkmkfile.sh Makefile.src ../../src/Makefile $hints
|
/bin/sh ./mkmkfile.sh Makefile.src SRC ../../src/Makefile $hints
|
||||||
/bin/sh ./mkmkfile.sh Makefile.utl ../../util/Makefile $hints
|
/bin/sh ./mkmkfile.sh Makefile.utl UTL ../../util/Makefile $hints
|
||||||
|
|||||||
Reference in New Issue
Block a user