Fix for the problem that SDL applications exited
[AROS-Contrib.git] / Games / lbreakout2 / Makefile.am
blobd06b36fa314335b51a1dd2962e9038c7a9ac38bc
1 SUBDIRS = intl m4 po common gui game server client docs
3 EXTRA_DIST = config.rpath AUTHORS COPYING ChangeLog INSTALL README \
4 README-SDL.txt TODO lbreakout2.spec touchall lbreakout32.gif \
5 lbreakout48.gif lbreakout2.desktop.in win32_mancomp win32_preparchive
7 desktopdir = $(datadir)/applications
8 desktop_DATA = lbreakout2.desktop
9 icondir = $(datadir)/icons
10 icon_DATA = lbreakout48.gif
12 WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
13 TODO lbreakout2.spec ABOUT-NLS
14 WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll zlib.dll libpng.dll
15 WIN32_SYS_DLL = msvcrt.dll                
17 AUTOMAKE_OPTIONS = foreign
19 # We can't use static desktop file because of icon location. Is this 
20 # the right way to handle it? At least it works... as long as $datadir
21 # does not contain plus signs. :-)
22 lbreakout2.desktop:
23         @sed -e "s+Icon=+Icon=$(datadir)/icons/lbreakout48.gif+" \
24         < $(srcdir)/lbreakout2.desktop.in > lbreakout2.desktop
26 win32text: $(WIN32_TEXT)
27         @echo Converting text files for win32 installer
28         @-rm -rf ./win32text
29         @mkdir ./win32text
30         @for textfile in $(WIN32_TEXT); do \
31           $(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
32         done
34 win32-installer-script: @win32_inst_script@
36 @win32_inst_script@: win32text
37         @echo Generating win32 installer script
38         @echo "[Setup]" > $@
39         @echo "AppName=@appname@" >> $@
40         @echo "AppVerName=@appname@ $(VERSION)" >> $@
41         @echo "AppPublisher=Michael Speck" >> $@
42         @echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
43         @echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
44         @echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
45         @echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
46         @echo "DefaultGroupName=@appname@" >> $@
47         @echo "OutputDir=." >> $@
48         @echo "Uninstallable=yes" >> $@
49         @echo "AlwaysCreateUninstallIcon=yes" >> $@
50         @echo "AdminPrivilegesRequired=1" >> $@
51         @echo "[Tasks]" >> $@
52         @echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
53         @echo "[Files]" >> $@
54         @(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do echo "Source: \"`pwd -W`\\$$file\";   DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; done)
55         @(cd win32dlls; for file in $(WIN32_SYS_DLL); do echo "Source: \"`pwd -W`\\$$file\";   DestDir: \"{sys}\"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace uninsneveruninstall" >> $@; done)
56         @echo "Source: \"win32text\\*.*\";      DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; 
57         @list='$(SUBDIRS)'; for subdir in $$list; do (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) win32-install-script); done
58         @echo "[Icons]" >> $@
59         @echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
60         @echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\docs\\index.html\"" >> $@
61         @echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
62         @echo "[Run]" >> $@
63         @echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@
65         @$(AWK) '{printf "%s\r\n",$$0}' $@ > installer.iss.w32
66         @mv installer.iss.w32 $@
67         
68 win32-installer: win32-installer-script
69         $(ISCC) @win32_inst_script@     
70         @mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
71         @-rm -rf win32text
72         @echo "Installer created: $(PACKAGE)-$(VERSION)-win32.exe"
74 ACLOCAL_AMFLAGS = -I m4