From cca00db569963d0e4c16e335232cf969caad1c11 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Mon, 6 May 2013 19:05:48 +0200 Subject: [PATCH] extract before install to work around a installer bug --- CLIENT_DATA/setup3264.ins | 22 ++++++++++++++++++---- builder-product.cfg | 12 ++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/CLIENT_DATA/setup3264.ins b/CLIENT_DATA/setup3264.ins index 44a5ebd..56c908a 100644 --- a/CLIENT_DATA/setup3264.ins +++ b/CLIENT_DATA/setup3264.ins @@ -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 diff --git a/builder-product.cfg b/builder-product.cfg index b6d39ca..731dae8 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -31,6 +31,18 @@ DL_WINST_NAME[2]=Install64Exe # File array index for the image showing while installing the program ICON_DL_INDEX=0 +WINST_NAME[0]="Install32Msi" +WINST_VALUE[0]="tccle.msi" + +WINST_NAME[1]="Extract32Dir" +WINST_VALUE[1]="3C97621" + +WINST_NAME[2]="Install64Msi" +WINST_VALUE[2]="tcclex64.msi" + +WINST_NAME[3]="Extract64Dir" +WINST_VALUE[3]="6BA2265" + OPSI_INI_SECTION[0]="X86" OPSI_INI_OPTION[0]="MsiId32" OPSI_INI_VALUE[0]="{CF67BC8F-42C3-40E7-A2E1-DD87A3C97621}"