update to new opsi builder template

This commit is contained in:
Mario Fetka 2013-03-13 15:24:35 +01:00
parent 0074caf854
commit d2123393b5
9 changed files with 60 additions and 185 deletions

1
648411.png.sha1sum Normal file
View File

@ -0,0 +1 @@
ebfcbbddc1e4fcb99758b011eb1f4b2fbad5e3da /home/mario/.opsi-dist-cache/highcriteria.transcriptionbuddy-4.0.45//648411.png

View File

@ -1,32 +1,17 @@
; 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 $UninstallProgram$ = $InstallDir$ + "\transcriptionbuddy-uninstall.exe"
Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini"
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists($IniFile$)
Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
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
Set $OLD_VERSION$ = GetValueFromInifile($IniFile$,"COMMON","VERSION","")
Set $OLD_CREATOR_TAG$ = GetValueFromInifile($IniFile$,"COMMON","CREATOR_TAG","")
Set $OLD_RELEASE$ = GetValueFromInifile($IniFile$,"COMMON","RELEASE","")
endif
Message "Uninstalling " + $ProductId$ + " " + $OLD_VERSION$ + "-" + $OLD_CREATOR_TAG$ + $OLD_RELEASE$ + " ..."
comment "Delete files"
Files_uninstall /32Bit
@ -37,63 +22,15 @@ Registry_uninstall /32Bit
comment "Delete program shortcuts"
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]
; 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]
; Example of deleting a registry key:
;
deletekey [HKEY_LOCAL_MACHINE\Software\HighCriteria\TranscriptionBuddyPE]
[LinkFolder_uninstall]
; Example of deleting a folder from AllUsers startmenu:
;
set_basefolder common_programs
delete_subfolder Transcription 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]
PN=highcriteria.transcriptionbuddy
VERSION=4.0.45

View File

@ -1,15 +1,11 @@
; Copyright (c) uib gmbh
; (www.uib.de)
; 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 $MsiId$
DefVar $MsiIdOld$
DefVar $UninstallProgram$
DefVar $IniFile$
DefVar $IniCfgFile$
DefVar $LogDir$
@ -20,6 +16,9 @@ DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OrgName$
Set $LogDir$ = "%SystemDrive%\tmp"
@ -41,29 +40,29 @@ Set $OrgName$ = GetProductProperty ("orgname","OrgName")
;$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$ = "highcriteria.transcriptionbuddy"
Set $MinimumSpace$ = "5 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\TranscriptionBuddy"
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
isFatalError "No Space"
; 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%\delsub32.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub32.ins"
endif
Message "Installing " + $ProductId$ + " ..."
Message "Installing " + $ProductId$ + " "+ $VERSION$ + "-" + $CREATOR_TAG$ + $RELEASE$ + " ..."
if $LicenseRequired$ = "true"
comment "Licensing required, reserve license and get license key"
@ -71,9 +70,7 @@ else
endif
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
ChangeDirectory "%SCRIPTPATH%"
comment "Copy files"
Files_install /32Bit
@ -83,33 +80,12 @@ else
comment "Create shortcuts"
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
[Winbatch_install]
; "$InstallExe$"
[Files_install]
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir$"
; Example of recursively copying some files into the installation directory:
;
copy -s "%ScriptPath%\X86\*.*" "$InstallDir$"
copy -s "%ScriptPath%\files\*.*" "$InstallDir$"
[Registry_install]
; Example of setting some values of an registry key:
;
openkey [HKEY_LOCAL_MACHINE\Software\HighCriteria\TranscriptionBuddyPE\WinReg]
set "Name" = "$OrgName$"
set "Key" = "$LicenseKey$"
@ -126,15 +102,10 @@ openkey [HKEY_LOCAL_MACHINE\Software\HighCriteria\TranscriptionBuddyPE]
set "Path" = "$InstallDir$"
set "Module" = "tnpbuddy.exe"
[LinkFolder_install]
; Example of deleting a folder from AllUsers startmenu:
;
set_basefolder common_programs
delete_subfolder $ProductId$
;
; Example of creating an shortcut to the installed exe in AllUsers startmenu:
;
set_basefolder common_programs
set_subfolder Transcription Buddy
@ -147,20 +118,6 @@ set_link
icon_index:
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"
@ -197,34 +154,3 @@ 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,23 @@
; 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 $MsiId$
DefVar $MsiIdOld$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $IniFile$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $OrgName$
Set $LogDir$ = "%SystemDrive%\tmp"
@ -33,15 +34,15 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "highcriteria.transcriptionbuddy"
Set $InstallDir$ = "%ProgramFiles32Dir%\HighCriteria\TranscriptionBuddy"
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

@ -21,18 +21,9 @@ onceScript:
customScript:
userLoginScript:
[ProductProperty]
type: unicode
name: install_architecture
multivalue: False
editable: False
description: which architecture (32/64 bit) has to be installed
values: ["32 only", "64 only", "both", "system specific"]
default: ["system specific"]
[ProductDependency]
action: setup
requiredProduct: aio
requiredProduct: sereby.aio
requiredStatus: installed
requirementType: before

View File

@ -3,6 +3,8 @@
############################
VENDOR="highcriteria.com"
PN="highcriteria.transcriptionbuddy"
NAME="Highcriteria Transcriptionbuddy"
DESCRIPTION="plays pre-recorded audio files and allows you to listen and control the playback"
VERSION="4.0.45"
RELEASE="3"
PRIORITY="0"
@ -12,8 +14,8 @@ ADVICE=""
# Valid value: restricted | public
TYPE="public"
DL_FILE[0]="transcription-buddy.png"
DL_SOURCE[0]="http://img.uptodown.net/icons/transcription-buddy.png"
DL_FILE[0]="648411.png"
DL_SOURCE[0]="http://img.informer.com/icons/png/48/648/648411.png"
DL_FILE[1]="tb-${VERSION}.zip"
DL_SOURCE[1]="http://www.transcriptionbuddy.com/download/tb40.zip"
@ -23,6 +25,3 @@ DL_EXTRACT_FORMAT[1]="unzip"
# File array index for the image showing while installing the program
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