ref: 184ea9ba501adf04b9b352760774fde268c0cc7f
parent: 87efdfbd570fe85141ec5e8b8f5814563fcf1d4f
author: Simon Howard <[email protected]>
date: Sat May 14 16:11:26 EDT 2011
Convert build system to using the PROGRAM_PREFIX system used on raven-branch. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2336
--- a/codeblocks/config.h
+++ b/codeblocks/config.h
@@ -17,6 +17,9 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5.0"
+/* Change this when you create your awesome forked version */
+#define PROGRAM_PREFIX "chocolate-"
+
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
--- a/configure.in
+++ b/configure.in
@@ -112,6 +112,16 @@
WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' `
+# This controls the prefix added to the start of program names. For example,
+# if this is changed to "lemon-", the programs generated will be named
+# lemon-doom, lemon-heretic, etc.
+
+PROGRAM_PREFIX=chocolate-
+
+AC_SUBST(PROGRAM_PREFIX)
+AC_DEFINE_UNQUOTED(PROGRAM_PREFIX, "$PROGRAM_PREFIX",
+ Change this when you create your awesome forked version)
+
AM_CONFIG_HEADER(config.h:config.hin)
AC_SUBST(WINDOWS_RC_VERSION)
@@ -145,6 +155,7 @@
pkg/osx/Info-gnustep.plist
setup/Makefile
setup/setup-res.rc
+setup/setup-manifest.xml
src/Makefile
src/doom-screensaver.desktop
src/resource.rc
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -19,6 +19,9 @@
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5.0"
+/* Change this when you create your awesome forked version */
+#define PROGRAM_PREFIX "chocolate-"
+
/* Version number of package */
#define VERSION "1.5.0"
--- a/pkg/config.make.in
+++ b/pkg/config.make.in
@@ -10,6 +10,7 @@
# Package name and version number:
+PROGRAM_PREFIX = @PROGRAM_PREFIX@
PACKAGE = @PACKAGE@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -78,10 +78,10 @@
cp launcher "$(APP_BIN_DIR)"
$(STRIP) "$(APP_BIN_DIR)/launcher"
- ./cp-with-libs $(TOPLEVEL)/src/$(PACKAGE_TARNAME) "$(APP_BIN_DIR)"
- $(STRIP) "$(APP_BIN_DIR)/$(PACKAGE_TARNAME)"
- ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)"
- $(STRIP) "$(APP_BIN_DIR)/chocolate-setup"
+ ./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom "$(APP_BIN_DIR)"
+ $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)doom"
+ ./cp-with-libs $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup "$(APP_BIN_DIR)"
+ $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)setup"
$(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \
< $(TOPLEVEL)/man/INSTALL.template \
@@ -94,7 +94,6 @@
cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6"
cp disk/dir.DS_Store $(STAGING_DIR)/.DS_Store
cp disk/background.png $(STAGING_DIR)/background.png
-# setfile -a V $(STAGING_DIR)/background.png
clean : launcher_clean
rm -f $(DMG)
--- a/pkg/osx/LauncherManager.m
+++ b/pkg/osx/LauncherManager.m
@@ -294,8 +294,8 @@
return;
}
- ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String],
- [args UTF8String]);
+ ExecuteProgram(PROGRAM_PREFIX "doom", [iwad UTF8String],
+ [args UTF8String]);
[NSApp terminate:sender];
}
@@ -306,7 +306,7 @@
[self saveConfig];
[self->iwadController setEnvironment];
- ExecuteProgram("chocolate-setup", NULL, NULL);
+ ExecuteProgram(PROGRAM_PREFIX "setup", NULL, NULL);
}
// Invoked when the "Terminal" option is selected from the menu, to open
--- a/pkg/win32/GNUmakefile
+++ b/pkg/win32/GNUmakefile
@@ -3,9 +3,9 @@
TOPLEVEL=../..
-EXE_FILES=$(TOPLEVEL)/src/$(PACKAGE_TARNAME).exe \
- $(TOPLEVEL)/src/chocolate-server.exe \
- $(TOPLEVEL)/setup/chocolate-setup.exe
+EXE_FILES=$(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom.exe \
+ $(TOPLEVEL)/src/$(PROGRAM_PREFIX)server.exe \
+ $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup.exe
DLL_FILES=$(TOPLEVEL)/src/SDL.dll \
$(TOPLEVEL)/src/SDL_mixer.dll \
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -3,7 +3,7 @@
AM_CFLAGS = -I../textscreen -I../src @SDLMIXER_CFLAGS@
-games_PROGRAMS = chocolate-setup
+games_PROGRAMS = @PROGRAM_PREFIX@setup
SOURCE_FILES = \
compatibility.c compatibility.h \
@@ -22,16 +22,15 @@
txt_mouseinput.c txt_mouseinput.h
EXTRA_DIST= \
- setup_icon.c \
- setup-manifest.xml
+ setup_icon.c
if HAVE_WINDRES
-chocolate_setup_SOURCES=$(SOURCE_FILES) setup-res.rc
+@PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES) setup-res.rc
else
-chocolate_setup_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES)
endif
-chocolate_setup_LDADD = \
+@PROGRAM_PREFIX@setup_LDADD = \
../wince/libc_wince.a \
../textscreen/libtextscreen.a \
@SDLMIXER_LIBS@ \
--- a/setup/configfile.c
+++ b/setup/configfile.c
@@ -637,9 +637,9 @@
else
{
extra_defaults.filename
- = malloc(strlen(configdir) + strlen(PACKAGE_TARNAME) + 10);
- sprintf(extra_defaults.filename, "%s%s.cfg",
- configdir, PACKAGE_TARNAME);
+ = malloc(strlen(configdir) + strlen(PROGRAM_PREFIX) + 15);
+ sprintf(extra_defaults.filename, "%s%sdoom.cfg",
+ configdir, PROGRAM_PREFIX);
}
LoadDefaultCollection(&doom_defaults);
--- a/setup/setup-manifest.xml
+++ /dev/null
@@ -1,33 +1,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-
-<!-- Magic manifest file that should make Windows Vista/7 not
- attempt to gain elevated privileges for chocolate-setup.
-
- Based on:
-
- http://www.cygwin.com/ml/cygwin/2006-12/msg00580.html
- -->
-
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <!-- The "name" field in this tag should be the same as the executable's
- name -->
- <assemblyIdentity version="0.0.0.0" processorArchitecture="X86"
- name="chocolate-setup.exe" type="win32"/>
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level="asInvoker" uiAccess="false" />
- </requestedPrivileges>
- </security>
- </trustInfo>
-
- <!-- Stop the Program Compatibility Assistant appearing: -->
-
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- 7 -->
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!-- Vista -->
- </application>
- </compatibility>
-</assembly>
-
--- /dev/null
+++ b/setup/setup-manifest.xml.in
@@ -1,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+
+<!-- Magic manifest file that should make Windows Vista/7 not
+ attempt to gain elevated privileges for chocolate-setup.
+
+ Based on:
+
+ http://www.cygwin.com/ml/cygwin/2006-12/msg00580.html
+ -->
+
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <!-- The "name" field in this tag should be the same as the executable's
+ name -->
+ <assemblyIdentity version="0.0.0.0" processorArchitecture="X86"
+ name="@[email protected]" type="win32"/>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level="asInvoker" uiAccess="false" />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+
+ <!-- Stop the Program Compatibility Assistant appearing: -->
+
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- 7 -->
+ <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!-- Vista -->
+ </application>
+ </compatibility>
+</assembly>
+
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
gamesdir = $(prefix)/games
-games_PROGRAMS = chocolate-doom chocolate-server
+games_PROGRAMS = @PROGRAM_PREFIX@doom @PROGRAM_PREFIX@server
AM_CFLAGS = -I../opl -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
@@ -21,8 +21,8 @@
net_structrw.c net_structrw.h \
z_native.c z_zone.h
-chocolate_server_SOURCES=$(DEDSERV_FILES)
-chocolate_server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@
+@PROGRAM_PREFIX@server_SOURCES=$(DEDSERV_FILES)
+@PROGRAM_PREFIX@server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@
MAIN_SOURCE_FILES=\
am_map.c am_map.h \
@@ -167,12 +167,12 @@
$(FEATURE_SOUND_SOURCE_FILES)
if HAVE_WINDRES
-chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) resource.rc
else
-chocolate_doom_SOURCES=$(SOURCE_FILES)
+@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES)
endif
-chocolate_doom_LDADD = \
+@PROGRAM_PREFIX@doom_LDADD = \
../wince/libc_wince.a \
../textscreen/libtextscreen.a \
../pcsound/libpcsound.a \
--- a/src/doom-screensaver.desktop.in
+++ b/src/doom-screensaver.desktop.in
@@ -3,8 +3,8 @@
Encoding=UTF-8
Name=Doom
Comment=DOOM by Id Software.
-TryExec=@PACKAGE_TARNAME@
-Exec=@PACKAGE_TARNAME@
+TryExec=@PACKAGE_PREFIX@doom
+Exec=@PACKAGE_PREFIX@doom
StartupNotify=false
Terminal=false
Type=Application
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1452,9 +1452,9 @@
else
{
extra_defaults.filename
- = malloc(strlen(configdir) + strlen(PACKAGE_TARNAME) + 10);
- sprintf(extra_defaults.filename, "%s%s.cfg",
- configdir, PACKAGE_TARNAME);
+ = malloc(strlen(configdir) + strlen(PROGRAM_PREFIX) + 15);
+ sprintf(extra_defaults.filename, "%s%sdoom.cfg",
+ configdir, PROGRAM_PREFIX);
}
LoadDefaultCollection(&doom_defaults);