diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/Makefile.am | 5 | ||||
-rw-r--r-- | pkg/osx/GNUmakefile | 6 | ||||
-rw-r--r-- | pkg/osx/IWADController.h | 4 | ||||
-rw-r--r-- | pkg/osx/IWADController.m | 35 | ||||
-rw-r--r-- | pkg/osx/LauncherManager.m | 26 | ||||
-rw-r--r-- | pkg/win32/GNUmakefile | 8 | ||||
-rw-r--r-- | pkg/wince/GNUmakefile | 34 | ||||
-rw-r--r-- | pkg/wince/common.py | 9 | ||||
-rw-r--r-- | pkg/wince/doom-cab.cfg | 27 | ||||
-rw-r--r-- | pkg/wince/heretic-cab.cfg | 27 | ||||
-rw-r--r-- | pkg/wince/hexen-cab.cfg | 27 | ||||
-rw-r--r-- | pkg/wince/wince-cab.cfg | 25 |
12 files changed, 191 insertions, 42 deletions
diff --git a/pkg/Makefile.am b/pkg/Makefile.am index a2850195..538b9e1e 100644 --- a/pkg/Makefile.am +++ b/pkg/Makefile.am @@ -23,7 +23,10 @@ osx/LauncherManager.m osx/LauncherManager.h WINCE_FILES= \ wince/GNUmakefile \ -wince/wince-cab.cfg \ +wince/common.py \ +wince/doom-cab.cfg \ +wince/heretic-cab.cfg \ +wince/hexen-cab.cfg \ wince/wince-cabgen WIN32_FILES= \ diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index d53a9981..cf8c42fc 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -80,7 +80,11 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) ./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)" + ./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)heretic "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)heretic" + ./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)hexen "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)hexen" + ./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)setup "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)setup" $(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \ diff --git a/pkg/osx/IWADController.h b/pkg/osx/IWADController.h index 7464af9f..2f691f69 100644 --- a/pkg/osx/IWADController.h +++ b/pkg/osx/IWADController.h @@ -36,6 +36,9 @@ id doom2; id plutonia; id tnt; + + id heretic; + id hexen; } - (void) closeConfigWindow: (id)sender; @@ -47,6 +50,7 @@ - (void) saveConfig; - (char *) doomWadPath; - (void) setEnvironment; +- (const char *) getGameName; - (BOOL) addIWADPath: (NSString *) path; @end diff --git a/pkg/osx/IWADController.m b/pkg/osx/IWADController.m index 0c55b3f5..b420d59d 100644 --- a/pkg/osx/IWADController.m +++ b/pkg/osx/IWADController.m @@ -33,6 +33,8 @@ typedef enum IWAD_TNT, IWAD_PLUTONIA, IWAD_CHEX, + IWAD_HERETIC, + IWAD_HEXEN, NUM_IWAD_TYPES } IWAD; @@ -42,7 +44,9 @@ static NSString *IWADLabels[NUM_IWAD_TYPES] = @"Doom II: Hell on Earth", @"Final Doom: TNT: Evilution", @"Final Doom: Plutonia Experiment", - @"Chex Quest" + @"Chex Quest", + @"Heretic", + @"Hexen" }; static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = @@ -52,6 +56,8 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = @"tnt.wad", @"plutonia.wad", @"chex.wad", + @"heretic.wad", + @"hexen.wad", @"undefined" }; @@ -64,6 +70,8 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = iwadList[IWAD_TNT] = self->tnt; iwadList[IWAD_PLUTONIA] = self->plutonia; iwadList[IWAD_CHEX] = self->chex; + iwadList[IWAD_HERETIC] = self->heretic; + iwadList[IWAD_HEXEN] = self->hexen; } - (IWAD) getSelectedIWAD @@ -102,6 +110,27 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = } } +// Get the name used for the executable for the selected IWAD. + +- (const char *) getGameName +{ + IWAD selectedIWAD; + + selectedIWAD = [self getSelectedIWAD]; + + switch (selectedIWAD) + { + case IWAD_HERETIC: + return "heretic"; + + case IWAD_HEXEN: + return "hexen"; + + default: + return "doom"; + } +} + - (void) setIWADConfig { IWADLocation *iwadList[NUM_IWAD_TYPES]; @@ -250,6 +279,10 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = - (void) awakeFromNib { + // TODO: This is temporary: + self->heretic = self->doom1; + self->hexen = self->doom2; + [self->configWindow center]; // Set configuration for all IWADs from configuration file. diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index 69c59577..a40ac7c9 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -278,6 +278,8 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) { NSString *iwad; NSString *args; + char *executable_name; + const char *game_name; [self saveConfig]; @@ -294,8 +296,12 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) return; } - ExecuteProgram(PROGRAM_PREFIX "doom", [iwad UTF8String], - [args UTF8String]); + game_name = [self->iwadController getGameName]; + executable_name = malloc(strlen(PROGRAM_PREFIX) + strlen(game_name) + 1); + sprintf(executable_name, "%s%s", PROGRAM_PREFIX, game_name); + + ExecuteProgram(executable_name, [iwad UTF8String], + [args UTF8String]); [NSApp terminate:sender]; } @@ -303,10 +309,22 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) - (void) runSetup: (id)sender { - [self saveConfig]; + const char *game_name; + char *arg; + [self saveConfig]; [self->iwadController setEnvironment]; - ExecuteProgram(PROGRAM_PREFIX "setup", NULL, NULL); + + // Provide the -game command line parameter to select the game + // to configure, based on the game selected in the dropdown. + + game_name = [self->iwadController getGameName]; + arg = malloc(strlen(game_name) + 8); + sprintf(arg, "-game %s", game_name); + + ExecuteProgram(PROGRAM_PREFIX "setup", NULL, arg); + + free(arg); } // Invoked when the "Terminal" option is selected from the menu, to open diff --git a/pkg/win32/GNUmakefile b/pkg/win32/GNUmakefile index 34f2c9bd..6b45152e 100644 --- a/pkg/win32/GNUmakefile +++ b/pkg/win32/GNUmakefile @@ -3,9 +3,11 @@ include ../config.make TOPLEVEL=../.. -EXE_FILES=$(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom.exe \ - $(TOPLEVEL)/src/$(PROGRAM_PREFIX)server.exe \ - $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup.exe +EXE_FILES=$(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom.exe \ + $(TOPLEVEL)/src/$(PROGRAM_PREFIX)heretic.exe \ + $(TOPLEVEL)/src/$(PROGRAM_PREFIX)hexen.exe \ + $(TOPLEVEL)/src/$(PROGRAM_PREFIX)server.exe \ + $(TOPLEVEL)/src/$(PROGRAM_PREFIX)setup.exe DLL_FILES=$(TOPLEVEL)/src/SDL.dll \ $(TOPLEVEL)/src/SDL_mixer.dll \ diff --git a/pkg/wince/GNUmakefile b/pkg/wince/GNUmakefile index b6acc3b8..3b8171aa 100644 --- a/pkg/wince/GNUmakefile +++ b/pkg/wince/GNUmakefile @@ -1,15 +1,35 @@ include ../config.make -DEPS=$(shell ./wince-cabgen -d $(CONFIG_FILE)) -EXECUTABLES=$(filter %.exe, $(DEPS)) -CONFIG_FILE=wince-cab.cfg -OUTPUT_FILE=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).cab +# Doom: -$(OUTPUT_FILE) : $(CONFIG_FILE) $(DEPS) - $(STRIP) $(EXECUTABLES) +DOOM_CAB=$(PROGRAM_PREFIX)doom-$(PACKAGE_VERSION).cab +DOOM_CFG=doom-cab.cfg +DOOM_DEPS=$(shell ./wince-cabgen -d $(DOOM_CFG)) + +# Heretic: + +HERETIC_CAB=$(PROGRAM_PREFIX)heretic-$(PACKAGE_VERSION).cab +HERETIC_CFG=heretic-cab.cfg +HERETIC_DEPS=$(shell ./wince-cabgen -d $(HERETIC_CFG)) + +# Hexen: + +HEXEN_CAB=$(PROGRAM_PREFIX)hexen-$(PACKAGE_VERSION).cab +HEXEN_CFG=hexen-cab.cfg +HEXEN_DEPS=$(shell ./wince-cabgen -d $(HEXEN_CFG)) + +all: $(DOOM_CAB) $(HERETIC_CAB) $(HEXEN_CAB) + +$(DOOM_CAB) : $(DOOM_CFG) $(DOOM_DEPS) + ./wince-cabgen $< $@ + +$(HERETIC_CAB) : $(HERETIC_CFG) $(HERETIC_DEPS) + ./wince-cabgen $< $@ + +$(HEXEN_CAB) : $(HEXEN_CFG) $(HEXEN_DEPS) ./wince-cabgen $< $@ clean: - rm -f $(OUTPUT_FILE) + rm -f $(DOOM_CAB) $(HERETIC_CAB) $(HEXEN_CAB) diff --git a/pkg/wince/common.py b/pkg/wince/common.py new file mode 100644 index 00000000..e142c2b7 --- /dev/null +++ b/pkg/wince/common.py @@ -0,0 +1,9 @@ + +# SDL library files that need to be installed: + +LIBRARIES = [ "SDL.dll", "SDL_mixer.dll", "libSDL_net-1-2-0.dll" ] + +def add_libraries(dir, files): + for lib in LIBRARIES: + files[dir + lib] = lib + diff --git a/pkg/wince/doom-cab.cfg b/pkg/wince/doom-cab.cfg new file mode 100644 index 00000000..2ffba5a3 --- /dev/null +++ b/pkg/wince/doom-cab.cfg @@ -0,0 +1,27 @@ + +from common import * + +app_name = "Chocolate Doom" +provider = "Simon Howard" +arch = "strongarm" + +# Install files: + +d = "$(PROGRAMS_GAMES)/Chocolate Doom/" +s = "$(START_GAMES)/" +src = "../../src/" + +files = { + d+"chocolate-doom.exe": src+"chocolate-doom.exe", + d+"chocolate-doom-setup.exe": src+"chocolate-setup.exe", +} + +add_libraries(d, files) + +# Start menu links: + +links = { + s+"Chocolate Doom.lnk": d+"chocolate-doom.exe", + s+"Chocolate Doom Setup.lnk": d+"chocolate-doom-setup.exe" +} + diff --git a/pkg/wince/heretic-cab.cfg b/pkg/wince/heretic-cab.cfg new file mode 100644 index 00000000..ead2081f --- /dev/null +++ b/pkg/wince/heretic-cab.cfg @@ -0,0 +1,27 @@ + +from common import * + +app_name = "Chocolate Heretic" +provider = "Simon Howard" +arch = "strongarm" + +# Install files: + +d = "$(PROGRAMS_GAMES)/Chocolate Heretic/" +s = "$(START_GAMES)/" +src = "../../src/" + +files = { + d+"chocolate-heretic.exe": src+"chocolate-heretic.exe", + d+"chocolate-heretic-setup.exe": src+"chocolate-setup.exe", +} + +add_libraries(d, files) + +# Start menu links: + +links = { + s+"Chocolate Heretic.lnk": d+"chocolate-heretic.exe", + s+"Chocolate Heretic Setup.lnk": d+"chocolate-heretic-setup.exe" +} + diff --git a/pkg/wince/hexen-cab.cfg b/pkg/wince/hexen-cab.cfg new file mode 100644 index 00000000..9d88f01d --- /dev/null +++ b/pkg/wince/hexen-cab.cfg @@ -0,0 +1,27 @@ + +from common import * + +app_name = "Chocolate Hexen" +provider = "Simon Howard" +arch = "strongarm" + +# Install files: + +d = "$(PROGRAMS_GAMES)/Chocolate Hexen/" +s = "$(START_GAMES)/" +src = "../../src/" + +files = { + d+"chocolate-hexen.exe": src+"chocolate-hexen.exe", + d+"chocolate-hexen-setup.exe": src+"chocolate-setup.exe", +} + +add_libraries(d, files) + +# Start menu links: + +links = { + s+"Chocolate Hexen.lnk": d+"chocolate-hexen.exe", + s+"Chocolate Hexen Setup.lnk": d+"chocolate-hexen-setup.exe" +} + diff --git a/pkg/wince/wince-cab.cfg b/pkg/wince/wince-cab.cfg deleted file mode 100644 index 5f37c5ab..00000000 --- a/pkg/wince/wince-cab.cfg +++ /dev/null @@ -1,25 +0,0 @@ - -app_name = "Chocolate Doom" -provider = "Simon Howard" -arch = "strongarm" - -# Install files: - -d = "$(PROGRAMS_GAMES)/Chocolate Doom/" -s = "$(START_GAMES)/" - -files = { - d+"chocolate-doom.exe": "../../src/chocolate-doom.exe", - d+"chocolate-setup.exe": "../../setup/chocolate-setup.exe", - d+"SDL.dll": "SDL.dll", - d+"SDL_mixer.dll": "SDL_mixer.dll", - d+"libSDL_net-1-2-0.dll": "libSDL_net-1-2-0.dll", -} - -# Start menu links: - -links = { - s+"Chocolate Doom.lnk": d+"chocolate-doom.exe", - s+"Chocolate Doom Setup.lnk": d+"chocolate-setup.exe" -} - |