extract before install to work around a installer bug

This commit is contained in:
Mario Fetka
2013-05-06 19:05:48 +02:00
parent fb707c3eab
commit cca00db569
2 changed files with 30 additions and 4 deletions

View File

@@ -22,6 +22,8 @@ DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $RealInstall32Msi$
DefVar $RealInstall64Msi$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
@@ -52,6 +54,10 @@ Set $InstallDir64$ = "%ProgramFiles64Dir%\JPSoft"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $RealInstall32Msi$ = $LogDir$ + "\" + $Extract32Dir$ + "\" + $Install32Msi$
Set $RealInstall64Msi$ = $LogDir$ + "\" + $Extract64Dir$ + "\" + $Install64Msi$
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
@@ -71,6 +77,8 @@ else
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_extract_32
Sub_check_exitcode
Winbatch_install_32
Sub_check_exitcode
comment "Copy files"
@@ -85,6 +93,8 @@ else
Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_extract_64
Sub_check_exitcode
Winbatch_install_64
Sub_check_exitcode
comment "Copy files"
@@ -97,9 +107,11 @@ else
endif
[Winbatch_extract_32]
"$Install32Exe$" /extract:"$LogDir$"
[Winbatch_install_32]
; 2 spaces between /qb and /l otherwise the extractor failes
"$Install32Exe$" /qb /l* "$LogDir$\$ProductId$.install_log.txt" ALLUSERS=1 REBOOT=ReallySuppress
msiexec /i "$RealInstall32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb ALLUSERS=1 REBOOT=ReallySuppress
[Files_install_32]
; copy the ini file to the InstallDir
@@ -109,9 +121,11 @@ copy "$IniCfgFile$" "$InstallDir32$"
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
[Winbatch_extract_64]
"$Install64Exe$" /extract:"$LogDir$"
[Winbatch_install_64]
; 2 spaces between /qb and /l otherwise the extractor failes
"$Install64Exe$" /qb /l* "$LogDir$\$ProductId$.install_log.txt" ALLUSERS=1 REBOOT=ReallySuppress
msiexec /i "$RealInstall64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb ALLUSERS=1 REBOOT=ReallySuppress
[Files_install_64]
; copy the ini file to the InstallDir