summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2006-01-15 18:02:44 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2006-01-15 18:02:44 +0000
commit61b86ce0e5d234d1cb5818922d8ee44bcf823224 (patch)
tree049c13ceff52c1aee003339df04b8f553e5e9ecf /test
parent464c2f4a5e16c45846b941ea335f6c8b315bc364 (diff)
More packaging fun (games package to "advertise" FLTK...)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4755 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
-rw-r--r--test/Makefile49
-rw-r--r--test/checkers-128.pngbin0 -> 23655 bytes
-rw-r--r--test/checkers-32.pngbin0 -> 1871 bytes
-rw-r--r--test/checkers.app/Contents/Info.plist44
-rw-r--r--test/checkers.app/Contents/PkgInfo1
-rw-r--r--test/checkers.desktop10
-rw-r--r--test/sudoku-128.png (renamed from test/sudoku.png)bin6514 -> 6514 bytes
-rw-r--r--test/sudoku-32.pngbin0 -> 295 bytes
-rw-r--r--test/sudoku.app/Contents/Info.plist4
-rw-r--r--test/sudoku.desktop10
10 files changed, 115 insertions, 3 deletions
diff --git a/test/Makefile b/test/Makefile
index d5e357b5d..925a00fe1 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -3,7 +3,7 @@
#
# Test/example program makefile for the Fast Light Tool Kit (FLTK).
#
-# Copyright 1998-2005 by Bill Spitzak and others.
+# Copyright 1998-2006 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -180,10 +180,53 @@ install:
$(CP) *.h *.cxx *.fl demo.menu *.xbm *.xpm $(DESTDIR)$(docdir)/examples
$(CHMOD) 644 $(DESTDIR)$(docdir)/examples/*.*
+install-linux:
+ echo Installing games to $(DESTDIR)$(bindir)...
+ -$(MKDIR) $(DESTDIR)$(bindir)
+ -$(MKDIR) $(DESTDIR)/usr/share/applnk/Games
+ -$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps; \
+ -$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps; \
+ for game in checkers sudoku; do \
+ $(CP) $$game $(DESTDIR)$(bindir); \
+ $(CHMOD) 755 $(DESTDIR)$(bindir)/$$game; \
+ $(CP) $$game.desktop $(DESTDIR)/usr/share/applnk/Games; \
+ $(CP) icons/$$game-32.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
+ $(CP) icons/$$game-128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
+ done
+
+install-osx:
+ echo Installing games in $(DESTDIR)/Applications...
+ for game in checkers sudoku; do \
+ if test ! -d $(DESTDIR)/Applications/$$game.app; then \
+ $(MKDIR) $(DESTDIR)/Applications/$$game.app; \
+ $(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents; \
+ $(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
+ $(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
+ fi; \
+ $(CP) $$game.app/Contents/Info.plist $(DESTDIR)/Applications/$$game.app/Contents; \
+ $(CP) $$game.app/Contents/PkgInfo $(DESTDIR)/Applications/$$game.app/Contents; \
+ $(CP) $$game.app/Contents/MacOS/$$game $(DESTDIR)/Applications/$$game.app/Contents/MacOS; \
+ $(CP) $$game.app/Contents/Resources/$$game.icns $(DESTDIR)/Applications/$$game.app/Contents/Resources; \
+ done
+
uninstall:
echo "Removing examples programs from $(DESTDIR)$(docdir)/examples..."
-$(RMDIR) $(DESTDIR)$(docdir)/examples
+uninstall-linux:
+ echo Removing games from $(DESTDIR)$(bindir)...
+ for game in checkers sudoku; do \
+ $(RM) $(DESTDIR)$(bindir)/$$game; \
+ $(RM) $(DESTDIR)/usr/share/applnk/Games/$$game.desktop; \
+ $(RM) $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
+ $(RM) $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
+ done
+
+uninstall-osx:
+ echo Removing games from $(DESTDIR)/Applications...
+ $(RM) -r $(DESTDIR)/Applications/checkers.app
+ $(RM) -r $(DESTDIR)/Applications/sudoku.app
+
# FLUID file rules
.fl.cxx .fl.h: ../fluid/fluid$(EXEEXT)
echo Generating $<...
@@ -212,6 +255,10 @@ button$(EXEEXT): button.o
buttons$(EXEEXT): buttons.o
checkers$(EXEEXT): checkers.o
+ echo Linking $@...
+ $(CXX) $(CXXFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
+ $(CP) checkers$(EXEEXT) checkers.app/Contents/MacOS
+ $(POSTBUILD) $@ ../FL/mac.r
clock$(EXEEXT): clock.o
diff --git a/test/checkers-128.png b/test/checkers-128.png
new file mode 100644
index 000000000..ed0252745
--- /dev/null
+++ b/test/checkers-128.png
Binary files differ
diff --git a/test/checkers-32.png b/test/checkers-32.png
new file mode 100644
index 000000000..4adcd6663
--- /dev/null
+++ b/test/checkers-32.png
Binary files differ
diff --git a/test/checkers.app/Contents/Info.plist b/test/checkers.app/Contents/Info.plist
new file mode 100644
index 000000000..6bfebc4ce
--- /dev/null
+++ b/test/checkers.app/Contents/Info.plist
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plist version="0.9">
+ <dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleExecutable</key>
+ <string>checkers</string>
+
+ <key>CFBundleIdentifier</key>
+ <string>org.fltk.checkers</string>
+
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright 1997-2006 by Bill Spitzak and others</string>
+
+ <key>CFAppleHelpAnchor</key>
+ <string>help</string>
+
+ <key>CFBundleName</key>
+ <string>checkers</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleSignature</key>
+ <string>FLSU</string>
+
+ <key>CFBundleIconFile</key>
+ <string>checkers.icns</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+
+ <key>CFBundleGetInfoString</key>
+ <string>1.0, Copyright 1997-2006 by Bill Spitzak and others</string>
+
+ </dict>
+</plist>
diff --git a/test/checkers.app/Contents/PkgInfo b/test/checkers.app/Contents/PkgInfo
new file mode 100644
index 000000000..5af7226a1
--- /dev/null
+++ b/test/checkers.app/Contents/PkgInfo
@@ -0,0 +1 @@
+FLSUFlsu
diff --git a/test/checkers.desktop b/test/checkers.desktop
new file mode 100644
index 000000000..6ad895806
--- /dev/null
+++ b/test/checkers.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=checkers
+Comment=Checkers Game
+TryExec=checkers
+Exec=checkers
+Icon=checkers
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Games
diff --git a/test/sudoku.png b/test/sudoku-128.png
index 070a41016..070a41016 100644
--- a/test/sudoku.png
+++ b/test/sudoku-128.png
Binary files differ
diff --git a/test/sudoku-32.png b/test/sudoku-32.png
new file mode 100644
index 000000000..154c27308
--- /dev/null
+++ b/test/sudoku-32.png
Binary files differ
diff --git a/test/sudoku.app/Contents/Info.plist b/test/sudoku.app/Contents/Info.plist
index 55e42690a..00eeb0516 100644
--- a/test/sudoku.app/Contents/Info.plist
+++ b/test/sudoku.app/Contents/Info.plist
@@ -17,7 +17,7 @@
<string>English</string>
<key>NSHumanReadableCopyright</key>
- <string>Copyright 2005 by Michael Sweet</string>
+ <string>Copyright 2005-2006 by Michael Sweet</string>
<key>CFAppleHelpAnchor</key>
<string>help</string>
@@ -38,7 +38,7 @@
<string>1.0</string>
<key>CFBundleGetInfoString</key>
- <string>1.0, Copyright 2005 by Michael Sweet</string>
+ <string>1.0, Copyright 2005-2006 by Michael Sweet</string>
</dict>
</plist>
diff --git a/test/sudoku.desktop b/test/sudoku.desktop
new file mode 100644
index 000000000..11ba2d366
--- /dev/null
+++ b/test/sudoku.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=sudoku
+Comment=Suduku Number Game
+TryExec=sudoku
+Exec=sudoku
+Icon=sudoku
+Terminal=false
+Type=Application
+Encoding=UTF-8
+Categories=Games