Skip to content

Commit

Permalink
Use environment variable to resolve Visual C++ Redistributable
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGregory084 committed Jan 25, 2021
1 parent a82f029 commit c8f4a18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ test_script:
- cmd: cd %APPVEYOR_BUILD_FOLDER%\physfs_rts
- cmd: cargo test

# SFS repacker
#
- cmd: cd %APPVEYOR_BUILD_FOLDER%\repacker
- cmd: cargo test

# Java PhysFS library
#
- cmd: cd %APPVEYOR_BUILD_FOLDER%
Expand Down
8 changes: 7 additions & 1 deletion installer/openil2-debug.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#define MyAppName "OpenIL2 (Debug Build)"
#define MyAppVersion GetEnv('RELEASE_VERSION')
#define MyAppExeName "openil2.exe"
#define VisualCppDir GetEnv('VCINSTALLDIR')
#if GetEnv('VCINSTALLDIR') != ""
#define VisualCppDir GetEnv('VCINSTALLDIR')
#else
#define VisualCppDir "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\"
#endif

[Setup]
AppId={{0C8CF246-19D7-4DDD-8836-9242E2EBDBA2}
Expand Down Expand Up @@ -47,7 +53,7 @@ Source: "..\jre_debug\*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdir
Source: "..\sfs_db.sqlite"; DestDir: "{app}"; Flags: ignoreversion
; fb_3do10.SFS - No identified entries as yet so we need to provide a dummy .zip with at least one entry
Source: "fb_3do10p.zip"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
Source: "{#VisualCppDir}Redist\MSVC\v142\vcredist_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall

[Run]
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ 2019 Redistributable"
Expand Down
7 changes: 6 additions & 1 deletion installer/openil2.iss
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#define MyAppName "OpenIL2"
#define MyAppVersion GetEnv('RELEASE_VERSION')
#define MyAppExeName "openil2.exe"
#if GetEnv('VCINSTALLDIR') != ""
#define VisualCppDir GetEnv('VCINSTALLDIR')
#else
#define VisualCppDir "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\"
#endif

[Setup]
AppId={{39EF55F9-0664-43CC-A3A2-7780264F1184}
Expand Down Expand Up @@ -47,7 +52,7 @@ Source: "..\jre\*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
Source: "..\sfs_db.sqlite"; DestDir: "{app}"; Flags: ignoreversion
; fb_3do10.SFS - No identified entries as yet so we need to provide a dummy .zip with at least one entry
Source: "fb_3do10p.zip"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Redist\MSVC\v142\vcredist_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall
Source: "{#VisualCppDir}Redist\MSVC\v142\vcredist_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall

[Run]
Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/install /quiet /norestart"; StatusMsg: "Installing Visual C++ 2019 Redistributable"
Expand Down

0 comments on commit c8f4a18

Please sign in to comment.