From 61b86ce0e5d234d1cb5818922d8ee44bcf823224 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sun, 15 Jan 2006 18:02:44 +0000 Subject: 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 --- test/Makefile | 49 +++++++++++++++++++++++++++++++++- test/checkers-128.png | Bin 0 -> 23655 bytes test/checkers-32.png | Bin 0 -> 1871 bytes test/checkers.app/Contents/Info.plist | 44 ++++++++++++++++++++++++++++++ test/checkers.app/Contents/PkgInfo | 1 + test/checkers.desktop | 10 +++++++ test/sudoku-128.png | Bin 0 -> 6514 bytes test/sudoku-32.png | Bin 0 -> 295 bytes test/sudoku.app/Contents/Info.plist | 4 +-- test/sudoku.desktop | 10 +++++++ test/sudoku.png | Bin 6514 -> 0 bytes 11 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 test/checkers-128.png create mode 100644 test/checkers-32.png create mode 100644 test/checkers.app/Contents/Info.plist create mode 100644 test/checkers.app/Contents/PkgInfo create mode 100644 test/checkers.desktop create mode 100644 test/sudoku-128.png create mode 100644 test/sudoku-32.png create mode 100644 test/sudoku.desktop delete mode 100644 test/sudoku.png (limited to 'test') 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 Binary files /dev/null and b/test/checkers-128.png differ diff --git a/test/checkers-32.png b/test/checkers-32.png new file mode 100644 index 000000000..4adcd6663 Binary files /dev/null and b/test/checkers-32.png 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 @@ + + + + CFBundleInfoDictionaryVersion + 6.0 + + CFBundleExecutable + checkers + + CFBundleIdentifier + org.fltk.checkers + + CFBundleVersion + 1.0 + + CFBundleDevelopmentRegion + English + + NSHumanReadableCopyright + Copyright 1997-2006 by Bill Spitzak and others + + CFAppleHelpAnchor + help + + CFBundleName + checkers + + CFBundlePackageType + APPL + + CFBundleSignature + FLSU + + CFBundleIconFile + checkers.icns + + CFBundleShortVersionString + 1.0 + + CFBundleGetInfoString + 1.0, Copyright 1997-2006 by Bill Spitzak and others + + + 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-128.png b/test/sudoku-128.png new file mode 100644 index 000000000..070a41016 Binary files /dev/null and b/test/sudoku-128.png differ diff --git a/test/sudoku-32.png b/test/sudoku-32.png new file mode 100644 index 000000000..154c27308 Binary files /dev/null and b/test/sudoku-32.png 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 @@ English NSHumanReadableCopyright - Copyright 2005 by Michael Sweet + Copyright 2005-2006 by Michael Sweet CFAppleHelpAnchor help @@ -38,7 +38,7 @@ 1.0 CFBundleGetInfoString - 1.0, Copyright 2005 by Michael Sweet + 1.0, Copyright 2005-2006 by Michael Sweet 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 diff --git a/test/sudoku.png b/test/sudoku.png deleted file mode 100644 index 070a41016..000000000 Binary files a/test/sudoku.png and /dev/null differ -- cgit v1.2.3