NSIS support for automake.
raw Makefiles might be broken, please report back! git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@935 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8745e3038e
commit
1b7a63f6ef
17
Makefile.am
17
Makefile.am
|
@ -1,10 +1,19 @@
|
|||
if MAKE_DATA
|
||||
DSUBDIRS = data
|
||||
if MINGW32
|
||||
SUBDIRS = win32
|
||||
else
|
||||
DSUBDIRS =
|
||||
SUBDIRS =
|
||||
endif
|
||||
|
||||
SUBDIRS += lib src
|
||||
|
||||
if DATA
|
||||
SUBDIRS += data
|
||||
endif
|
||||
|
||||
if INSTALLER
|
||||
SUBDIRS += nsis
|
||||
endif
|
||||
|
||||
SUBDIRS = $(DSUBDIRS) win32 lib src
|
||||
|
||||
# Remove this line when Automake 1.10 becomes standard
|
||||
MKDIR_P=$(mkdir_p)
|
||||
|
|
|
@ -82,9 +82,9 @@ version_check ()
|
|||
fi
|
||||
}
|
||||
|
||||
version_check 1 "bison" "ftp://ftp.gnu.org/pub/gnu/bison/" 1 31 || DIE=1
|
||||
version_check 1 "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 56 || DIE=1
|
||||
version_check 1 "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 8 || DIE=1
|
||||
version_check 1 "bison" "ftp://ftp.gnu.org/pub/gnu/bison/" 1 31 || DIE=1
|
||||
if [ "$DIE" -eq 1 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
72
configure.ac
72
configure.ac
|
@ -38,32 +38,77 @@ fi
|
|||
|
||||
# Commandline options:
|
||||
|
||||
AC_ARG_ENABLE(make_data,
|
||||
[ --disable-make-data do not recurse make into data directories
|
||||
(ok to disable unless you will 'make install')],
|
||||
[ make_data="$enableval" ], [make_data=yes])
|
||||
AC_MSG_CHECKING([whether to make data])
|
||||
AM_CONDITIONAL(MAKE_DATA, test "x$make_data" = "xyes" )
|
||||
if test "x$make_data" = "xyes" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_ARG_WITH(makensis,
|
||||
[AS_HELP_STRING([--with-makensis],[Path to makensis])],
|
||||
[ makensis=$withval ], [ makensis=auto ])
|
||||
|
||||
|
||||
AC_ARG_WITH(installer_libdir,
|
||||
[AS_HELP_STRING([--with-installer-libdir],[Path to libraries for NSIS script])],
|
||||
[ installer_libdir=$withval ], [ installer_libdir=auto ])
|
||||
|
||||
|
||||
AC_ARG_WITH(installer_version,
|
||||
[AS_HELP_STRING([--with-installer-version],[Version of the installer. Workaround till we have some automagic.])],
|
||||
[ installer_version=$withval ], [ installer_version=auto ])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(data,
|
||||
[AS_HELP_STRING([--disable-data],[Do not build data packages])],
|
||||
[ data="$enableval" ], [ data=no ])
|
||||
AM_CONDITIONAL(DATA, test "x$data" = "xyes" )
|
||||
AC_MSG_CHECKING([whether to build data packages])
|
||||
AC_MSG_RESULT([$data])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(installer,
|
||||
[AS_HELP_STRING([--enable-installer],[Build NSIS installer])],
|
||||
[ installer=$enableval ], [ installer=no ])
|
||||
AM_CONDITIONAL(INSTALLER, test "x$installer" = "xyes" )
|
||||
AC_MSG_CHECKING([whether to build NSIS installer])
|
||||
AC_MSG_RESULT([$installer])
|
||||
|
||||
if test "x$installer" = "xyes" ; then
|
||||
if test "x$makensis" = "xauto" ; then
|
||||
AC_CHECK_TOOL([MAKENSIS], [makensis], [no])
|
||||
if test "x$MAKENSIS" = "xno" ; then
|
||||
AC_MSG_ERROR([makensis not found])
|
||||
fi
|
||||
else
|
||||
AC_MSG_CHECKING([for makensis])
|
||||
AC_MSG_RESULT([$makensis])
|
||||
AC_SUBST(MAKENSIS, $makensis)
|
||||
fi
|
||||
if test "x$installer_version" = "xauto" ; then
|
||||
AC_MSG_ERROR([installer version invalid])
|
||||
else
|
||||
AC_MSG_CHECKING([for installer version])
|
||||
AC_MSG_RESULT([$installer_version])
|
||||
AC_SUBST(INSTALLER_VERSION, $installer_version)
|
||||
fi
|
||||
if test "x$installer_libdir" = "xauto" ; then
|
||||
AC_MSG_ERROR([installer libdir not found])
|
||||
else
|
||||
AC_MSG_CHECKING([for installer libdir])
|
||||
AC_MSG_RESULT([$installer_libdir])
|
||||
AC_SUBST(INSTALLER_LIBDIR, $installer_libdir)
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug run in debug mode],
|
||||
[AS_HELP_STRING([--enable-debug],[Compile debug version])],
|
||||
[ debug=$enableval ], [ debug=no ])
|
||||
AC_MSG_CHECKING([whether to compile in debug mode])
|
||||
AC_MSG_RESULT([$debug])
|
||||
if test "x$debug" = "xyes" ; then
|
||||
# -O0 turns off all optimizations; this is necessary for accurate debugging
|
||||
WZ_CFLAGS="${WZ_CFLAGS} -g3 -O0 -DDEBUG -Wall -Wextra -Wwrite-strings -Wcast-qual -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
WZ_CFLAGS="${WZ_CFLAGS} -g0 -O2 -DNDEBUG"
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
|
||||
# --disable-ogg will build without Ogg Vorbis support
|
||||
AC_ARG_ENABLE(ogg,
|
||||
[AS_HELP_STRING([--disable-ogg],[Do not built support for Ogg files])],
|
||||
|
@ -253,6 +298,7 @@ CFLAGS="${CFLAGS} ${WZ_CFLAGS}"
|
|||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
data/Makefile
|
||||
nsis/Makefile
|
||||
win32/Makefile
|
||||
lib/Makefile
|
||||
lib/framework/Makefile
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Version of Warzone you are compiling
|
||||
#VERSION=\"0.0.0\"
|
||||
#VERSION=TRUNK
|
||||
#INSTALLER_VERSION=9.9.9.9
|
||||
|
||||
# Platform you are running
|
||||
#PLATFORM=windows
|
||||
|
@ -14,8 +15,12 @@
|
|||
#MODE=release
|
||||
|
||||
# Directory where you store your dev stuff (lib and include)
|
||||
#DEVDIR=D:\Programme\Warzone-DevPkg
|
||||
#DEVDIR=C:/Program\ Files/DevPkg
|
||||
|
||||
# Remind the user to install Flex and Bison
|
||||
#BISON=bison
|
||||
#FLEX=flex
|
||||
|
||||
# Path to makensis
|
||||
#MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ endif
|
|||
|
||||
# Setup paths and static values
|
||||
|
||||
CFLAGS+=-m32 -DVERSION=$(VERSION) -DYY_STATIC -I.. -I../.. -I$(DEVDIR)/include
|
||||
CFLAGS+=-m32 -DVERSION=\"$(VERSION)\" -DYY_STATIC -I.. -I../.. -I$(DEVDIR)/include
|
||||
LDFLAGS+=-L$(DEVDIR)/lib
|
||||
|
||||
|
||||
|
@ -74,15 +74,15 @@ RMF=del /F
|
|||
EXEEXT=.exe
|
||||
WINDRES=windres
|
||||
CFLAGS+=-mwindows -DWIN32
|
||||
LDFLAGS+=-lmingw32 -lglu32 -lopengl32 -lopenal32 -ljpeg6b -lpng13
|
||||
LDFLAGS+=-lwsock32 -lwinmm -lglu32 -lopengl32 -lopenal32
|
||||
else
|
||||
DIRSEP=/
|
||||
RMF=rm -f
|
||||
EXEEXT=
|
||||
WINDRES=
|
||||
LDFLAGS+=-lGLU -lGL -lopenal -ljpeg -lpng
|
||||
LDFLAGS+=-lGLU -lGL -lopenal
|
||||
endif
|
||||
|
||||
LDFLAGS+=-lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net
|
||||
LDFLAGS+=-ljpeg -lpng -lz -lmad -lvorbisfile -lvorbis -logg -lphysfs -lSDLmain -lSDL -lSDL_net
|
||||
|
||||
include $(MAKERULES)/common.mk
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
INSTALLERFILE=warzone2100-$(VERSION).exe
|
||||
|
||||
all: $(INSTALLERFILE)
|
||||
|
||||
$(INSTALLERFILE): warzone2100.nsi ../src/warzone2100.exe ../data/warzone.wz ../data/mp.wz ../data/grim.wz
|
||||
$(MAKENSIS) "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(INSTALLER_VERSION)" "/DLIBDIR=$(INSTALLER_LIBDIR)" $<
|
||||
|
||||
clean:
|
||||
$(RM) $(INSTALLERFILE)
|
|
@ -8,7 +8,7 @@ SETUPFILE=warzone2100-$(VERSION).exe
|
|||
all: $(SETUPFILE)
|
||||
|
||||
$(SETUPFILE): warzone2100.nsi ../src/warzone2100.exe ../data/warzone.wz ../data/mp.wz ../data/grim.wz
|
||||
makensis "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(VERSION)" "/DLIBDIR=$(DEVDIR)\lib" "/DSRCDIR=..\src" "/DDATADIR=..\data" "/DMISCDIR=.." $<
|
||||
$(MAKENSIS) "/DVERSION=$(VERSION)" "/DVERSIONNUM=$(INSTALLER_VERSION)" "/DLIBDIR=$(DEVDIR)\lib" $<
|
||||
|
||||
clean:
|
||||
$(RM) $(SETUPFILE)
|
||||
|
|
|
@ -88,8 +88,8 @@ VIAddVersionKey "ProductVersion" "${VERSION}"
|
|||
;--------------------------------
|
||||
;License Language String
|
||||
|
||||
LicenseLangString MUILicense ${LANG_ENGLISH} "${MISCDIR}\COPYING"
|
||||
LicenseLangString MUILicense ${LANG_GERMAN} "${MISCDIR}\COPYING"
|
||||
LicenseLangString MUILicense ${LANG_ENGLISH} "..\COPYING"
|
||||
LicenseLangString MUILicense ${LANG_GERMAN} "..\COPYING"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
@ -114,19 +114,19 @@ Section $(TEXT_SecBase) SecBase
|
|||
;ADD YOUR OWN FILES HERE...
|
||||
|
||||
; Main executable
|
||||
File "${SRCDIR}\warzone2100.exe"
|
||||
File "..\src\warzone2100.exe"
|
||||
|
||||
; Required runtime libs
|
||||
File "${LIBDIR}\OpenAL32.dll"
|
||||
File "${LIBDIR}\wrap_oal.dll"
|
||||
|
||||
; Data files
|
||||
File "${DATADIR}\mp.wz"
|
||||
File "${DATADIR}\warzone.wz"
|
||||
File "..\data\mp.wz"
|
||||
File "..\data\warzone.wz"
|
||||
|
||||
; Information/documentation files
|
||||
File "/oname=License.txt" "${MISCDIR}\COPYING"
|
||||
File "/oname=Readme.txt" "${MISCDIR}\README"
|
||||
File "/oname=License.txt" "..\COPYING"
|
||||
File "/oname=Readme.txt" "..\README"
|
||||
|
||||
|
||||
;Store installation folder
|
||||
|
@ -162,7 +162,7 @@ Section $(TEXT_SecGrimMod) SecGrimMod
|
|||
|
||||
SetOutPath "$INSTDIR\mods\global"
|
||||
|
||||
File "${DATADIR}\grim.wz"
|
||||
File "..\data\grim.wz"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ dist_noinst_DATA = \
|
|||
warzone2100.rc \
|
||||
warzone2100.ico
|
||||
|
||||
if MINGW32
|
||||
nodist_noinst_DATA = \
|
||||
warzone2100.o
|
||||
|
||||
CLEANFILES = $(nodist_noinst_DATA)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue