update to new opsi builder template

This commit is contained in:
Mario Fetka 2013-03-15 15:10:06 +01:00
parent ae080fa4e6
commit cc8e92e17a
8 changed files with 90 additions and 87 deletions

View File

@ -1,18 +1,20 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
; credits: http://www.opsi.org/en/credits/
Set $UninstallProgram32$ = $InstallDir32$ + "\uninstall.exe"
Set $UninstallProgram64$ = $InstallDir64$ + "\uninstall.exe"
Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini"
Set $IniFile64$ = $InstallDir64$ + "\opsi-" + $ProductId$ + ".ini"
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Uninstalling " + $ProductId$ + " 32 Bit..."
if FileExists($IniFile32$)
Set $OLD_VERSION$ = GetValueFromInifile($IniFile32$,"COMMON","VERSION","")
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile32$,"COMMON","CREATOR_TAG","")
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile32$,"COMMON","RELEASE","")
endif
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 32 Bit..."
if FileExists($IniFile32$)
Set $MsiIdOld32$ = GetValueFromInifile($IniFile32$,"X86","MsiId32","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
@ -22,13 +24,6 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram32$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_32
sub_check_exitcode
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_32
@ -42,7 +37,12 @@ if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specif
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Uninstalling " + $ProductId$ + " 64 Bit..."
if FileExists($IniFile64$)
Set $OLD_VERSION$ = GetValueFromInifile($IniFile64$,"COMMON","VERSION","")
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile64$,"COMMON","CREATOR_TAG","")
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile64$,"COMMON","RELEASE","")
endif
Message "Uninstalling " + $ProductId$ + " "+ $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " 64 Bit..."
if FileExists($IniFile64$)
Set $MsiIdOld64$ = GetValueFromInifile($IniFile64$,"X86_64","MsiId64","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
@ -52,12 +52,6 @@ if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system spe
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram64$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_64
sub_check_exitcode
endif
if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi_64
@ -73,16 +67,6 @@ endif
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_32]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; "$UninstallProgram32$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram32$" /silent /norestart /SUPPRESSMSGBOXES
[Winbatch_uninstall_msi_old_32]
msiexec /x $MsiIdOld32$ /qb! REBOOT=ReallySuppress
@ -92,17 +76,7 @@ msiexec /x $MsiId32$ /qb! REBOOT=ReallySuppress
[Files_uninstall_32]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
; delete -sf "$InstallDir32$\"
[Winbatch_uninstall_64]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; "$UninstallProgram64$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram64$" /silent /norestart /SUPPRESSMSGBOXES
delete -sf "$InstallDir32$\"
[Winbatch_uninstall_msi_old_64]
msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
@ -111,9 +85,9 @@ msiexec /x $MsiIdOld64$ /qb! REBOOT=ReallySuppress
msiexec /x $MsiId64$ /qb! REBOOT=ReallySuppress
[Files_uninstall_64]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
; Example for recursively deleting the installation directory:
;
; delete -sf "$InstallDir64$\"
del -sf "$InstallDir64$\"
[Registry_uninstall]
; Example of deleting a registry key:

24
CLIENT_DATA/login.ins Normal file
View File

@ -0,0 +1,24 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
[Actions]
Message "Profile Patch for VLC ...."
comment "Did we run this script before ? - and set version stamp in profile"
if getValue("installationstate", getProductMap) = "installed"
comment "Product is installed"
if not (scriptWasExecutedBefore)
comment "loginscript was not run yet "
Files_profile_copy
Registry_currentuser_set
endif
endif
[Files_profile_copy]
copy "%Scriptpath%\profiles\*.*" "%CurrentAppdataDir%\ACME"
[Registry_currentuser_set]
openkey [HKCU\Software\ACME]
set "show_greeting_window" = "no"

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,13 +22,15 @@ DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OrgName$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $OrgName$ = GetProductProperty ("orgname","OrgName")
Set $LogDir$ = "%SystemDrive%\tmp"
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
@ -51,23 +49,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$ = "realtimesoft.ultramon"
Set $MinimumSpace$ = "10 MB"
Set $MinimumSpace$ = "1 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\UltraMon"
Set $InstallDir64$ = "%ProgramFiles64Dir%\UltraMon"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $LicenseRequired$ = "true"
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"
@ -82,8 +80,9 @@ 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 "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_32
Sub_check_exitcode
comment "Copy files"
@ -95,8 +94,9 @@ 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 "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install_64
Sub_check_exitcode
comment "Copy files"
@ -110,9 +110,10 @@ else
endif
[Winbatch_install_32]
msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress USERNAME="$OrgName$" PIDKEY=$LicenseKey$
msiexec /i "$Install32Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress USERNAME="$OrgName$" PIDKEY=$LicenseKey$
[Files_install_32]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir32$"
; Example of recursively copying some files into the installation directory:
@ -120,9 +121,10 @@ copy "$IniCfgFile$" "$InstallDir32$"
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"
[Winbatch_install_64]
msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=2 REBOOT=ReallySuppress USERNAME="$OrgName$" PIDKEY=$LicenseKey$
msiexec /i "$Install64Msi$" /l* "$LogDir$\$ProductId$.install_log.txt" /qb! ALLUSERS=1 REBOOT=ReallySuppress USERNAME="$OrgName$" PIDKEY=$LicenseKey$
[Files_install_64]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir64$"
; Example of recursively copying some files into the installation directory:

View File

@ -1,18 +1,14 @@
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; 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$
@ -24,11 +20,14 @@ DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OrgName$
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
@ -44,16 +43,16 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "realtimesoft.ultramon"
Set $InstallDir32$ = "%ProgramFiles32Dir%\UltraMon"
Set $InstallDir64$ = "%ProgramFiles64Dir%\UltraMon"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
Message "Uninstalling " + $ProductId$ + " ..."

View File

@ -32,7 +32,7 @@ default: ["system specific"]
[ProductDependency]
action: setup
requiredProduct: aio
requiredProduct: sereby.aio
requiredStatus: installed
requirementType: before

View File

@ -3,6 +3,8 @@
############################
VENDOR="realtimesoft.com"
PN="realtimesoft.ultramon"
NAME="UltraMon"
DESCRIPTION="Get the most out of multiple monitors with UltraMon"
VERSION="3.2.2"
RELEASE="3"
PRIORITY="0"
@ -13,8 +15,8 @@ ADVICE=""
TYPE="public"
DL_FILE[0]="win-ultramon.jpg"
DL_SOURCE[0]="http://www.xeko.vn/sites/www.xeko.vn/files/content-files/90/3d/57/win-ultramon.jpg"
DL_FILE[0]="ultramon.png"
DL_SOURCE[0]="http://www.lotsof.org/images/62xpicon/ultramon.png"
DL_FILE[1]="UltraMon_${VERSION}_de_x32.msi"
DL_SOURCE[1]="http://realtimesoft.com/files/UltraMon_${VERSION}_de_x32.msi"
@ -29,8 +31,10 @@ DL_WINST_NAME[2]=Install64Msi
# File array index for the image showing while installing the program
ICON_DL_INDEX=0
WINST_NAME[0]="MsiId32"
WINST_VALUE[0]="{537056B7-32A4-4408-9B54-0341963C7C9C}"
OPSI_INI_SECTION[0]="X86"
OPSI_INI_OPTION[0]="MsiId32"
OPSI_INI_VALUE[0]="{9069EE0A-7615-4D86-AD80-CA263E936DA6}"
WINST_NAME[1]="MsiId64"
WINST_VALUE[1]="{F24FF688-7138-4CCF-A83F-71E9FB01170E}"
OPSI_INI_SECTION[1]="X86_64"
OPSI_INI_OPTION[1]="MsiId64"
OPSI_INI_VALUE[1]="{9069EE0A-7615-4D86-AD80-CA263E936DA6}"

1
ultramon.png.sha1sum Normal file
View File

@ -0,0 +1 @@
961c7a3ac0bd4ba0cd6fc0d1a91ba75972169368 /home/mario/.opsi-dist-cache/realtimesoft.ultramon-3.2.2//ultramon.png

View File

@ -1 +0,0 @@
ac16b69369845a77e0e0f95f2fa1a1539ca1d332 /home/mario/.opsi-dist-cache/realtimesoft.ultramon-3.2.1//win-ultramon.jpg