update to new opsi builder template

This commit is contained in:
Mario Fetka 2013-03-13 17:10:43 +01:00
parent f7b70a0f71
commit 0fbb97c2a1
12 changed files with 114 additions and 62 deletions

View File

@ -1,3 +0,0 @@
[Language]
DLL=DEUTSCH.DLL
Lang=Deutsch

View File

@ -1,13 +1,28 @@
; 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$ + "\iv_uninstall.exe"
Set $IniFile$ = $InstallDir$ + "\opsi-" + $ProductId$ + ".ini"
Message "Uninstalling " + $ProductId$ + " ..."
if FileExists($IniFile$)
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$ + " ..."
if FileExists($IniFile$)
Set $UninstallProg$ = GetValueFromInifile($IniFile$,"X86","UninstallProg","XXXXXXXX.exe")
Set $UninstallProgramOld$ = $InstallDir$ + "\" + $UninstallProg$
if FileExists($UninstallProgramOld$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall_old
sub_check_exitcode
endif
endif
if FileExists($UninstallProgram$)
comment "Uninstall program found, starting uninstall"
Winbatch_uninstall
@ -23,17 +38,17 @@ Registry_uninstall /32Bit
comment "Delete program shortcuts"
LinkFolder_uninstall
[Winbatch_uninstall_old]
"$UninstallProgramOld$" /silent
[Winbatch_uninstall]
; Choose one of the following examples as basis for program uninstall
;
"$UninstallProgram$" /silent
[Files_uninstall]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
; delete -sf "$InstallDir$\"
; Delete files for german
[Files_uninstall]
; Example for recursively deleting the installation directory:
;
del -sf "$InstallDir$\"
delete -sf "%ProfileDir%\Default User\Anwendungsdaten\irfanview"
[Registry_uninstall]

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

@ -0,0 +1,5 @@
[X86]
[COMMON]
PN=name
VERSION=version

View File

@ -1,23 +1,29 @@
; 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 $UninstallProgram$
DefVar $UninstallProgramOld$
DefVar $IniFile$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
DefVar $language$
Set $language$ = GetProductProperty("language", "german")
Set $LogDir$ = "%SystemDrive%\tmp"
DefVar $language$
Set $language$ = GetProductProperty("language", "german")
; 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]
@ -34,77 +40,63 @@ Set $language$ = GetProductProperty("language", "german")
;$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$ = "irfanview.irfanview"
Set $MinimumSpace$ = "10 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\IrfanView"
; ----------------------------------------------------------------
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$ + " ..."
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
Winbatch_install
Sub_check_exitcode
comment "Installation for german language"
if ($language$ = "german")
Message "Set german language..."
Files_install_german /AllNTUserProfiles
comment "Clean useless files and directories"
Files_delete_AllNTUser_german
Dosbatch_delete_AllNTUser_german
endif
Message "Set german language..."
Files_install_german /AllNTUserProfiles
comment "Clean useless files and directories"
Files_delete_AllNTUser_german
Dosbatch_delete_AllNTUser_german
endif
comment "Copy files"
Files_install /32Bit
comment "Patch Registry"
Registry_install /32Bit
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]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
"$InstallExe$" /silent /folder="$InstallDir$" /desktop=1 /thumbs=0 /group=1 /allusers=1 /assoc=1 /assocallusers=1 /ini="%APPDATA%\irfanview"
"$InstallPluginsExe$" /silent
[Dosbatch_delete_AllNTUser_german]
rd "%ProfileDir%\Public\Anwendungsdaten"
[Files_install]
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir$"
; copy the ini file to the InstallDir
copy "$IniCfgFile$" "$InstallDir$"
[Files_install_german]
copy "%ScriptPath%\X86\i_view32.ini" "%UserProfileDir%\Anwendungsdaten\irfanview"
copy "$IniCfgFile$" "%UserProfileDir%\Anwendungsdaten\irfanview\i_view32.ini"
[Files_delete_AllNTUser_german]
delete -sf "%ProfileDir%\Public\Anwendungsdaten\irfanview"

View File

@ -1,16 +1,22 @@
; 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 $UninstallProgram$
DefVar $UninstallProgramOld$
DefVar $IniFile$
DefVar $IniCfgFile$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $OLD_VERSION$
DefVar $OLD_CREATOR_TAG$
DefVar $OLD_RELEASE$
Set $LogDir$ = "%SystemDrive%\tmp"
@ -27,13 +33,13 @@ Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "irfanview.irfanview"
Set $InstallDir$ = "%ProgramFiles32Dir%\IrfanView"
; ----------------------------------------------------------------
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

@ -3,6 +3,8 @@
############################
VENDOR="irfanview.tuwien.ac.at"
PN="irfanview.irfanview"
NAME="IrfanView"
DESCRIPTION="IrfanView is a very fast, small, compact and innovative FREEWARE (for non-commercial use) graphic viewer for Windows."
VERSION="4.35"
RELEASE="1"
PRIORITY="0"
@ -12,20 +14,31 @@ ADVICE=""
# Valid value: restricted | public
TYPE="public"
DL_FILE[0]="preview-29-1353-280.jpg"
DL_SOURCE[0]="http://skins13.wincustomize.com/6/89/689332/29/1353/preview-29-1353-280.jpg"
DL_FILE[0]="irfanview-icon.jpg"
DL_SOURCE[0]="http://www.technoinsta.com/wp-content/uploads/2012/12/irfanview-icon.jpg"
DL_FILE[1]="iview435_setup.exe"
DL_SOURCE[1]="http://irfanview.tuwien.ac.at/iview435_setup.exe"
DL_FILE[1]="iview435g_setup.exe"
DL_SOURCE[1]="http://irfanview.info/files/iview435g_setup.exe"
DL_ARCH[1]="X86"
DL_WINST_NAME[1]=InstallExe
DL_FILE[2]="irfanview_plugins_435_setup.exe"
DL_SOURCE[2]="http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_435_setup.exe"
DL_SOURCE[2]="http://irfanview.info/files/irfanview_plugins_435_setup.exe"
DL_ARCH[2]="X86"
DL_WINST_NAME[2]=InstallPluginsExe
# File array index for the image showing while installing the program
ICON_DL_INDEX=0
OPSI_INI_SECTION[0]="X86"
OPSI_INI_OPTION[0]="UninstallProg"
OPSI_INI_VALUE[0]="iv_uninstall.exe"
OPSI_INI_SECTION[1]="Language"
OPSI_INI_OPTION[1]="DLL"
OPSI_INI_VALUE[1]="DEUTSCH.DLL"
OPSI_INI_SECTION[2]="Language"
OPSI_INI_OPTION[2]="Lang"
OPSI_INI_VALUE[2]="Deutsch"

View File

@ -0,0 +1 @@
b0b21b2b34477f9b40cc63b2873a1b5f555b726c /home/mario/.opsi-dist-cache/irfanview.irfanview-4.35//irfanview-icon.jpg

View File

@ -1 +1 @@
d2c65ef987f324acd4ba56429a689f9c0160bf4e /home/opsiproducts/.opsi-dist-cache/irfanview.irfanview-4.35/X86/irfanview_plugins_435_setup.exe
7cb7a35fff72f7e327e980a3fad3057fe4d99d61 /home/mario/.opsi-dist-cache/irfanview.irfanview-4.35/X86/irfanview_plugins_435_setup.exe

View File

@ -1 +0,0 @@
7c88945853910be1c19ac8c9864501200ea2851a /home/opsiproducts/.opsi-dist-cache/irfanview.irfanview-4.35/X86/iview435_setup.exe

View File

@ -0,0 +1 @@
94c15d115f711cd967b76c1e058cd8566fc56fa9 /home/mario/.opsi-dist-cache/irfanview.irfanview-4.35/X86/iview435g_setup.exe

View File

@ -1 +0,0 @@
b9301bcf49d58f97fcfe9d017e88e28393d183ab /home/opsiproducts/.opsi-dist-cache/irfanview.irfanview-4.35//preview-29-1353-280.jpg