Add efacf056cd
This commit is contained in:
366
dockerdoom/trunk/pkg/Makefile
Normal file
366
dockerdoom/trunk/pkg/Makefile
Normal file
@ -0,0 +1,366 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# pkg/Makefile. Generated from Makefile.in by configure.
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/psdoom
|
||||
pkgincludedir = $(includedir)/psdoom
|
||||
pkglibdir = $(libdir)/psdoom
|
||||
pkglibexecdir = $(libexecdir)/psdoom
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = pkg
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.make.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = config.make
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run aclocal-1.11
|
||||
AMTAR = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run tar
|
||||
AUTOCONF = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run autoconf
|
||||
AUTOHEADER = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run autoheader
|
||||
AUTOMAKE = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run automake-1.11
|
||||
AWK = gawk
|
||||
CC = gcc
|
||||
CCDEPMODE = depmode=gcc3
|
||||
CFLAGS = -O2 -g -Wall -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
|
||||
CPP = gcc -E
|
||||
CPPFLAGS =
|
||||
CYGPATH_W = echo
|
||||
DEFS = -DHAVE_CONFIG_H
|
||||
DEPDIR = .deps
|
||||
ECHO_C =
|
||||
ECHO_N = -n
|
||||
ECHO_T =
|
||||
EGREP = /bin/grep -E
|
||||
EXEEXT =
|
||||
GREP = /bin/grep
|
||||
HAVE_PYTHON = true
|
||||
INSTALL = /usr/bin/install -c
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_PROGRAM = ${INSTALL}
|
||||
INSTALL_SCRIPT = ${INSTALL}
|
||||
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
|
||||
LDFLAGS = -lSDL -lpthread
|
||||
LIBOBJS =
|
||||
LIBS = -lm
|
||||
LTLIBOBJS =
|
||||
MAKEINFO = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/missing --run makeinfo
|
||||
MKDIR_P = /bin/mkdir -p
|
||||
OBJEXT = o
|
||||
PACKAGE = psdoom
|
||||
PACKAGE_BUGREPORT = orsonteodoro@yahoo.com
|
||||
PACKAGE_COPYRIGHT = Copyright (C) 1993-2012
|
||||
PACKAGE_LICENSE = GNU General Public License, version 2
|
||||
PACKAGE_MAINTAINER = Orson Teodoro
|
||||
PACKAGE_NAME = psdoom
|
||||
PACKAGE_SHORTDESC = psdoom-ng source port - psDooM with Chocolate Doom
|
||||
PACKAGE_STRING = psdoom 2012.02.05-1.6.0
|
||||
PACKAGE_TARNAME = psdoom
|
||||
PACKAGE_URL = https://github.com/orsonteodoro/psdoom-ng/
|
||||
PACKAGE_VERSION = 2012.02.05-1.6.0
|
||||
PATH_SEPARATOR = :
|
||||
PROGRAM_PREFIX = ps
|
||||
RANLIB = ranlib
|
||||
SDLMIXER_CFLAGS =
|
||||
SDLMIXER_LIBS = -lSDL_mixer
|
||||
SDLNET_CFLAGS =
|
||||
SDLNET_LIBS = -lSDL_net
|
||||
SDL_CFLAGS = -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
|
||||
SDL_CONFIG = /usr/bin/sdl-config
|
||||
SDL_LIBS = -lSDL -lpthread
|
||||
SET_MAKE =
|
||||
SHELL = /bin/sh
|
||||
STRIP = strip
|
||||
VERSION = 2012.02.05-1.6.0
|
||||
WINDOWS_RC_VERSION = 2012, 02, 05-1, 6, 0, 0
|
||||
WINDRES =
|
||||
abs_builddir = /home/orson/Downloads/chocolate-doom-1.6.0/pkg
|
||||
abs_srcdir = /home/orson/Downloads/chocolate-doom-1.6.0/pkg
|
||||
abs_top_builddir = /home/orson/Downloads/chocolate-doom-1.6.0
|
||||
abs_top_srcdir = /home/orson/Downloads/chocolate-doom-1.6.0
|
||||
ac_aux_dir = autotools
|
||||
ac_ct_CC = gcc
|
||||
am__include = include
|
||||
am__leading_dot = .
|
||||
am__quote =
|
||||
am__tar = ${AMTAR} chof - "$$tardir"
|
||||
am__untar = ${AMTAR} xf -
|
||||
bindir = ${exec_prefix}/bin
|
||||
build_alias =
|
||||
builddir = .
|
||||
datadir = ${datarootdir}
|
||||
datarootdir = ${prefix}/share
|
||||
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
|
||||
dvidir = ${docdir}
|
||||
exec_prefix = ${prefix}
|
||||
host_alias =
|
||||
htmldir = ${docdir}
|
||||
includedir = ${prefix}/include
|
||||
infodir = ${datarootdir}/info
|
||||
install_sh = ${SHELL} /home/orson/Downloads/chocolate-doom-1.6.0/autotools/install-sh
|
||||
libdir = ${exec_prefix}/lib
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
localedir = ${datarootdir}/locale
|
||||
localstatedir = ${prefix}/var
|
||||
mandir = ${datarootdir}/man
|
||||
mkdir_p = /bin/mkdir -p
|
||||
oldincludedir = /usr/include
|
||||
pdfdir = ${docdir}
|
||||
prefix = /usr/local
|
||||
program_transform_name = s,x,x,
|
||||
psdir = ${docdir}
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
sharedstatedir = ${prefix}/com
|
||||
srcdir = .
|
||||
sysconfdir = ${prefix}/etc
|
||||
target_alias =
|
||||
top_build_prefix = ../
|
||||
top_builddir = ..
|
||||
top_srcdir = ..
|
||||
OSX_FILES = \
|
||||
osx/Resources/128x128.png \
|
||||
osx/Resources/app.icns \
|
||||
osx/Resources/app.png \
|
||||
osx/Resources/wadfile.icns \
|
||||
osx/Resources/wadfile.png \
|
||||
osx/Resources/launcher.nib/designable.nib \
|
||||
osx/Resources/launcher.nib/keyedobjects.nib \
|
||||
osx/disk/dir.DS_Store \
|
||||
osx/disk/background.png \
|
||||
osx/GNUmakefile \
|
||||
osx/Info.plist.in osx/Info-gnustep.plist.in \
|
||||
osx/PkgInfo \
|
||||
osx/cp-with-libs \
|
||||
osx/dmgfix \
|
||||
osx/main.m \
|
||||
osx/AppController.m osx/AppController.h \
|
||||
osx/Execute.m osx/Execute.h \
|
||||
osx/IWADController.m osx/IWADController.h \
|
||||
osx/IWADLocation.m osx/IWADLocation.h \
|
||||
osx/LauncherManager.m osx/LauncherManager.h
|
||||
|
||||
WINCE_FILES = \
|
||||
wince/GNUmakefile \
|
||||
wince/wince-cab.cfg \
|
||||
wince/wince-cabgen
|
||||
|
||||
WIN32_FILES = \
|
||||
win32/GNUmakefile \
|
||||
win32/README
|
||||
|
||||
EXTRA_DIST = $(OSX_FILES) $(WINCE_FILES) $(WIN32_FILES)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pkg/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu pkg/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
config.make: $(top_builddir)/config.status $(srcdir)/config.make.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
34
dockerdoom/trunk/pkg/Makefile.am
Normal file
34
dockerdoom/trunk/pkg/Makefile.am
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
OSX_FILES= \
|
||||
osx/Resources/128x128.png \
|
||||
osx/Resources/app.icns \
|
||||
osx/Resources/app.png \
|
||||
osx/Resources/wadfile.icns \
|
||||
osx/Resources/wadfile.png \
|
||||
osx/Resources/launcher.nib/designable.nib \
|
||||
osx/Resources/launcher.nib/keyedobjects.nib \
|
||||
osx/disk/dir.DS_Store \
|
||||
osx/disk/background.png \
|
||||
osx/GNUmakefile \
|
||||
osx/Info.plist.in osx/Info-gnustep.plist.in \
|
||||
osx/PkgInfo \
|
||||
osx/cp-with-libs \
|
||||
osx/dmgfix \
|
||||
osx/main.m \
|
||||
osx/AppController.m osx/AppController.h \
|
||||
osx/Execute.m osx/Execute.h \
|
||||
osx/IWADController.m osx/IWADController.h \
|
||||
osx/IWADLocation.m osx/IWADLocation.h \
|
||||
osx/LauncherManager.m osx/LauncherManager.h
|
||||
|
||||
WINCE_FILES= \
|
||||
wince/GNUmakefile \
|
||||
wince/wince-cab.cfg \
|
||||
wince/wince-cabgen
|
||||
|
||||
WIN32_FILES= \
|
||||
win32/GNUmakefile \
|
||||
win32/README
|
||||
|
||||
EXTRA_DIST=$(OSX_FILES) $(WINCE_FILES) $(WIN32_FILES)
|
||||
|
366
dockerdoom/trunk/pkg/Makefile.in
Normal file
366
dockerdoom/trunk/pkg/Makefile.in
Normal file
@ -0,0 +1,366 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
subdir = pkg
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
$(srcdir)/config.make.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = config.make
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GREP = @GREP@
|
||||
HAVE_PYTHON = @HAVE_PYTHON@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_COPYRIGHT = @PACKAGE_COPYRIGHT@
|
||||
PACKAGE_LICENSE = @PACKAGE_LICENSE@
|
||||
PACKAGE_MAINTAINER = @PACKAGE_MAINTAINER@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_SHORTDESC = @PACKAGE_SHORTDESC@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PROGRAM_PREFIX = @PROGRAM_PREFIX@
|
||||
RANLIB = @RANLIB@
|
||||
SDLMIXER_CFLAGS = @SDLMIXER_CFLAGS@
|
||||
SDLMIXER_LIBS = @SDLMIXER_LIBS@
|
||||
SDLNET_CFLAGS = @SDLNET_CFLAGS@
|
||||
SDLNET_LIBS = @SDLNET_LIBS@
|
||||
SDL_CFLAGS = @SDL_CFLAGS@
|
||||
SDL_CONFIG = @SDL_CONFIG@
|
||||
SDL_LIBS = @SDL_LIBS@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
WINDOWS_RC_VERSION = @WINDOWS_RC_VERSION@
|
||||
WINDRES = @WINDRES@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_aux_dir = @ac_aux_dir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
OSX_FILES = \
|
||||
osx/Resources/128x128.png \
|
||||
osx/Resources/app.icns \
|
||||
osx/Resources/app.png \
|
||||
osx/Resources/wadfile.icns \
|
||||
osx/Resources/wadfile.png \
|
||||
osx/Resources/launcher.nib/designable.nib \
|
||||
osx/Resources/launcher.nib/keyedobjects.nib \
|
||||
osx/disk/dir.DS_Store \
|
||||
osx/disk/background.png \
|
||||
osx/GNUmakefile \
|
||||
osx/Info.plist.in osx/Info-gnustep.plist.in \
|
||||
osx/PkgInfo \
|
||||
osx/cp-with-libs \
|
||||
osx/dmgfix \
|
||||
osx/main.m \
|
||||
osx/AppController.m osx/AppController.h \
|
||||
osx/Execute.m osx/Execute.h \
|
||||
osx/IWADController.m osx/IWADController.h \
|
||||
osx/IWADLocation.m osx/IWADLocation.h \
|
||||
osx/LauncherManager.m osx/LauncherManager.h
|
||||
|
||||
WINCE_FILES = \
|
||||
wince/GNUmakefile \
|
||||
wince/wince-cab.cfg \
|
||||
wince/wince-cabgen
|
||||
|
||||
WIN32_FILES = \
|
||||
win32/GNUmakefile \
|
||||
win32/README
|
||||
|
||||
EXTRA_DIST = $(OSX_FILES) $(WINCE_FILES) $(WIN32_FILES)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pkg/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu pkg/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
config.make: $(top_builddir)/config.status $(srcdir)/config.make.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
29
dockerdoom/trunk/pkg/config.make
Normal file
29
dockerdoom/trunk/pkg/config.make
Normal file
@ -0,0 +1,29 @@
|
||||
# Shared file included by the makefiles used to build packages.
|
||||
# This contains various information needed by the makefiles,
|
||||
# and is autogenerated by configure to include various
|
||||
# necessary details.
|
||||
|
||||
# Tools needed:
|
||||
|
||||
CC = gcc
|
||||
STRIP = strip
|
||||
|
||||
# Package name and version number:
|
||||
|
||||
PROGRAM_PREFIX = ps
|
||||
PACKAGE = psdoom
|
||||
PACKAGE_NAME = psdoom
|
||||
PACKAGE_STRING = psdoom 2012.02.05-1.6.0
|
||||
PACKAGE_TARNAME = psdoom
|
||||
PACKAGE_VERSION = 2012.02.05-1.6.0
|
||||
|
||||
# Documentation files to distribute with packages.
|
||||
|
||||
DOC_FILES = README \
|
||||
COPYING \
|
||||
ChangeLog \
|
||||
NEWS \
|
||||
NOT-BUGS \
|
||||
CMDLINE \
|
||||
TODO
|
||||
|
29
dockerdoom/trunk/pkg/config.make.in
Normal file
29
dockerdoom/trunk/pkg/config.make.in
Normal file
@ -0,0 +1,29 @@
|
||||
# Shared file included by the makefiles used to build packages.
|
||||
# This contains various information needed by the makefiles,
|
||||
# and is autogenerated by configure to include various
|
||||
# necessary details.
|
||||
|
||||
# Tools needed:
|
||||
|
||||
CC = @CC@
|
||||
STRIP = @STRIP@
|
||||
|
||||
# Package name and version number:
|
||||
|
||||
PROGRAM_PREFIX = @PROGRAM_PREFIX@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
|
||||
# Documentation files to distribute with packages.
|
||||
|
||||
DOC_FILES = README \
|
||||
COPYING \
|
||||
ChangeLog \
|
||||
NEWS \
|
||||
NOT-BUGS \
|
||||
CMDLINE \
|
||||
TODO
|
||||
|
53
dockerdoom/trunk/pkg/osx/AppController.h
Normal file
53
dockerdoom/trunk/pkg/osx/AppController.h
Normal file
@ -0,0 +1,53 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LAUNCHER_APPCONTROLLER_H
|
||||
#define LAUNCHER_APPCONTROLLER_H
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include "LauncherManager.h"
|
||||
|
||||
@interface AppController : NSObject
|
||||
{
|
||||
LauncherManager *launcherManager;
|
||||
BOOL filesAdded;
|
||||
}
|
||||
|
||||
+ (void)initialize;
|
||||
|
||||
- (id)init;
|
||||
- (void)dealloc;
|
||||
|
||||
- (void)awakeFromNib;
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotif;
|
||||
- (BOOL)applicationShouldTerminate:(id)sender;
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotif;
|
||||
- (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName;
|
||||
|
||||
- (void)showPrefPanel:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
132
dockerdoom/trunk/pkg/osx/AppController.m
Normal file
132
dockerdoom/trunk/pkg/osx/AppController.m
Normal file
@ -0,0 +1,132 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "AppController.h"
|
||||
|
||||
#include "config.h"
|
||||
|
||||
@implementation AppController
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
NSMutableDictionary *defaults = [NSMutableDictionary dictionary];
|
||||
|
||||
/*
|
||||
* Register your app's defaults here by adding objects to the
|
||||
* dictionary, eg
|
||||
*
|
||||
* [defaults setObject:anObject forKey:keyForThatObject];
|
||||
*
|
||||
*/
|
||||
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
}
|
||||
|
||||
self->filesAdded = NO;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
[[NSApp mainMenu] setTitle:@PACKAGE_NAME];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotif
|
||||
{
|
||||
// Uncomment if your application is Renaissance-based
|
||||
// [NSBundle loadGSMarkupNamed:@"Main" owner:self];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminate:(id)sender
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotif
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL) application:(NSApplication *) application
|
||||
openFile:(NSString *) fileName
|
||||
{
|
||||
NSString *extension;
|
||||
|
||||
// This may be an IWAD. If so, add it to the IWAD configuration;
|
||||
// don't add it like a PWAD.
|
||||
|
||||
if ([self->launcherManager addIWADPath: fileName])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
// If this is the first file added, clear out the existing
|
||||
// command line. This allows us to select multiple files
|
||||
// in the finder and open them all together (for TCs, etc).
|
||||
|
||||
if (!self->filesAdded)
|
||||
{
|
||||
[self->launcherManager clearCommandLine];
|
||||
}
|
||||
|
||||
// Add file with appropriate command line option based on extension:
|
||||
|
||||
extension = [fileName pathExtension];
|
||||
|
||||
if (![extension caseInsensitiveCompare: @"wad"])
|
||||
{
|
||||
[self->launcherManager addFileToCommandLine: fileName
|
||||
forArgument: @"-merge"];
|
||||
}
|
||||
else if (![extension caseInsensitiveCompare: @"deh"])
|
||||
{
|
||||
[self->launcherManager addFileToCommandLine: fileName
|
||||
forArgument: @"-deh"];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
self->filesAdded = YES;
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)showPrefPanel:(id)sender
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
32
dockerdoom/trunk/pkg/osx/Execute.h
Normal file
32
dockerdoom/trunk/pkg/osx/Execute.h
Normal file
@ -0,0 +1,32 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LAUNCHER_EXECUTE_H
|
||||
#define LAUNCHER_EXECUTE_H
|
||||
|
||||
void SetProgramLocation(const char *path);
|
||||
void ExecuteProgram(const char *executable, const char *iwad, const char *args);
|
||||
void OpenTerminalWindow(const char *doomwadpath);
|
||||
void OpenDocumentation(const char *filename);
|
||||
|
||||
#endif /* #ifndef LAUNCHER_EXECUTE_H */
|
||||
|
231
dockerdoom/trunk/pkg/osx/Execute.m
Normal file
231
dockerdoom/trunk/pkg/osx/Execute.m
Normal file
@ -0,0 +1,231 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define RESPONSE_FILE "/tmp/launcher.rsp"
|
||||
#define TEMP_SCRIPT "/tmp/tempscript.sh"
|
||||
|
||||
static char *executable_path;
|
||||
|
||||
// Called on startup to save the location of the launcher program
|
||||
// (within a package, other executables should be in the same directory)
|
||||
|
||||
void SetProgramLocation(const char *path)
|
||||
{
|
||||
char *p;
|
||||
|
||||
executable_path = strdup(path);
|
||||
|
||||
p = strrchr(executable_path, '/');
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
// Write out the response file containing command line arguments.
|
||||
|
||||
static void WriteResponseFile(const char *iwad, const char *args)
|
||||
{
|
||||
FILE *fstream;
|
||||
|
||||
fstream = fopen(RESPONSE_FILE, "w");
|
||||
|
||||
if (iwad != NULL)
|
||||
{
|
||||
fprintf(fstream, "-iwad \"%s\"", iwad);
|
||||
}
|
||||
|
||||
if (args != NULL)
|
||||
{
|
||||
fprintf(fstream, "%s", args);
|
||||
}
|
||||
|
||||
fclose(fstream);
|
||||
}
|
||||
|
||||
static void DoExec(const char *executable, const char *iwad, const char *args)
|
||||
{
|
||||
char *argv[3];
|
||||
|
||||
argv[0] = malloc(strlen(executable_path) + strlen(executable) + 3);
|
||||
sprintf(argv[0], "%s/%s", executable_path, executable);
|
||||
|
||||
if (iwad != NULL || args != NULL)
|
||||
{
|
||||
WriteResponseFile(iwad, args);
|
||||
|
||||
argv[1] = "@" RESPONSE_FILE;
|
||||
argv[2] = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
argv[1] = NULL;
|
||||
}
|
||||
|
||||
execv(argv[0], argv);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
// Execute the specified executable contained in the same directory
|
||||
// as the launcher, with the specified arguments.
|
||||
|
||||
void ExecuteProgram(const char *executable, const char *iwad, const char *args)
|
||||
{
|
||||
pid_t childpid;
|
||||
char *homedir;
|
||||
|
||||
childpid = fork();
|
||||
|
||||
if (childpid == 0)
|
||||
{
|
||||
signal(SIGCHLD, SIG_DFL);
|
||||
|
||||
// Change directory to home dir before launch, so that any demos
|
||||
// are saved somewhere sensible.
|
||||
|
||||
homedir = getenv("HOME");
|
||||
|
||||
if (homedir != NULL)
|
||||
{
|
||||
chdir(homedir);
|
||||
}
|
||||
|
||||
DoExec(executable, iwad, args);
|
||||
}
|
||||
else
|
||||
{
|
||||
signal(SIGCHLD, SIG_IGN);
|
||||
}
|
||||
}
|
||||
|
||||
// Write a sequence of commands that will display the specified message
|
||||
// via shell commands.
|
||||
|
||||
static void WriteMessage(FILE *script, char *msg)
|
||||
{
|
||||
char *p;
|
||||
|
||||
fprintf(script, "echo \"");
|
||||
|
||||
for (p=msg; *p != '\0'; ++p)
|
||||
{
|
||||
// Start new line?
|
||||
|
||||
if (*p == '\n')
|
||||
{
|
||||
fprintf(script, "\"\necho \"");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Escaped character?
|
||||
|
||||
if (*p == '\\' || *p == '\"')
|
||||
{
|
||||
fprintf(script, "\\");
|
||||
}
|
||||
|
||||
fprintf(script, "%c", *p);
|
||||
}
|
||||
|
||||
fprintf(script, "\"\n");
|
||||
}
|
||||
|
||||
// Open a terminal window with the PATH set appropriately, and DOOMWADPATH
|
||||
// set to the specified value.
|
||||
|
||||
void OpenTerminalWindow(const char *doomwadpath)
|
||||
{
|
||||
FILE *stream;
|
||||
|
||||
// Generate a shell script that sets the PATH to include the location
|
||||
// where the Doom binaries are, and DOOMWADPATH to include the
|
||||
// IWAD files that have been configured in the launcher interface.
|
||||
// The script then deletes itself and starts a shell.
|
||||
|
||||
stream = fopen(TEMP_SCRIPT, "w");
|
||||
|
||||
fprintf(stream, "#!/bin/sh\n");
|
||||
//fprintf(stream, "set -x\n");
|
||||
fprintf(stream, "PATH=\"%s:$PATH\"\n", executable_path);
|
||||
|
||||
// MANPATH is set to point to the directory within the bundle that
|
||||
// contains the Unix manpages. However, the bundle name or path to
|
||||
// it can contain a space, and OS X doesn't like this! As a
|
||||
// workaround, create a symlink in /tmp to point to the real directory,
|
||||
// and put *this* in MANPATH.
|
||||
|
||||
fprintf(stream, "rm -f \"/tmp/%s.man\"\n", PACKAGE_TARNAME);
|
||||
fprintf(stream, "ln -s \"%s/man\" \"/tmp/%s.man\"\n",
|
||||
executable_path, PACKAGE_TARNAME);
|
||||
fprintf(stream, "MANPATH=\"/tmp/%s.man:$(manpath)\"\n", PACKAGE_TARNAME);
|
||||
fprintf(stream, "export MANPATH\n");
|
||||
|
||||
fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath);
|
||||
fprintf(stream, "export DOOMWADPATH\n");
|
||||
fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT);
|
||||
|
||||
// Display a useful message:
|
||||
|
||||
fprintf(stream, "clear\n");
|
||||
WriteMessage(stream,
|
||||
"\n"
|
||||
"This command line has the PATH variable configured so that you may\n"
|
||||
"launch the game with whatever parameters you desire.\n"
|
||||
"\n"
|
||||
"For example:\n"
|
||||
"\n"
|
||||
" " PACKAGE_TARNAME " -iwad doom2.wad -file sid.wad -warp 1\n"
|
||||
"\n"
|
||||
"Type 'exit' to exit.\n");
|
||||
|
||||
fprintf(stream, "exec $SHELL\n");
|
||||
fprintf(stream, "\n");
|
||||
|
||||
fclose(stream);
|
||||
|
||||
chmod(TEMP_SCRIPT, 0755);
|
||||
|
||||
// Tell the terminal to open a window to run the script.
|
||||
|
||||
[[NSWorkspace sharedWorkspace] openFile: @TEMP_SCRIPT
|
||||
withApplication: @"Terminal"];
|
||||
}
|
||||
|
||||
void OpenDocumentation(const char *filename)
|
||||
{
|
||||
NSString *path;
|
||||
|
||||
path = [NSString stringWithFormat: @"%s/Documentation/%s",
|
||||
executable_path, filename];
|
||||
|
||||
[[NSWorkspace sharedWorkspace] openFile: path];
|
||||
}
|
||||
|
131
dockerdoom/trunk/pkg/osx/GNUmakefile
Normal file
131
dockerdoom/trunk/pkg/osx/GNUmakefile
Normal file
@ -0,0 +1,131 @@
|
||||
|
||||
# Makefile for building the OS X launcher program and DMG package.
|
||||
# It is also possible to build and run the launcher under Unix
|
||||
# systems using GNUstep, although this is only here for development
|
||||
# and debugging purposes.
|
||||
|
||||
include ../config.make
|
||||
|
||||
# Build so that the package will work on older versions.
|
||||
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.4
|
||||
|
||||
STAGING_DIR=staging
|
||||
DMG=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).dmg
|
||||
|
||||
TOPLEVEL=../..
|
||||
TOPLEVEL_DOCS=$(patsubst %,../../%,$(DOC_FILES))
|
||||
|
||||
ifndef GNUSTEP_MAKEFILES
|
||||
|
||||
# DMG file containing package:
|
||||
|
||||
$(DMG) : tmp.dmg
|
||||
rm -f $@
|
||||
./dmgfix "$(realpath tmp.dmg)" "$(PACKAGE_STRING)" "$(PACKAGE_NAME).app"
|
||||
hdiutil convert -format UDZO -o $@ tmp.dmg
|
||||
rm -f tmp.dmg
|
||||
|
||||
tmp.dmg : $(STAGING_DIR)
|
||||
rm -f $@
|
||||
hdiutil makehybrid -hfs -hfs-volume-name "$(PACKAGE_STRING)" \
|
||||
-hfs-openfolder $(STAGING_DIR) $(STAGING_DIR) \
|
||||
-o tmp.dmg
|
||||
|
||||
endif
|
||||
|
||||
# Staging dir build for package:
|
||||
|
||||
APP_DIR=$(STAGING_DIR)/$(PACKAGE_NAME).app
|
||||
|
||||
# OS X and GNUstep apps have a slightly different internal structure:
|
||||
# OS X apps have their files within a containing "Contents" directory
|
||||
# that does not exist in GNUstep apps. Similarly, the binaries are
|
||||
# installed at the top level, rather than in a "MacOS" directory.
|
||||
# Finally, we must install a different Info.plist file.
|
||||
|
||||
ifdef GNUSTEP_MAKEFILES
|
||||
APP_TOP_DIR=$(APP_DIR)
|
||||
APP_BIN_DIR=$(APP_DIR)
|
||||
SRC_INFO_PLIST=Info-gnustep.plist
|
||||
else
|
||||
APP_TOP_DIR=$(APP_DIR)/Contents
|
||||
APP_BIN_DIR=$(APP_DIR)/Contents/MacOS
|
||||
SRC_INFO_PLIST=Info.plist
|
||||
endif
|
||||
|
||||
APP_DOC_DIR=$(APP_BIN_DIR)/Documentation
|
||||
APP_DOC_RELDIR=$(patsubst $(STAGING_DIR)/%,%,$(APP_DOC_DIR))
|
||||
|
||||
$(STAGING_DIR): launcher $(TOPLEVEL_DOCS)
|
||||
rm -rf $(STAGING_DIR)
|
||||
mkdir $(STAGING_DIR)
|
||||
|
||||
mkdir -p "$(APP_TOP_DIR)"
|
||||
cp -R Resources "$(APP_TOP_DIR)"
|
||||
cp PkgInfo "$(APP_TOP_DIR)"
|
||||
cp $(SRC_INFO_PLIST) "$(APP_TOP_DIR)"
|
||||
|
||||
mkdir -p "$(APP_BIN_DIR)"
|
||||
|
||||
mkdir -p "$(APP_DOC_DIR)"
|
||||
cp $(TOPLEVEL_DOCS) "$(APP_DOC_DIR)"
|
||||
|
||||
ln -s "$(APP_DOC_RELDIR)/COPYING" "$(STAGING_DIR)/Software License"
|
||||
ln -s "$(APP_DOC_RELDIR)/README" "$(STAGING_DIR)/README"
|
||||
ln -s /Applications "$(STAGING_DIR)"
|
||||
|
||||
cp launcher "$(APP_BIN_DIR)"
|
||||
$(STRIP) "$(APP_BIN_DIR)/launcher"
|
||||
|
||||
./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 \
|
||||
> "$(APP_DOC_DIR)/INSTALL"
|
||||
|
||||
find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true
|
||||
|
||||
mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6"
|
||||
cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5"
|
||||
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
|
||||
|
||||
clean : launcher_clean
|
||||
rm -f $(DMG)
|
||||
rm -rf $(STAGING_DIR)
|
||||
|
||||
# Launcher build:
|
||||
|
||||
CFLAGS = -Wall -I$(TOPLEVEL)
|
||||
|
||||
# Are we building using gs_make?
|
||||
|
||||
ifdef GNUSTEP_MAKEFILES
|
||||
CFLAGS += $(shell gnustep-config --objc-flags)
|
||||
LDFLAGS = $(shell gnustep-config --gui-libs)
|
||||
else
|
||||
LDFLAGS = -framework Cocoa
|
||||
endif
|
||||
|
||||
LAUNCHER_OBJS= \
|
||||
AppController.o \
|
||||
Execute.o \
|
||||
IWADController.o \
|
||||
IWADLocation.o \
|
||||
LauncherManager.o \
|
||||
main.o
|
||||
|
||||
launcher : $(LAUNCHER_OBJS)
|
||||
$(CC) $(LDFLAGS) $(LAUNCHER_OBJS) -o $@
|
||||
|
||||
%.o : %.m
|
||||
$(CC) -c $(CFLAGS) $^ -o $@
|
||||
|
||||
launcher_clean :
|
||||
rm -f $(LAUNCHER_OBJS) launcher
|
||||
|
55
dockerdoom/trunk/pkg/osx/IWADController.h
Normal file
55
dockerdoom/trunk/pkg/osx/IWADController.h
Normal file
@ -0,0 +1,55 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LAUNCHER_IWADCONTROLLER_H
|
||||
#define LAUNCHER_IWADCONTROLLER_H
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <AppKit/NSNibLoading.h>
|
||||
|
||||
@interface IWADController : NSObject
|
||||
{
|
||||
id iwadSelector;
|
||||
id configWindow;
|
||||
|
||||
id chex;
|
||||
id doom1;
|
||||
id doom2;
|
||||
id plutonia;
|
||||
id tnt;
|
||||
}
|
||||
|
||||
- (void) closeConfigWindow: (id)sender;
|
||||
- (void) openConfigWindow: (id)sender;
|
||||
- (NSString *) getIWADLocation;
|
||||
- (void) awakeFromNib;
|
||||
- (BOOL) setDropdownList;
|
||||
- (void) setDropdownSelection;
|
||||
- (void) saveConfig;
|
||||
- (char *) doomWadPath;
|
||||
- (void) setEnvironment;
|
||||
- (BOOL) addIWADPath: (NSString *) path;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* #ifndef LAUNCHER_IWADCONTROLLER_H */
|
||||
|
386
dockerdoom/trunk/pkg/osx/IWADController.m
Normal file
386
dockerdoom/trunk/pkg/osx/IWADController.m
Normal file
@ -0,0 +1,386 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "IWADController.h"
|
||||
#include "IWADLocation.h"
|
||||
|
||||
typedef enum
|
||||
{
|
||||
IWAD_DOOM1,
|
||||
IWAD_DOOM2,
|
||||
IWAD_TNT,
|
||||
IWAD_PLUTONIA,
|
||||
IWAD_CHEX,
|
||||
NUM_IWAD_TYPES
|
||||
} IWAD;
|
||||
|
||||
static NSString *IWADLabels[NUM_IWAD_TYPES] =
|
||||
{
|
||||
@"Doom",
|
||||
@"Doom II: Hell on Earth",
|
||||
@"Final Doom: TNT: Evilution",
|
||||
@"Final Doom: Plutonia Experiment",
|
||||
@"Chex Quest"
|
||||
};
|
||||
|
||||
static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] =
|
||||
{
|
||||
@"doom.wad",
|
||||
@"doom2.wad",
|
||||
@"tnt.wad",
|
||||
@"plutonia.wad",
|
||||
@"chex.wad",
|
||||
@"undefined"
|
||||
};
|
||||
|
||||
@implementation IWADController
|
||||
|
||||
- (void) getIWADList: (IWADLocation **) iwadList
|
||||
{
|
||||
iwadList[IWAD_DOOM1] = self->doom1;
|
||||
iwadList[IWAD_DOOM2] = self->doom2;
|
||||
iwadList[IWAD_TNT] = self->tnt;
|
||||
iwadList[IWAD_PLUTONIA] = self->plutonia;
|
||||
iwadList[IWAD_CHEX] = self->chex;
|
||||
}
|
||||
|
||||
- (IWAD) getSelectedIWAD
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
if ([self->iwadSelector titleOfSelectedItem] == IWADLabels[i])
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return NUM_IWAD_TYPES;
|
||||
}
|
||||
|
||||
// Get the location of the selected IWAD.
|
||||
|
||||
- (NSString *) getIWADLocation
|
||||
{
|
||||
IWAD selectedIWAD;
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
|
||||
selectedIWAD = [self getSelectedIWAD];
|
||||
|
||||
if (selectedIWAD == NUM_IWAD_TYPES)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
[self getIWADList: iwadList];
|
||||
|
||||
return [iwadList[selectedIWAD] getLocation];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setIWADConfig
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
NSUserDefaults *defaults;
|
||||
NSString *key;
|
||||
NSString *value;
|
||||
unsigned int i;
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
|
||||
// Load IWAD filename paths
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
key = IWADFilenames[i];
|
||||
value = [defaults stringForKey:key];
|
||||
|
||||
if (value != nil)
|
||||
{
|
||||
[iwadList[i] setLocation:value];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// On startup, set the selected item in the IWAD dropdown
|
||||
|
||||
- (void) setDropdownSelection
|
||||
{
|
||||
NSUserDefaults *defaults;
|
||||
NSString *selected;
|
||||
unsigned int i;
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
selected = [defaults stringForKey: @"selected_iwad"];
|
||||
|
||||
if (selected == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Find this IWAD in the filenames list, and select it.
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
if ([selected isEqualToString:IWADFilenames[i]])
|
||||
{
|
||||
[self->iwadSelector selectItemWithTitle:IWADLabels[i]];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the dropdown list to include an entry for each IWAD that has
|
||||
// been configured. Returns true if at least one IWAD is configured.
|
||||
|
||||
- (BOOL) setDropdownList
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
BOOL have_wads;
|
||||
id location;
|
||||
unsigned int i;
|
||||
unsigned int enabled_wads;
|
||||
|
||||
// Build the new list.
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
[self->iwadSelector removeAllItems];
|
||||
|
||||
enabled_wads = 0;
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
location = [iwadList[i] getLocation];
|
||||
|
||||
if (location != nil && [location length] > 0)
|
||||
{
|
||||
[self->iwadSelector addItemWithTitle: IWADLabels[i]];
|
||||
++enabled_wads;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable/disable the dropdown depending on whether there
|
||||
// were any configured IWADs.
|
||||
|
||||
have_wads = enabled_wads > 0;
|
||||
[self->iwadSelector setEnabled: have_wads];
|
||||
|
||||
// Restore the old selection.
|
||||
|
||||
[self setDropdownSelection];
|
||||
|
||||
return have_wads;
|
||||
}
|
||||
|
||||
- (void) saveConfig
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
IWAD selectedIWAD;
|
||||
NSUserDefaults *defaults;
|
||||
NSString *key;
|
||||
NSString *value;
|
||||
unsigned int i;
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
|
||||
// Store all IWAD locations to user defaults.
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
key = IWADFilenames[i];
|
||||
value = [iwadList[i] getLocation];
|
||||
|
||||
[defaults setObject:value forKey:key];
|
||||
}
|
||||
|
||||
// Save currently selected IWAD.
|
||||
|
||||
selectedIWAD = [self getSelectedIWAD];
|
||||
[defaults setObject:IWADFilenames[selectedIWAD]
|
||||
forKey:@"selected_iwad"];
|
||||
}
|
||||
|
||||
// Callback method invoked when the configuration button in the main
|
||||
// window is clicked.
|
||||
|
||||
- (void) openConfigWindow: (id)sender
|
||||
{
|
||||
if (![self->configWindow isVisible])
|
||||
{
|
||||
[self->configWindow makeKeyAndOrderFront: sender];
|
||||
}
|
||||
}
|
||||
|
||||
// Callback method invoked when the close button is clicked.
|
||||
|
||||
- (void) closeConfigWindow: (id)sender
|
||||
{
|
||||
[self->configWindow orderOut: sender];
|
||||
[self saveConfig];
|
||||
[self setDropdownList];
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[self->configWindow center];
|
||||
|
||||
// Set configuration for all IWADs from configuration file.
|
||||
|
||||
[self setIWADConfig];
|
||||
|
||||
// Populate the dropdown IWAD list.
|
||||
|
||||
if ([self setDropdownList])
|
||||
{
|
||||
[self setDropdownSelection];
|
||||
}
|
||||
}
|
||||
|
||||
// Generate a value to set for the DOOMWADPATH environment variable
|
||||
// that contains each of the configured IWAD files.
|
||||
|
||||
- (char *) doomWadPath
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
NSString *location;
|
||||
unsigned int i;
|
||||
unsigned int len;
|
||||
BOOL first;
|
||||
char *env;
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
|
||||
// Calculate length of environment string.
|
||||
|
||||
len = 0;
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
location = [iwadList[i] getLocation];
|
||||
|
||||
if (location != nil && [location length] > 0)
|
||||
{
|
||||
len += [location length] + 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Build string.
|
||||
|
||||
env = malloc(len);
|
||||
strcpy(env, "");
|
||||
|
||||
first = YES;
|
||||
|
||||
for (i=0; i<NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
location = [iwadList[i] getLocation];
|
||||
|
||||
if (location != nil && [location length] > 0)
|
||||
{
|
||||
if (!first)
|
||||
{
|
||||
strcat(env, ":");
|
||||
}
|
||||
|
||||
strcat(env, [location UTF8String]);
|
||||
first = NO;
|
||||
}
|
||||
}
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
// Set the DOOMWADPATH environment variable to contain the path to each
|
||||
// of the configured IWAD files.
|
||||
|
||||
- (void) setEnvironment
|
||||
{
|
||||
char *doomwadpath;
|
||||
char *env;
|
||||
|
||||
// Get the value for the path.
|
||||
|
||||
doomwadpath = [self doomWadPath];
|
||||
|
||||
env = malloc(strlen(doomwadpath) + 15);
|
||||
|
||||
sprintf(env, "DOOMWADPATH=%s", doomwadpath);
|
||||
|
||||
free(doomwadpath);
|
||||
|
||||
// Load into environment:
|
||||
|
||||
putenv(env);
|
||||
|
||||
//free(env);
|
||||
}
|
||||
|
||||
// Examine a path to a WAD and determine whether it is an IWAD file.
|
||||
// If so, it is added to the IWAD configuration, and true is returned.
|
||||
|
||||
- (BOOL) addIWADPath: (NSString *) path
|
||||
{
|
||||
IWADLocation *iwadList[NUM_IWAD_TYPES];
|
||||
NSArray *pathComponents;
|
||||
NSString *filename;
|
||||
unsigned int i;
|
||||
|
||||
[self getIWADList: iwadList];
|
||||
|
||||
// Find an IWAD file that matches the filename in the path that we
|
||||
// have been given.
|
||||
|
||||
pathComponents = [path pathComponents];
|
||||
filename = [pathComponents objectAtIndex: [pathComponents count] - 1];
|
||||
|
||||
for (i = 0; i < NUM_IWAD_TYPES; ++i)
|
||||
{
|
||||
if ([filename caseInsensitiveCompare: IWADFilenames[i]] == 0)
|
||||
{
|
||||
// Configure this IWAD.
|
||||
|
||||
[iwadList[i] setLocation: path];
|
||||
|
||||
// Rebuild dropdown list and select the new IWAD.
|
||||
|
||||
[self setDropdownList];
|
||||
[self->iwadSelector selectItemWithTitle:IWADLabels[i]];
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
|
||||
// No IWAD found with this name.
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
44
dockerdoom/trunk/pkg/osx/IWADLocation.h
Normal file
44
dockerdoom/trunk/pkg/osx/IWADLocation.h
Normal file
@ -0,0 +1,44 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LAUNCHER_IWADLOCATION_H
|
||||
#define LAUNCHER_IWADLOCATION_H
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
|
||||
#include "IWADController.h"
|
||||
|
||||
@interface IWADLocation : NSObject
|
||||
{
|
||||
IWADController *iwadController;
|
||||
|
||||
id locationConfigBox;
|
||||
}
|
||||
|
||||
- (void) setButtonClicked: (id)sender;
|
||||
- (NSString *) getLocation;
|
||||
- (void) setLocation: (NSString *) value;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* #ifndef LAUNCHER_IWADLOCATION_H */
|
||||
|
74
dockerdoom/trunk/pkg/osx/IWADLocation.m
Normal file
74
dockerdoom/trunk/pkg/osx/IWADLocation.m
Normal file
@ -0,0 +1,74 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "IWADLocation.h"
|
||||
|
||||
static id WAD_TYPES[] =
|
||||
{
|
||||
@"wad", @"WAD"
|
||||
};
|
||||
|
||||
@implementation IWADLocation
|
||||
|
||||
- (void) setButtonClicked: (id)sender
|
||||
{
|
||||
NSArray *wadTypes = [NSArray arrayWithObjects: WAD_TYPES count: 2];
|
||||
NSOpenPanel *openPanel;
|
||||
NSArray *filenames;
|
||||
int result;
|
||||
|
||||
[wadTypes retain];
|
||||
|
||||
// Open a file selector for the new file.
|
||||
|
||||
openPanel = [NSOpenPanel openPanel];
|
||||
[openPanel setTitle: @"Add IWAD file"];
|
||||
[openPanel setCanChooseFiles: YES];
|
||||
[openPanel setCanChooseDirectories: NO];
|
||||
|
||||
result = [openPanel runModalForTypes: wadTypes];
|
||||
|
||||
// If the "OK" button was clicked, add the new IWAD file to the list.
|
||||
|
||||
if (result == NSOKButton)
|
||||
{
|
||||
filenames = [openPanel filenames];
|
||||
[self setLocation: [filenames lastObject]];
|
||||
|
||||
[self->iwadController saveConfig];
|
||||
[self->iwadController setDropdownList];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *) getLocation
|
||||
{
|
||||
return [self->locationConfigBox stringValue];
|
||||
}
|
||||
|
||||
- (void) setLocation: (NSString *) filename
|
||||
{
|
||||
[self->locationConfigBox setStringValue: filename];
|
||||
}
|
||||
|
||||
@end
|
||||
|
36
dockerdoom/trunk/pkg/osx/Info-gnustep.plist
Normal file
36
dockerdoom/trunk/pkg/osx/Info-gnustep.plist
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
ApplicationName = "psdoom";
|
||||
ApplicationDescription = "psdoom-ng source port - psDooM with Chocolate Doom";
|
||||
ApplicationIcon = app.png;
|
||||
ApplicationRelease = 2012.02.05-1.6.0;
|
||||
ApplicationURL = "https://github.com/orsonteodoro/psdoom-ng/";
|
||||
Authors = (
|
||||
"Orson Teodoro <orsonteodoro@yahoo.com>"
|
||||
);
|
||||
Copyright = "Copyright (C) 1993-2012";
|
||||
CopyrightDescription = "GNU General Public License, version 2";
|
||||
FullVersionID = 2012.02.05-1.6.0;
|
||||
GSMainMarkupFile = "";
|
||||
NSExecutable = "launcher";
|
||||
NSIcon = app.png;
|
||||
NSMainNibFile = launcher.nib;
|
||||
NSPrincipalClass = NSApplication;
|
||||
NSRole = Application;
|
||||
NSTypes = (
|
||||
{
|
||||
NSHumanReadableName = "Doom WAD file";
|
||||
NSUnixExtensions = ( wad );
|
||||
NSRole = Viewer;
|
||||
NSMimeTypes = (
|
||||
"application/x-doom"
|
||||
);
|
||||
NSIcon = "wadfile.png";
|
||||
},
|
||||
{
|
||||
NSHumanReadableName = "Dehacked patch";
|
||||
NSUnixExtensions = ( deh );
|
||||
NSRole = Viewer;
|
||||
NSIcon = "wadfile.png";
|
||||
}
|
||||
);
|
||||
}
|
36
dockerdoom/trunk/pkg/osx/Info-gnustep.plist.in
Normal file
36
dockerdoom/trunk/pkg/osx/Info-gnustep.plist.in
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
ApplicationName = "@PACKAGE_NAME@";
|
||||
ApplicationDescription = "@PACKAGE_SHORTDESC@";
|
||||
ApplicationIcon = app.png;
|
||||
ApplicationRelease = @PACKAGE_VERSION@;
|
||||
ApplicationURL = "@PACKAGE_URL@";
|
||||
Authors = (
|
||||
"@PACKAGE_MAINTAINER@ <@PACKAGE_BUGREPORT@>"
|
||||
);
|
||||
Copyright = "@PACKAGE_COPYRIGHT@";
|
||||
CopyrightDescription = "@PACKAGE_LICENSE@";
|
||||
FullVersionID = @PACKAGE_VERSION@;
|
||||
GSMainMarkupFile = "";
|
||||
NSExecutable = "launcher";
|
||||
NSIcon = app.png;
|
||||
NSMainNibFile = launcher.nib;
|
||||
NSPrincipalClass = NSApplication;
|
||||
NSRole = Application;
|
||||
NSTypes = (
|
||||
{
|
||||
NSHumanReadableName = "Doom WAD file";
|
||||
NSUnixExtensions = ( wad );
|
||||
NSRole = Viewer;
|
||||
NSMimeTypes = (
|
||||
"application/x-doom"
|
||||
);
|
||||
NSIcon = "wadfile.png";
|
||||
},
|
||||
{
|
||||
NSHumanReadableName = "Dehacked patch";
|
||||
NSUnixExtensions = ( deh );
|
||||
NSRole = Viewer;
|
||||
NSIcon = "wadfile.png";
|
||||
}
|
||||
);
|
||||
}
|
60
dockerdoom/trunk/pkg/osx/Info.plist
Normal file
60
dockerdoom/trunk/pkg/osx/Info.plist
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>psdoom</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>launcher</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>psdoom 2012.02.05-1.6.0</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>app.icns</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>psdoom</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2012.02.05-1.6.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2012.02.05-1.6.0</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>launcher</string>
|
||||
|
||||
<!-- file associations: -->
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Doom WAD file</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>wadfile.icns</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wad</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Dehacked patch</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>wadfile.icns</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>deh</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
60
dockerdoom/trunk/pkg/osx/Info.plist.in
Normal file
60
dockerdoom/trunk/pkg/osx/Info.plist.in
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>@PACKAGE_NAME@</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>launcher</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@PACKAGE_STRING@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>app.icns</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>@PACKAGE_NAME@</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>@PACKAGE_VERSION@</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>@PACKAGE_VERSION@</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>launcher</string>
|
||||
|
||||
<!-- file associations: -->
|
||||
|
||||
<key>CFBundleDocumentTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Doom WAD file</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>wadfile.icns</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>wad</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>Dehacked patch</string>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string>wadfile.icns</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Viewer</string>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>deh</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
58
dockerdoom/trunk/pkg/osx/LauncherManager.h
Normal file
58
dockerdoom/trunk/pkg/osx/LauncherManager.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef LAUNCHER_LAUNCHERMANAGER_H
|
||||
#define LAUNCHER_LAUNCHERMANAGER_H
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include <AppKit/NSNibLoading.h>
|
||||
#include "IWADController.h"
|
||||
|
||||
@interface LauncherManager : NSObject
|
||||
{
|
||||
IWADController *iwadController;
|
||||
|
||||
id launcherWindow;
|
||||
id launchButton;
|
||||
|
||||
id commandLineArguments;
|
||||
}
|
||||
|
||||
- (void) launch: (id)sender;
|
||||
- (void) runSetup: (id)sender;
|
||||
- (void) awakeFromNib;
|
||||
- (void) clearCommandLine;
|
||||
- (BOOL) addIWADPath: (NSString *) path;
|
||||
- (void) addFileToCommandLine: (NSString *) fileName
|
||||
forArgument: (NSString *) args;
|
||||
- (void) openTerminal: (id) sender;
|
||||
|
||||
- (void) openREADME: (id) sender;
|
||||
- (void) openINSTALL: (id) sender;
|
||||
- (void) openCMDLINE: (id) sender;
|
||||
- (void) openCOPYING: (id) sender;
|
||||
- (void) openDocumentation: (id) sender;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* #ifndef LAUNCHER_LAUNCHERMANAGER_H */
|
||||
|
367
dockerdoom/trunk/pkg/osx/LauncherManager.m
Normal file
367
dockerdoom/trunk/pkg/osx/LauncherManager.m
Normal file
@ -0,0 +1,367 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "Execute.h"
|
||||
#include "LauncherManager.h"
|
||||
#include "config.h"
|
||||
|
||||
@implementation LauncherManager
|
||||
|
||||
// Save configuration. Invoked when we launch the game or quit.
|
||||
|
||||
- (void) saveConfig
|
||||
{
|
||||
NSUserDefaults *defaults;
|
||||
|
||||
// Save IWAD configuration and selected IWAD.
|
||||
|
||||
[self->iwadController saveConfig];
|
||||
|
||||
// Save command line arguments.
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
[defaults setObject:[self->commandLineArguments stringValue]
|
||||
forKey:@"command_line_args"];
|
||||
}
|
||||
|
||||
// Load configuration, invoked on startup.
|
||||
|
||||
- (void) setConfig
|
||||
{
|
||||
NSUserDefaults *defaults;
|
||||
NSString *args;
|
||||
|
||||
defaults = [NSUserDefaults standardUserDefaults];
|
||||
|
||||
args = [defaults stringForKey:@"command_line_args"];
|
||||
|
||||
if (args != nil)
|
||||
{
|
||||
[self->commandLineArguments setStringValue:args];
|
||||
}
|
||||
}
|
||||
|
||||
// Get the next command line argument from the command line.
|
||||
// The position counter used to iterate over arguments is in 'pos'.
|
||||
// The index of the argument that was found is saved in arg_pos.
|
||||
|
||||
static NSString *GetNextArgument(NSString *commandLine, int *pos, int *arg_pos)
|
||||
{
|
||||
NSRange arg_range;
|
||||
|
||||
// Skip past any whitespace
|
||||
|
||||
while (*pos < [commandLine length]
|
||||
&& isspace([commandLine characterAtIndex: *pos]))
|
||||
{
|
||||
++*pos;
|
||||
}
|
||||
|
||||
if (*pos >= [commandLine length])
|
||||
{
|
||||
*arg_pos = *pos;
|
||||
return nil;
|
||||
}
|
||||
|
||||
// We are at the start of the argument. This may be a quoted
|
||||
// string argument, or a "normal" one.
|
||||
|
||||
if ([commandLine characterAtIndex: *pos] == '\"')
|
||||
{
|
||||
// Quoted string, skip past first quote
|
||||
|
||||
++*pos;
|
||||
|
||||
// Save start position:
|
||||
|
||||
*arg_pos = *pos;
|
||||
|
||||
while (*pos < [commandLine length]
|
||||
&& [commandLine characterAtIndex: *pos] != '\"')
|
||||
{
|
||||
++*pos;
|
||||
}
|
||||
|
||||
// Unexpected end of string?
|
||||
|
||||
if (*pos >= [commandLine length])
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
arg_range = NSMakeRange(*arg_pos, *pos - *arg_pos);
|
||||
|
||||
// Skip past last quote
|
||||
|
||||
++*pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Normal argument
|
||||
|
||||
// Save position:
|
||||
|
||||
*arg_pos = *pos;
|
||||
|
||||
// Read until end:
|
||||
|
||||
while (*pos < [commandLine length]
|
||||
&& !isspace([commandLine characterAtIndex: *pos]))
|
||||
{
|
||||
++*pos;
|
||||
}
|
||||
|
||||
arg_range = NSMakeRange(*arg_pos, *pos - *arg_pos);
|
||||
}
|
||||
|
||||
return [commandLine substringWithRange: arg_range];
|
||||
}
|
||||
|
||||
// Given the specified command line argument, find the index
|
||||
// to insert the new file within the command line. Returns -1 if the
|
||||
// argument is not already within the arguments string.
|
||||
|
||||
static int GetFileInsertIndex(NSString *commandLine, NSString *needle)
|
||||
{
|
||||
NSString *arg;
|
||||
int arg_pos;
|
||||
int pos;
|
||||
|
||||
pos = 0;
|
||||
|
||||
// Find the command line parameter we are searching
|
||||
// for (-merge, -deh, etc)
|
||||
|
||||
for (;;)
|
||||
{
|
||||
arg = GetNextArgument(commandLine, &pos, &arg_pos);
|
||||
|
||||
// Searched to end of string and never found?
|
||||
|
||||
if (arg == nil)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (![arg caseInsensitiveCompare: needle])
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Now skip over existing files. For example, if we
|
||||
// have -file foo.wad bar.wad, the new file should be appended
|
||||
// to the end of the list.
|
||||
|
||||
for (;;)
|
||||
{
|
||||
arg = GetNextArgument(commandLine, &pos, &arg_pos);
|
||||
|
||||
// If we search to the end of the string now, it is fine;
|
||||
// the new string should be added to the end of the command
|
||||
// line. Otherwise, if we find an argument that begins
|
||||
// with '-', it is a new command line parameter and the end
|
||||
// of the list.
|
||||
|
||||
if (arg == nil || [arg characterAtIndex: 0] == '-')
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// arg_pos should now contain the offset to insert the new filename.
|
||||
|
||||
return arg_pos;
|
||||
}
|
||||
|
||||
// Given the specified string, append a filename, quoted if necessary.
|
||||
|
||||
static NSString *AppendQuotedFilename(NSString *str, NSString *fileName)
|
||||
{
|
||||
int i;
|
||||
|
||||
// Search the filename for spaces, and quote if necessary.
|
||||
|
||||
for (i=0; i<[fileName length]; ++i)
|
||||
{
|
||||
if (isspace([fileName characterAtIndex: i]))
|
||||
{
|
||||
str = [str stringByAppendingString: @" \""];
|
||||
str = [str stringByAppendingString: fileName];
|
||||
str = [str stringByAppendingString: @"\" "];
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
str = [str stringByAppendingString: @" "];
|
||||
str = [str stringByAppendingString: fileName];
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// Clear out the existing command line options.
|
||||
// Invoked before the first file is added.
|
||||
|
||||
- (void) clearCommandLine
|
||||
{
|
||||
[self->commandLineArguments setStringValue: @""];
|
||||
}
|
||||
|
||||
// Add a file to the command line to load with the game.
|
||||
|
||||
- (void) addFileToCommandLine: (NSString *) fileName
|
||||
forArgument: (NSString *) arg
|
||||
{
|
||||
NSString *commandLine;
|
||||
int insert_pos;
|
||||
|
||||
// Get the current command line
|
||||
|
||||
commandLine = [self->commandLineArguments stringValue];
|
||||
|
||||
// Find the location to insert the new filename:
|
||||
|
||||
insert_pos = GetFileInsertIndex(commandLine, arg);
|
||||
|
||||
// If position < 0, we should add the new argument and filename
|
||||
// to the end. Otherwise, append the new filename to the existing
|
||||
// list of files.
|
||||
|
||||
if (insert_pos < 0)
|
||||
{
|
||||
commandLine = [commandLine stringByAppendingString: @" "];
|
||||
commandLine = [commandLine stringByAppendingString: arg];
|
||||
commandLine = AppendQuotedFilename(commandLine, fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString *start;
|
||||
NSString *end;
|
||||
|
||||
// Divide existing command line in half:
|
||||
|
||||
start = [commandLine substringToIndex: insert_pos];
|
||||
end = [commandLine substringFromIndex: insert_pos];
|
||||
|
||||
// Construct new command line:
|
||||
|
||||
commandLine = AppendQuotedFilename(start, fileName);
|
||||
commandLine = [commandLine stringByAppendingString: @" "];
|
||||
commandLine = [commandLine stringByAppendingString: end];
|
||||
}
|
||||
|
||||
[self->commandLineArguments setStringValue: commandLine];
|
||||
}
|
||||
|
||||
- (void) launch: (id)sender
|
||||
{
|
||||
NSString *iwad;
|
||||
NSString *args;
|
||||
|
||||
[self saveConfig];
|
||||
|
||||
iwad = [self->iwadController getIWADLocation];
|
||||
args = [self->commandLineArguments stringValue];
|
||||
|
||||
if (iwad == nil)
|
||||
{
|
||||
NSRunAlertPanel(@"No IWAD selected",
|
||||
@"You have not selected an IWAD (game) file.\n\n"
|
||||
"You must configure and select a valid IWAD file "
|
||||
"in order to launch the game.",
|
||||
@"OK", nil, nil);
|
||||
return;
|
||||
}
|
||||
|
||||
ExecuteProgram(PROGRAM_PREFIX "doom", [iwad UTF8String],
|
||||
[args UTF8String]);
|
||||
[NSApp terminate:sender];
|
||||
}
|
||||
|
||||
// Invoked when the "Setup Tool" button is clicked, to run the setup tool:
|
||||
|
||||
- (void) runSetup: (id)sender
|
||||
{
|
||||
[self saveConfig];
|
||||
|
||||
[self->iwadController setEnvironment];
|
||||
ExecuteProgram(PROGRAM_PREFIX "setup", NULL, NULL);
|
||||
}
|
||||
|
||||
// Invoked when the "Terminal" option is selected from the menu, to open
|
||||
// a terminal window.
|
||||
|
||||
- (void) openTerminal: (id) sender
|
||||
{
|
||||
char *doomwadpath;
|
||||
|
||||
[self saveConfig];
|
||||
|
||||
doomwadpath = [self->iwadController doomWadPath];
|
||||
|
||||
OpenTerminalWindow(doomwadpath);
|
||||
|
||||
free(doomwadpath);
|
||||
}
|
||||
|
||||
- (void) openREADME: (id) sender
|
||||
{
|
||||
OpenDocumentation("README");
|
||||
}
|
||||
|
||||
- (void) openINSTALL: (id) sender
|
||||
{
|
||||
OpenDocumentation("INSTALL");
|
||||
}
|
||||
|
||||
- (void) openCMDLINE: (id) sender
|
||||
{
|
||||
OpenDocumentation("CMDLINE");
|
||||
}
|
||||
|
||||
- (void) openCOPYING: (id) sender
|
||||
{
|
||||
OpenDocumentation("COPYING");
|
||||
}
|
||||
|
||||
- (void) openDocumentation: (id) sender
|
||||
{
|
||||
OpenDocumentation("");
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[self->launcherWindow setTitle: @PACKAGE_NAME " Launcher"];
|
||||
[self->launcherWindow center];
|
||||
[self->launcherWindow setDefaultButtonCell: [self->launchButton cell]];
|
||||
[self setConfig];
|
||||
}
|
||||
|
||||
- (BOOL) addIWADPath: (NSString *) path
|
||||
{
|
||||
return [self->iwadController addIWADPath: path];
|
||||
}
|
||||
|
||||
@end
|
||||
|
1
dockerdoom/trunk/pkg/osx/PkgInfo
Normal file
1
dockerdoom/trunk/pkg/osx/PkgInfo
Normal file
@ -0,0 +1 @@
|
||||
APPL????
|
BIN
dockerdoom/trunk/pkg/osx/Resources/128x128.png
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/128x128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
dockerdoom/trunk/pkg/osx/Resources/app.icns
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/app.icns
Normal file
Binary file not shown.
BIN
dockerdoom/trunk/pkg/osx/Resources/app.png
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/app.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
2949
dockerdoom/trunk/pkg/osx/Resources/launcher.nib/designable.nib
generated
Normal file
2949
dockerdoom/trunk/pkg/osx/Resources/launcher.nib/designable.nib
generated
Normal file
File diff suppressed because it is too large
Load Diff
BIN
dockerdoom/trunk/pkg/osx/Resources/launcher.nib/keyedobjects.nib
generated
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/launcher.nib/keyedobjects.nib
generated
Normal file
Binary file not shown.
BIN
dockerdoom/trunk/pkg/osx/Resources/wadfile.icns
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/wadfile.icns
Normal file
Binary file not shown.
BIN
dockerdoom/trunk/pkg/osx/Resources/wadfile.png
Normal file
BIN
dockerdoom/trunk/pkg/osx/Resources/wadfile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
100
dockerdoom/trunk/pkg/osx/cp-with-libs
Executable file
100
dockerdoom/trunk/pkg/osx/cp-with-libs
Executable file
@ -0,0 +1,100 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy a program to the specified destination, along
|
||||
# with libraries it depends upon.
|
||||
|
||||
src_bin=$1
|
||||
dest_dir=$2
|
||||
|
||||
# Returns true if the specified file is a dylib.
|
||||
|
||||
is_dylib() {
|
||||
case "$1" in
|
||||
*.dylib)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Returns true if the specified file is in a system location
|
||||
# (/System or /usr):
|
||||
|
||||
is_sys_lib() {
|
||||
case "$1" in
|
||||
/System/*)
|
||||
true
|
||||
;;
|
||||
/usr/*)
|
||||
true
|
||||
;;
|
||||
*)
|
||||
false
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Install the specified file to the location in dest_dir, along with
|
||||
# any libraries it depends upon (recursively):
|
||||
|
||||
install_with_deps() {
|
||||
local src_file
|
||||
local bin_name
|
||||
local dest_file
|
||||
local lib_name
|
||||
|
||||
src_file=$1
|
||||
bin_name=$(basename "$src_file")
|
||||
dest_file="$dest_dir/$bin_name"
|
||||
|
||||
# Already copied into the package? Don't copy again.
|
||||
# Prevents endless recursion.
|
||||
|
||||
if [ -e "$dest_file" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Installing $bin_name..."
|
||||
|
||||
# Copy file into package.
|
||||
|
||||
cp "$src_file" "$dest_file"
|
||||
|
||||
# Copy libraries that this file depends on:
|
||||
|
||||
otool -L "$src_file" | tail -n +2 | sed 's/^.//; s/ (.*//' | while read; do
|
||||
|
||||
# Don't copy system libraries
|
||||
|
||||
if is_sys_lib "$REPLY"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
#echo " - $bin_name depends on $REPLY"
|
||||
|
||||
# Copy this library into the package, and:
|
||||
# recursively install any libraries that _this_ library depends on:
|
||||
|
||||
install_with_deps "$REPLY"
|
||||
|
||||
# Change destination binary to depend on the
|
||||
# copy inside the package:
|
||||
|
||||
lib_name=$(basename "$REPLY")
|
||||
install_name_tool -change "$REPLY" "@executable_path/$lib_name" \
|
||||
"$dest_file"
|
||||
done
|
||||
|
||||
# If this is a library that we have installed, change its id:
|
||||
|
||||
if is_dylib "$dest_file"; then
|
||||
install_name_tool -id "@executable_path/$bin_name" "$dest_file"
|
||||
fi
|
||||
}
|
||||
|
||||
# Install the file, and recursively install any libraries:
|
||||
|
||||
install_with_deps "$src_bin"
|
||||
|
BIN
dockerdoom/trunk/pkg/osx/disk/background.png
Normal file
BIN
dockerdoom/trunk/pkg/osx/disk/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
dockerdoom/trunk/pkg/osx/disk/dir.DS_Store
Normal file
BIN
dockerdoom/trunk/pkg/osx/disk/dir.DS_Store
Normal file
Binary file not shown.
64
dockerdoom/trunk/pkg/osx/dmgfix
Executable file
64
dockerdoom/trunk/pkg/osx/dmgfix
Executable file
@ -0,0 +1,64 @@
|
||||
#!/usr/bin/osascript
|
||||
--
|
||||
-- Copyright(C) 2009 Simon Howard
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or
|
||||
-- modify it under the terms of the GNU General Public License
|
||||
-- as published by the Free Software Foundation; either version 2
|
||||
-- of the License, or (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
-- 02111-1307, USA.
|
||||
--
|
||||
--
|
||||
-- AppleScript script to automatically set the view properties in a
|
||||
-- .dmg file - ie. the background image, other Finder view options
|
||||
-- and icon positions.
|
||||
--
|
||||
-- Usage: dmgfix <absolute path to dmg> <disk name> <name of app>
|
||||
--
|
||||
|
||||
on run argv
|
||||
set dmgFile to POSIX file (item 1 of argv)
|
||||
set diskName to item 2 of argv
|
||||
set appName to item 3 of argv
|
||||
|
||||
tell application "Finder"
|
||||
--activate
|
||||
open dmgFile
|
||||
delay 1
|
||||
set win to the front Finder window
|
||||
set theDisk to disk diskName
|
||||
set the target of win to theDisk
|
||||
|
||||
-- window options:
|
||||
|
||||
set bgfile to file "background.png" of theDisk
|
||||
set the bounds of win to {200, 200, 717, 536}
|
||||
set icon size of icon view options of win to 96
|
||||
set background picture of icon view options of win to bgfile
|
||||
set toolbar visible of win to false
|
||||
|
||||
-- hide background file:
|
||||
|
||||
set bgloc to quoted form of POSIX path of (bgfile as text)
|
||||
do shell script "SetFile -a V " & bgloc
|
||||
|
||||
-- icon positions:
|
||||
|
||||
set position of file "README" of theDisk to {120, 250}
|
||||
set position of file "Software License" of theDisk to {380, 250}
|
||||
set position of file appName of theDisk to {70, 110}
|
||||
set position of file "Applications" of theDisk to {450, 110}
|
||||
|
||||
eject theDisk
|
||||
end tell
|
||||
end run
|
||||
|
32
dockerdoom/trunk/pkg/osx/main.m
Normal file
32
dockerdoom/trunk/pkg/osx/main.m
Normal file
@ -0,0 +1,32 @@
|
||||
/* ... */
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright(C) 2009 Simon Howard
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "Execute.h"
|
||||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
SetProgramLocation(argv[0]);
|
||||
|
||||
return NSApplicationMain (argc, argv);
|
||||
}
|
||||
|
38
dockerdoom/trunk/pkg/win32/GNUmakefile
Normal file
38
dockerdoom/trunk/pkg/win32/GNUmakefile
Normal file
@ -0,0 +1,38 @@
|
||||
|
||||
include ../config.make
|
||||
|
||||
TOPLEVEL=../..
|
||||
|
||||
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 \
|
||||
$(TOPLEVEL)/src/SDL_net.dll
|
||||
|
||||
DOC_FILES += README.OPL
|
||||
|
||||
ZIP=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-win32.zip
|
||||
|
||||
$(ZIP) : staging
|
||||
zip -j -r $@ staging/
|
||||
|
||||
staging: $(EXE_FILES) $(DLL_FILES) $(patsubst %,../../%,$(DOC_FILES))
|
||||
rm -rf staging
|
||||
mkdir staging
|
||||
cp $(EXE_FILES) $(DLL_FILES) staging/
|
||||
$(STRIP) staging/*.exe
|
||||
for f in $(DOC_FILES); do \
|
||||
cp $(TOPLEVEL)/$$f staging/$$f.txt; \
|
||||
unix2dos staging/$$f.txt; \
|
||||
done
|
||||
$(TOPLEVEL)/man/simplecpp -D_WIN32 -DPRECOMPILED \
|
||||
< $(TOPLEVEL)/man/INSTALL.template \
|
||||
> staging/INSTALL.txt
|
||||
unix2dos staging/INSTALL.txt
|
||||
|
||||
clean:
|
||||
rm -f $(ZIP)
|
||||
rm -rf staging
|
||||
|
4
dockerdoom/trunk/pkg/win32/README
Normal file
4
dockerdoom/trunk/pkg/win32/README
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
Makefile to build Windows packages. Requires zip and unix2dos cygwin
|
||||
packages to be installed.
|
||||
|
15
dockerdoom/trunk/pkg/wince/GNUmakefile
Normal file
15
dockerdoom/trunk/pkg/wince/GNUmakefile
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
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
|
||||
|
||||
$(OUTPUT_FILE) : $(CONFIG_FILE) $(DEPS)
|
||||
$(STRIP) $(EXECUTABLES)
|
||||
./wince-cabgen $< $@
|
||||
|
||||
clean:
|
||||
rm -f $(OUTPUT_FILE)
|
||||
|
25
dockerdoom/trunk/pkg/wince/wince-cab.cfg
Normal file
25
dockerdoom/trunk/pkg/wince/wince-cab.cfg
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
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"
|
||||
}
|
||||
|
668
dockerdoom/trunk/pkg/wince/wince-cabgen
Executable file
668
dockerdoom/trunk/pkg/wince/wince-cabgen
Executable file
@ -0,0 +1,668 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import struct
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
CAB_HEADER = "MSCE".encode("ascii")
|
||||
|
||||
ARCHITECTURES = {
|
||||
"shx-sh3": 103,
|
||||
"shx-sh4": 104,
|
||||
"i386": 386,
|
||||
"i486": 486,
|
||||
"i586": 586,
|
||||
"powerpc-601": 601,
|
||||
"powerpc-603": 603,
|
||||
"powerpc-604": 604,
|
||||
"powerpc-620": 620,
|
||||
"powerpc-mpc821": 821,
|
||||
"arm720": 1824,
|
||||
"arm820": 2080,
|
||||
"arm920": 2336,
|
||||
"strongarm": 2577,
|
||||
"mips-r4000": 4000,
|
||||
"sh3": 10003,
|
||||
"sh3e": 10004,
|
||||
"sh4": 10005,
|
||||
"alpha-21064": 21064,
|
||||
"arm7tdmi": 70001,
|
||||
}
|
||||
|
||||
DIR_VARIABLES = {
|
||||
"PROGRAMS": "%CE1%", # \Program Files
|
||||
"WINDOWS": "%CE2%", # \Windows
|
||||
"DESKTOP": "%CE3%", # \Windows\Desktop
|
||||
"STARTUP": "%CE4%", # \Windows\StartUp
|
||||
"DOCUMENTS": "%CE5%", # \My Documents
|
||||
"PROGRAMS_ACCESSORIES": "%CE6%", # \Program Files\Accessories
|
||||
"PROGRAMS_COMMUNICATIONS": "%CE7%", # \Program Files\Communications
|
||||
"PROGRAMS_GAMES": "%CE8%", # \Program Files\Games
|
||||
"PROGRAMS_OUTLOOK": "%CE9%", # \Program Files\Pocket Outlook
|
||||
"PROGRAMS_OFFICE": "%CE10%", # \Program Files\Office
|
||||
"WINDOWS_PROGRAMS": "%CE11%", # \Windows\Programs
|
||||
"WINDOWS_ACCESSORIES": "%CE12%", # \Windows\Programs\Accessories
|
||||
"WINDOWS_COMMUNICATIONS": "%CE13%", # \Windows\Programs\Communications
|
||||
"WINDOWS_GAMES": "%CE14%", # \Windows\Programs\Games
|
||||
"FONTS": "%CE15%", # \Windows\Fonts
|
||||
"RECENT": "%CE16%", # \Windows\Recent
|
||||
"FAVORITES": "%CE17%", # \Windows\Favorites
|
||||
|
||||
"START_PROGRAMS": "%CE11%", # \Windows\Start Menu\Programs
|
||||
"START_ACCESSORIES": "%CE12%", # \Windows\Start Menu\Accessories
|
||||
"START_COMMUNICATIONS": "%CE13%", # \Windows\Start Menu\Communications
|
||||
"START_GAMES": "%CE14%", # \Windows\Start Menu\Games
|
||||
"START": "%CE17%", # \Windows\Start Menu
|
||||
}
|
||||
|
||||
def write_int16(f, value):
|
||||
f.write(struct.pack("<H", value))
|
||||
|
||||
def write_int32(f, value):
|
||||
f.write(struct.pack("<I", value))
|
||||
|
||||
# Pad a string with NUL characters so that it has a length that is
|
||||
# a multiple of 4. At least one NUL is always added.
|
||||
|
||||
def pad_string(s):
|
||||
pad_len = 4 - (len(s) % 4)
|
||||
return s + (pad_len * "\x00")
|
||||
|
||||
class HeaderSection:
|
||||
|
||||
def __init__(self, cab_header):
|
||||
self.cab_header = cab_header
|
||||
self.arch = None
|
||||
self.app_name = None
|
||||
self.provider = None
|
||||
self.unsupported = None
|
||||
|
||||
def __len__(self):
|
||||
return 100 # header has fixed size
|
||||
|
||||
def set_meta(self, arch, app_name, provider, unsupported):
|
||||
|
||||
if arch not in ARCHITECTURES:
|
||||
raise Exception("Unknown architecture '%s'" % arch)
|
||||
|
||||
self.arch = ARCHITECTURES[arch]
|
||||
|
||||
dictionary = self.cab_header.dictionary
|
||||
|
||||
self.app_name = app_name
|
||||
dictionary.get(self.app_name)
|
||||
|
||||
self.provider = provider
|
||||
dictionary.get(self.provider)
|
||||
|
||||
self.unsupported = unsupported
|
||||
dictionary.get(self.unsupported)
|
||||
|
||||
def write(self, stream):
|
||||
|
||||
# Basic header
|
||||
|
||||
stream.write(CAB_HEADER)
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, len(self.cab_header))
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 1)
|
||||
write_int32(stream, self.arch)
|
||||
|
||||
# minimum Windows CE version:
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 0)
|
||||
write_int32(stream, 0)
|
||||
|
||||
dictionary = self.cab_header.dictionary
|
||||
|
||||
# Write number of entries in other sections:
|
||||
|
||||
for section in self.cab_header.sections:
|
||||
if section is not self:
|
||||
write_int16(stream, section.num_entries())
|
||||
|
||||
# Write offsets of other sections:
|
||||
|
||||
for section in self.cab_header.sections:
|
||||
if section is not self:
|
||||
offset = self.cab_header.get_section_offset(section)
|
||||
write_int32(stream, offset)
|
||||
|
||||
# Special strings:
|
||||
|
||||
special_strings = (
|
||||
self.app_name,
|
||||
self.provider,
|
||||
self.unsupported
|
||||
)
|
||||
|
||||
dictionary_offset = self.cab_header.get_section_offset(dictionary)
|
||||
|
||||
for s in special_strings:
|
||||
s_offset = dictionary.get_offset(s)
|
||||
write_int16(stream, dictionary_offset + s_offset)
|
||||
write_int16(stream, len(s) + 1)
|
||||
|
||||
# Two left-over fields of unknown use:
|
||||
|
||||
write_int16(stream, 0)
|
||||
write_int16(stream, 0)
|
||||
|
||||
class StringDictionary:
|
||||
def __init__(self, cab_header):
|
||||
self.cab_header = cab_header
|
||||
self.string_list = []
|
||||
self.strings = {}
|
||||
self.length = 0
|
||||
self.index = 1
|
||||
|
||||
# Get the length of the dictionary, in bytes.
|
||||
|
||||
def __len__(self):
|
||||
return self.length
|
||||
|
||||
# Get the number of entries in the dictionary.
|
||||
|
||||
def num_entries(self):
|
||||
return len(self.strings)
|
||||
|
||||
# Get the ID for the given string, adding it if necessary.
|
||||
|
||||
def get(self, s):
|
||||
# Is this a new string? Add it to the dictionary.
|
||||
|
||||
if s not in self.strings:
|
||||
offset = self.length
|
||||
padded = pad_string(s)
|
||||
|
||||
self.strings[s] = (self.index, offset)
|
||||
self.string_list.append((self.index, padded))
|
||||
self.length += len(padded) + 4
|
||||
self.index += 1
|
||||
|
||||
return self.strings[s][0]
|
||||
|
||||
# Get the offset of a particular string within the dictionary.
|
||||
|
||||
def get_offset(self, s):
|
||||
return self.strings[s][1] + 4
|
||||
|
||||
# Write the dictionary to the output stream.
|
||||
|
||||
def write(self, stream):
|
||||
|
||||
# Write out all strings:
|
||||
|
||||
for i, s in self.string_list:
|
||||
write_int16(stream, i)
|
||||
write_int16(stream, len(s))
|
||||
stream.write(s.encode("ascii"))
|
||||
|
||||
class DirectoryList:
|
||||
def __init__(self, cab_header):
|
||||
self.cab_header = cab_header
|
||||
self.directories_list = []
|
||||
self.directories = {}
|
||||
self.length = 0
|
||||
self.index = 1
|
||||
|
||||
def __len__(self):
|
||||
return self.length
|
||||
|
||||
def num_entries(self):
|
||||
return len(self.directories_list)
|
||||
|
||||
# Find whether the specified directory exists in the list
|
||||
|
||||
def find(self, dir):
|
||||
key = dir.lower()
|
||||
|
||||
if key in self.directories:
|
||||
return self.directories[key]
|
||||
else:
|
||||
return None
|
||||
|
||||
# Get the ID for the given directory, adding it if necessary.
|
||||
|
||||
def get(self, dir):
|
||||
|
||||
key = dir.lower()
|
||||
dictionary = self.cab_header.dictionary
|
||||
|
||||
# Add new directory?
|
||||
|
||||
if key not in self.directories:
|
||||
|
||||
# Separate into individual directories, and map to strings:
|
||||
|
||||
#dir_path = dir.split("\\")
|
||||
#if dir_path[0] == "":
|
||||
# dir_path = dir_path[1:]
|
||||
dir_path = [ dir ]
|
||||
|
||||
dir_path = list(map(lambda x: dictionary.get(x), dir_path))
|
||||
|
||||
self.directories[key] = self.index
|
||||
self.directories_list.append((self.index, dir_path))
|
||||
self.length += 6 + 2 * len(dir_path)
|
||||
self.index += 1
|
||||
|
||||
return self.directories[key]
|
||||
|
||||
# Write the directory list to the specified stream.
|
||||
|
||||
def write(self, stream):
|
||||
for i, dir in self.directories_list:
|
||||
write_int16(stream, i)
|
||||
write_int16(stream, 2 * len(dir) + 2)
|
||||
|
||||
for subdir in dir:
|
||||
write_int16(stream, subdir)
|
||||
|
||||
write_int16(stream, 0)
|
||||
|
||||
class FileList:
|
||||
def __init__(self, cab_header):
|
||||
self.cab_header = cab_header
|
||||
self.files = []
|
||||
self.length = 0
|
||||
self.index = 1
|
||||
|
||||
# Get the length of this section, in bytes.
|
||||
|
||||
def __len__(self):
|
||||
return self.length
|
||||
|
||||
# Query whether the file list contains a particular file.
|
||||
|
||||
def find(self, filename):
|
||||
dirname, sep, target_basename = filename.rpartition("\\")
|
||||
|
||||
target_basename = pad_string(target_basename)
|
||||
|
||||
target_dir_id = self.cab_header.directory_list.find(dirname)
|
||||
|
||||
if target_dir_id is None:
|
||||
return None
|
||||
else:
|
||||
# Search the list of files:
|
||||
|
||||
for i, dir_id, basename, file_no, flags in self.files:
|
||||
if dir_id == target_dir_id and basename == target_basename:
|
||||
return file_no
|
||||
else:
|
||||
return None
|
||||
|
||||
# Get the number of entries in the file list
|
||||
|
||||
def num_entries(self):
|
||||
return len(self.files)
|
||||
|
||||
# Add a file to the list.
|
||||
|
||||
def add(self, filename, file_no, flags=0):
|
||||
|
||||
dirname, sep, basename = filename.rpartition("\\")
|
||||
|
||||
dir_id = self.cab_header.directory_list.get(dirname)
|
||||
|
||||
padded = pad_string(basename)
|
||||
|
||||
self.files.append((self.index, dir_id, padded, file_no, flags))
|
||||
self.length += 12 + len(padded)
|
||||
self.index += 1
|
||||
|
||||
# Write this section to the output stream.
|
||||
|
||||
def write(self, stream):
|
||||
|
||||
for i, dir_id, filename, file_no, flags in self.files:
|
||||
write_int16(stream, i)
|
||||
write_int16(stream, dir_id)
|
||||
write_int16(stream, file_no)
|
||||
write_int32(stream, flags)
|
||||
write_int16(stream, len(filename))
|
||||
stream.write(filename.encode("ascii"))
|
||||
|
||||
# TODO?
|
||||
|
||||
class RegHiveList:
|
||||
def __len__(self):
|
||||
return 0
|
||||
|
||||
def num_entries(self):
|
||||
return 0
|
||||
|
||||
def write(self, stream):
|
||||
pass
|
||||
|
||||
class RegKeyList():
|
||||
def __len__(self):
|
||||
return 0
|
||||
|
||||
def num_entries(self):
|
||||
return 0
|
||||
|
||||
def write(self, stream):
|
||||
pass
|
||||
|
||||
class LinkList:
|
||||
def __init__(self, cab_header):
|
||||
self.cab_header = cab_header
|
||||
self.links = []
|
||||
self.length = 0
|
||||
self.index = 1
|
||||
|
||||
def __len__(self):
|
||||
return self.length
|
||||
|
||||
def num_entries(self):
|
||||
return len(self.links)
|
||||
|
||||
# Determine the target type (dir/file) and ID:
|
||||
|
||||
def __find_target(self, target):
|
||||
file_id = self.cab_header.file_list.find(target)
|
||||
|
||||
if file_id is not None:
|
||||
return 1, file_id
|
||||
|
||||
dir_list = self.cab_header.get_section(DirectoryList)
|
||||
dir_id = dir_list.find(target)
|
||||
|
||||
if dir_id is not None:
|
||||
return 0, dir_id
|
||||
|
||||
raise Exception("Link target '%s' not found" % target)
|
||||
|
||||
def add(self, target, destination):
|
||||
|
||||
target_type, target_id = self.__find_target(target)
|
||||
|
||||
dest_path = destination.split("\\")
|
||||
|
||||
# Leading \:
|
||||
|
||||
if dest_path[0] == "":
|
||||
dest_path = dest_path[1:]
|
||||
|
||||
# %CEn% to specify the install root is handled differently for
|
||||
# links than it is for files/dirs.
|
||||
|
||||
match = re.match(r"\%CE(\d+)\%", dest_path[0])
|
||||
|
||||
if match:
|
||||
base_dir = int(match.group(1))
|
||||
dest_path = dest_path[1:]
|
||||
else:
|
||||
base_dir = 0
|
||||
|
||||
# Map dirs that make up the path to strings.
|
||||
|
||||
dictionary = self.cab_header.dictionary
|
||||
dest_path = list(map(lambda x: dictionary.get(x), dest_path))
|
||||
|
||||
self.links.append((self.index, target_type, target_id,
|
||||
base_dir, dest_path))
|
||||
self.index += 1
|
||||
self.length += 14 + 2 * len(dest_path)
|
||||
|
||||
def write(self, stream):
|
||||
|
||||
for i, target_type, target_id, base_dir, dest_path in self.links:
|
||||
|
||||
write_int16(stream, i)
|
||||
write_int16(stream, 0)
|
||||
write_int16(stream, base_dir)
|
||||
write_int16(stream, target_id)
|
||||
write_int16(stream, target_type)
|
||||
write_int16(stream, 2 * len(dest_path) + 2)
|
||||
|
||||
for subdir in dest_path:
|
||||
write_int16(stream, subdir)
|
||||
|
||||
write_int16(stream, 0)
|
||||
|
||||
class CabHeaderFile:
|
||||
def __init__(self):
|
||||
self.dictionary = StringDictionary(self)
|
||||
self.directory_list = DirectoryList(self)
|
||||
self.file_list = FileList(self)
|
||||
|
||||
self.sections = [
|
||||
HeaderSection(self),
|
||||
self.dictionary,
|
||||
self.directory_list,
|
||||
self.file_list,
|
||||
RegHiveList(),
|
||||
RegKeyList(),
|
||||
LinkList(self)
|
||||
]
|
||||
|
||||
def set_meta(self, *args):
|
||||
header_section = self.get_section(HeaderSection)
|
||||
header_section.set_meta(*args)
|
||||
|
||||
def add_file(self, filename, file_no, flags=0):
|
||||
files_section = self.get_section(FileList)
|
||||
files_section.add(filename, file_no, flags)
|
||||
|
||||
def add_link(self, target, destination):
|
||||
links_section = self.get_section(LinkList)
|
||||
links_section.add(target, destination)
|
||||
|
||||
def get_section(self, section_class):
|
||||
for section in self.sections:
|
||||
if isinstance(section, section_class):
|
||||
return section
|
||||
else:
|
||||
raise Exception("Can't find section of class %s" % section_class)
|
||||
|
||||
def get_section_offset(self, section):
|
||||
offset = 0
|
||||
|
||||
for s in self.sections:
|
||||
if section is s:
|
||||
return offset
|
||||
offset += len(s)
|
||||
else:
|
||||
raise Exception("Section %s not found in list")
|
||||
|
||||
def __len__(self):
|
||||
result = 0
|
||||
for s in self.sections:
|
||||
result += len(s)
|
||||
return result
|
||||
|
||||
def write(self, stream):
|
||||
old_pos = 0
|
||||
for section in self.sections:
|
||||
section.write(stream)
|
||||
pos = stream.tell()
|
||||
if pos != old_pos + len(section):
|
||||
print(section)
|
||||
raise Exception("Section is %i bytes long, but %i written" % \
|
||||
(len(section), pos - old_pos))
|
||||
old_pos = pos
|
||||
|
||||
class CabFile:
|
||||
def __init__(self, config):
|
||||
self.cab_header = CabHeaderFile()
|
||||
|
||||
self.__process_meta(config)
|
||||
self.__process_files(config["files"])
|
||||
|
||||
if "links" in config:
|
||||
self.__process_links(config["links"])
|
||||
|
||||
# Metadata:
|
||||
|
||||
def __process_meta(self, config):
|
||||
arch = config.get("arch") or "strongarm"
|
||||
app_name = config.get("app_name")
|
||||
provider = config.get("provider")
|
||||
unsupported = config.get("unsupported") or ""
|
||||
|
||||
if app_name is None or provider is None:
|
||||
raise Exception("Application name and provider must be specified")
|
||||
|
||||
self.cab_header.set_meta(arch, app_name, provider, unsupported)
|
||||
self.app_name = app_name
|
||||
|
||||
# Get the shortened 8.3 filename used for the specified file
|
||||
# within the CAB.
|
||||
|
||||
def __shorten_name(self, filename, file_no):
|
||||
|
||||
# Strip down to base filename without extension:
|
||||
|
||||
basename = os.path.basename(filename)
|
||||
|
||||
if "." in basename:
|
||||
basename = basename.rpartition(".")[0]
|
||||
|
||||
# Remove non-alphanumeric characters:
|
||||
|
||||
def only_alnum(x):
|
||||
if x.isalnum():
|
||||
return x
|
||||
else:
|
||||
return ""
|
||||
|
||||
cleaned_name = "".join(map(only_alnum, basename))
|
||||
short_name = cleaned_name[0:8]
|
||||
|
||||
if len(short_name) < 8:
|
||||
short_name = "0" * (8 - len(short_name)) + short_name
|
||||
|
||||
return "%s.%03i" % (short_name, file_no)
|
||||
|
||||
# Process the list of files to install:
|
||||
|
||||
def __process_files(self, files):
|
||||
self.files = [ self.app_name ]
|
||||
|
||||
for filename, source_file in files.items():
|
||||
file_no = len(self.files)
|
||||
filename = expand_path(filename)
|
||||
self.cab_header.add_file(filename, file_no)
|
||||
self.files.append(source_file)
|
||||
|
||||
# Process the list of links:
|
||||
|
||||
def __process_links(self, links):
|
||||
for destination, target in links.items():
|
||||
target = expand_path(target)
|
||||
destination = expand_path(destination)
|
||||
self.cab_header.add_link(target, destination)
|
||||
|
||||
# Write the header file:
|
||||
|
||||
def __write_header(self, dir):
|
||||
|
||||
basename = self.__shorten_name(self.files[0], 0)
|
||||
filename = os.path.join(dir, basename)
|
||||
|
||||
stream = open(filename, "wb")
|
||||
self.cab_header.write(stream)
|
||||
stream.close()
|
||||
|
||||
return [ filename ]
|
||||
|
||||
# Write the files:
|
||||
|
||||
def __write_files(self, dir):
|
||||
|
||||
result = []
|
||||
|
||||
for file_no in range(1, len(self.files)):
|
||||
source_file = self.files[file_no]
|
||||
basename = self.__shorten_name(source_file, file_no)
|
||||
filename = os.path.join(dir, basename)
|
||||
|
||||
shutil.copy(source_file, filename)
|
||||
result.append(filename)
|
||||
|
||||
return result
|
||||
|
||||
# Output to a file:
|
||||
|
||||
def write(self, filename):
|
||||
|
||||
temp_dir = tempfile.mkdtemp()
|
||||
|
||||
header = self.__write_header(temp_dir)
|
||||
files = self.__write_files(temp_dir)
|
||||
files.reverse()
|
||||
|
||||
args = [ "lcab", "-n" ] + header + files + [ filename ]
|
||||
|
||||
os.spawnlp(os.P_WAIT, "lcab", *args)
|
||||
|
||||
# Clean up:
|
||||
|
||||
for tmpfile in header + files:
|
||||
os.remove(tmpfile)
|
||||
os.rmdir(temp_dir)
|
||||
|
||||
def expand_path(filename):
|
||||
|
||||
# Replace Unix-style / path separators with DOS-style \
|
||||
|
||||
filename = filename.replace("/", "\\")
|
||||
|
||||
# Expand $(xyz) path variables to their Windows equivalents:
|
||||
|
||||
def replace_var(match):
|
||||
var_name = match.group(1)
|
||||
|
||||
if not var_name in DIR_VARIABLES:
|
||||
raise Exception("Unknown variable '%s'" % var_name)
|
||||
else:
|
||||
return DIR_VARIABLES[var_name]
|
||||
|
||||
return re.sub(r"\$\((.*?)\)", replace_var, filename)
|
||||
|
||||
def read_config_file(filename):
|
||||
f = open(filename)
|
||||
|
||||
data = f.readlines()
|
||||
data = "".join(data)
|
||||
|
||||
f.close()
|
||||
|
||||
prog = compile(data, filename, "exec")
|
||||
result = {}
|
||||
eval(prog, result)
|
||||
|
||||
return result
|
||||
|
||||
# List the files that the output CAB depends on.
|
||||
|
||||
def print_dependencies(filename):
|
||||
config = read_config_file(filename)
|
||||
|
||||
files_list = config["files"]
|
||||
|
||||
for dest, source_file in files_list.items():
|
||||
print(source_file)
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: %s <config file> <output file>" % sys.argv[0])
|
||||
sys.exit(0)
|
||||
|
||||
if sys.argv[1] == "-d":
|
||||
print_dependencies(sys.argv[2])
|
||||
else:
|
||||
config = read_config_file(sys.argv[1])
|
||||
|
||||
cab_file = CabFile(config)
|
||||
cab_file.write(sys.argv[2])
|
||||
|
Reference in New Issue
Block a user