aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLittleboy2011-05-05 13:11:57 -0400
committerLittleboy2011-05-05 13:11:57 -0400
commitca9ed0a9798b1d44541a73950a01f1f5b4e3b442 (patch)
treea9b34b2a69072f9b9646ba86501b2d36d68045e6
parent548e43c57f146b6009143f17104439f19f0324a6 (diff)
downloadscummvm-rg350-ca9ed0a9798b1d44541a73950a01f1f5b4e3b442.tar.gz
scummvm-rg350-ca9ed0a9798b1d44541a73950a01f1f5b4e3b442.tar.bz2
scummvm-rg350-ca9ed0a9798b1d44541a73950a01f1f5b4e3b442.zip
CREATE_PROJECT: Pass architecture to nsis setup in post-build step
-rw-r--r--devtools/create_project/scripts/installer.vbs16
-rw-r--r--devtools/create_project/scripts/postbuild.cmd2
2 files changed, 15 insertions, 3 deletions
diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs
index 716fa279a9..6bcd794bef 100644
--- a/devtools/create_project/scripts/installer.vbs
+++ b/devtools/create_project/scripts/installer.vbs
@@ -43,6 +43,7 @@ Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
' Folders
Dim rootFolder : rootFolder = ""
Dim targetFolder : targetFolder = ""
+Dim arch : arch = ""
' Parse our command line arguments
If ParseCommandLine() Then
@@ -59,11 +60,21 @@ Sub CreateInstaller()
Exit Sub
End If
+ ' Preprocess architecture
+ Select Case arch
+ Case "x86"
+ arch = "win32"
+
+ Case "x64"
+ arch = "win64"
+ End Select
+
' Build command line
Dim commandLine : commandLine = """" & nsisPath & "\makensis.exe"" /V2" & _
" /Dtop_srcdir=""" & rootFolder & """" & _
" /Dbuild_dir=""" & targetFolder & """" & _
" /Dtext_dir=""" & targetFolder & """" & _
+ " /DARCH=""" & arch & """" & _
" """ & rootFolder & "\dists\nsis\scummvm.nsi"""
Dim oExec: Set oExec = WshShell.Exec(commandline)
@@ -115,8 +126,8 @@ End Function
Function ParseCommandLine()
ParseCommandLine = True
- If Wscript.Arguments.Count <> 2 Then
- Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 2)"
+ If Wscript.Arguments.Count <> 3 Then
+ Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 3)"
ParseCommandLine = False
Exit Function
@@ -125,6 +136,7 @@ Function ParseCommandLine()
' Get our arguments
rootFolder = Wscript.Arguments.Item(0)
targetFolder = Wscript.Arguments.Item(1)
+ arch = Wscript.Arguments.Item(2)
' Check that the folders are valid
If Not FSO.FolderExists(rootFolder) Then
diff --git a/devtools/create_project/scripts/postbuild.cmd b/devtools/create_project/scripts/postbuild.cmd
index da61afcc3c..e78861463a 100644
--- a/devtools/create_project/scripts/postbuild.cmd
+++ b/devtools/create_project/scripts/postbuild.cmd
@@ -45,7 +45,7 @@ if "%~5"=="0" goto done
echo Running installer script
echo.
-@call cscript "%~1/devtools/create_project/scripts/installer.vbs" %~1 %~2 1>NUL
+@call cscript "%~1/devtools/create_project/scripts/installer.vbs" %~1 %~2 %~3 1>NUL
if not %errorlevel% == 0 goto error_script
goto done