This commit was manufactured by cvs2svn to create branch
authornobody <nobody@nowhere>
Thu, 29 May 2003 06:26:28 +0000 (06:26 +0000)
committernobody <nobody@nowhere>
Thu, 29 May 2003 06:26:28 +0000 (06:26 +0000)
'console-branch'.

Info.plist.in [new file with mode: 0644]
Makefile.am
configure.ac

diff --git a/Info.plist.in b/Info.plist.in
new file mode 100644 (file)
index 0000000..a4b3e84
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+<plist version="0.9">
+<dict>
+       <key>CFBundleDevelopmentRegion</key>
+       <string>English</string>
+       <key>CFBundleExecutable</key>
+       <string>@TARGETS@</string>
+       <key>CFBundleGetInfoString</key>
+       <string>@VERSION@, Copyright 2003 Bradley Bell</string>
+       <key>CFBundleInfoDictionaryVersion</key>
+       <string>6.0</string>
+       <key>CFBundleName</key>
+       <string>@PACKAGE@</string>
+       <key>CFBundlePackageType</key>
+       <string>APPL</string>
+       <key>CFBundleShortVersionString</key>
+       <string>@VERSION@</string>
+       <key>CFBundleSignature</key>
+       <string>????</string>
+       <key>CFBundleVersion</key>
+       <string>@VERSION@</string>
+       <key>NSMainNibFile</key>
+       <string>SDLMain.nib</string>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
+       <key>NSHumanReadableCopyright</key>
+       <string>Copyright 2003 Bradley Bell</string>
+</dict>
+</plist>
index 407f602..28db43f 100644 (file)
@@ -2,6 +2,14 @@ SUBDIRS = 2d 3d maths mem cfile iff texmap misc arch main libmve utilities
 
 EXTRA_SUBDIRS = include unused debian rpm
 
+if BUILD_MACOSX_BUNDLE
+bundle_contents = @PACKAGE@.app/Contents
+else
+if BUILD_SIMPLE_BUNDLE
+bundle_contents = @PACKAGE@
+endif
+endif
+
 bin_PROGRAMS = @TARGETS@
 
 EXTRA_PROGRAMS = d2x d2x-sdl d2x-gl d2x-svga d2x-ggi
@@ -48,6 +56,60 @@ dist-hook:
 pkgdatadir = @sharepath@
 missiondir = ${pkgdatadir}/missions
 
+CLEANFILES = @TARGETS@ Info.plist
+
+if BUILD_MACOSX_BUNDLE
+
+@PACKAGE@_bundle: @TARGETS@
+       mkdir -p $(bundle_contents)/MacOS
+       echo "APPL????" > $(bundle_contents)/PkgInfo
+       $(INSTALL_DATA) Info.plist $(bundle_contents)
+       $(INSTALL_PROGRAM) @TARGETS@ $(bundle_contents)/MacOS/
+
+install-exec-hook: @PACKAGE@_bundle
+       rm -rf $(DESTDIR)$(prefix)/@PACKAGE@.app
+       mkdir -p $(DESTDIR)$(prefix)/
+       cp -r @PACKAGE@.app $(DESTDIR)$(prefix)/
+
+clean-local:
+       rm -rf $(bundle_contents)
+
+else
+
+if BUILD_SIMPLE_BUNDLE
+
+@PACKAGE@_bundle: @TARGETS@
+       $(INSTALL_PROGRAM) @TARGETS@ $(bundle_contents)/
+
+install-exec-hook: @PACKAGE@_bundle
+       rm -rf $(DESTDIR)/$(prefix)/@PACKAGE@
+       mkdir -p $(DESTDIR)/$(prefix)/
+       cp COPYING @PACKAGE@/COPYING.txt
+       cp COPYING.LIB @PACKAGE@/COPYING_LIB.txt
+       cp ChangeLog @PACKAGE@/ChangeLog.txt
+       cp TODO @PACKAGE@/TODO.txt
+       cp README @PACKAGE@/README.txt
+       cp README.jp @PACKAGE@/README_jp.txt
+       cp README.sfont @PACKAGE@/sfont.txt
+       cp README.xkobo @PACKAGE@/xkobo.txt
+       cp README.xkobo.jp @PACKAGE@/xkobo_jp.txt
+       cp 501 @PACKAGE@/scores/42
+       cp -r @PACKAGE@  $(DESTDIR)/$(prefix)/
+
+clean-local:
+       rm -rf $(bundle_contents)
+
+else
+@PACKAGE@_bundle:
+
+install-exec-hook:
+
+clean-local:
+
+endif
+
+endif
+
 EXTRA_DIST = ${EXTRA_SUBDIRS} \
 ChangeLog \
 README.utils \
index 096cc41..8cc5f1a 100644 (file)
@@ -43,6 +43,9 @@ case $host_cpu in
        ;;
 esac
 
+build_macosx_bundle=no
+build_simple_bundle=no
+
 case $host_os in
     cygwin)
         AC_MSG_WARN([Cygwin found, setting -mno-cygwin])
@@ -54,7 +57,14 @@ case $host_os in
         ;;
     darwin*)
         MACOSX=yes
-        ;;
+       AC_MSG_RESULT(Mac OS X/Darwin; Mac OS X bundle)
+       build_macosx_bundle=yes
+       DATADIR='EXE>>../Resources'
+       #SCOREDIR='/Library/Preferences/KoboDeluxe/scores'
+       #CONFIGDIR='HOME>>Library/Preferences'
+       #CONFIGFILE='KoboDeluxe Preferences'
+       MATHLIB=""
+       ;;
     msdos*)
         MSDOS=yes
         ;;
@@ -73,6 +83,8 @@ else
 fi
 
 AM_CONDITIONAL(MACOSX, test x$MACOSX = xyes)
+AM_CONDITIONAL(BUILD_MACOSX_BUNDLE, test x$build_macosx_bundle = xyes)
+AM_CONDITIONAL(BUILD_SIMPLE_BUNDLE, test x$build_simple_bundle = xyes)
 
 dnl Set $prefix and $exec_prefix to $ac_default_prefix if they are not set
 test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
@@ -378,6 +390,7 @@ AC_OUTPUT(
     utilities/Makefile
     debian/changelog
     rpm/d2x.spec
+    Info.plist
 )
 
 AC_MSG_RESULT([