Skip to content

Commit

Permalink
Do some rearranging of image and desktop support files.
Browse files Browse the repository at this point in the history
Add new Block Attack! game...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5358 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Aug 25, 2006
1 parent 0ce1425 commit f27180b
Show file tree
Hide file tree
Showing 64 changed files with 2,738 additions and 397 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
CHANGES IN FLTK 1.1.8

- Added a new demo game called "Block Attack!"
- Updated the Sudoku game to show a notice about Hard and
Impossible puzzles having multiple solutions which are
not a bug or error (STR #1361)
Expand Down
8 changes: 7 additions & 1 deletion documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ IMAGEFILES = \


MANPAGES = fltk.$(CAT3EXT) fltk-config.$(CAT1EXT) fluid.$(CAT1EXT) \
checkers.$(CAT6EXT) sudoku.$(CAT6EXT)
blocks.$(CAT6EXT) checkers.$(CAT6EXT) sudoku.$(CAT6EXT)

all: $(MANPAGES)

Expand Down Expand Up @@ -253,11 +253,15 @@ install: $(MANPAGES)

install-linux install-osx:
-$(MKDIR) $(DESTDIR)$(mandir)/cat6
$(CP) blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
$(CP) checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
$(CP) sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
-$(MKDIR) $(DESTDIR)$(mandir)/man6
$(CP) blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
$(CHMOD) 644 $(DESTDIR)$(mandir)/man6/blocks.6
$(CP) checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
$(CHMOD) 644 $(DESTDIR)$(mandir)/man6/checkers.6
$(CP) sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6
Expand All @@ -274,8 +278,10 @@ uninstall:
$(RM) $(DESTDIR)$(mandir)/man3/fltk.3

uninstall-linux uninstall-osx:
$(RM) $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
$(RM) $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
$(RM) $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
$(RM) $(DESTDIR)$(mandir)/man6/blocks.6
$(RM) $(DESTDIR)$(mandir)/man6/checkers.6
$(RM) $(DESTDIR)$(mandir)/man6/sudoku.6

Expand Down
26 changes: 26 additions & 0 deletions documentation/blocks.man
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.TH blocks 6 "FLTK Checkers" "15 January 2006"
.SH NAME
blocks \- the fltk block attack! game
.sp
.SH SYNOPSIS
\fIBlocks\fR is a FLTK-based block elimination game. Stacks of
colored blocks move from right to left as you try to eliminate
groups adjacent blocks by clicking on them. As the game
progresses, more colors are added (up to a maximum of 7) and the
blocks move faster and faster.
.SH GAME PLAY
Press the N key to start a game. As the blocks move across the
window, click on groups of two or more blocks to clear them - the
larger the number of adjacent blocks, the greater the score.
Clicking on a blocks containing a dark ball will clear all blocks
of that color, however you will score much fewer points than a
normal click. The game is over when the blocks reach the left
side of the window.
.LP
Press the spacebar to pause the game.
.SH SEE ALSO
fltk(3)
.br
FLTK Web Site, http://www.fltk.org/
.SH AUTHOR
Michael R Sweet.
31 changes: 24 additions & 7 deletions fltk.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,19 @@ f 0444 root sys $docdir/examples/ test/*.h

%subpackage games
%description FLTK Games
%description Install fltk-games to play checkers or Sudoku on your computer.
%description Install fltk-games to play Block Attack!, checkers, or Sudoku on your computer.

%system darwin
d 0555 root sys /Applications/blocks.app -
d 0555 root sys /Applications/blocks.app/Contents -
f 0444 root sys /Applications/blocks.app/Contents/Info.plist test/blocks.app/Contents/Info.plist
f 0444 root sys /Applications/blocks.app/Contents/PkgInfo test/blocks.app/Contents/PkgInfo
d 0555 root sys /Applications/blocks.app/Contents/MacOS -
f 0555 root sys /Applications/blocks.app/Contents/MacOS/blocks test/blocks
d 0555 root sys /Applications/blocks.app/Contents/Resources -
f 0444 root sys /Applications/blocks.app/Contents/Resources/blocks.icns test/blocks.app/Contents/Resources/blocks.icns
%postremove /bin/rm -rf /Applications/blocks.app

d 0555 root sys /Applications/checkers.app -
d 0555 root sys /Applications/checkers.app/Contents -
f 0444 root sys /Applications/checkers.app/Contents/Info.plist test/checkers.app/Contents/Info.plist
Expand All @@ -383,19 +393,26 @@ f 0444 root sys /Applications/sudoku.app/Contents/Resources/sudoku.icns test/sud
%postremove /bin/rm -rf /Applications/sudoku.app

%system !darwin
f 0555 root sys $bindir/blocks test/blocks
f 0444 root sys /usr/share/applnk/Games/blocks.desktop test/desktop/blocks.desktop
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/blocks.png test/icons/blocks-32.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/blocks.png test/icons/blocks-128.png

f 0555 root sys $bindir/checkers test/checkers
f 0444 root sys /usr/share/applnk/Games/checkers.desktop test/checkers.desktop
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/checkers.png checkers/checkers-32.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/checkers.png checkers/checkers-128.png
f 0444 root sys /usr/share/applnk/Games/checkers.desktop test/desktop/checkers.desktop
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/checkers.png test/icons/checkers-32.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/checkers.png test/icons/checkers-128.png

f 0555 root sys $bindir/sudoku test/sudoku
f 0444 root sys /usr/share/applnk/Games/sudoku.desktop test/sudoku.desktop
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/sudoku.png sudoku/sudoku-32.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/sudoku.png sudoku/sudoku-128.png
f 0444 root sys /usr/share/applnk/Games/sudoku.desktop test/desktop/sudoku.desktop
f 0444 root sys /usr/share/icons/hicolor/32x32/apps/sudoku.png test/icons/sudoku-32.png
f 0444 root sys /usr/share/icons/hicolor/128x128/apps/sudoku.png test/icons/sudoku-128.png

%system all
f 0444 root sys $mandir/cat6/blocks.$CAT6EXT documentation/blocks.$CAT6EXT
f 0444 root sys $mandir/cat6/checkers.$CAT6EXT documentation/checkers.$CAT6EXT
f 0444 root sys $mandir/cat6/sudoku.$CAT6EXT documentation/sudoku.$CAT6EXT
f 0444 root sys $mandir/man6/blocks.6 documentation/blocks.man
f 0444 root sys $mandir/man6/checkers.6 documentation/checkers.man
f 0444 root sys $mandir/man6/sudoku.6 documentation/sudoku.man

Expand Down
4 changes: 3 additions & 1 deletion fltk.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Summary: FLTK Games
Group: Games

%description games
Install fltk-games to play checkers or Sudoku on your computer.
Install fltk-games to play Block Attack!, checkers, or Sudoku on your computer.

%prep
%setup
Expand Down Expand Up @@ -124,6 +124,7 @@ rm -rf $RPM_BUILD_ROOT

%files games
%dir %{prefix}/bin
%{prefix}/bin/blocks
%{prefix}/bin/checkers
%{prefix}/bin/sudoku

Expand All @@ -135,6 +136,7 @@ rm -rf $RPM_BUILD_ROOT
%{prefix}/share/applnk/Games/*

%dir %{prefix}/share/icons
%{prefix}/share/icons/hicolor/*/apps/blocks.png
%{prefix}/share/icons/hicolor/*/apps/checkers.png
%{prefix}/share/icons/hicolor/*/apps/sudoku.png

Expand Down
21 changes: 15 additions & 6 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ CPPFILES =\
arc.cxx \
ask.cxx \
bitmap.cxx \
blocks.cxx \
boxtype.cxx \
browser.cxx \
button.cxx \
Expand Down Expand Up @@ -99,6 +100,7 @@ ALL = \
arc$(EXEEXT) \
ask$(EXEEXT) \
bitmap$(EXEEXT) \
blocks$(EXEEXT) \
boxtype$(EXEEXT) \
browser$(EXEEXT) \
button$(EXEEXT) \
Expand Down Expand Up @@ -198,17 +200,17 @@ install-linux:
-$(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 \
for game in blocks checkers sudoku; do \
$(CP) $$game $(DESTDIR)$(bindir); \
$(CHMOD) 755 $(DESTDIR)$(bindir)/$$game; \
$(CP) $$game.desktop $(DESTDIR)/usr/share/applnk/Games; \
$(CP) $$game-32.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/$$game.png; \
$(CP) $$game-128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/$$game.png; \
$(CP) desktop/$$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 \
for game in blocks checkers sudoku; do \
if test ! -d $(DESTDIR)/Applications/$$game.app; then \
$(MKDIR) $(DESTDIR)/Applications/$$game.app; \
$(MKDIR) $(DESTDIR)/Applications/$$game.app/Contents; \
Expand All @@ -227,7 +229,7 @@ uninstall:

uninstall-linux:
echo Removing games from $(DESTDIR)$(bindir)...
for game in checkers sudoku; do \
for game in blocks 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; \
Expand All @@ -236,6 +238,7 @@ uninstall-linux:

uninstall-osx:
echo Removing games from $(DESTDIR)/Applications...
$(RM) -r $(DESTDIR)/Applications/blocks.app
$(RM) -r $(DESTDIR)/Applications/checkers.app
$(RM) -r $(DESTDIR)/Applications/sudoku.app

Expand Down Expand Up @@ -266,6 +269,12 @@ button$(EXEEXT): button.o

buttons$(EXEEXT): buttons.o

blocks$(EXEEXT): blocks.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) blocks.o -o $@ $(AUDIOLIBS) $(LINKFLTK) $(LDLIBS)
$(CP) blocks$(EXEEXT) blocks.app/Contents/MacOS
$(POSTBUILD) $@ ../FL/mac.r

checkers$(EXEEXT): checkers.o
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) checkers.o -o $@ $(LINKFLTK) $(LDLIBS)
Expand Down
44 changes: 44 additions & 0 deletions test/blocks.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -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>blocks</string>

<key>CFBundleIdentifier</key>
<string>com.easysw.blocks</string>

<key>CFBundleVersion</key>
<string>1.0</string>

<key>CFBundleDevelopmentRegion</key>
<string>English</string>

<key>NSHumanReadableCopyright</key>
<string>Copyright 2006 by Michael Sweet</string>

<key>CFAppleHelpAnchor</key>
<string>help</string>

<key>CFBundleName</key>
<string>blocks</string>

<key>CFBundlePackageType</key>
<string>APPL</string>

<key>CFBundleSignature</key>
<string>BLKS</string>

<key>CFBundleIconFile</key>
<string>blocks.icns</string>

<key>CFBundleShortVersionString</key>
<string>1.0</string>

<key>CFBundleGetInfoString</key>
<string>1.0, Copyright 2006 by Michael Sweet</string>

</dict>
</plist>
1 change: 1 addition & 0 deletions test/blocks.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BLKSBlks
Binary file added test/blocks.app/Contents/Resources/blocks.icns
Binary file not shown.
Loading

0 comments on commit f27180b

Please sign in to comment.