first round of update (getting the msi id is complicated)

This commit is contained in:
Mario Fetka
2013-03-14 17:10:58 +01:00
parent 9025fb13fb
commit db9eb4d1b0
11 changed files with 105 additions and 116 deletions

View File

@@ -1,18 +1,14 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; credits: http://www.opsi.org/en/credits/
[Actions]
requiredWinstVersion >= "4.10.8.6"
requiredWinstVersion >= "4.11.2.6"
; DefVar $MsiId32$
DefVar $MsiIdOld32$
DefVar $UninstallProgram32$
DefVar $IniFile32$
; DefVar $MsiId64$
DefVar $MsiIdOld64$
DefVar $UninstallProgram64$
DefVar $IniFile64$
DefVar $IniCfgFile$
DefVar $LogDir$
@@ -26,11 +22,13 @@ DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
@@ -49,23 +47,23 @@ Set $LogDir$ = "%SystemDrive%\tmp"
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "nitro.pdfpro"
Set $MinimumSpace$ = "200 MB"
Set $MinimumSpace$ = "1 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\Nitro PDF\Reader 2"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Nitro PDF\Reader 2"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $LicenseRequired$ = "true"
Set $InstallDir32$ = "%ProgramFiles32Dir%\<path to the product>"
Set $InstallDir64$ = "%ProgramFiles64Dir%\<path to the product>"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
if FileExists("%ScriptPath%\delsub3264.ins")
comment "Start uninstall sub section"
@@ -80,11 +78,11 @@ else
comment "installing"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Installing " + $ProductId$ + " 32 Bit..."
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 32 Bit..."
comment "Extract the setup programm"
Winbatch_extract_32
Sub_check_exitcode
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_32
Sub_check_exitcode
comment "Copy files"
@@ -96,11 +94,11 @@ else
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Installing " + $ProductId$ + " 64 Bit..."
Message "Installing " + $ProductId$ + " " + $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " 64 Bit..."
comment "Extract the setup programm"
Winbatch_extract_64
Sub_check_exitcode
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_64
Sub_check_exitcode
comment "Copy files"
@@ -117,9 +115,10 @@ endif
"$Install32Exe$" /EXTRACTMSI:$LogDir$\nitropro-32.msi
[Winbatch_install_32]
msiexec /i "$LogDir$\nitropro-32.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
msiexec /i "$LogDir$\nitropro-32.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
; Example of recursively copying some files into the installation directory:
@@ -130,9 +129,10 @@ copy "$IniCfgFile$" "$InstallDir32$"
"$Install64Exe$" /EXTRACTMSI:$LogDir$\nitropro-64.msi
[Winbatch_install_64]
msiexec /i "$LogDir$\nitropro-64.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
msiexec /i "$LogDir$\nitropro-64.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 NPSERIAL=$LicenseKey$ REBOOT=ReallySuppress
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"
; Example of recursively copying some files into the installation directory: