aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2011-05-05 12:58:42 -0400
committerLittleboy2011-05-05 12:58:42 -0400
commit548e43c57f146b6009143f17104439f19f0324a6 (patch)
treee03a7eb66fd8fe968276114419d4c4bd7c0a5a5c
parentc160dbc8d2f29ba5070ec0e27fbb858bcf2a1218 (diff)
downloadscummvm-rg350-548e43c57f146b6009143f17104439f19f0324a6.tar.gz
scummvm-rg350-548e43c57f146b6009143f17104439f19f0324a6.tar.bz2
scummvm-rg350-548e43c57f146b6009143f17104439f19f0324a6.zip
DISTS: Test for parameters in NSIS script and throw errors when not passed to command line
-rw-r--r--dists/nsis/scummvm.nsi17
-rw-r--r--dists/nsis/scummvm.nsi.in17
2 files changed, 32 insertions, 2 deletions
diff --git a/dists/nsis/scummvm.nsi b/dists/nsis/scummvm.nsi
index 03bd98ab66..aeabcca039 100644
--- a/dists/nsis/scummvm.nsi
+++ b/dists/nsis/scummvm.nsi
@@ -33,8 +33,23 @@ Name ScummVM
#!define build_dir ""
#!define text_dir ""
#!define ARCH "" ;(optional, defaults to win32)
+
+# Check parameters
+!ifndef top_srcdir
+ !error "Top source folder has not been passed to command line!"
+!endif
+
+!ifndef build_dir
+ !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
+!endif
+
+!ifndef text_dir
+ !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!endif
+
!ifndef ARCH
-!define ARCH "win32"
+ !warning "ARCH has not been defined, defaulting to 'win32'"
+ !define ARCH "win32"
!endif
#########################################################################################
diff --git a/dists/nsis/scummvm.nsi.in b/dists/nsis/scummvm.nsi.in
index 457e82972b..766a20633f 100644
--- a/dists/nsis/scummvm.nsi.in
+++ b/dists/nsis/scummvm.nsi.in
@@ -33,8 +33,23 @@ Name ScummVM
#!define build_dir ""
#!define text_dir ""
#!define ARCH "" ;(optional, defaults to win32)
+
+# Check parameters
+!ifndef top_srcdir
+ !error "Top source folder has not been passed to command line!"
+!endif
+
+!ifndef build_dir
+ !error "Build folder has not been passed to command line (this folder should contain the executable and linked DLLs)!"
+!endif
+
+!ifndef text_dir
+ !error "Text folder has not been passed to command line (this folder should contain all the text files used by the installer)!"
+!endif
+
!ifndef ARCH
-!define ARCH "win32"
+ !warning "ARCH has not been defined, defaulting to 'win32'"
+ !define ARCH "win32"
!endif
#########################################################################################