move to new build iand install system
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
; credits: http://www.opsi.org/credits/
|
||||
|
||||
|
||||
Set $MsiId$ = '{1E38D402-2678-4668-9812-45CD06658846}'
|
||||
; Set $MsiIdHelp$ = '{BC8B55D1-5B97-4882-9345-0D16FB25A76A}'
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\iv_uninstall.exe"
|
||||
Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
|
||||
Set $MsiIdHelp$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
|
||||
Set $UninstallProgram$ = $InstallDir$ + "\uninstall.exe"
|
||||
|
||||
Message "Uninstalling " + $ProductId$ + " ..."
|
||||
|
||||
@@ -20,6 +20,11 @@ if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
|
||||
Winbatch_uninstall_msi
|
||||
sub_check_exitcode
|
||||
endif
|
||||
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdHelp$ + "] DisplayName") = "")
|
||||
comment "MSI id " + $MsiIdHelp$ + " found in registry, starting msiexec to uninstall"
|
||||
Winbatch_uninstall_msi_help
|
||||
sub_check_exitcode
|
||||
endif
|
||||
|
||||
comment "Delete files"
|
||||
Files_uninstall /32Bit
|
||||
@@ -33,13 +38,19 @@ LinkFolder_uninstall
|
||||
[Winbatch_uninstall]
|
||||
; Choose one of the following examples as basis for program uninstall
|
||||
;
|
||||
"$UninstallProgram$" /silent
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "$UninstallProgram$" /S
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; "$UninstallProgram$" /silent /norestart /SUPPRESSMSGBOXES
|
||||
|
||||
|
||||
[Winbatch_uninstall_msi]
|
||||
msiexec /x {B645E138-3386-442F-B8A3-5237D82E7365} /qb! REBOOT=ReallySuppress
|
||||
msiexec /x {BC8B55D1-5B97-4882-9345-0D16FB25A76A} /qb! REBOOT=ReallySuppress
|
||||
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Winbatch_uninstall_msi_help]
|
||||
msiexec /x $MsiIdHelp$ /qb! REBOOT=ReallySuppress
|
||||
|
||||
[Files_uninstall]
|
||||
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
|
||||
;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdHelp$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ProductId$
|
||||
@@ -19,6 +20,16 @@ DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||
; and adds the following variables:
|
||||
; from builder-product.cfg : all variables definded by attribute WINST[index]
|
||||
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
|
||||
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
|
||||
; auto generated winst-variables
|
||||
; $IconFile$: path to product picture
|
||||
;
|
||||
@@BUILDER_VARIABLES@@
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; - Please edit the following values -
|
||||
; ----------------------------------------------------------------
|
||||
@@ -28,7 +39,7 @@ Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
Set $ProductId$ = "libreoffice"
|
||||
Set $MinimumSpace$ = "1500 MB"
|
||||
; the path were we find the product after the installation
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\LibreOffice 3.4"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\Libreoffice 3.5"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
@@ -57,6 +68,10 @@ else
|
||||
Winbatch_install
|
||||
Sub_check_exitcode
|
||||
|
||||
comment "Start setup program"
|
||||
Winbatch_install_help
|
||||
Sub_check_exitcode
|
||||
|
||||
comment "Copy files"
|
||||
Files_install /32Bit
|
||||
|
||||
@@ -81,8 +96,53 @@ endif
|
||||
; Choose one of the following examples as basis for your installation
|
||||
; You can use $LicenseKey$ var to pass a license key to the installer
|
||||
;
|
||||
msiexec /i "%ScriptPath%\office\libreoffice34.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
msiexec /i "%ScriptPath%\help\libreoffice34.msi" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "%ScriptPath%\Setup.exe" /S
|
||||
;
|
||||
; === MSI package =======================================================================================
|
||||
; You may use the parameter PIDKEY=$Licensekey$
|
||||
msiexec /i "$InstallMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
;
|
||||
; === InstallShield + MSI=====================================================================================
|
||||
; Attention: The path to the log file should not contain any whitespaces
|
||||
; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
;
|
||||
; === InstallShield =====================================================================================
|
||||
; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
|
||||
; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
|
||||
; You may create setup answer file by: setup.exe /SAVEINF="filename"
|
||||
; You may use an answer file by the parameter /LOADINF="filename"
|
||||
; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES
|
||||
|
||||
[Winbatch_install_help]
|
||||
; Choose one of the following examples as basis for your installation
|
||||
; You can use $LicenseKey$ var to pass a license key to the installer
|
||||
;
|
||||
; === Nullsoft Scriptable Install System ================================================================
|
||||
; "%ScriptPath%\Setup.exe" /S
|
||||
;
|
||||
; === MSI package =======================================================================================
|
||||
; You may use the parameter PIDKEY=$Licensekey$
|
||||
msiexec /i "$InstallHelpMsi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress
|
||||
;
|
||||
; === InstallShield + MSI=====================================================================================
|
||||
; Attention: The path to the log file should not contain any whitespaces
|
||||
; "%ScriptPath%\setup.exe" /s /v" /l* $LogDir$\$ProductId$.install_log.txt /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
; "%ScriptPath%\setup.exe" /s /v" /qb! ALLUSERS=2 REBOOT=ReallySuppress"
|
||||
;
|
||||
; === InstallShield =====================================================================================
|
||||
; Create setup.iss answer file by running: setup.exe /r /f1"c:\setup.iss"
|
||||
; "%ScriptPath%\setup.exe" /s /sms /f1"%ScriptPath%\setup.iss" /f2"$LogDir$\$ProductId$.install_log.txt"
|
||||
;
|
||||
; === Inno Setup ========================================================================================
|
||||
; http://unattended.sourceforge.net/InnoSetup_Switches_ExitCodes.html
|
||||
; You may create setup answer file by: setup.exe /SAVEINF="filename"
|
||||
; You may use an answer file by the parameter /LOADINF="filename"
|
||||
; "%ScriptPath%\setup.exe" /sp- /silent /norestart /SUPPRESSMSGBOXES
|
||||
|
||||
[Files_install]
|
||||
; Example of recursively copying some files into the installation directory:
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
requiredWinstVersion >= "4.10.8.6"
|
||||
|
||||
DefVar $MsiId$
|
||||
DefVar $MsiIdHelp$
|
||||
DefVar $UninstallProgram$
|
||||
DefVar $LogDir$
|
||||
DefVar $ExitCode$
|
||||
@@ -17,11 +18,21 @@ DefVar $LicensePool$
|
||||
|
||||
Set $LogDir$ = "%SystemDrive%\tmp"
|
||||
|
||||
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
|
||||
; and adds the following variables:
|
||||
; from builder-product.cfg : all variables definded by attribute WINST[index]
|
||||
; from builder-product.cfg : VENDOR PN VERSION RELEASE PRIORITY ADVICE TYPE
|
||||
; from opsi-builder.cfg : CREATOR_TAG CREATOR_NAME CREATOR_EMAIL
|
||||
; auto generated winst-variables
|
||||
; $IconFile$: path to product picture
|
||||
;
|
||||
@@BUILDER_VARIABLES@@
|
||||
|
||||
; ----------------------------------------------------------------
|
||||
; - Please edit the following values -
|
||||
; ----------------------------------------------------------------
|
||||
Set $ProductId$ = "libreoffice"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\LibreOffice 3.4"
|
||||
Set $InstallDir$ = "%ProgramFiles32Dir%\Libreoffice 3.5"
|
||||
Set $LicenseRequired$ = "false"
|
||||
Set $LicensePool$ = "p_" + $ProductId$
|
||||
; ----------------------------------------------------------------
|
||||
@@ -43,23 +54,16 @@ if $LicenseRequired$ = "true"
|
||||
endif
|
||||
|
||||
[Sub_free_license]
|
||||
if opsiLicenseManagementEnabled
|
||||
comment "License management is enabled and will be used"
|
||||
|
||||
comment "Trying to free license used for the product"
|
||||
DefVar $result$
|
||||
Set $result$ = FreeLicense($LicensePool$)
|
||||
; If there is an assignment of a license pool to the product, it is possible to use
|
||||
; Set $result$ = FreeLicense("", $ProductId$)
|
||||
;
|
||||
; If there is an assignment of a license pool to a windows software id, it is possible to use
|
||||
; DefVar $WindowsSoftwareId$
|
||||
; $WindowsSoftwareId$ = "..."
|
||||
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
|
||||
else
|
||||
LogError "Error: licensing required, but license management not enabled"
|
||||
isFatalError
|
||||
endif
|
||||
|
||||
comment "License management is enabled and will be used"
|
||||
|
||||
comment "Trying to free license used for the product"
|
||||
DefVar $result$
|
||||
Set $result$ = FreeLicense($LicensePool$)
|
||||
; If there is an assignment of a license pool to the product, it is possible to use
|
||||
; Set $result$ = FreeLicense("", $ProductId$)
|
||||
;
|
||||
; If there is an assignment of a license pool to a windows software id, it is possible to use
|
||||
; DefVar $WindowsSoftwareId$
|
||||
; $WindowsSoftwareId$ = "..."
|
||||
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user