version.h now contains the UQM version, and an 'EXTRA_VERSION' is supported.

More swweping changes to the windows installer.  It is now much easier to
configure, and reads the version out of version.h


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@759 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
ghaushe
2003-02-16 15:51:28 +00:00
parent c81115db06
commit 9eca0ee63b
9 changed files with 349 additions and 92 deletions
+56 -25
View File
@@ -31,10 +31,8 @@ resource hacker: http://www.users.on.net/johnson/resourcehacker/
This will generate a reference contour to compare the current CVS build This will generate a reference contour to compare the current CVS build
against. This only needs to be done once (after each release) against. This only needs to be done once (after each release)
1) Compile uqm.exe 1) Compile uqm.exe. Note that version.h defines the version of UQM to build,
and should be set appropriately before compiling
1a) If you have upx, run it on uqm.exe as follows:
upx --best --crp-ms=100000 uqm.exe
2) Build content .zip files and content.nsh 2) Build content .zip files and content.nsh
For this procedure, you must have no modifications in the content tree. For this procedure, you must have no modifications in the content tree.
@@ -42,8 +40,9 @@ resource hacker: http://www.users.on.net/johnson/resourcehacker/
modified files. modified files.
use the 'full' option when building a production release where you plan use the 'full' option when building a production release where you plan
to create a full content directory rather than just the upgrade zip to create a full content directory rather than just the upgrade zip
./build_archives.pl 0.2 contour_0_1 [full] ./build_archives.pl contour_0_1 [full]
This will generate .zip files of the content directory: This will generate .zip files of the content directory (assuming
version.h defines the version as 0.2):
uqm-0.1_to_0.2-content.zip uqm-0.1_to_0.2-content.zip
uqm-0.1_to_0.2-voice.zip uqm-0.1_to_0.2-voice.zip
and (if 'full' is specified) and (if 'full' is specified)
@@ -53,35 +52,67 @@ resource hacker: http://www.users.on.net/johnson/resourcehacker/
These files should be uploaded to the disrtibution web page These files should be uploaded to the disrtibution web page
It will also generate content.nsh which contains a list of files for the It will also generate content.nsh which contains a list of files for the
uninstaller, as well as the file-size of each of the archives, for use in uninstaller, as well as the information aout the archives, for use in
the installer the installer
3) Modify the install script: 3) Modify the install script:
Edit uqm.nsi, and change the following variables: Edit options.nsi, and change the following variables:
MUI_VERSION: The version you are building
OLD_VERSION: The earliest version that can be upgraded from OLD_VERSION: The earliest version that can be upgraded from
FULL_NEEDS_UPGRADE: This parameter is set if a 'full' build requires DOWNLOAD_LOCATION: The default directory to download the archives from
both the 'content' archive pak along with the if not using a mirror file. NOTE: This parameter
'upgrade' archive pak. In general, only official can be overridden by setting <...>_LOCATION an a
builds wil have this set to '0' all other builds per-archive basis.
ahould leave it at '1' MIRROR_LOCATION: The default location of the mirror file to use for
also, there are 5 sections: retrieving the archives if <...>_USE_MIRROR is defined
CONTENT, VOICE, THREEDO, UPGRADE, and VUPGRADE, which represent how to (see below). The mirror file contains a list of
retreive the data-files, voice-files, 3do music files, upgrade to the directries (http) where the data-file can be
data files, and upgrade to the voice files respectively). These downloaded from. NOTE: This parameter can be
variables are: overridden by setting <...>_LOCATION an a
per-archive basis.
<...>_USE_MIRROR: Whether the 'LOCATION' is pointing to a mirror file Each of the archives can be fine-tuned using per-archive defines. For
or a directory for direct-download. The mirror file most of these, the defaults should be fine. The only paramater that
contains a list of directries (http) where the data- is likely to need changing is:
file can be downloaded from. <...>_USE_MIRROR: Whether to use a mirror file or not. If this
parameter is not defined then DOWNLOAD_LOCATION
will be used, ootherwise MIRROR_LOCATION will be
used. If <...>_LOCATION is defined, then
<...>_USE_MIRROR must still be set depending on
whetehr the locationn is a mirror-file or directory.
(NOTE: DO NOT set it to '0'. The value should
either be defined as '1' or not at all. Defining
it is '0' WILL break things)
The other sections that may be changed are defined below, however it is
STRONGLY recommended that you do not change them without being sure of
what you are doing!
<...>_LOCATION: The path (http) to retrieve the data-file or mirror- <...>_LOCATION: The path (http) to retrieve the data-file or mirror-
file from (depending on the value of 'USE_MIRROR') file from (depending on the value of 'USE_MIRROR')
<...>_PACKAGE_FILE: The name of the data-file to retreive <...>_PACKAGE_FILE: The name of the data-file to retreive
<...>_TYPE: The type of archiver used (must be "zip" or "tgz") <...>_TYPE: The type of archiver used (must be "zip" or "tgz")
<...>_ROOT: The directory to unpack the data-file archive into <...>_ROOT: The directory to unpack the data-file archive into
It should only be bnecessary to modify the first two variables
(USE_MIRROR and LOCATION) There are other parameters which may be tuned as well, although it
should not be necessary (and once again, changing the defaults should
not be done unless you are sure about what you are doing)
FULL_NEEDS_UPGRADE: This parameter is set if a 'full' build requires
both the 'content' archive pak along with the
'upgrade' archive pak. In general, only official
builds wil have this parameter undefined, all other
builds ahould probably leave it as is. NOTE:
the paramter should be either defined or undefined,
it should not have a value
DEFAULT_UPGRADE: this parameter determines whether the installer
defaults to an 'upgrade' or 'full' install. In
general, it is probably better to define this
paramater, since a full install is ~150MB, vs an
upgrade which is ~3MB
USE_UBX: This will compress uqm.exe and the installer with
ubx. this may break the game and/or installer, and
is not recomended.
MUI_VERSION: The version of UQM you are building. This parameter
is normally auto-defined by readinng version.h, but
can be manually overridden if needed.
4) run NSIS to build the installer: 4) run NSIS to build the installer:
makensis uqm.nsi makensis uqm.nsi
+107 -25
View File
@@ -5,16 +5,38 @@ use Cwd;
$use_zip = 1; $use_zip = 1;
$version = shift @ARGV;
$file = shift @ARGV; $file = shift @ARGV;
$tag = shift @ARGV; $tag = shift @ARGV;
$do_full = shift @ARGV; $do_full = shift @ARGV;
if (! defined ($version) || ! defined ($file) || scalar(@ARGV)) { if (! defined ($file) || scalar(@ARGV)) {
print STDERR "$0 version contour_file [full]\n"; print STDERR "$0 contour_file [full]\n";
print STDERR " or\n"; print STDERR " or\n";
print STDERR "$0 version cvs_log_file cvs_tag [full]\n"; print STDERR "$0 cvs_log_file cvs_tag [full]\n";
exit 1; exit 1;
} }
# fetch the version from version.h
if (-f "../../src/version.h") {
open (FH, "../../src/version.h") or die "couldn't read version.h\n";
while (<FH>) {
if (/^\s*\#define\s+UQM_MAJOR_VERSION\s+(\d+)/) {
$major = $1;
}
if (/^\s*#define\s+UQM_MINOR_VERSION\s+(\d+)/) {
$minor = $1;
}
if (/^\s*#define\s+UQM_EXTRA_VERSION\s+"(.*)"/) {
$extra = $1;
}
}
close FH;
if (!defined ($major) || !defined ($minor) || !defined ($extra)) {
die "Error reading version.h\n";
}
$version = "$major.${minor}${extra}";
} else {
die "couldn't find version.h\n";
}
if (! defined ($do_full)) { if (! defined ($do_full)) {
if (defined ($tag) && $tag eq "full") { if (defined ($tag) && $tag eq "full") {
$do_full = $tag; $do_full = $tag;
@@ -103,7 +125,7 @@ if ($tag) {
} }
$alldata{"$1,prev"} = $2; $alldata{"$1,prev"} = $2;
} else { } else {
print "Couldn't find '$1' in the repository\n"; print "Couldn't find '$1'. OK if removed since $oldver\n";
} }
} }
} }
@@ -114,11 +136,11 @@ if ($tag) {
} }
} }
} }
$change_zip = "$cwd/uqm-${oldver}_to_${version}-content.$ext"; $change_zip = "uqm-${oldver}_to_${version}-content.$ext";
$change_ogg_zip = "$cwd/uqm-${oldver}_to_${version}-voice.$ext"; $change_ogg_zip = "uqm-${oldver}_to_${version}-voice.$ext";
$content_zip = "$cwd/uqm-${version}-content.$ext"; $content_zip = "uqm-${version}-content.$ext";
$voice_zip = "$cwd/uqm-${version}-voice.$ext"; $voice_zip = "uqm-${version}-voice.$ext";
$threedo_zip = "$cwd/uqm-${version}-3domusic.$ext"; $threedo_zip = "uqm-${version}-3domusic.$ext";
# build the upgrade .zip file # build the upgrade .zip file
$last_dir = ""; $last_dir = "";
@@ -146,17 +168,18 @@ foreach $path (@changed) {
} }
close FH1; close FH1;
close FH2; close FH2;
unlink $change_zip; unlink "$cwd/$change_zip";
unlink $change_ogg_zip; unlink "$cwd/$change_ogg_zip";
if ($use_zip) { if ($use_zip) {
`cat tmpfile | zip -r $change_zip -@`; `cat tmpfile | zip -r "$cwd/$change_zip" -@`;
`cat tmpfile1 | zip -r $change_ogg_zip -@` if ($change_ogg_size); `cat tmpfile1 | zip -r "$cwd/$change_ogg_zip" -@` if ($change_ogg_size);
} else { } else {
`tar -T tmpfile -czf $change_zip`; `tar -T tmpfile -czf "$cwd/$change_zip"`;
`tar -T tmpfile1 -czf $change_ogg_zip` if ($change_ogg_size); `tar -T tmpfile1 -czf "$cwd/$change_ogg_zip"` if ($change_ogg_size);
} }
open (FH, ">$cwd/content.nsh"); open (FH, ">$cwd/content.nsh");
print FH "!verbose 3\n";
print FH "!macro REMOVE_CONTENT\n"; print FH "!macro REMOVE_CONTENT\n";
open FH1, ">tmpfile" || die "Couldn't create temp file!\n"; open FH1, ">tmpfile" || die "Couldn't create temp file!\n";
open FH2, ">tmpfile1" || die "Couldn't create temp file!\n"; open FH2, ">tmpfile1" || die "Couldn't create temp file!\n";
@@ -177,7 +200,6 @@ foreach $path (@all) {
$num_voice++; $num_voice++;
print FH2 "$path\n"; print FH2 "$path\n";
} elsif ($path =~ /\.ogg$/) { } elsif ($path =~ /\.ogg$/) {
print "$path : $siz1\n";
$threedo_size += $siz1; $threedo_size += $siz1;
$num_3do++; $num_3do++;
print FH3 "$path\n"; print FH3 "$path\n";
@@ -209,16 +231,17 @@ foreach $dir (@dirs) {
} }
print FH "!macroend\n"; print FH "!macroend\n";
if ($do_full) { if ($do_full) {
unlink $content_zip; unlink "$cwd/$content_zip";
unlink $voice_zip; unlink "$cwd/$voice_zip";
unlink "$cwd/$threedo_zip";
if ($use_zip) { if ($use_zip) {
`cat tmpfile | zip -r $content_zip -@`; `cat tmpfile | zip -r "$cwd/$content_zip" -@`;
`cat tmpfile1 | zip -r $voice_zip -@` if($voice_size); `cat tmpfile1 | zip -r "$cwd/$voice_zip" -@` if($voice_size);
`cat tmpfile2 | zip -r $threedo_zip -@` if($threedo_size); `cat tmpfile2 | zip -r "$cwd/$threedo_zip" -@` if($threedo_size);
} else { } else {
`tar -T tmpfile -czf $content_zip`; `tar -T tmpfile -czf "$cwd/$content_zip"`;
`tar -T tmpfile1 -czf $voice_zip` if ($voice_size); `tar -T tmpfile1 -czf "$cwd/$voice_zip"` if ($voice_size);
`tar -T tmpfile2 -czf $threedo_zip` if ($threedo_size); `tar -T tmpfile2 -czf "$cwd/$threedo_zip"` if ($threedo_size);
} }
} }
unlink "tmpfile"; unlink "tmpfile";
@@ -229,11 +252,70 @@ $change_ogg_size = int(0.5 + $change_ogg_size / 1000);
$content_size = int(0.5 + $content_size / 1000); $content_size = int(0.5 + $content_size / 1000);
$voice_size = int(0.5 + $voice_size / 1000); $voice_size = int(0.5 + $voice_size / 1000);
$threedo_size = int(0.5 + $threedo_size / 1000); $threedo_size = int(0.5 + $threedo_size / 1000);
print FH "!ifndef \${MUI_VERSION}\n";
print FH " !define MUI_VERSION \"$version\"\n";
print FH "!endif\n";
print FH "\n";
print FH "!define CONTENT_SIZE $content_size\n"; print FH "!define CONTENT_SIZE $content_size\n";
print FH "!define VOICE_SIZE $voice_size\n"; print FH "!define VOICE_SIZE $voice_size\n";
print FH "!define THREEDO_SIZE $threedo_size\n"; print FH "!define THREEDO_SIZE $threedo_size\n";
print FH "!define UPGRADE_SIZE $change_size\n"; print FH "!define UPGRADE_SIZE $change_size\n";
print FH "!define VUPGRADE_SIZE $change_ogg_size\n"; print FH "!define VUPGRADE_SIZE $change_ogg_size\n";
print FH "\n";
if ($do_full) {
print FH "!ifndef \${CONTENT_PACKAGE_FILE}\n";
print FH " !define CONTENT_PACKAGE_FILE \"$content_zip\"\n";
print FH "!endif\n";
print FH "!ifndef \${CONTENT_TYPE}\n";
print FH " !define CONTENT_TYPE \"$ext\"\n";
print FH "!endif\n";
print FH "!ifndef \${CONTENT_ROOT}\n";
print FH " !define CONTENT_ROOT \"\\content\"\n";
print FH "!endif\n";
print FH "\n";
print FH "!ifndef \${VOICE_PACKAGE_FILE}\n";
print FH " !define VOICE_PACKAGE_FILE \"$voice_zip\"\n";
print FH "!endif\n";
print FH "!ifndef \${VOICE_TYPE}\n";
print FH " !define VOICE_TYPE \"$ext\"\n";
print FH "!endif\n";
print FH "!ifndef \${VOICE_ROOT}\n";
print FH " !define VOICE_ROOT \"\\content\"\n";
print FH "!endif\n";
print FH "\n";
print FH "!ifndef \${THREEDO_PACKAGE_FILE}\n";
print FH " !define THREEDO_PACKAGE_FILE \"$threedo_zip\"\n";
print FH "!endif\n";
print FH "!ifndef \${THREEDO_TYPE}\n";
print FH " !define THREEDO_TYPE \"$ext\"\n";
print FH "!endif\n";
print FH "!ifndef \${THREEDO_ROOT}\n";
print FH " !define THREEDO_ROOT \"\\content\"\n";
print FH "!endif\n";
print FH "\n";
}
print FH "!ifndef \${UPGRADE_PACKAGE_FILE}\n";
print FH " !define UPGRADE_PACKAGE_FILE \"$change_zip\"\n";
print FH "!endif\n";
print FH "!ifndef \${UPGRADE_TYPE}\n";
print FH " !define UPGRADE_TYPE \"$ext\"\n";
print FH "!endif\n";
print FH "!ifndef \${UPGRADE_ROOT}\n";
print FH " !define UPGRADE_ROOT \"\\content\"\n";
print FH "!endif\n";
print FH "\n";
print FH "!ifndef \${VUPGRADE_PACKAGE_FILE}\n";
print FH " !define VUPGRADE_PACKAGE_FILE \"$change_ogg_zip\"\n";
print FH "!endif\n";
print FH "!ifndef \${VUPGRADE_TYPE}\n";
print FH " !define VUPGRADE_TYPE \"$ext\"\n";
print FH "!endif\n";
print FH "!ifndef \${VUPGRADE_ROOT}\n";
print FH " !define VUPGRADE_ROOT \"\\content\"\n";
print FH "!endif\n";
print FH "\n";
print FH "!verbose 4\n";
close FH; close FH;
print "upgrade : #files: $num_change ($change_size kb)\n"; print "upgrade : #files: $num_change ($change_size kb)\n";
print "voiceupgrade: #files: $num_change_ogg ($change_ogg_size kb)\n"; print "voiceupgrade: #files: $num_change_ogg ($change_ogg_size kb)\n";
+59
View File
@@ -0,0 +1,59 @@
!define OLD_VERSION "0.1" ; The earliest version that we can upgrade from
!define DOWNLOAD_LOCATION "http://sc2.sf.net/install_files/0.2"
!define MIRROR_LOCATION "http://sc2.sf.net/install_files/0.2/mirror.txt"
;!define CONTENT_USE_MIRROR 1 ; Define if the download should use a mirror
;!define VOICE_USE_MIRROR 1 ; Define if the download should use a mirror
;!define THREEDO_USE_MIRROR 1 ; Define if the download should use a mirror
;!define UPGRADE_USE_MIRROR 1 ; Define if the download should use a mirror
;!define VUPGRADE_USE_MIRROR 1 ; Define if the download should use a mirror
; -----------------------------
; Only define these if you need fine control over where the archives are stored
;!define CONTENT_LOCATION "http://sc2.sf.net/install_files/0.2/mirror.txt"
;!define VOICE_LOCATION "http://sc2.sf.net/install_files/0.2"
;!define THREEDO_LOCATION "http://sc2.sf.net/install_files/0.2/mirror.txt"
;!define UPGRADE_LOCATION "http://sc2.sf.net/install_files/0.2"
;!define VUPGRADE_LOCATION "http://sc2.sf.net/install_files/0.2/mirror.txt"
; -----------------------------
; define DEFAULT_UPGRADE if the defaullt should be to install an upgrade.
; undefining this will cause the default install to be a full install
; (i.e. install all files)
!define DEFAULT_UPGRADE
; -----------------------------
; define FULL_NEEDS_UPGRADE if both arhives are needed for a full install
; !define FULL_NEEDS_UPGRADE
; -----------------------------
; using 'ubx' is risky, and often leads to unusable binaries. I don't
; recommend enabling it
; !define USE_UBX
; -----------------------------
; These should only be changed if you know what you are doing!!!!!
; These definitions override the defaults, and should probaly NOT be used
;!define MUI_VERSION "0.14"
;!define CONTENT_PACKAGE_FILE "uqm-${MUI_VERSION}-content.zip"
;!define CONTENT_TYPE "zip"
;!define CONTENT_ROOT "\content"
;!define VOICE_PACKAGE_FILE "uqm-${MUI_VERSION}-voice.zip"
;!define VOICE_TYPE "zip"
;!define VOICE_ROOT "\content"
;!define THREEDO_PACKAGE_FILE "uqm-${MUI_VERSION}-3domusic.zip"
;!define THREEDO_TYPE "zip"
;!define THREEDO_ROOT "\content"
;!define UPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-upgrade.zip"
;!define UPGRADE_TYPE "zip"
;!define UPGRADE_ROOT "\content"
;!define VUPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-voice.zip"
;!define VUPGRADE_TYPE "zip"
;!define VUPGRADE_ROOT "\content"
+78 -26
View File
@@ -1,55 +1,107 @@
!define MUI_PRODUCT "The Ur-Quan Masters" ;Define your own software name here !define MUI_PRODUCT "The Ur-Quan Masters" ;Define your own software name here
!define MUI_VERSION "0.14" ;Define your own software version here
!define OLD_VERSION "0.1" ; The earliest version that we can upgrade from
!define DEFAULT_UPGRADE 1 ; Define if the default install should be 'upgrade' !include "options.nsh"
!define MIRROR_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt" !include "content.nsh"
!define NO_MIRROR_LOCATION "http://sc2.sourceforge.net/install_files/"
; define FULL_NEEDS_UPGRADE if both arhives are needed for a full install ; ***************** content **********************
!define FULL_NEEDS_UPGRADE 1 !ifndef ${CONTENT_LOCATION}
!ifdef ${CONTENT_USE_MIRROR}
!define CONTENT_USE_MIRROR 1 !define CONTENT_LOCATION ${MIRROR_LOCATION}
!define CONTENT_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt" !else
!define CONTENT_LOCATION ${DOWNLOAD_LOCATION}
!endif
!endif
!ifndef ${CONTENT_USE_MIRROR}
!define CONTENT_USE_MIRROR 0
!endif
!ifndef ${CONTENT_PACKAGE_FILE}
!define CONTENT_PACKAGE_FILE "uqm-${MUI_VERSION}-content.zip" !define CONTENT_PACKAGE_FILE "uqm-${MUI_VERSION}-content.zip"
!endif
!ifndef ${CONTENT_TYPE}
!define CONTENT_TYPE "zip" !define CONTENT_TYPE "zip"
!endif
!ifndef ${CONTENT_ROOT}
!define CONTENT_ROOT "\content" !define CONTENT_ROOT "\content"
!endif
!define VOICE_USE_MIRROR 1 ; ****************** voice **********************
!define VOICE_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt" !ifndef ${VOICE_LOCATION}
!ifdef ${VOICE_USE_MIRROR}
!define VOICE_LOCATION ${MIRROR_LOCATION}
!else
!define VOICE_LOCATION ${DOWNLOAD_LOCATION}
!endif
!endif
!ifndef ${VOICE_USE_MIRROR}
!define VOICE_USE_MIRROR 0
!endif
!ifndef ${VOICE_PACKAGE_FILE}
!define VOICE_PACKAGE_FILE "uqm-${MUI_VERSION}-voice.zip" !define VOICE_PACKAGE_FILE "uqm-${MUI_VERSION}-voice.zip"
!endif
!ifndef ${VOICE_TYPE}
!define VOICE_TYPE "zip" !define VOICE_TYPE "zip"
!endif
!ifndef ${VOICE_ROOT}
!define VOICE_ROOT "\content" !define VOICE_ROOT "\content"
!endif
!define THREEDO_USE_MIRROR 1 ; **************** 3do music *********************
!define THREEDO_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt" !ifndef ${THREEDO_LOCATION}
!ifdef ${THREEDO_USE_MIRROR}
!define THREEDO_LOCATION ${MIRROR_LOCATION}
!else
!define THREEDO_LOCATION ${DOWNLOAD_LOCATION}
!endif
!endif
!ifndef ${THREEDO_USE_MIRROR}
!define THREEDO_USE_MIRROR 0
!endif
!ifndef ${THREEDO_PACKAGE_FILE}
!define THREEDO_PACKAGE_FILE "uqm-${MUI_VERSION}-3domusic.zip" !define THREEDO_PACKAGE_FILE "uqm-${MUI_VERSION}-3domusic.zip"
!endif
!ifndef ${THREEDO_TYPE}
!define THREEDO_TYPE "zip" !define THREEDO_TYPE "zip"
!endif
!ifndef ${THREEDO_ROOT}
!define THREEDO_ROOT "\content" !define THREEDO_ROOT "\content"
!endif
; ***************** upgrade **********************
!ifndef ${UPGRADE_LOCATION}
!ifdef ${UPGRADE_USE_MIRROR}
!define UPGRADE_LOCATION ${MIRROR_LOCATION}
!else
!define UPGRADE_LOCATION ${DOWNLOAD_LOCATION}
!endif
!endif
!ifndef ${UPGRADE_USE_MIRROR}
!define UPGRADE_USE_MIRROR 0 !define UPGRADE_USE_MIRROR 0
!define UPGRADE_LOCATION "http://sc2.sourceforge.net/install_files/" !endif
!define UPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-content.zip"
!define UPGRADE_TYPE "zip"
!define UPGRADE_ROOT "\content"
; ************** voice upgrade *******************
!ifndef ${VUPGRADE_LOCATION}
!ifdef ${VUPGRADE_USE_MIRROR}
!define VUPGRADE_LOCATION ${MIRROR_LOCATION}
!else
!define VUPGRADE_LOCATION ${DOWNLOAD_LOCATION}
!endif
!endif
!ifndef ${VUPGRADE_USE_MIRROR}
!define VUPGRADE_USE_MIRROR 0 !define VUPGRADE_USE_MIRROR 0
!define VUPGRADE_LOCATION "http://sc2.sourceforge.net/install_files/" !endif
!define VUPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-voice.zip"
!define VUPGRADE_TYPE "zip"
!define VUPGRADE_ROOT "\content"
;-------------------------------- ;--------------------------------
!include "MUI.nsh" !include "MUI.nsh"
!verbose 3
!include "content.nsh"
!verbose 4
;-------------------------------- ;--------------------------------
;Configuration ;Configuration
;Preprocessing of input files ;Preprocessing of input files
!ifdef USE_UBX
!system 'upx --best --crp-ms=100000 -f -q ..\..\uqm.exe' ignore
!packhdr temp.dat "upx.exe --best --crp-ms=100000 temp.dat" !packhdr temp.dat "upx.exe --best --crp-ms=100000 temp.dat"
!endif
;SetCompressor bzip2 ;SetCompressor bzip2
;Interface ;Interface
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe" !define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
@@ -72,7 +124,7 @@
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
!include "uqm_english.nsh" !include "uqm_english.nsh"
OutFile "UQMSetup.exe" OutFile "UQMSetup-${MUI_VERSION}.exe"
;Page order ;Page order
+4
View File
@@ -3316,6 +3316,10 @@ SOURCE=..\options.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\version.h
# End Source File
# Begin Source File
SOURCE=..\types.h SOURCE=..\types.h
# End Source File # End Source File
# Begin Source File # Begin Source File
-3
View File
@@ -22,9 +22,6 @@
#ifndef OPTIONS_H #ifndef OPTIONS_H
#define OPTIONS_H #define OPTIONS_H
#define UQM_MAJOR_VERSION 0
#define UQM_MINOR_VERSION 14
#define OPT_3DO 0x01 #define OPT_3DO 0x01
#define OPT_PC 0x02 #define OPT_PC 0x02
#define OPT_ALL 0xFF #define OPT_ALL 0xFF
@@ -25,6 +25,7 @@
#include "primitives.h" #include "primitives.h"
#include "dcqueue.h" #include "dcqueue.h"
#include "options.h" #include "options.h"
#include "version.h"
#include "SDL_thread.h" #include "SDL_thread.h"
#include "libs/graphics/drawcmd.h" #include "libs/graphics/drawcmd.h"
#include "bbox.h" #include "bbox.h"
@@ -76,7 +77,8 @@ TFB_InitGraphics (int driver, int flags, int width, int height, int bpp)
result = TFB_Pure_InitGraphics (driver, flags, width, height, bpp); result = TFB_Pure_InitGraphics (driver, flags, width, height, bpp);
} }
sprintf (caption, "The Ur-Quan Masters v%d.%d", UQM_MAJOR_VERSION, UQM_MINOR_VERSION); sprintf (caption, "The Ur-Quan Masters v%d.%d%s",
UQM_MAJOR_VERSION, UQM_MINOR_VERSION, UQM_EXTRA_VERSION);
SDL_WM_SetCaption (caption, NULL); SDL_WM_SetCaption (caption, NULL);
//if (flags & TFB_GFXFLAGS_FULLSCREEN) //if (flags & TFB_GFXFLAGS_FULLSCREEN)
+4 -1
View File
@@ -36,6 +36,7 @@
#include "file.h" #include "file.h"
#include "port.h" #include "port.h"
#include "options.h" #include "options.h"
#include "version.h"
#include "comm.h" #include "comm.h"
#if defined(GFXMODULE_SDL) || defined(SOUNDMODULE_SDL) #if defined(GFXMODULE_SDL) || defined(SOUNDMODULE_SDL)
@@ -124,7 +125,9 @@ main (int argc, char *argv[])
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
fprintf (stderr, "The Ur-Quan Masters v%d.%d (compiled %s %s)\n", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, __DATE__, __TIME__); fprintf (stderr, "The Ur-Quan Masters v%d.%d%s (compiled %s %s)\n",
UQM_MAJOR_VERSION, UQM_MINOR_VERSION, UQM_EXTRA_VERSION,
__DATE__, __TIME__);
#ifdef CONTENTDIR #ifdef CONTENTDIR
strcpy (contentdir, CONTENTDIR); strcpy (contentdir, CONTENTDIR);
+27
View File
@@ -0,0 +1,27 @@
/*
* 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 VERSION_H
#define VERSION_H
#define UQM_MAJOR_VERSION 0
#define UQM_MINOR_VERSION 14
#define UQM_EXTRA_VERSION ""
/* The final version is interpreted as:
printf ("%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, UQM_EXTRA_VERSION);
*/
#endif