From cf033cfec1c92ed5077a09b6f05b891c24daf2fc Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Thu, 14 Mar 2013 16:12:28 +0100 Subject: [PATCH] update to new opsi builder templates --- CLIENT_DATA/{delsub.ins => delsub3264.ins} | 52 ++++++++++++++++--- CLIENT_DATA/login.ins | 24 +++++++++ CLIENT_DATA/opsi-nerdcave.taskbarshuffle.ini | 7 +++ CLIENT_DATA/{setup.ins => setup3264.ins} | 38 ++++++++++---- .../{uninstall.ins => uninstall3264.ins} | 29 +++++++---- OPSI/control | 4 +- builder-product.cfg | 13 ++++- taskbar-shuffle-portable-6.jpg.sha1sum | 1 - taskbar-shuffle.jpg.sha1sum | 1 + 9 files changed, 135 insertions(+), 34 deletions(-) rename CLIENT_DATA/{delsub.ins => delsub3264.ins} (57%) create mode 100644 CLIENT_DATA/login.ins create mode 100644 CLIENT_DATA/opsi-nerdcave.taskbarshuffle.ini rename CLIENT_DATA/{setup.ins => setup3264.ins} (85%) rename CLIENT_DATA/{uninstall.ins => uninstall3264.ins} (68%) delete mode 100644 taskbar-shuffle-portable-6.jpg.sha1sum create mode 100644 taskbar-shuffle.jpg.sha1sum diff --git a/CLIENT_DATA/delsub.ins b/CLIENT_DATA/delsub3264.ins similarity index 57% rename from CLIENT_DATA/delsub.ins rename to CLIENT_DATA/delsub3264.ins index 80944c8..3d36803 100644 --- a/CLIENT_DATA/delsub.ins +++ b/CLIENT_DATA/delsub3264.ins @@ -1,16 +1,32 @@ ; 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$ + "\unins000.exe" +Set $UninstallProgram32$ = $InstallDir32$ + "\" + $UninstallProg32$ +Set $IniFile32$ = $InstallDir32$ + "\opsi-" + $ProductId$ + ".ini" -Set $UninstallProgram32$ = $InstallDir64$ + "\unins000.exe" +Set $UninstallProgram64$ = $InstallDir64$ + "\" + $UninstallProg64$ +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 $UninstallProg32$ = GetValueFromInifile($IniFile32$,"X86","UninstallProg32","XXXXXXXX.exe") + Set $UninstallProgramOld32$ = $InstallDir32$ + "\" + $UninstallProg32$ + if FileExists($UninstallProgramOld32$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_32 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram32$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_32 @@ -24,8 +40,22 @@ 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 $UninstallProg64$ = GetValueFromInifile($IniFile64$,"X86_64","UninstallProg64","XXXXXXXX.exe") + Set $UninstallProgramOld64$ = $InstallDir64$ + "\" + $UninstallProg64$ + if FileExists($UninstallProgramOld64$) + comment "Uninstall program found, starting uninstall" + Winbatch_uninstall_old_64 + sub_check_exitcode + endif + endif if FileExists($UninstallProgram64$) comment "Uninstall program found, starting uninstall" Winbatch_uninstall_64 @@ -41,21 +71,27 @@ endif comment "Delete program shortcuts" LinkFolder_uninstall +[Winbatch_uninstall_old_32] +"$UninstallProgramOld32$" /VERYSILENT + [Winbatch_uninstall_32] "$UninstallProgram32$" /VERYSILENT [Files_uninstall_32] ; Example for recursively deleting the installation directory (don't forget the trailing backslash): ; -; delete -sf "$InstallDir32$\" +delete -sf "$InstallDir32$\" + +[Winbatch_uninstall_old_64] +"$UninstallProgramOld64$" /VERYSILENT [Winbatch_uninstall_64] "$UninstallProgram64$" /VERYSILENT [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: diff --git a/CLIENT_DATA/login.ins b/CLIENT_DATA/login.ins new file mode 100644 index 0000000..7b85744 --- /dev/null +++ b/CLIENT_DATA/login.ins @@ -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" diff --git a/CLIENT_DATA/opsi-nerdcave.taskbarshuffle.ini b/CLIENT_DATA/opsi-nerdcave.taskbarshuffle.ini new file mode 100644 index 0000000..3bcccd3 --- /dev/null +++ b/CLIENT_DATA/opsi-nerdcave.taskbarshuffle.ini @@ -0,0 +1,7 @@ +[X86] + +[X86_64] + +[COMMON] +PN=name +VERSION=version diff --git a/CLIENT_DATA/setup.ins b/CLIENT_DATA/setup3264.ins similarity index 85% rename from CLIENT_DATA/setup.ins rename to CLIENT_DATA/setup3264.ins index 708bafe..eb24886 100644 --- a/CLIENT_DATA/setup.ins +++ b/CLIENT_DATA/setup3264.ins @@ -1,13 +1,18 @@ ; 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 $UninstallProgram32$ +DefVar $UninstallProgramOld32$ +DefVar $IniFile32$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ +DefVar $IniFile64$ +DefVar $IniCfgFile$ DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ @@ -16,11 +21,13 @@ DefVar $InstallDir64$ DefVar $ExitCode$ 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 @@ -39,29 +46,33 @@ 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$ = "nerdcave.taskbarshuffle" -Set $MinimumSpace$ = "3 MB" +Set $MinimumSpace$ = "5 MB" ; the path were we find the product after the installation Set $InstallDir32$ = "%ProgramFiles32Dir%\Taskbar Shuffle" Set $InstallDir64$ = "%ProgramFiles64Dir%\Taskbar Shuffle" ; ---------------------------------------------------------------- +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%\delsub.ins") + if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub.ins" + Sub "%ScriptPath%\delsub3264.ins" endif + 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" @@ -73,8 +84,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" @@ -91,6 +103,9 @@ endif "$Install32Exe$" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- [Files_install_32] +; copy the ini file to the InstallDir +copy "$IniCfgFile$" "$InstallDir32$" + ; Example of recursively copying some files into the installation directory: ; ; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$" @@ -99,6 +114,9 @@ endif "$Install64Exe$" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- [Files_install_64] +; copy the ini file to the InstallDir +copy "$IniCfgFile$" "$InstallDir64$" + ; Example of recursively copying some files into the installation directory: ; ; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$" diff --git a/CLIENT_DATA/uninstall.ins b/CLIENT_DATA/uninstall3264.ins similarity index 68% rename from CLIENT_DATA/uninstall.ins rename to CLIENT_DATA/uninstall3264.ins index 193ce5e..f1abbdb 100644 --- a/CLIENT_DATA/uninstall.ins +++ b/CLIENT_DATA/uninstall3264.ins @@ -1,13 +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/ [Actions] -requiredWinstVersion >= "4.10.8.6" +requiredWinstVersion >= "4.11.2.6" +DefVar $UninstallProg32$ DefVar $UninstallProgram32$ +DefVar $UninstallProgramOld32$ +DefVar $IniFile32$ +DefVar $UninstallProg64$ DefVar $UninstallProgram64$ +DefVar $UninstallProgramOld64$ +DefVar $IniFile64$ +DefVar $IniCfgFile$ DefVar $LogDir$ DefVar $ExitCode$ DefVar $ProductId$ @@ -15,11 +22,13 @@ DefVar $InstallDir32$ DefVar $InstallDir64$ 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 @@ -35,21 +44,19 @@ Set $LogDir$ = "%SystemDrive%\tmp" ; ---------------------------------------------------------------- ; - Please edit the following values - ; ---------------------------------------------------------------- -Set $ProductId$ = "nerdcave.taskbarshuffle" -Set $InstallDir32$ = "%ProgramFiles32Dir%\Taskbar Shuffle" -Set $InstallDir64$ = "%ProgramFiles64Dir%\Taskbar Shuffle" -Set $LicenseRequired$ = "false" -Set $LicensePool$ = "p_" + $ProductId$ +Set $InstallDir32$ = "%ProgramFiles32Dir%\Taskbar Shuffle" +Set $InstallDir64$ = "%ProgramFiles64Dir%\Taskbar Shuffle" ; ---------------------------------------------------------------- +Set $IniCfgFile$ = "%ScriptPath%\opsi-" + $ProductId$ + ".ini" comment "Show product picture" -ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $NAME$ Message "Uninstalling " + $ProductId$ + " ..." -if FileExists("%ScriptPath%\delsub.ins") +if FileExists("%ScriptPath%\delsub3264.ins") comment "Start uninstall sub section" - Sub "%ScriptPath%\delsub.ins" + Sub "%ScriptPath%\delsub3264.ins" endif diff --git a/OPSI/control b/OPSI/control index 29b221c..1b3cf48 100644 --- a/OPSI/control +++ b/OPSI/control @@ -13,8 +13,8 @@ version: VERSION priority: PRIORITY licenseRequired: False productClasses: -setupScript: setup.ins -uninstallScript: uninstall.ins +setupScript: setup3264.ins +uninstallScript: uninstall3264.ins updateScript: alwaysScript: onceScript: diff --git a/builder-product.cfg b/builder-product.cfg index 541a824..baac0ca 100644 --- a/builder-product.cfg +++ b/builder-product.cfg @@ -3,6 +3,8 @@ ############################ VENDOR="nerdcave.webs.com" PN="nerdcave.taskbarshuffle" +NAME="Taskbar Shuffle" +DESCRIPTION="Taskbar Shuffle is a simple, small, free utility that lets you drag and drop your Windows taskbar buttons to rearrange them." VERSION="2.5" RELEASE="3" PRIORITY="0" @@ -13,8 +15,8 @@ ADVICE="" TYPE="public" -DL_FILE[0]="taskbar-shuffle-portable-6.jpg" -DL_SOURCE[0]="http://screenshots.de.sftcdn.net/de/scrn/83000/83890/taskbar-shuffle-portable-6.jpg" +DL_FILE[0]="taskbar-shuffle.jpg" +DL_SOURCE[0]="http://www.econsultant.com/images/taskbar-shuffle.jpg" DL_FILE[1]="ts2.5_setup.exe" DL_SOURCE[1]="http://dl.dropbox.com/u/1644845/TS/ts2.5_setup.exe" @@ -29,3 +31,10 @@ DL_WINST_NAME[2]=Install64Exe # File array index for the image showing while installing the program ICON_DL_INDEX=0 +OPSI_INI_SECTION[0]="X86" +OPSI_INI_OPTION[0]="UninstallProg32" +OPSI_INI_VALUE[0]="unins000.exe" + +OPSI_INI_SECTION[1]="X86_64" +OPSI_INI_OPTION[1]="UninstallProg64" +OPSI_INI_VALUE[1]="unins000.exe" diff --git a/taskbar-shuffle-portable-6.jpg.sha1sum b/taskbar-shuffle-portable-6.jpg.sha1sum deleted file mode 100644 index 49deb9c..0000000 --- a/taskbar-shuffle-portable-6.jpg.sha1sum +++ /dev/null @@ -1 +0,0 @@ -44944ce992c4169c5612d43191af2aa5e52532b3 /home/mario/.opsi-dist-cache/nerdcave.taskbarshuffle-2.5//taskbar-shuffle-portable-6.jpg diff --git a/taskbar-shuffle.jpg.sha1sum b/taskbar-shuffle.jpg.sha1sum new file mode 100644 index 0000000..8d83686 --- /dev/null +++ b/taskbar-shuffle.jpg.sha1sum @@ -0,0 +1 @@ +30869800dde4c50c7a16b3fa4f28c9fc02b3e44c /home/mario/.opsi-dist-cache/nerdcave.taskbarshuffle-2.5//taskbar-shuffle.jpg