From 57889d5a2a9eff55596a736aad3afa742c3ced6d Mon Sep 17 00:00:00 2001 From: Dennis Schridde Date: Sun, 1 Apr 2007 04:14:49 +0000 Subject: [PATCH] Of course I broke the tag. How could it have come different... git-svn-id: svn+ssh://svn.gna.org/svn/warzone/tags/2.0.6@1317 4a71c877-e1ca-e34f-864e-861f7616d084 --- INSTALL | 234 ++++++++++++++++++++++++++++++++++ Makefile.am | 2 +- NEWS | 0 autopackage/default.apspec.in | 3 +- configure.ac | 59 +++++---- lib/framework/Makefile.am | 8 +- lib/framework/dbghelp.h | 14 +- lib/script/Makefile.am | 5 +- lib/sound/Makefile.am | 2 +- nsis/warzone2100.nsi | 65 ++++++---- src/multiplay.c | 2 +- 11 files changed, 324 insertions(+), 70 deletions(-) create mode 100644 INSTALL create mode 100644 NEWS diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000000..5458714e1e2 --- /dev/null +++ b/INSTALL @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am index 12061f7aa92..a3e13b47ad9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,7 @@ uninstall-local: $(RM) $(DESTDIR)$(icondir)/warzone2100.png $(RM) $(DESTDIR)$(applicationdir)/warzone2100.desktop -EXTRA_DIST= \ +EXTRA_DIST= \ autogen.sh \ configure.ac \ m4/ogg.m4 \ diff --git a/NEWS b/NEWS new file mode 100644 index 00000000000..e69de29bb2d diff --git a/autopackage/default.apspec.in b/autopackage/default.apspec.in index 2696a90ca21..654fbe26dd7 100644 --- a/autopackage/default.apspec.in +++ b/autopackage/default.apspec.in @@ -45,8 +45,7 @@ removeOwningPackage $PREFIX/share/warzone2100 [Install] # Put your installation script here installExe bin/warzone2100 -installData share/warzone2100 -installData share/doc +installData share/warzone2100 share/doc installIcon share/icons/warzone2100.png installMenuItem "Games/TacticStrategy" share/applications/warzone2100.desktop diff --git a/configure.ac b/configure.ac index 6e45182787e..9245dc90cc2 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ if test "x$YACC" != "xbison -y" ; then AC_MSG_ERROR([Bison is not installed]) fi -AM_PROG_LEX +AC_PROG_LEX if test "x$LEX" != "xflex" ; then AC_MSG_ERROR([Flex is not installed]) fi @@ -35,20 +35,20 @@ case $host_os in host_os_darwin=yes ;; esac -AM_CONDITIONAL([MINGW32], [test "x$host_os_mingw32" = "xyes"]) -AM_CONDITIONAL([DARWIN], [test "x$host_os_darwin" = "xyes"]) +AM_CONDITIONAL([MINGW32], test "x$host_os_mingw32" = "xyes") +AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") # Installation directories AC_ARG_WITH(icondir, AS_HELP_STRING([--with-icondir=DIR],[icon files [DATADIR/icons]]), - [], [ with_icondir=$datadir/icons ]) + [ with_icondir=$withval ], [ with_icondir=$datadir/icons ]) AC_ARG_WITH(applicationdir, AS_HELP_STRING([--with-applicationdir=DIR],[application files [DATADIR/applications]]), - [], [ with_applicationdir=$datadir/applications ]) + [ with_applicationdir=$withval ], [ with_applicationdir=$datadir/applications ]) AC_SUBST(icondir, $with_icondir) @@ -60,6 +60,22 @@ fi # Commandline options: +AC_ARG_ENABLE([data], + AS_HELP_STRING([--enable-data],[Build data packages [no]]), + [ enable_data=$enableval ], [ enable_data=no ]) +AM_CONDITIONAL(DATA, test "x$enable_data" = "xyes") +AC_MSG_CHECKING([whether to build data packages]) +AC_MSG_RESULT([$enable_data]) + + +AC_ARG_ENABLE([installer], + AS_HELP_STRING([--enable-installer],[Build NSIS installer [no]]), + [ enable_installer=$enableval ], [ enable_installer=no ]) +AM_CONDITIONAL(INSTALLER, test "x$enable_installer" = "xyes") +AC_MSG_CHECKING([whether to build NSIS installer]) +AC_MSG_RESULT([$enable_installer]) + + AC_ARG_WITH(makensis, AS_HELP_STRING([--with-makensis],[Path to makensis])) @@ -72,21 +88,6 @@ AC_ARG_WITH(installer_version, AS_HELP_STRING([--with-installer-version],[Version of the installer. i.e. 1.2.3.4])) -AC_ARG_ENABLE([data], - AS_HELP_STRING([--enable-data],[Build data packages]) - [], [ enable_data=no ]) -AM_CONDITIONAL(DATA, test "x$enable_data" = "xyes") -AC_MSG_CHECKING([whether to build data packages]) -AC_MSG_RESULT([$enable_data]) - - -AC_ARG_ENABLE([installer], - AS_HELP_STRING([--enable-installer],[Build NSIS installer]) - [], [ enable_installer=no ]) -AM_CONDITIONAL(INSTALLER, test "x$enable_installer" = "xyes") -AC_MSG_CHECKING([whether to build NSIS installer]) -AC_MSG_RESULT([$enable_installer]) - if test "x$enable_installer" = "xyes" ; then if test "x$with_makensis" = "x" ; then AC_CHECK_TOOL([MAKENSIS], [makensis], [no]) @@ -119,28 +120,25 @@ fi # -Wno-unused-label is necessary because flex produces unused labels that we cannot fix # Add later for stricter checking: -Wextra -Wmissing-declarations -Wstrict-prototypes AC_ARG_ENABLE(debug, - AS_HELP_STRING([--enable-debug],[Compile debug version]), - [], [ enable_debug=no ]) + AS_HELP_STRING([--enable-debug[=strict/yes/relaxed/no]],[Compile debug version [no]]), + [ enable_debug=$enableval ], [ enable_debug=no ]) AC_MSG_CHECKING([whether to compile in debug mode]) AC_MSG_RESULT([$enable_debug]) if test "x$enable_debug" = "xyes" ; then - WZ_CFLAGS="${WZ_CFLAGS} -g -DDEBUG -Wall -Wno-unused-label" - WZ_CFLAGS_OVERRIDE="-O0" + WZ_CFLAGS="${WZ_CFLAGS} -g -DDEBUG -Wall -Wno-unused-label" + WZ_CFLAGS_OVERRIDE="-O0" else - WZ_CFLAGS="${WZ_CFLAGS} -g -DNDEBUG" + WZ_CFLAGS="${WZ_CFLAGS} -g -DNDEBUG" 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])], -[ ogg=$enableval ], [ ogg=maybe ]) + AS_HELP_STRING([--disable-ogg],[Do not built support for Ogg files])) # --disable-mp3 will build without Mp3 support AC_ARG_ENABLE(mp3, -[AS_HELP_STRING([--disable-mp3],[Do not built support for Mp3 files])], -[ mp3=$enableval ], [ mp3=maybe ]) - + AS_HELP_STRING([--disable-mp3],[Do not built support for Mp3 files])) # Checks for libraries: @@ -217,6 +215,7 @@ else AC_MSG_ERROR([OpenGL is currently mandatory]) fi + if test "x$enable_openal" != "xno" ; then if test "x$host_os_darwin" = "xyes" ; then AC_MSG_CHECKING([for OpenAL framework]) diff --git a/lib/framework/Makefile.am b/lib/framework/Makefile.am index e2124bfe46c..3b90a4970a9 100644 --- a/lib/framework/Makefile.am +++ b/lib/framework/Makefile.am @@ -12,9 +12,9 @@ CLEANFILES = resource_parser.tab.h strres_parser.tab.h noinst_LIBRARIES = libframework.a noinst_HEADERS = block.h configfile.h cursors.h cursors16.h debug.h font.h fractions.h frame.h \ - frameint.h frameresource.h heap.h input.h listmacs.h mem.h memint.h mono.h resly.h \ - strres.h strresly.h treap.h treapint.h trig.h types.h + frameint.h frameresource.h heap.h input.h listmacs.h mem.h memint.h mono.h resly.h \ + strres.h strresly.h treap.h treapint.h trig.h types.h libframework_a_SOURCES = SDL_framerate.c block.c configfile.c debug.c exceptionhandler.c frame.c \ - frameresource.c heap.c ignorecase.c input.c mem.c mono.c resource_lexer.lex.c resource_parser.tab.c \ - strres.c strres_lexer.lex.c strres_parser.tab.c treap.c trig.c + frameresource.c heap.c ignorecase.c input.c mem.c mono.c resource_lexer.lex.c resource_parser.tab.c \ + strres.c strres_lexer.lex.c strres_parser.tab.c treap.c trig.c diff --git a/lib/framework/dbghelp.h b/lib/framework/dbghelp.h index 3840a1e6f69..e81809606f1 100644 --- a/lib/framework/dbghelp.h +++ b/lib/framework/dbghelp.h @@ -764,6 +764,8 @@ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, ULONG, PVOID); BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID); typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PSTR, DWORD64, PVOID); BOOL WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID); +typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PWSTR, DWORD64, PVOID); +BOOL WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID); BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE); BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW); BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64); @@ -911,6 +913,7 @@ BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PV typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID); typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW, ULONG, PVOID); BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID); +BOOL WINAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID); BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*); BOOL WINAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*); BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO); @@ -999,12 +1002,17 @@ BOOL WINAPI SymCleanup(HANDLE); HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR); typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PSTR, PVOID); HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID); -typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR, PVOID); +typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR, PVOID); BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, PSTR, PFINDFILEINPATHCALLBACK, PVOID); +typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR, PVOID); +BOOL WINAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD, + PWSTR, PFINDFILEINPATHCALLBACKW, PVOID); HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR); typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PSTR, PVOID); HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID); +typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PWSTR, PVOID); +HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID); PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID); PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG, PIMAGE_SECTION_HEADER *); @@ -1018,9 +1026,13 @@ BOOL WINAPI SymSetSearchPathW(HANDLE, PCWSTR); DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE); BOOL WINAPI MakeSureDirectoryPathExists(PCSTR); BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR); +BOOL WINAPI SearchTreeForFileW(PCWSTR, PCWSTR, PWSTR); typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR, PVOID); BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, void*); +typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(LPCWSTR, PVOID); +BOOL WINAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, void*); BOOL WINAPI SymMatchFileName(PSTR, PSTR, PSTR*, PSTR*); +BOOL WINAPI SymMatchFileNameW(PWSTR, PWSTR, PWSTR*, PWSTR*); PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR); PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t); #define hdBase 0 diff --git a/lib/script/Makefile.am b/lib/script/Makefile.am index 2006d8a862a..8247fa7f2b1 100644 --- a/lib/script/Makefile.am +++ b/lib/script/Makefile.am @@ -8,12 +8,13 @@ AM_LFLAGS = $(FLEX_FLAGS) AM_YFLAGS = -d AM_CPPFLAGS = -I$(top_srcdir) BUILT_SOURCES = script_parser.tab.h +CLEANFILES = script_parser.tab.h noinst_LIBRARIES = libscript.a noinst_HEADERS = codeprint.h event.h evntsave.h interp.h \ - parse.h script.h stack.h + parse.h script.h stack.h libscript_a_SOURCES = script_lexer.lex.c script_parser.tab.c \ - codeprint.c event.c evntsave.c interp.c script.c stack.c + codeprint.c event.c evntsave.c interp.c script.c stack.c libscript_a_LIBADD = $(top_builddir)/lib/framework/libframework.a diff --git a/lib/sound/Makefile.am b/lib/sound/Makefile.am index 3eab58a7316..0ac87ce5a53 100644 --- a/lib/sound/Makefile.am +++ b/lib/sound/Makefile.am @@ -6,4 +6,4 @@ noinst_HEADERS = aud.h audio.h cdaudio.h mixer.h track.h tracklib.h libsound_a_SOURCES = audio.c cdaudio.c mixer_stub.c openal_track.c playlist.c track.c libsound_a_LIBADD = $(top_builddir)/lib/gamelib/libgamelib.a \ - $(top_builddir)/lib/framework/libframework.a + $(top_builddir)/lib/framework/libframework.a diff --git a/nsis/warzone2100.nsi b/nsis/warzone2100.nsi index d2d45c3462e..461e5d28f9c 100644 --- a/nsis/warzone2100.nsi +++ b/nsis/warzone2100.nsi @@ -1,5 +1,5 @@ ;NSIS Modern User Interface -;Warzone 2100 GPL Installer script +;Warzone 2100 Resurrection Installer script ;Written by Dennis Schridde ;-------------------------------- @@ -18,7 +18,7 @@ InstallDir "$PROGRAMFILES\Warzone 2100" ;Get installation folder from registry if available - InstallDirRegKey HKCU "Software\Warzone 2100" "" + InstallDirRegKey HKLM "Software\Warzone 2100" "" SetCompressor /FINAL /SOLID lzma @@ -30,7 +30,7 @@ VIAddVersionKey "CompanyName" "Warzone Resurrection Project" VIAddVersionKey "FileDescription" "Warzone 2100 Installer" VIAddVersionKey "FileVersion" "${VERSION}" VIAddVersionKey "InternalName" "Warzone 2100" -VIAddVersionKey "LegalCopyright" "Copyright © 2006 Warzone Resurrection Project" +VIAddVersionKey "LegalCopyright" "Copyright © 2006 Warzone Resurrection Project" VIAddVersionKey "OriginalFilename" "warzone2100-${VERSION}.exe" VIAddVersionKey "ProductName" "Warzone 2100" VIAddVersionKey "ProductVersion" "${VERSION}" @@ -50,7 +50,7 @@ VIAddVersionKey "ProductVersion" "${VERSION}" !define MUI_LICENSEPAGE_RADIOBUTTONS ;Start Menu Folder Page Configuration (for MUI_PAGE_STARTMENU) - !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU" + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Warzone 2100" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" @@ -93,11 +93,11 @@ VIAddVersionKey "ProductVersion" "${VERSION}" ;-------------------------------- ;Reserve Files - + ;These files should be inserted before other files in the data block ;Keep these lines before any File command ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA) - + !insertmacro MUI_RESERVEFILE_LANGDLL @@ -120,6 +120,10 @@ Section $(TEXT_SecBase) SecBase File "${LIBDIR}\OpenAL32.dll" File "${LIBDIR}\wrap_oal.dll" + ; Windows dbghelp library + File "${LIBDIR}\dbghelp.dll.license.txt" + File "${LIBDIR}\dbghelp.dll" + ; Data files File "..\data\mp.wz" File "..\data\warzone.wz" @@ -132,29 +136,29 @@ Section $(TEXT_SecBase) SecBase ;Store installation folder - WriteRegStr HKCU "Software\Warzone 2100" "" $INSTDIR + WriteRegStr HKLM "Software\Warzone 2100" "" $INSTDIR ; Write the Windows-uninstall keys - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayName" "Warzone 2100" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayVersion" "${VERSION}" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayIcon" "$INSTDIR\warzone2100.exe,0" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "Publisher" "Warzone Resurrection Project" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "URLInfoAbout" "http://wz2100.net/" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "InstallLocation" "$INSTDIR" - WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "UninstallString" "$INSTDIR\uninstall.exe" - WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "NoModify" 1 - WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "NoRepair" 1 + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayName" "Warzone 2100" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayVersion" "${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "DisplayIcon" "$INSTDIR\warzone2100.exe,0" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "Publisher" "Warzone Resurrection Project" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "URLInfoAbout" "http://wz2100.net/" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "InstallLocation" "$INSTDIR" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "UninstallString" "$INSTDIR\uninstall.exe" + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "NoModify" 1 + WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" "NoRepair" 1 ;Create uninstaller WriteUninstaller "$INSTDIR\uninstall.exe" !insertmacro MUI_STARTMENU_WRITE_BEGIN Application - + ;Create shortcuts CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Warzone 2100.lnk" "$INSTDIR\warzone2100.exe" - + !insertmacro MUI_STARTMENU_WRITE_END SectionEnd @@ -242,8 +246,13 @@ Section "Uninstall" ;ADD YOUR OWN FILES HERE... Delete "$INSTDIR\warzone2100.exe" + Delete "$INSTDIR\OpenAL32.dll" Delete "$INSTDIR\wrap_oal.dll" + + Delete "$INSTDIR\dbghelp.dll.license.txt" + Delete "$INSTDIR\dbghelp.dll" + Delete "$INSTDIR\warzone.wz" Delete "$INSTDIR\mp.wz" @@ -259,30 +268,30 @@ Section "Uninstall" RMDir "$INSTDIR" !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP - + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Warzone 2100.lnk" Delete "$SMPROGRAMS\$MUI_TEMP\Warzone 2100 - Grim's GFX.lnk" - + ;Delete empty start menu parent diretories StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" - + startMenuDeleteLoop: ClearErrors RMDir $MUI_TEMP GetFullPathName $MUI_TEMP "$MUI_TEMP\.." - + IfErrors startMenuDeleteLoopDone - + StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop startMenuDeleteLoopDone: - DeleteRegValue HKCU "Software\Warzone 2100" "Start Menu Folder" - DeleteRegValue HKCU "Software\Warzone 2100" "" - DeleteRegKey /ifempty HKCU "Software\Warzone 2100" + DeleteRegValue HKLM "Software\Warzone 2100" "Start Menu Folder" + DeleteRegValue HKLM "Software\Warzone 2100" "" + DeleteRegKey /ifempty HKLM "Software\Warzone 2100" ; Unregister with Windows' uninstall system - DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Warzone 2100" SectionEnd @@ -292,5 +301,5 @@ SectionEnd Function un.onInit !insertmacro MUI_UNGETLANGUAGE - + FunctionEnd diff --git a/src/multiplay.c b/src/multiplay.c index 0a49d69043a..39d6db7a3a5 100644 --- a/src/multiplay.c +++ b/src/multiplay.c @@ -2001,4 +2001,4 @@ BOOL recvBeacon(NETMSG *pMsg) strcpy(beaconReceiveMsg[sender], msg); return addHelpBlip(locX,locY,receiver,sender,beaconReceiveMsg[sender]); -} \ No newline at end of file +}