Makefile.am 3.37 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
SUBDIRS = intl m4 po common gui game server client docs

EXTRA_DIST = config.rpath AUTHORS COPYING ChangeLog INSTALL README \
README-SDL.txt TODO lbreakout2.spec touchall lbreakout32.gif \
lbreakout48.gif lbreakout2.desktop.in win32_mancomp win32_preparchive

desktopdir = $(datadir)/applications
desktop_DATA = lbreakout2.desktop
icondir = $(datadir)/icons
icon_DATA = lbreakout48.gif
11

12
WIN32_TEXT = AUTHORS COPYING ChangeLog INSTALL README README-SDL.txt \
13
TODO lbreakout2.spec ABOUT-NLS
14 15
WIN32_LOCAL_DLL = SDL.dll SDL_mixer.dll zlib.dll libpng.dll
WIN32_SYS_DLL = msvcrt.dll		  
16 17

AUTOMAKE_OPTIONS = foreign
18

19 20 21 22 23 24 25
# We can't use static desktop file because of icon location. Is this 
# the right way to handle it? At least it works... as long as $datadir
# does not contain plus signs. :-)
lbreakout2.desktop:
	@sed -e "s+Icon=+Icon=$(datadir)/icons/lbreakout48.gif+" \
	< lbreakout2.desktop.in > lbreakout2.desktop

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
win32text: $(WIN32_TEXT)
	@echo Converting text files for win32 installer
	@-rm -rf ./win32text
	@mkdir ./win32text
	@for textfile in $(WIN32_TEXT); do \
	  $(AWK) '{printf "%s\r\n",$$0}' $$textfile > ./win32text/$$textfile ; \
	done

win32-installer-script: @win32_inst_script@

@win32_inst_script@: win32text
	@echo Generating win32 installer script
	@echo "[Setup]" > $@
	@echo "AppName=@appname@" >> $@
	@echo "AppVerName=@appname@ $(VERSION)" >> $@
	@echo "AppPublisher=Michael Speck" >> $@
	@echo "AppPublisherURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
	@echo "AppSupportURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
	@echo "AppUpdatesURL=http://lgames.sourceforge.net/index.php?project=LBreakout2" >> $@
	@echo "DefaultDirName={pf}\\$(PACKAGE)" >> $@
	@echo "DefaultGroupName=@appname@" >> $@
	@echo "OutputDir=." >> $@
	@echo "Uninstallable=yes" >> $@
	@echo "AlwaysCreateUninstallIcon=yes" >> $@
	@echo "AdminPrivilegesRequired=1" >> $@
	@echo "[Tasks]" >> $@
	@echo "Name: \"desktopicon\"; Description: \"Create a &desktop icon\"; GroupDescription: \"Additional icons:\"" >> $@
	@echo "[Files]" >> $@
54 55
	@(cd win32dlls; for file in $(WIN32_LOCAL_DLL); do echo "Source: \"`pwd -W`\\$$file\";   DestDir: \"{app}\"; CopyMode: alwaysoverwrite" >> $@; done)
	@(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 59 60 61 62 63 64 65 66 67 68 69 70 71 72
	@echo "[Icons]" >> $@
	@echo "Name: \"{group}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"" >> $@
	@echo "Name: \"{group}\\@appname@ Manual\"; Filename: \"{app}\\docs\\index.html\"" >> $@
	@echo "Name: \"{userdesktop}\\@appname@\"; Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; WorkingDir: \"{app}\"; Tasks: \"desktopicon\"" >> $@
	@echo "[Run]" >> $@
	@echo "Filename: \"{app}\\$(PACKAGE)$(EXEEXT)\"; Description: \"Launch @appname@\"; Flags: nowait postinstall skipifsilent" >> $@

	@$(AWK) '{printf "%s\r\n",$$0}' $@ > installer.iss.w32
	@mv installer.iss.w32 $@
	
win32-installer: win32-installer-script
	$(ISCC) @win32_inst_script@ 	
	@mv setup.exe $(PACKAGE)-$(VERSION)-win32.exe
	@-rm -rf win32text
	@echo "Installer created: $(PACKAGE)-$(VERSION)-win32.exe"
73 74

ACLOCAL_AMFLAGS = -I m4