aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSupSuper2018-12-19 20:15:11 +0000
committerFilippos Karapetis2018-12-23 18:39:06 +0200
commit3091345af36b879bb1f34fc3862fa596cf92d57d (patch)
tree53104172ed0952a9c2378a593c5080962e2ad2a0
parentb66711da04a2c89b012286552a2d64bbcbb1692d (diff)
downloadscummvm-rg350-3091345af36b879bb1f34fc3862fa596cf92d57d.tar.gz
scummvm-rg350-3091345af36b879bb1f34fc3862fa596cf92d57d.tar.bz2
scummvm-rg350-3091345af36b879bb1f34fc3862fa596cf92d57d.zip
MSVC: Update post-build installer for Inno Setup
-rw-r--r--devtools/create_project/create_project.cpp2
-rw-r--r--devtools/create_project/create_project.h2
-rw-r--r--devtools/create_project/msvc.h2
-rw-r--r--devtools/create_project/scripts/installer.vbs61
4 files changed, 27 insertions, 40 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index dd7eeba895..b415882758 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -710,7 +710,7 @@ void displayHelp(const char *exe) {
" The default is \"12\", thus \"Visual Studio 2013\"\n"
" --build-events Run custom build events as part of the build\n"
" (default: false)\n"
- " --installer Create NSIS installer after the build (implies --build-events)\n"
+ " --installer Create installer after the build (implies --build-events)\n"
" (default: false)\n"
" --tools Create project files for the devtools\n"
" (ignores --build-events and --installer, as well as engine settings)\n"
diff --git a/devtools/create_project/create_project.h b/devtools/create_project/create_project.h
index af4de291e4..932950c555 100644
--- a/devtools/create_project/create_project.h
+++ b/devtools/create_project/create_project.h
@@ -245,7 +245,7 @@ struct BuildSetup {
bool devTools; ///< Generate project files for the tools
bool tests; ///< Generate project files for the tests
bool runBuildEvents; ///< Run build events as part of the build (generate revision number and copy engine/theme data & needed files to the build folder
- bool createInstaller; ///< Create NSIS installer after the build
+ bool createInstaller; ///< Create installer after the build
bool useSDL2; ///< Whether to use SDL2 or not.
BuildSetup() {
diff --git a/devtools/create_project/msvc.h b/devtools/create_project/msvc.h
index 178ba8e216..b25d030483 100644
--- a/devtools/create_project/msvc.h
+++ b/devtools/create_project/msvc.h
@@ -105,7 +105,7 @@ protected:
* Get the command line for copying data files to the build directory.
*
* @param isWin32 Bitness of property file.
- * @param createInstaller true to NSIS create installer
+ * @param createInstaller true to create installer
*
* @return The post build event.
*/
diff --git a/devtools/create_project/scripts/installer.vbs b/devtools/create_project/scripts/installer.vbs
index 19b4eee49b..6fe781358e 100644
--- a/devtools/create_project/scripts/installer.vbs
+++ b/devtools/create_project/scripts/installer.vbs
@@ -21,14 +21,14 @@
'
'/
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-' This script calls the makensis tool to generate a NSIS Windows installer for ScummVM
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+' This script calls the iscc tool to generate a Inno Setup Windows installer for ScummVM
'
-' It tries to read the NSIS installation folder from the registry and then calls the
+' It tries to read the Inno Setup installation folder from the registry and then calls the
' command line script compiler to create the installer.
'
' This is called from the postbuild.cmd batch file
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'================================================================
' TODO: Reduce duplication with revision.vbs script
@@ -43,7 +43,6 @@ 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
@@ -54,31 +53,20 @@ End If
'// Installer creation
'////////////////////////////////////////////////////////////////
Sub CreateInstaller()
- ' Get nsis installation folder
- Dim nsisPath : nsisPath = GetNSISPath()
- If (nsisPath = "") Then
+ ' Get inno installation folder
+ Dim innoPath : innoPath = GetInnoPath()
+ If (innoPath = "") Then
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 & """" & _
- " /Dstaging_dir=""" & targetFolder & """" & _
- " /DARCH=""" & arch & """" & _
- " """ & rootFolder & "\dists\win32\scummvm.nsi"""
+ Dim commandLine : commandLine = """" & innoPath & "\iscc.exe"" /Qp" & _
+ " /O""" & targetFolder & """" & _
+ " """ & rootFolder & "\dists\win32\scummvm.iss"""
Dim oExec: Set oExec = WshShell.Exec(commandline)
If Err.Number <> 0 Then
- Wscript.StdErr.WriteLine "Error running makensis.exe!"
+ Wscript.StdErr.WriteLine "Error running iscc.exe!"
Exit Sub
End If
@@ -98,25 +86,25 @@ Sub CreateInstaller()
End If
End Sub
-Function GetNSISPath()
- ' Get the directory where NSIS (should) reside(s)
- Dim sNSIS
+Function GetInnoPath()
+ ' Get the directory where Inno Setup (should) reside(s)
+ Dim sInno
' First, try with 32-bit architecture
- sNSIS = ReadRegistryKey("HKLM", "SOFTWARE\NSIS", "", 32)
+ sInno = ReadRegistryKey("HKLM", "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1", "InstallLocation", 32)
- If sNSIS = "" Or IsNull(sNSIS) Then
- ' No 32-bit version of TortoiseSVN installed, try 64-bit version (doesn't hurt on 32-bit machines, it returns nothing or is ignored)
- sNSIS = ReadRegistryKey("HKLM", "SOFTWARE\NSIS", "", 64)
+ If sInno = "" Or IsNull(sInno) Then
+ ' No 32-bit version of Inno Setup installed, try 64-bit version (doesn't hurt on 32-bit machines, it returns nothing or is ignored)
+ sInno = ReadRegistryKey("HKLM", "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1", "InstallLocation", 64)
End If
- ' Check if Tortoise is present
- If sNSIS = "" Then
- Wscript.StdErr.WriteLine "NSIS not installed!"
+ ' Check if Inno Setup is present
+ If sInno = "" Then
+ Wscript.StdErr.WriteLine "Inno Setup not installed!"
Exit Function
End If
- GetNSISPath = sNSIS
+ GetInnoPath = sInno
End Function
'////////////////////////////////////////////////////////////////
@@ -125,8 +113,8 @@ End Function
Function ParseCommandLine()
ParseCommandLine = True
- If Wscript.Arguments.Count <> 3 Then
- Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 3)"
+ If Wscript.Arguments.Count <> 2 Then
+ Wscript.StdErr.WriteLine "[Error] Invalid number of arguments (was: " & Wscript.Arguments.Count & ", expected: 2)"
ParseCommandLine = False
Exit Function
@@ -135,7 +123,6 @@ 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