update to new opsi builder template

This commit is contained in:
Mario Fetka 2013-03-13 14:51:04 +01:00
parent f25f00e76d
commit 389c037b3d
8 changed files with 57 additions and 241 deletions

1
704634.png.sha1sum Normal file
View File

@ -0,0 +1 @@
223e61d70672ffb9a555e1da88feba0b2bbcfa33 /home/mario/.opsi-dist-cache/highcriteria.dictationbuddy-4.0.45//704634.png

View File

@ -1,32 +1,17 @@
; Copyright (c) uib gmbh (www.uib.de) ; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh ; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License. ; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/ ; credits: http://www.opsi.org/en/credits/
Set $UninstallProgram$ = $InstallDir$ + "\dictationbuddy-uninstall.exe"
Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini" Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini"
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists($IniFile$) if FileExists($IniFile$)
Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}") Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","")
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "") Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","")
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version" Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","")
Winbatch_uninstall_msi_old
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall
sub_check_exitcode
endif
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId$ + "] DisplayName") = "")
comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall"
Winbatch_uninstall_msi
sub_check_exitcode
endif endif
Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..."
comment "Delete files" comment "Delete files"
Files_uninstall /32Bit Files_uninstall /32Bit
@ -37,63 +22,14 @@ Registry_uninstall /32Bit
comment "Delete program shortcuts" comment "Delete program shortcuts"
LinkFolder_uninstall LinkFolder_uninstall
[Winbatch_uninstall]
; "$UninstallProgram$"
[Winbatch_uninstall_msi_old]
msiexec /x $MsiIdOld$ /qb! REBOOT=ReallySuppress
[Winbatch_uninstall_msi]
msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress
[Files_uninstall] [Files_uninstall]
; Example for recursively deleting the installation directory (don't forget the trailing backslash): ; Example for recursively deleting the installation directory:
; ;
delete -sf "$InstallDir$\" del -sf "$InstallDir$\"
[Registry_uninstall] [Registry_uninstall]
; Example of deleting a registry key:
;
deletekey [HKEY_LOCAL_MACHINE\Software\HighCriteria\DictationBuddy] deletekey [HKEY_LOCAL_MACHINE\Software\HighCriteria\DictationBuddy]
[LinkFolder_uninstall] [LinkFolder_uninstall]
; Example of deleting a folder from AllUsers startmenu:
;
set_basefolder common_programs set_basefolder common_programs
delete_subfolder Dictation Buddy delete_subfolder Dictation Buddy
;
; Example of deleting a shortcut from AllUsers desktop:
;
; set_basefolder common_desktopdirectory
; set_subfolder ""
; delete_element $ProductId$
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

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,6 +1,3 @@
[X86]
MsiId={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
[COMMON] [COMMON]
PN=highcriteria.dictationbuddy PN=highcriteria.dictationbuddy
VERSION=4.0.45 VERSION=4.0.45

View File

@ -1,15 +1,11 @@
; Copyright (c) uib gmbh ; Copyright (c) uib gmbh (www.uib.de)
; (www.uib.de)
; This sourcecode is owned by uib ; This sourcecode is owned by uib
; and published under the Terms of the General Public License. ; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/ ; credits: http://www.opsi.org/en/credits/
[Actions] [Actions]
requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.11.2.6"
; DefVar $MsiId$
DefVar $MsiIdOld$
DefVar $UninstallProgram$
DefVar $IniFile$ DefVar $IniFile$
DefVar $IniCfgFile$ DefVar $IniCfgFile$
DefVar $LogDir$ DefVar $LogDir$
@ -17,13 +13,11 @@ DefVar $ProductId$
DefVar $MinimumSpace$ DefVar $MinimumSpace$
DefVar $InstallDir$ DefVar $InstallDir$
DefVar $ExitCode$ DefVar $ExitCode$
DefVar $LicenseRequired$ DefVar $OLD_VERSION$
DefVar $LicenseKey$ DefVar $OLD_CREATOR_TAG$
DefVar $LicensePool$ DefVar $OLD_RELEASE$
DefVar $OrgName$
Set $LogDir$ = "%SystemDrive%\tmp" Set $LogDir$ = "%SystemDrive%\tmp"
Set $OrgName$ = GetProductProperty ("orgname","OrgName")
; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh ; The token BUILDER_VARIABLES will be replaced by opsi-builder.sh
; and adds the following variables: ; and adds the following variables:
@ -41,38 +35,30 @@ Set $OrgName$ = GetProductProperty ("orgname","OrgName")
;$ProductId$ should be the name of the product in opsi ;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts, ; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator ; no white space use '-' as a seperator
Set $ProductId$ = "highcriteria.dictationbuddy"
Set $MinimumSpace$ = "5 MB" Set $MinimumSpace$ = "5 MB"
; the path were we find the product after the installation ; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\DictationBuddy" Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\DictationBuddy"
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ---------------------------------------------------------------- ; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError isFatalError "No Space"
; Stop process and set installation status to failed ; Stop process and set installation status to failed
else else
comment "Show product picture" comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
if FileExists("%ScriptPath%\delsub32.ins") if FileExists("%ScriptPath%\delsub32.ins")
comment "Start uninstall sub section" comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub32.ins" Sub "%ScriptPath%\delsub32.ins"
endif endif
Message "Installing " + $ProductId$ + " ..." Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..."
if $LicenseRequired$ = "true"
comment "Licensing required, reserve license and get license key"
Sub_get_licensekey
endif
comment "Start setup program" comment "Start setup program"
Winbatch_install ChangeDirectory "%SCRIPTPATH%"
Sub_check_exitcode
comment "Copy files" comment "Copy files"
Files_install /32Bit Files_install /32Bit
@ -83,33 +69,15 @@ else
comment "Create shortcuts" comment "Create shortcuts"
LinkFolder_install LinkFolder_install
comment "Test for installation success"
; Test if software marked as installed in registry
; if (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] DisplayName") = "")
; logError "Fatal: After Installation 32 bit [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}] not found"
; isFatalError
; else
; comment "Successful Installation"
; endif
endif endif
[Winbatch_install]
; "$InstallExe$"
[Files_install] [Files_install]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir$" copy "$IniCfgFile$" "$InstallDir$"
; Example of recursively copying some files into the installation directory:
;
copy -s "%ScriptPath%\X86\*.*" "$InstallDir$" copy -s "%ScriptPath%\X86\*.*" "$InstallDir$"
[Registry_install] [Registry_install]
; Example of setting some values of an registry key:
;
openkey [HKEY_LOCAL_MACHINE\Software\HighCriteria\DictationBuddy\WinReg] openkey [HKEY_LOCAL_MACHINE\Software\HighCriteria\DictationBuddy\WinReg]
set "Name" = "$OrgName$" set "Name" = "$OrgName$"
set "Key" = "$LicenseKey$" set "Key" = "$LicenseKey$"
@ -126,15 +94,10 @@ openkey [HKEY_LOCAL_MACHINE\Software\HighCriteria\DictationBuddy]
set "Path" = "$InstallDir$" set "Path" = "$InstallDir$"
set "Module" = "dicbuddy.exe" set "Module" = "dicbuddy.exe"
[LinkFolder_install] [LinkFolder_install]
; Example of deleting a folder from AllUsers startmenu:
;
set_basefolder common_programs set_basefolder common_programs
delete_subfolder $ProductId$ delete_subfolder $ProductId$
;
; Example of creating an shortcut to the installed exe in AllUsers startmenu:
;
set_basefolder common_programs set_basefolder common_programs
set_subfolder Dictation Buddy set_subfolder Dictation Buddy
@ -147,84 +110,3 @@ set_link
icon_index: icon_index:
end_link end_link
; Example of creating an shortcut to the installed exe on AllUsers desktop:
; set_basefolder common_desktopdirectory
; set_subfolder ""
;
; set_link
; name: $ProductId$
; target: <path to the program>
; parameters: <some_param>
; working_dir: $InstallDir$
; icon_file: <path to icon file>
; icon_index: 2
; end_link
[Sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"
comment "Trying to get a license key"
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
; If there is an assignment of exactly one licensepool to the product the following call is possible:
; Set $LicenseKey$ = demandLicenseKey ("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use:
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; Set $LicenseKey$ = demandLicenseKey ("", "", $WindowsSoftwareId$)
DefVar $ServiceErrorClass$
set $ServiceErrorClass$ = getLastServiceErrorClass
comment "Error class: " + $ServiceErrorClass$
if $ServiceErrorClass$ = "None"
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
else
if $ServiceErrorClass$ = "LicenseConfigurationError"
LogError "Fatal: license configuration must be corrected"
LogError getLastServiceErrorMessage
isFatalError
else
if $ServiceErrorClass$ = "LicenseMissingError"
LogError "Fatal: required license is not supplied"
isFatalError
endif
endif
endif
else
LogError "Fatal: license required, but license management not enabled"
isFatalError
endif
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif

View File

@ -1,22 +1,20 @@
; Copyright (c) uib gmbh (www.uib.de) ; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh ; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License. ; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/ ; credits: http://www.opsi.org/en/credits/
[Actions] [Actions]
requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.11.2.6"
; DefVar $MsiId$
DefVar $MsiIdOld$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $IniFile$ DefVar $IniFile$
DefVar $IniCfgFile$ DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ExitCode$ DefVar $ExitCode$
DefVar $ProductId$ DefVar $ProductId$
DefVar $InstallDir$ DefVar $InstallDir$
DefVar $LicenseRequired$ DefVar $OLD_VERSION$
DefVar $LicensePool$ DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $LogDir$ = "%SystemDrive%\tmp" Set $LogDir$ = "%SystemDrive%\tmp"
@ -33,15 +31,13 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ---------------------------------------------------------------- ; ----------------------------------------------------------------
; - Please edit the following values - ; - Please edit the following values -
; ---------------------------------------------------------------- ; ----------------------------------------------------------------
Set $ProductId$ = "highcriteria.dictationbuddy"
Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\DictationBuddy" Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\DictationBuddy"
Set $LicenseRequired$ = "true"
Set $LicensePool$ = "p_" + $ProductId$
; ---------------------------------------------------------------- ; ----------------------------------------------------------------
Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini"
comment "Show product picture" comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$
Message "Uninstalling " + $ProductId$ + " ..." Message "Uninstalling " + $ProductId$ + " ..."
@ -50,22 +46,3 @@ if FileExists("%ScriptPath%\delsub32.ins")
Sub "%ScriptPath%\delsub32.ins" Sub "%ScriptPath%\delsub32.ins"
endif endif
if $LicenseRequired$ = "true"
comment "Licensing required, free license used"
Sub_free_license
endif
[Sub_free_license]
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$)

View File

@ -3,6 +3,8 @@
############################ ############################
VENDOR="highcriteria.com" VENDOR="highcriteria.com"
PN="highcriteria.dictationbuddy" PN="highcriteria.dictationbuddy"
NAME="Highcriteria Dictationbuddy"
DESCRIPTION="plays pre-recorded audio files and allows you to listen and control the playback"
VERSION="4.0.45" VERSION="4.0.45"
RELEASE="3" RELEASE="3"
PRIORITY="0" PRIORITY="0"
@ -12,8 +14,8 @@ ADVICE=""
# Valid value: restricted | public # Valid value: restricted | public
TYPE="public" TYPE="public"
DL_FILE[0]="transcription-buddy.png" DL_FILE[0]="704634.png"
DL_SOURCE[0]="http://img.uptodown.net/icons/transcription-buddy.png" DL_SOURCE[0]="http://i.udm4.com/win/48/704/704634.png"
DL_FILE[1]="dicbud-${VERSION}.zip" DL_FILE[1]="dicbud-${VERSION}.zip"
DL_SOURCE[1]="http://www.transcriptionbuddy.com/download/dicbud40.zip" DL_SOURCE[1]="http://www.transcriptionbuddy.com/download/dicbud40.zip"
@ -23,6 +25,4 @@ DL_EXTRACT_FORMAT[1]="unzip"
# File array index for the image showing while installing the program # File array index for the image showing while installing the program
ICON_DL_INDEX=0 ICON_DL_INDEX=0
WINST_NAME[0]="MsiId"
WINST_VALUE[0]="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"

View File

@ -1 +0,0 @@
a7ac7281e119fbdf94d4b5d59ab4da854c67a996 /home/mario/.opsi-dist-cache/highcriteria.transcriptionbuddy-4.0.45//transcription-buddy.png