Major update of windows installer. Supports seperated ogg files, save game
moving, and other niceties for the 0.2 release git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@752 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -6,7 +6,7 @@ alternatively, steps 3 and 4 can be completed on a linux machine (which
|
|||||||
will probably work better anyway)
|
will probably work better anyway)
|
||||||
|
|
||||||
The following additional tools are required:
|
The following additional tools are required:
|
||||||
NSIS 2.0b0 or newer: nsis.sourceforge.net
|
NSIS 2.0b1 or newer: nsis.sourceforge.net
|
||||||
NSIS 'ZipDLL' http://nsis.sourceforge.net/archive/download.php?file=ZipDLL.zip
|
NSIS 'ZipDLL' http://nsis.sourceforge.net/archive/download.php?file=ZipDLL.zip
|
||||||
NSIS 'unTGZ' http://nsis.sourceforge.net/archive/viewpage.php?pageid=84
|
NSIS 'unTGZ' http://nsis.sourceforge.net/archive/viewpage.php?pageid=84
|
||||||
|
|
||||||
@@ -14,66 +14,77 @@ Optionally:
|
|||||||
upx 1.90 or newer: http://upx.sourceforge.net/#unstable
|
upx 1.90 or newer: http://upx.sourceforge.net/#unstable
|
||||||
resource hacker: http://www.users.on.net/johnson/resourcehacker/
|
resource hacker: http://www.users.on.net/johnson/resourcehacker/
|
||||||
|
|
||||||
1) Compile uqm.exe
|
0) Update the 'upgrade' reference.
|
||||||
|
NOTE: Only run this step if you are building an official release! If you
|
||||||
2) If you have upx, run it on uqm.exe as follows:
|
are building a development release, or anything not sanctioned by the
|
||||||
upx --best --crp-ms=100000 uqm.exe
|
UQM developers, you do not need to run this.
|
||||||
|
|
||||||
3) Update the 'upgrade' reference.
|
|
||||||
The UQM installer can install either a 'full' version of the content dir
|
The UQM installer can install either a 'full' version of the content dir
|
||||||
or an 'upgrade' from a previous version. The last official version was
|
or an 'upgrade' from a previous version. The last official version was
|
||||||
0.1 as of Jan 31, 2003. To build the upgrade, it is necessary to determine
|
0.1 as of Feb 14, 2003. To build the upgrade, it is necessary to determine
|
||||||
what has changed since the previous release. Each release is taggged in
|
what has changed since the previous release. Each release is taggged in
|
||||||
the CVS repository with something like 'version_0_1'. A perl script is
|
the CVS repository with something like 'version_0_1'. A perl script is
|
||||||
included which can build a list of file versions tagged with a specific tag.
|
included which can build a list of file versions tagged with a specific tag.
|
||||||
The procedure is:
|
The command is:
|
||||||
cvs log -h > logfile
|
./build_contour.pl version_0_1 contour_0_1
|
||||||
build_contour.pl logfile version_0_1 >content_0_1
|
(NOTE that this may take a very long time to run, as it is fetching the
|
||||||
|
CVS log for each file in the content directory)
|
||||||
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)
|
||||||
|
|
||||||
4) Build content .zip files and content.nsh
|
1) Compile uqm.exe
|
||||||
|
|
||||||
|
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
|
||||||
For this procedure, you must have no modifications in the content tree.
|
For this procedure, you must have no modifications in the content tree.
|
||||||
having additional files won't cause any issues, but there can't be any
|
having additional files won't cause any issues, but there can't be any
|
||||||
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 content_0_1 [full]
|
./build_archives.pl 0.2 contour_0_1 [full]
|
||||||
This will generate .zip files of the content directory:
|
This will generate .zip files of the content directory:
|
||||||
uqm_0_2_upgrade_0_1.zip
|
uqm-0.1_to_0.2-content.zip
|
||||||
|
uqm-0.1_to_0.2-voice.zip
|
||||||
and (if 'full' is specified)
|
and (if 'full' is specified)
|
||||||
uqm_0_2_content.zip
|
uqm-0.2-content.zip
|
||||||
|
uqm-0.2-voice.zip
|
||||||
|
uqm-0.2-3domusic.zip
|
||||||
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 is a list of all files in the
|
It will also generate content.nsh which contains a list of files for the
|
||||||
content directory, for use in building the uninstaller
|
uninstaller, as well as the file-size of each of the archives, for use in
|
||||||
|
the installer
|
||||||
|
|
||||||
Lastly, this script will display the sizes of the uncompressed archives
|
3) Modify the install script:
|
||||||
which are needed for the next step
|
|
||||||
|
|
||||||
5) Modify the install script:
|
|
||||||
Edit uqm.nsi, and change the following variables:
|
Edit uqm.nsi, and change the following variables:
|
||||||
MUI_VERSION: The version you are building
|
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
|
||||||
MIRROR_LOCATION: Where the mirror file lives (probbaly ok as is)
|
|
||||||
NO_MIRROR_LOCATION: Where to get non-mirrored files from
|
|
||||||
FULL_NEEDS_UPGRADE: This parameter is set if a 'full' build requires
|
FULL_NEEDS_UPGRADE: This parameter is set if a 'full' build requires
|
||||||
both the 'content' archive pak along with the
|
both the 'content' archive pak along with the
|
||||||
'upgrade' archive pak. In general, only official
|
'upgrade' archive pak. In general, only official
|
||||||
builds wil have this set to '0' all other builds
|
builds wil have this set to '0' all other builds
|
||||||
ahould leave it at '1'
|
ahould leave it at '1'
|
||||||
CONTENT_USE_MIRROR: Whether to use the mirror for the 'content' archive
|
also, there are 5 sections:
|
||||||
CONTENT_PACKAGE_FILE: the name of the 'content' file (from step 4)
|
CONTENT, VOICE, THREEDO, UPGRADE, and VUPGRADE, which represent how to
|
||||||
CONTENT_TYPE_ZIP/CONTENT_TYPE_TGZ: set the correct define
|
retreive the data-files, voice-files, 3do music files, upgrade to the
|
||||||
CONTENT_SIZE: The size of the content archive (uncompressed)
|
data files, and upgrade to the voice files respectively). These
|
||||||
|
variables are:
|
||||||
|
|
||||||
UPGRADE_USE_MIRROR: Whether to use the mirror for the 'upgrade' archive
|
<...>_USE_MIRROR: Whether the 'LOCATION' is pointing to a mirror file
|
||||||
UPGRADE_PACKAGE_FILE: the name of the 'upgrade' file (from step 4)
|
or a directory for direct-download. The mirror file
|
||||||
UPGRADE_TYPE_ZIP/CONTENT_TYPE_TGZ: set the correct define
|
contains a list of directries (http) where the data-
|
||||||
UPGRADE_SIZE: The size of the upgrade archive (uncompressed)
|
file can be downloaded from.
|
||||||
|
<...>_LOCATION: The path (http) to retrieve the data-file or mirror-
|
||||||
|
file from (depending on the value of 'USE_MIRROR')
|
||||||
|
<...>_PACKAGE_FILE: The name of the data-file to retreive
|
||||||
|
<...>_TYPE: The type of archiver used (must be "zip" or "tgz")
|
||||||
|
<...>_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)
|
||||||
|
|
||||||
6) run NSIS to build the installer:
|
4) run NSIS to build the installer:
|
||||||
makensis uqm.nsi
|
makensis uqm.nsi
|
||||||
the installer expects all the dlls to be in the same directory as uqm.exe
|
the installer expects all the dlls to be in the same directory as uqm.exe
|
||||||
|
|
||||||
7) you should be done.
|
5) you should be done.
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
Things stiill needing doing of rthe installer:
|
Things stiill needing doing of rthe installer:
|
||||||
- Support for moving save-game files to the correct location
|
|
||||||
- untgz.dll doesn't support error checking yet
|
- untgz.dll doesn't support error checking yet
|
||||||
- suppot different mirror files for upgrade and full innstalls
|
|
||||||
- check md5 sums on downloaded files
|
- check md5 sums on downloaded files
|
||||||
- the uninstaller doesn't seem to get everything
|
- the uninstaller doesn't seem to get everything
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
use File::Find;
|
use File::Find;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
# set use_zip = 1 for .zip, = 0 for .tgz
|
# set use_zip = 1 for .zip, = 0 for .tgz
|
||||||
$use_zip = 0;
|
$use_zip = 1;
|
||||||
|
|
||||||
|
|
||||||
$version = shift @ARGV;
|
$version = shift @ARGV;
|
||||||
@@ -38,10 +38,10 @@ if ($use_zip) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($tag) {
|
if ($tag) {
|
||||||
if ($tag =~ /(\d+_\d+\S*)$/) {
|
if ($tag =~ /(\d+[._]\d+\S*)$/) {
|
||||||
$vernum = $1;
|
$oldver = $1;
|
||||||
} else {
|
} else {
|
||||||
$vernum = "";
|
$oldver = "";
|
||||||
}
|
}
|
||||||
# read in a cvs log for the content dir.
|
# read in a cvs log for the content dir.
|
||||||
# log is made by doing:
|
# log is made by doing:
|
||||||
@@ -87,11 +87,11 @@ if ($tag) {
|
|||||||
find (\&find_callback, ".");
|
find (\&find_callback, ".");
|
||||||
# use a contour file and the 'CVS' directories to determine the file list
|
# use a contour file and the 'CVS' directories to determine the file list
|
||||||
$first = 1;
|
$first = 1;
|
||||||
$vernum = "";
|
$oldver = "";
|
||||||
while (<FH>) {
|
while (<FH>) {
|
||||||
chomp;
|
chomp;
|
||||||
if ($first) {
|
if ($first) {
|
||||||
$vernum = $_;
|
$oldver = $_;
|
||||||
$first = 0;
|
$first = 0;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
@@ -114,41 +114,78 @@ if ($tag) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$change_zip = "$cwd/uqm_${version}_upgrade${vernum}.$ext";
|
$change_zip = "$cwd/uqm-${oldver}_to_${version}-content.$ext";
|
||||||
$content_zip = "$cwd/uqm_${version}_content.$ext";
|
$change_ogg_zip = "$cwd/uqm-${oldver}_to_${version}-voice.$ext";
|
||||||
|
$content_zip = "$cwd/uqm-${version}-content.$ext";
|
||||||
|
$voice_zip = "$cwd/uqm-${version}-voice.$ext";
|
||||||
|
$threedo_zip = "$cwd/uqm-${version}-3domusic.$ext";
|
||||||
|
|
||||||
# build the upgrade .zip file
|
# build the upgrade .zip file
|
||||||
$last_dir = "";
|
$last_dir = "";
|
||||||
$change_size = 0;
|
$change_size = 0;
|
||||||
|
$change_ogg_size = 0;
|
||||||
|
$num_change = 0;
|
||||||
|
$num_change_ogg = 0;
|
||||||
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";
|
||||||
foreach $path (@changed) {
|
foreach $path (@changed) {
|
||||||
if (-f $path) {
|
if (-f $path) {
|
||||||
($null,$null,$null,$null,$null,$null,$null,$siz1) = stat $path;
|
($null,$null,$null,$null,$null,$null,$null,$siz1) = stat $path;
|
||||||
$change_size += $siz1;
|
if ($path =~ /comm\/.*\/.*\.ogg$/) {
|
||||||
print FH1 "$path\n";
|
$change_ogg_size += $siz1;
|
||||||
|
$num_change_ogg++;
|
||||||
|
print FH2 "$path\n";
|
||||||
|
} else {
|
||||||
|
$change_size += $siz1;
|
||||||
|
$num_change++;
|
||||||
|
print FH1 "$path\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print "WARNING: '$path' was not found in local repository\n";
|
print "WARNING: '$path' was not found in local repository\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close FH1;
|
close FH1;
|
||||||
|
close FH2;
|
||||||
unlink $change_zip;
|
unlink $change_zip;
|
||||||
|
unlink $change_ogg_zip;
|
||||||
if ($use_zip) {
|
if ($use_zip) {
|
||||||
`cat tmpfile | zip -r $change_zip -@`;
|
`cat tmpfile | zip -r $change_zip -@`;
|
||||||
|
`cat tmpfile1 | zip -r $change_ogg_zip -@` if ($change_ogg_size);
|
||||||
} else {
|
} else {
|
||||||
`tar -T tmpfile -czf $change_zip`;
|
`tar -T tmpfile -czf $change_zip`;
|
||||||
|
`tar -T tmpfile1 -czf $change_ogg_zip` if ($change_ogg_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
open (FH, ">$cwd/content.nsh");
|
open (FH, ">$cwd/content.nsh");
|
||||||
|
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 FH3, ">tmpfile2" || die "Couldn't create temp file!\n";
|
||||||
$last_dir = "";
|
$last_dir = "";
|
||||||
$content_size = 0;
|
$content_size = 0;
|
||||||
|
$voice_size = 0;
|
||||||
|
$threedo_size = 0;
|
||||||
|
$num_voice = 0;
|
||||||
|
$num_content = 0;
|
||||||
|
$num_3do = 0;
|
||||||
@dirs = ();
|
@dirs = ();
|
||||||
foreach $path (@all) {
|
foreach $path (@all) {
|
||||||
if (-f $path) {
|
if (-f $path) {
|
||||||
($null,$null,$null,$null,$null,$null,$null,$siz1) = stat $path;
|
($null,$null,$null,$null,$null,$null,$null,$siz1) = stat $path;
|
||||||
$content_size += $siz1;
|
if ($path =~ /comm\/.*\/.*\.ogg$/) {
|
||||||
print FH1 "$path\n";
|
$voice_size += $siz1;
|
||||||
|
$num_voice++;
|
||||||
|
print FH2 "$path\n";
|
||||||
|
} elsif ($path =~ /\.ogg$/) {
|
||||||
|
print "$path : $siz1\n";
|
||||||
|
$threedo_size += $siz1;
|
||||||
|
$num_3do++;
|
||||||
|
print FH3 "$path\n";
|
||||||
|
} else {
|
||||||
|
$content_size += $siz1;
|
||||||
|
$num_content++;
|
||||||
|
print FH1 "$path\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print "WARNING: '$path' was not found in local repository\n";
|
print "WARNING: '$path' was not found in local repository\n";
|
||||||
}
|
}
|
||||||
@@ -158,25 +195,51 @@ foreach $path (@all) {
|
|||||||
push @dirs, $dir;
|
push @dirs, $dir;
|
||||||
$last_dir = $dir;
|
$last_dir = $dir;
|
||||||
}
|
}
|
||||||
|
$path =~ s/\//\\/g;
|
||||||
print FH "Delete \"\$INSTDIR\\content\\$path\"\n";
|
print FH "Delete \"\$INSTDIR\\content\\$path\"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close FH1;
|
close FH1;
|
||||||
|
close FH2;
|
||||||
|
close FH3;
|
||||||
foreach $dir (@dirs) {
|
foreach $dir (@dirs) {
|
||||||
|
$dir =~ s/\/$//;
|
||||||
|
$dir =~ s/\//\\/g;
|
||||||
print FH "RMDir \"\$INSTDIR\\content\\$dir\"\n";
|
print FH "RMDir \"\$INSTDIR\\content\\$dir\"\n";
|
||||||
}
|
}
|
||||||
close FH;
|
print FH "!macroend\n";
|
||||||
if ($do_full) {
|
if ($do_full) {
|
||||||
unlink $content_zip;
|
unlink $content_zip;
|
||||||
|
unlink $voice_zip;
|
||||||
if ($use_zip) {
|
if ($use_zip) {
|
||||||
`cat tmpfile | zip -r $content_zip -@`;
|
`cat tmpfile | zip -r $content_zip -@`;
|
||||||
|
`cat tmpfile1 | zip -r $voice_zip -@` if($voice_size);
|
||||||
|
`cat tmpfile2 | zip -r $threedo_zip -@` if($threedo_size);
|
||||||
} else {
|
} else {
|
||||||
`tar -T tmpfile -czf $content_zip`;
|
`tar -T tmpfile -czf $content_zip`;
|
||||||
|
`tar -T tmpfile1 -czf $voice_zip` if ($voice_size);
|
||||||
|
`tar -T tmpfile2 -czf $threedo_zip` if ($threedo_size);
|
||||||
}
|
}
|
||||||
unlink "tmpfile";
|
|
||||||
}
|
}
|
||||||
print "changed: #files: " . scalar (@changed) . " ($change_size kb)\n";
|
unlink "tmpfile";
|
||||||
print "total: #files: " . scalar (@all) . " ($content_size kb)\n";
|
unlink "tmpfile1";
|
||||||
|
unlink "tmpfile2";
|
||||||
|
$change_size = int(0.5 + $change_size / 1000);
|
||||||
|
$change_ogg_size = int(0.5 + $change_ogg_size / 1000);
|
||||||
|
$content_size = int(0.5 + $content_size / 1000);
|
||||||
|
$voice_size = int(0.5 + $voice_size / 1000);
|
||||||
|
$threedo_size = int(0.5 + $threedo_size / 1000);
|
||||||
|
print FH "!define CONTENT_SIZE $content_size\n";
|
||||||
|
print FH "!define VOICE_SIZE $voice_size\n";
|
||||||
|
print FH "!define THREEDO_SIZE $threedo_size\n";
|
||||||
|
print FH "!define UPGRADE_SIZE $change_size\n";
|
||||||
|
print FH "!define VUPGRADE_SIZE $change_ogg_size\n";
|
||||||
|
close FH;
|
||||||
|
print "upgrade : #files: $num_change ($change_size kb)\n";
|
||||||
|
print "voiceupgrade: #files: $num_change_ogg ($change_ogg_size kb)\n";
|
||||||
|
print "content : #files: $num_content ($content_size kb)\n";
|
||||||
|
print "voice : #files: $num_voice ($voice_size kb)\n";
|
||||||
|
print "threedo : #files: $num_3do ($threedo_size kb)\n";
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
#! /usr/bin/perl -w
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
if (scalar (@ARGV) != 2) {
|
if (scalar (@ARGV) != 2) {
|
||||||
print STDERR "$0 cvs_log_file cvs_tag\n";
|
print STDERR "$0 cvs_tag output_contour_file\n";
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = shift @ARGV;
|
|
||||||
$ver = shift @ARGV;
|
$ver = shift @ARGV;
|
||||||
|
$file = shift @ARGV;
|
||||||
if ($ver =~ /(\d+_\d+\S*)$/) {
|
if ($ver =~ /(\d+_\d+\S*)$/) {
|
||||||
$vernum = $1;
|
$vernum = $1;
|
||||||
|
$vernum =~ s/_/./g;
|
||||||
} else {
|
} else {
|
||||||
print STDERR "Couldn't parse the cvs-tag for a release version\n";
|
print STDERR "Couldn't parse the cvs-tag for a release version\n";
|
||||||
$vernum = "0_0";
|
$vernum = "0.0";
|
||||||
}
|
}
|
||||||
print "$vernum\n";
|
open FH1, ">$file" or die "Couldn't write to $file\n";
|
||||||
open FH, $file || die "Couldn't find file $file\n";
|
print FH1 "$vernum\n";
|
||||||
|
chdir "../../content";
|
||||||
|
open FH, "cvs log -h|" or die "Couldn't run 'cvs log -h'\n";
|
||||||
|
$file = "";
|
||||||
while (<FH>) {
|
while (<FH>) {
|
||||||
chomp;
|
chomp;
|
||||||
if (/Working file: (.+)\s*$/) {
|
if (/Working file: (.+)\s*$/) {
|
||||||
@@ -24,9 +28,10 @@ while (<FH>) {
|
|||||||
$head = $1;
|
$head = $1;
|
||||||
}
|
}
|
||||||
if (/\s+${ver}:\s+(\S+)/) {
|
if (/\s+${ver}:\s+(\S+)/) {
|
||||||
print "$file : $1\n";
|
print FH1 "$file : $1\n";
|
||||||
$file = "";
|
$file = "";
|
||||||
$head = "";
|
$head = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close FH;
|
close FH;
|
||||||
|
close FH1;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
0_1
|
0.1
|
||||||
androsyn.shp : 1.1
|
androsyn.shp : 1.1
|
||||||
arilou.con : 1.1
|
arilou.con : 1.1
|
||||||
arilou.shp : 1.1
|
arilou.shp : 1.1
|
||||||
|
|||||||
@@ -7,58 +7,59 @@ BackEnabled=1
|
|||||||
[Field 1]
|
[Field 1]
|
||||||
Type=label
|
Type=label
|
||||||
left=0
|
left=0
|
||||||
right=450
|
right=-1
|
||||||
top=0
|
top=0
|
||||||
bottom=15
|
bottom=13
|
||||||
|
|
||||||
[Field 2]
|
[Field 2]
|
||||||
Type=label
|
Type=label
|
||||||
left=0
|
left=20
|
||||||
right=450
|
right=-1
|
||||||
top=15
|
top=13
|
||||||
bottom=45
|
bottom=36
|
||||||
|
|
||||||
[Field 3]
|
[Field 3]
|
||||||
Type=label
|
Type=label
|
||||||
left=0
|
left=0
|
||||||
right=450
|
right=-1
|
||||||
top=45
|
top=36
|
||||||
bottom=86; 59
|
bottom=66; 59
|
||||||
|
|
||||||
[Field 4]
|
[Field 4]
|
||||||
Type=RadioButton
|
Type=RadioButton
|
||||||
State=1
|
State=1
|
||||||
left=0
|
left=0
|
||||||
right=450
|
right=-1
|
||||||
top=90
|
top=70
|
||||||
bottom=105
|
bottom=80
|
||||||
|
|
||||||
[Field 5]
|
[Field 5]
|
||||||
Type=RadioButton
|
Type=RadioButton
|
||||||
State=0
|
State=0
|
||||||
left=0
|
left=0
|
||||||
right=450
|
right=-1
|
||||||
top=105
|
top=80
|
||||||
bottom=120
|
bottom=90
|
||||||
|
|
||||||
[Field 6]
|
[Field 6]
|
||||||
Type=CheckBox
|
Type=CheckBox
|
||||||
State=0
|
State=0
|
||||||
left=0
|
left=0
|
||||||
right=450
|
right=-1
|
||||||
top=130
|
top=90
|
||||||
bottom=145
|
bottom=100
|
||||||
|
|
||||||
[Field 7]
|
[Field 7]
|
||||||
Type=DirRequest
|
Type=DirRequest
|
||||||
left=20
|
left=20
|
||||||
right=450
|
right=-1
|
||||||
top=145
|
top=100
|
||||||
bottom=168
|
bottom=112
|
||||||
|
|
||||||
[Field 8]
|
[Field 8]
|
||||||
Type=label
|
Type=label
|
||||||
left=20
|
left=20
|
||||||
right=450
|
right=-1
|
||||||
top=170
|
top=112
|
||||||
bottom=210
|
bottom=160
|
||||||
|
|
||||||
|
|||||||
+251
-90
@@ -1,5 +1,5 @@
|
|||||||
!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.13" ;Define your own software version here
|
!define MUI_VERSION "0.2" ;Define your own software version here
|
||||||
!define OLD_VERSION "0.1" ; The earliest version that we can upgrade from
|
!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'
|
!define DEFAULT_UPGRADE 1 ; Define if the default install should be 'upgrade'
|
||||||
@@ -10,24 +10,41 @@
|
|||||||
!define FULL_NEEDS_UPGRADE 1
|
!define FULL_NEEDS_UPGRADE 1
|
||||||
|
|
||||||
!define CONTENT_USE_MIRROR 1
|
!define CONTENT_USE_MIRROR 1
|
||||||
;!define CONTENT_PACKAGE_FILE "uqm_0_1_3_content.tgz"
|
!define CONTENT_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt"
|
||||||
!define CONTENT_PACKAGE_FILE "uqm-0.1-content-full.tgz"
|
!define CONTENT_PACKAGE_FILE "uqm-${MUI_VERSION}-content.zip"
|
||||||
;!define CONTENT_TYPE_ZIP
|
!define CONTENT_TYPE "zip"
|
||||||
!define CONTENT_TYPE_TGZ
|
!define CONTENT_ROOT "\content"
|
||||||
!define CONTENT_ROOT ""
|
|
||||||
!define CONTENT_SIZE 148454
|
|
||||||
|
|
||||||
;!define UPGRADE_USE_MIRROR 1
|
!define VOICE_USE_MIRROR 1
|
||||||
!define UPGRADE_PACKAGE_FILE "uqm_0_1_3_upgrade0_1.tgz"
|
!define VOICE_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt"
|
||||||
;!define UPGRADE_TYPE_ZIP
|
!define VOICE_PACKAGE_FILE "uqm-${MUI_VERSION}-voice.zip"
|
||||||
!define UPGRADE_TYPE_TGZ
|
!define VOICE_TYPE "zip"
|
||||||
|
!define VOICE_ROOT "\content"
|
||||||
|
|
||||||
|
!define THREEDO_USE_MIRROR 1
|
||||||
|
!define THREEDO_LOCATION "http://sc2.sourceforge.net/install_files/mirrors.txt"
|
||||||
|
!define THREEDO_PACKAGE_FILE "uqm-${MUI_VERSION}-3domusic.zip"
|
||||||
|
!define THREEDO_TYPE "zip"
|
||||||
|
!define THREEDO_ROOT "\content"
|
||||||
|
|
||||||
|
!define UPGRADE_USE_MIRROR 0
|
||||||
|
!define UPGRADE_LOCATION "http://sc2.sourceforge.net/install_files/"
|
||||||
|
!define UPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-content.zip"
|
||||||
|
!define UPGRADE_TYPE "zip"
|
||||||
!define UPGRADE_ROOT "\content"
|
!define UPGRADE_ROOT "\content"
|
||||||
!define UPGRADE_SIZE 1324
|
|
||||||
|
|
||||||
|
!define VUPGRADE_USE_MIRROR 0
|
||||||
|
!define VUPGRADE_LOCATION "http://sc2.sourceforge.net/install_files/"
|
||||||
|
!define VUPGRADE_PACKAGE_FILE "uqm-${OLD_VERSION}_to_${MUI_VERSION}-voice.zip"
|
||||||
|
!define VUPGRADE_TYPE "zip"
|
||||||
|
!define VUPGRADE_ROOT "\content"
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
|
!include "MUI.nsh"
|
||||||
|
|
||||||
|
!verbose 3
|
||||||
|
!include "content.nsh"
|
||||||
|
!verbose 4
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Configuration
|
;Configuration
|
||||||
|
|
||||||
@@ -35,9 +52,9 @@
|
|||||||
!packhdr temp.dat "upx.exe --best --crp-ms=100000 temp.dat"
|
!packhdr temp.dat "upx.exe --best --crp-ms=100000 temp.dat"
|
||||||
;SetCompressor bzip2
|
;SetCompressor bzip2
|
||||||
;Interface
|
;Interface
|
||||||
|
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
|
||||||
;!define MUI_ICON "uqm.ico"
|
;!define MUI_ICON "uqm.ico"
|
||||||
;!define MUI_UNICON "uninstall.ico"
|
;!define MUI_UNICON "uninstall.ico"
|
||||||
|
|
||||||
!define MUI_LICENSEPAGE
|
!define MUI_LICENSEPAGE
|
||||||
!define MUI_COMPONENTSPAGE
|
!define MUI_COMPONENTSPAGE
|
||||||
!define MUI_DIRECTORYPAGE
|
!define MUI_DIRECTORYPAGE
|
||||||
@@ -88,11 +105,9 @@
|
|||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Modern UI system
|
;Modern UI system
|
||||||
|
!define MUI_CUSTOMFUNCTION_DIRECTORY_PRE SetDirectory
|
||||||
!undef MUI_DIRECTORYPAGE
|
!define MUI_CUSTOMFUNCTION_DIRECTORY_SHOW SetDirectoryDialog
|
||||||
!insertmacro MUI_SYSTEM
|
!insertmacro MUI_SYSTEM
|
||||||
!define MUI_DIRECTORYPAGE
|
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Installer Sections
|
;Installer Sections
|
||||||
|
|
||||||
@@ -144,25 +159,16 @@ SectionIn 2
|
|||||||
|
|
||||||
AddSize ${CONTENT_SIZE}
|
AddSize ${CONTENT_SIZE}
|
||||||
|
|
||||||
SetOutPath "$INSTDIR\content"
|
; $0 = download file name
|
||||||
|
; $1 = web site for download or mirror
|
||||||
|
; $2 = install directory
|
||||||
|
; $3 = use mirror
|
||||||
|
; $4 = archive type ("zip" or "tgz")
|
||||||
StrCpy $0 ${CONTENT_PACKAGE_FILE}
|
StrCpy $0 ${CONTENT_PACKAGE_FILE}
|
||||||
!ifdef CONTENT_USE_MIRROR
|
StrCpy $1 ${CONTENT_LOCATION}
|
||||||
StrCpy $1 ${MIRROR_LOCATION}
|
|
||||||
StrCpy $3 1
|
|
||||||
!else
|
|
||||||
StrCpy $1 ${NO_MIRROR_LOCATION}
|
|
||||||
StrCpy $3 0
|
|
||||||
!endiF
|
|
||||||
StrCpy $2 "$INSTDIR${CONTENT_ROOT}"
|
StrCpy $2 "$INSTDIR${CONTENT_ROOT}"
|
||||||
!ifdef CONTENT_TYPE_ZIP
|
StrCpy $3 ${CONTENT_USE_MIRROR}
|
||||||
StrCpy $4 "zip"
|
StrCpy $4 ${CONTENT_TYPE}
|
||||||
!else
|
|
||||||
!ifdef CONTENT_TYPE_TGZ
|
|
||||||
StrCpy $4 "tgz"
|
|
||||||
!else
|
|
||||||
!error "Content file type unknown"
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
call DownloadAndExtract
|
call DownloadAndExtract
|
||||||
Pop $0
|
Pop $0
|
||||||
StrCmp $0 success content_ok content_failure
|
StrCmp $0 success content_ok content_failure
|
||||||
@@ -175,51 +181,140 @@ SectionIn 2
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section $(SecUpgradeName) SecUpgrade
|
Section $(SecVoiceName) SecVoice
|
||||||
!ifdef FULL_NEEDS_UPGRADE
|
!ifndef DEFAULT_UPGRADE
|
||||||
SectionIn 1 2
|
SectionIn 1
|
||||||
!else
|
!else
|
||||||
!ifndef DEFAULT_UPGRADE
|
SectionIn 2
|
||||||
SectionIn 2
|
!endif
|
||||||
!else
|
|
||||||
SectionIn 1
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
|
|
||||||
AddSize ${UPGRADE_SIZE}
|
AddSize ${VOICE_SIZE}
|
||||||
|
|
||||||
StrCpy $R1 0
|
; $0 = download file name
|
||||||
SetOutPath $INSTDIR\content
|
; $1 = web site for download or mirror
|
||||||
StrCpy $0 ${UPGRADE_PACKAGE_FILE}
|
; $2 = install directory
|
||||||
!ifdef UPGRADE_USE_MIRROR
|
; $3 = use mirror
|
||||||
StrCpy $1 ${MIRROR_LOCATION}
|
; $4 = archive type ("zip" or "tgz")
|
||||||
StrCpy $3 1
|
StrCpy $0 ${VOICE_PACKAGE_FILE}
|
||||||
!else
|
StrCpy $1 ${VOICE_LOCATION}
|
||||||
StrCpy $1 ${NO_MIRROR_LOCATION}
|
StrCpy $2 "$INSTDIR${VOICE_ROOT}"
|
||||||
StrCpy $3 0
|
StrCpy $3 ${VOICE_USE_MIRROR}
|
||||||
!endiF
|
StrCpy $4 ${VOICE_TYPE}
|
||||||
StrCpy $2 "$INSTDIR${UPGRADE_ROOT}"
|
|
||||||
!ifdef UPGRADE_TYPE_ZIP
|
|
||||||
StrCpy $4 "zip"
|
|
||||||
!else
|
|
||||||
!ifdef UPGRADE_TYPE_TGZ
|
|
||||||
StrCpy $4 "tgz"
|
|
||||||
!else
|
|
||||||
!error "Upgrade file type unknown"
|
|
||||||
!endif
|
|
||||||
!endif
|
|
||||||
call DownloadAndExtract
|
call DownloadAndExtract
|
||||||
Pop $0
|
Pop $0
|
||||||
StrCmp $0 success upgrade_ok upgrade_failure
|
StrCmp $0 success voice_ok voice_failure
|
||||||
upgrade_ok:
|
voice_ok:
|
||||||
StrCpy $0 "upgrade"
|
StrCpy $0 "voice"
|
||||||
goto upgrade_end
|
goto voice_end
|
||||||
upgrade_failure:
|
voice_failure:
|
||||||
StrCpy $0 ""
|
StrCpy $0 ""
|
||||||
upgrade_end:
|
voice_end:
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
Section $(Sec3doMusicName) Sec3doMusic
|
||||||
|
!ifndef DEFAULT_UPGRADE
|
||||||
|
SectionIn 1
|
||||||
|
!else
|
||||||
|
SectionIn 2
|
||||||
|
!endif
|
||||||
|
|
||||||
|
AddSize ${THREEDO_SIZE}
|
||||||
|
|
||||||
|
; $0 = download file name
|
||||||
|
; $1 = web site for download or mirror
|
||||||
|
; $2 = install directory
|
||||||
|
; $3 = use mirror
|
||||||
|
; $4 = archive type ("zip" or "tgz")
|
||||||
|
StrCpy $0 ${THREEDO_PACKAGE_FILE}
|
||||||
|
StrCpy $1 ${THREEDO_LOCATION}
|
||||||
|
StrCpy $2 "$INSTDIR${THREEDO_ROOT}"
|
||||||
|
StrCpy $3 ${THREEDO_USE_MIRROR}
|
||||||
|
StrCpy $4 ${THREEDO_TYPE}
|
||||||
|
call DownloadAndExtract
|
||||||
|
Pop $0
|
||||||
|
StrCmp $0 success threedo_ok threedo_failure
|
||||||
|
threedo_ok:
|
||||||
|
StrCpy $0 "3domusic"
|
||||||
|
goto threedo_end
|
||||||
|
threedo_failure:
|
||||||
|
StrCpy $0 ""
|
||||||
|
threedo_end:
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
SubSection $(SubSecUpgradeName) SubSecUpgrade
|
||||||
|
Section $(SecUpgradeName) SecUpgrade
|
||||||
|
!ifdef FULL_NEEDS_UPGRADE
|
||||||
|
SectionIn 1 2
|
||||||
|
!else
|
||||||
|
!ifndef DEFAULT_UPGRADE
|
||||||
|
SectionIn 2
|
||||||
|
!else
|
||||||
|
SectionIn 1
|
||||||
|
!endif
|
||||||
|
!endif
|
||||||
|
|
||||||
|
AddSize ${UPGRADE_SIZE}
|
||||||
|
|
||||||
|
; $0 = download file name
|
||||||
|
; $1 = web site for download or mirror
|
||||||
|
; $2 = install directory
|
||||||
|
; $3 = use mirror
|
||||||
|
; $4 = archive type ("zip" or "tgz")
|
||||||
|
StrCpy $0 ${UPGRADE_PACKAGE_FILE}
|
||||||
|
StrCpy $1 ${UPGRADE_LOCATION}
|
||||||
|
StrCpy $2 "$INSTDIR${UPGRADE_ROOT}"
|
||||||
|
StrCpy $3 ${UPGRADE_USE_MIRROR}
|
||||||
|
StrCpy $4 ${UPGRADE_TYPE}
|
||||||
|
call DownloadAndExtract
|
||||||
|
Pop $0
|
||||||
|
StrCmp $0 success upgrade_ok upgrade_failure
|
||||||
|
upgrade_ok:
|
||||||
|
StrCpy $0 "upgrade"
|
||||||
|
goto upgrade_end
|
||||||
|
upgrade_failure:
|
||||||
|
StrCpy $0 ""
|
||||||
|
upgrade_end:
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section $(SecVUpgradeName) SecVUpgrade
|
||||||
|
!ifdef FULL_NEEDS_UPGRADE
|
||||||
|
SectionIn 1 2
|
||||||
|
!else
|
||||||
|
!ifndef DEFAULT_UPGRADE
|
||||||
|
SectionIn 2
|
||||||
|
!else
|
||||||
|
SectionIn 1
|
||||||
|
!endif
|
||||||
|
!endif
|
||||||
|
|
||||||
|
AddSize ${VUPGRADE_SIZE}
|
||||||
|
|
||||||
|
; $0 = download file name
|
||||||
|
; $1 = web site for download or mirror
|
||||||
|
; $2 = install directory
|
||||||
|
; $3 = use mirror
|
||||||
|
; $4 = archive type ("zip" or "tgz")
|
||||||
|
StrCpy $0 ${VUPGRADE_PACKAGE_FILE}
|
||||||
|
StrCpy $1 ${VUPGRADE_LOCATION}
|
||||||
|
StrCpy $2 "$INSTDIR${VUPGRADE_ROOT}"
|
||||||
|
StrCpy $3 ${VUPGRADE_USE_MIRROR}
|
||||||
|
StrCpy $4 ${VUPGRADE_TYPE}
|
||||||
|
call DownloadAndExtract
|
||||||
|
Pop $0
|
||||||
|
StrCmp $0 success vupgrade_ok vupgrade_failure
|
||||||
|
vupgrade_ok:
|
||||||
|
StrCpy $0 "vupgrade"
|
||||||
|
goto vupgrade_end
|
||||||
|
vupgrade_failure:
|
||||||
|
StrCpy $0 ""
|
||||||
|
vupgrade_end:
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
SubSectionEnd
|
||||||
|
|
||||||
SubSection $(SecSupportDLLName) SecSupportDLL
|
SubSection $(SecSupportDLLName) SecSupportDLL
|
||||||
|
|
||||||
Section $(SecSDLName) SecSDL
|
Section $(SecSDLName) SecSDL
|
||||||
@@ -239,7 +334,7 @@ SectionIn 2
|
|||||||
File "..\..\SDL_image.dll"
|
File "..\..\SDL_image.dll"
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section $(SecVoiceName) SecVoice
|
Section $(SecVoiceDLLName) SecVoiceDLL
|
||||||
!ifndef DEFAULT_UPGRADE
|
!ifndef DEFAULT_UPGRADE
|
||||||
SectionIn 1
|
SectionIn 1
|
||||||
!else
|
!else
|
||||||
@@ -256,6 +351,35 @@ SectionEnd
|
|||||||
|
|
||||||
SubSectionEnd
|
SubSectionEnd
|
||||||
|
|
||||||
|
Section $(SecMoveSaveName) SecMoveSave
|
||||||
|
SectionIn 1 2
|
||||||
|
IfFileExists "$INSTDIR\content\starcon2.0*" +2
|
||||||
|
return
|
||||||
|
ReadEnvStr $R0 "APPDATA"
|
||||||
|
StrCmp $R0 "" 0 MoveSave
|
||||||
|
ReadEnvStr $R0 "USERPROFILE"
|
||||||
|
StrCmp $R0 "" MoveSaveLastResort
|
||||||
|
StrCpy $R0 "$R0\Application Data"
|
||||||
|
IfFileExists "$R0\*.*" MoveSave
|
||||||
|
MoveSaveLastResort:
|
||||||
|
StrCpy $R0 "$INSTDIR\userdata"
|
||||||
|
IfFileExists "$R0\*.*" MoveSave
|
||||||
|
CreateDirectory $R0
|
||||||
|
MoveSave:
|
||||||
|
StrCpy $R0 "$R0\uqm\save"
|
||||||
|
IfFileExists "$R0\starcon2.0*" 0 MoveSaveContinue
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION $(MoveSaveAlreadyExists)
|
||||||
|
return
|
||||||
|
MoveSaveContinue:
|
||||||
|
CreateDirectory $R0
|
||||||
|
ClearErrors
|
||||||
|
CopyFiles /FILESONLY "$INSTDIR\content\starcon2.0*" "$R0\"
|
||||||
|
IfErrors +3
|
||||||
|
Delete "$INSTDIR\content\starcon2.0*"
|
||||||
|
return
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION $(MoveSaveBadCopy)
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
Section $(SecStartMenuName) SecStartMenu
|
Section $(SecStartMenuName) SecStartMenu
|
||||||
SectionIn 1 2
|
SectionIn 1 2
|
||||||
CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
|
CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}"
|
||||||
@@ -311,22 +435,20 @@ FunctionEnd
|
|||||||
Function DownloadOptions
|
Function DownloadOptions
|
||||||
Push $0
|
Push $0
|
||||||
Call CheckDownloadDialog
|
Call CheckDownloadDialog
|
||||||
IntCmp $0 1 +2
|
StrCmp $0 "" 0 +2
|
||||||
Return
|
Return
|
||||||
Pop $0
|
Push $0
|
||||||
!insertmacro MUI_HEADER_TEXT $(PageDownloadTitle) $(PageDownloadSubTitle)
|
!insertmacro MUI_HEADER_TEXT $(PageDownloadTitle) $(PageDownloadSubTitle)
|
||||||
|
|
||||||
|
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 1" text $(DownloadDialog1)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 1" text $(DownloadDialog1)
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 3" text $(DownloadDialog3)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 3" text $(DownloadDialog3)
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 4" text $(DownloadDialog4)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 4" text $(DownloadDialog4)
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 5" text $(DownloadDialog5)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 5" text $(DownloadDialog5)
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 6" text $(DownloadDialog6)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 6" text $(DownloadDialog6)
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 8" text $(DownloadDialog8)
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 8" text $(DownloadDialog8)
|
||||||
|
Pop $R1
|
||||||
StrCpy $R1 ""
|
|
||||||
StrCpy $R1 $(SecContentName)
|
|
||||||
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 2" text $R1
|
!insertmacro MUI_INSTALLOPTIONS_WRITE "download.ini" "Field 2" text $R1
|
||||||
|
Pop $0
|
||||||
|
|
||||||
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "download.ini"
|
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "download.ini"
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
@@ -336,7 +458,7 @@ Function SetDirectoryDialog
|
|||||||
|
|
||||||
Push $0
|
Push $0
|
||||||
Call CheckDownloadDialog
|
Call CheckDownloadDialog
|
||||||
IntCmp $0 0 buttoninst
|
StrCmp $0 "" buttoninst
|
||||||
StrCpy $R0 $(DownloadDialogNext2)
|
StrCpy $R0 $(DownloadDialogNext2)
|
||||||
goto buttondone
|
goto buttondone
|
||||||
buttoninst:
|
buttoninst:
|
||||||
@@ -349,22 +471,56 @@ FunctionEnd
|
|||||||
|
|
||||||
Function CheckDownloadDialog
|
Function CheckDownloadDialog
|
||||||
Push $R0
|
Push $R0
|
||||||
|
Push $R1
|
||||||
|
Push $2
|
||||||
|
StrCpy $2 ""
|
||||||
|
StrCpy $R1 ", "
|
||||||
SectionGetFlags ${SecContent} $R0
|
SectionGetFlags ${SecContent} $R0
|
||||||
Intop $R0 $R0 & "0x1"
|
Intop $R0 $R0 & "0x1"
|
||||||
|
IntCmp $R0 0 dlchk_voice
|
||||||
|
StrCpy $R0 $(SecContentName)
|
||||||
|
StrCpy $2 $R0
|
||||||
|
dlchk_voice:
|
||||||
|
SectionGetFlags ${SecVoice} $R0
|
||||||
|
Intop $R0 $R0 & "0x1"
|
||||||
|
IntCmp $R0 0 dlchk_3domusic
|
||||||
|
StrLen $R0 $2
|
||||||
|
IntCmp $R0 0 +2
|
||||||
|
StrCpy $2 $2$R1
|
||||||
|
StrCpy $R0 $(SecVoiceName)
|
||||||
|
StrCpy $2 $2$R0
|
||||||
|
dlchk_3domusic:
|
||||||
|
SectionGetFlags ${Sec3doMusic} $R0
|
||||||
|
Intop $R0 $R0 & "0x1"
|
||||||
IntCmp $R0 0 dlchk_upg
|
IntCmp $R0 0 dlchk_upg
|
||||||
Pop $R0
|
StrLen $R0 $2
|
||||||
StrCpy $0 1
|
IntCmp $R0 0 +2
|
||||||
Return
|
StrCpy $2 $2$R1
|
||||||
|
StrCpy $R0 $(Sec3doMusicName)
|
||||||
|
StrCpy $2 $2$R0
|
||||||
dlchk_upg:
|
dlchk_upg:
|
||||||
SectionGetFlags ${SecUpgrade} $R0
|
SectionGetFlags ${SecUpgrade} $R0
|
||||||
Intop $R0 $R0 & "0x1"
|
Intop $R0 $R0 & "0x1"
|
||||||
|
IntCmp $R0 0 dlchk_vupg
|
||||||
|
StrLen $R0 $2
|
||||||
|
IntCmp $R0 0 +2
|
||||||
|
StrCpy $2 $2$R1
|
||||||
|
StrCpy $R0 $(SecUpgradeName)
|
||||||
|
StrCpy $2 $2$R0
|
||||||
|
dlchk_vupg:
|
||||||
|
SectionGetFlags ${SecVUpgrade} $R0
|
||||||
|
Intop $R0 $R0 & "0x1"
|
||||||
IntCmp $R0 0 dlchk_end
|
IntCmp $R0 0 dlchk_end
|
||||||
Pop $R0
|
StrLen $R0 $2
|
||||||
StrCpy $0 1
|
IntCmp $R0 0 +2
|
||||||
Return
|
StrCpy $2 $2$R1
|
||||||
|
StrCpy $R0 $(SecVUpgradeName)
|
||||||
|
StrCpy $2 $2$R0
|
||||||
dlchk_end:
|
dlchk_end:
|
||||||
|
StrCpy $0 $2
|
||||||
|
Pop $2
|
||||||
|
Pop $R1
|
||||||
Pop $R0
|
Pop $R0
|
||||||
StrCpy $0 0
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
@@ -376,10 +532,14 @@ FunctionEnd
|
|||||||
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
|
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecUQM} $(SecUQMDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecUQM} $(SecUQMDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecUpgrade} $(SecUpgradeDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecUpgrade} $(SecUpgradeDesc)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecVUpgrade} $(SecVUpgradeDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecContent} $(SecContentDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecContent} $(SecContentDesc)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecVoice} $(SecVoiceDesc)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${Sec3doMusic} $(Sec3doMusicDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSupportDLL} $(SecSupportDLLDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecSupportDLL} $(SecSupportDLLDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecSDL} $(SecSDLDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecSDL} $(SecSDLDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecVoice} $(SecVoiceDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecVoiceDLL} $(SecVoiceDLLDesc)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecMoveSave} $(SecMoveSaveDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(SecStartMenuDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartMenu} $(SecStartMenuDesc)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(SecDesktopIconDesc)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktopIcon} $(SecDesktopIconDesc)
|
||||||
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
|
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
|
||||||
@@ -414,7 +574,9 @@ Section "Uninstall"
|
|||||||
Delete "$INSTDIR\ogg.dll"
|
Delete "$INSTDIR\ogg.dll"
|
||||||
|
|
||||||
; Remove content dir
|
; Remove content dir
|
||||||
!include "content.nsh"
|
!verbose 3
|
||||||
|
!insertmacro REMOVE_CONTENT
|
||||||
|
!verbose 4
|
||||||
|
|
||||||
; MUST REMOVE UNINSTALLER, too
|
; MUST REMOVE UNINSTALLER, too
|
||||||
Delete $INSTDIR\uninstall.exe
|
Delete $INSTDIR\uninstall.exe
|
||||||
@@ -447,4 +609,3 @@ SectionEnd
|
|||||||
;Written by Joost Verburg
|
;Written by Joost Verburg
|
||||||
;and FileZilla installation
|
;and FileZilla installation
|
||||||
;written by Tim Kosse (mailto:tim.kosse@gmx.de)
|
;written by Tim Kosse (mailto:tim.kosse@gmx.de)
|
||||||
|
|
||||||
|
|||||||
@@ -13,25 +13,34 @@ LicenseData /LANG=${LANG_ENGLISH} "..\..\COPYING"
|
|||||||
LangString InstTypeFullName ${LANG_ENGLISH} "Full"
|
LangString InstTypeFullName ${LANG_ENGLISH} "Full"
|
||||||
LangString InstTypeUpgradeName ${LANG_ENGLISH} "Upgrade"
|
LangString InstTypeUpgradeName ${LANG_ENGLISH} "Upgrade"
|
||||||
LangString SecUQMName ${LANG_ENGLISH} "Ur-Quan Masters (required)"
|
LangString SecUQMName ${LANG_ENGLISH} "Ur-Quan Masters (required)"
|
||||||
LangString SecUpgradeName ${LANG_ENGLISH} "Upgrade Data from ${OLD_VERSION}"
|
LangString SecContentName ${LANG_ENGLISH} "Install data files"
|
||||||
LangString SecContentName ${LANG_ENGLISH} "Install All data"
|
LangString SecVoiceName ${LANG_ENGLISH} "Install voice files"
|
||||||
|
LangString Sec3doMusicName ${LANG_ENGLISH} "Install 3DO Music"
|
||||||
|
LangString SubSecUpgradeName ${LANG_ENGLISH} "Upgrade from ${OLD_VERSION}"
|
||||||
|
LangString SecUpgradeName ${LANG_ENGLISH} "Upgrade data files"
|
||||||
|
LangString SecVUpgradeName ${LANG_ENGLISH} "Upgrade voice files"
|
||||||
LangString SecSupportDLLName ${LANG_ENGLISH} "Graphics/Sound libs"
|
LangString SecSupportDLLName ${LANG_ENGLISH} "Graphics/Sound libs"
|
||||||
LangString SecSDLName ${LANG_ENGLISH} "SDL"
|
LangString SecSDLName ${LANG_ENGLISH} "SDL"
|
||||||
LangString SecVoiceName ${LANG_ENGLISH} "Voice"
|
LangString SecVoiceDLLName ${LANG_ENGLISH} "Voice"
|
||||||
|
LangString SecMoveSaveName ${LANG_ENGLISH} "Move Save Games"
|
||||||
LangString SecStartMenuName ${LANG_ENGLISH} "Start Menu Shortcuts"
|
LangString SecStartMenuName ${LANG_ENGLISH} "Start Menu Shortcuts"
|
||||||
LangString SecDesktopIconName ${LANG_ENGLISH} "Desktop Icon"
|
LangString SecDesktopIconName ${LANG_ENGLISH} "Desktop Icon"
|
||||||
|
|
||||||
LangString SecUQMDesc ${LANG_ENGLISH} "Install uqm.exe and other required files"
|
LangString SecUQMDesc ${LANG_ENGLISH} "Install uqm.exe and other required files"
|
||||||
LangString SecUpgradeDesc ${LANG_ENGLISH} "Download the upgrade uqm from a previous ${OLD_VERSION} (or later) install. NOTE: aborting an upgrade can leave your uqm install corrupted"
|
LangString SecUpgradeDesc ${LANG_ENGLISH} "Download the upgrade data-files from a previous ${OLD_VERSION} (or later) install."
|
||||||
|
LangString SecVUpgradeDesc ${LANG_ENGLISH} "Download the upgrade voices from a previous ${OLD_VERSION} (or later) install."
|
||||||
LangString SecContentDesc ${LANG_ENGLISH} "Download all data files needed to play uqm."
|
LangString SecContentDesc ${LANG_ENGLISH} "Download all data files needed to play uqm."
|
||||||
|
LangString SecVoiceDesc ${LANG_ENGLISH} "Download all voice files needed to play uqm."
|
||||||
|
LangString Sec3doMusicDesc ${LANG_ENGLISH} "Download optional music from the 3do version."
|
||||||
LangString SecSupportDLLDesc ${LANG_ENGLISH} "Install Support .dll files needed to play Ur-Quan Masters"
|
LangString SecSupportDLLDesc ${LANG_ENGLISH} "Install Support .dll files needed to play Ur-Quan Masters"
|
||||||
LangString SecSDLDesc ${LANG_ENGLISH} "Install SDL and SDL_image libraries for graphics and sound support"
|
LangString SecSDLDesc ${LANG_ENGLISH} "Install SDL and SDL_image libraries for graphics and sound support"
|
||||||
LangString SecVoiceDesc ${LANG_ENGLISH} "Install OggVorbis libraries for playing voice"
|
LangString SecVoiceDLLDesc ${LANG_ENGLISH} "Install OggVorbis libraries for playing voice"
|
||||||
|
LangString SecMoveSaveDesc ${LANG_ENGLISH} "Move SavedGames from ${OLD_VERSION} location to new location"
|
||||||
LangString SecStartMenuDesc ${LANG_ENGLISH} "Create shortcuts in the start menu"
|
LangString SecStartMenuDesc ${LANG_ENGLISH} "Create shortcuts in the start menu"
|
||||||
LangString SecDesktopIconDesc ${LANG_ENGLISH} "Add a desktop icon for quick access to UrQuan Masters"
|
LangString SecDesktopIconDesc ${LANG_ENGLISH} "Add a desktop icon for quick access to UrQuan Masters"
|
||||||
|
|
||||||
;Page titles
|
;Page titles
|
||||||
LangString PageDownloadTitle ${LANG_ENGLISH} ": Download options"
|
LangString PageDownloadTitle ${LANG_ENGLISH} "Download options"
|
||||||
LangString PageDownloadSubTitle ${LANG_ENGLISH} "Some components have to be downloaded"
|
LangString PageDownloadSubTitle ${LANG_ENGLISH} "Some components have to be downloaded"
|
||||||
|
|
||||||
;Download dialog
|
;Download dialog
|
||||||
@@ -59,6 +68,10 @@ LangString DownloadExtractFailedBox ${LANG_ENGLISH} "Failed to extract contents
|
|||||||
; Mirror problems
|
; Mirror problems
|
||||||
LangString DownloadMirrorBroken ${LANG_ENGLISH} "Failed to parse mirror file"
|
LangString DownloadMirrorBroken ${LANG_ENGLISH} "Failed to parse mirror file"
|
||||||
LangString DownloadMirrorBrokenDlg ${LANG_ENGLISH} "There were problems reading the mirror file. We wil not be able to install downloaded content. You can retrieve the files directly from http://sc2.sourceforge.net"
|
LangString DownloadMirrorBrokenDlg ${LANG_ENGLISH} "There were problems reading the mirror file. We wil not be able to install downloaded content. You can retrieve the files directly from http://sc2.sourceforge.net"
|
||||||
|
;Move Saved Games
|
||||||
|
LangString MoveSaveAlreadyExists ${LANG_ENGLISH} "Saved games already exist in $R0. We will not overwrite them!"
|
||||||
|
LangString MoveSaveBadCopy ${LANG_ENGLISH} "Error while copying saved games to $R0!"
|
||||||
|
|
||||||
;Uninstaller
|
;Uninstaller
|
||||||
LangString un.QuestionDeleteRegistry ${LANG_ENGLISH} "Delete all Registry keys created by Ur-Quan Masters?"
|
LangString un.QuestionDeleteRegistry ${LANG_ENGLISH} "Delete all Registry keys created by Ur-Quan Masters?"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user