User Tools

Site Tools


userspace:irfanview_4.3

This is an old revision of the document!


Irfan View 4.33

2012-12-12
Script by uib gmbh
Comments and improvements welcome
Tested with opsi 4.0.2

type: localboot
id: irfanview
description: Grafikviewer
version: 4.33

Full package: http://download.uib.de/opsi4.0/products/contribute/full-package/

setup.ins

; 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/
 
 
[Actions]
requiredWinstVersion >= "4.11.2.6"
setloglevel = 6
 
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $NewExe$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $UserSpecificIni$
 
; This should be edited
set $ProductId$ = "IrfanView"
set $MinimumSpace$ = "20 MB"
set $InstallDir$ = "%ProgramFiles32Dir%\"+$ProductId$
set $NewExe$ = $InstallDir$+"\"+"i_view32.exe"
 
Set $UserSpecificIni$ = ''
if GetProductProperty("user_specific_ini", "false") = "true"
	Set $UserSpecificIni$ = '/ini="%APPDATA%\irfanview'
endif
 
Message "Installing "+$ProductId$+" ..."
 
if not(HasMinimumSpace ("%SYSTEMDRIVE%", $MinimumSpace$))
	LogError "Not enough space on C: . "+$MinimumSpace$+" auf C: fuer "+$ProductId$+" erforderlich."
	isFatalError
	; stop process and set installation status to failed
else
	comment "show product picture"
	ShowBitmap "%scriptpath%\"+$ProductId$+".png" $ProductId$
 
	if FileExists("%ScriptPath%\delsub.ins")
		comment  "start uninstall sub section"
		sub "%ScriptPath%\delsub.ins"
	endif
 
	;Message at install time:
	Message "Installing "+$ProductId$+" ..."
 
	comment "start setup program"  
	Winbatch_install
	sub_check_exitcode
 
	comment "Plugins start setup program"  
	Winbatch_install_plugins
	sub_check_exitcode
 
	comment "copy LANGUAGE files"
	Files_install
 
	comment "set start menu"
	LinkFolder_install
 
	comment "test for installation success"
	if not(FileExists($NewExe$))
		logError "Fatal: After Installation "+$NewExe$+" not found"
		isFatalError
	endif
 
	comment " patches Language"
 
	DefVar $Ini_file$
	Set $Ini_file$ =$InstallDir$+"\"+"i_view32.ini"
	Patches_INI $Ini_file$
 
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
		logError "Fatal: Setup program gives an unknown exitcode unequal zero: "+$ExitCode$
		isFatalError
	endif
endif
 
 
 
[Winbatch_install]
"%SCRIPTPATH%\iview433_setup.exe" /silent /folder="%ProgramFiles32Dir%\Irfanview" /desktop=0 /group=0 /allusers=1 /assoc=1 /assocallusers=1 $UserSpecificIni$
 
[Winbatch_install_plugins]
"%SCRIPTPATH%\irfanview_plugins_433_setup.exe" /silent 
 
[Files_install]
copy -sv "%SCRIPTPATH%\irfanview_lang_deutsch\*.*" "%ProgramFiles32Dir%\Irfanview"
 
[LinkFolder_install]
set_basefolder common_programs
set_subfolder $ProductId$
 
set_link
	name: "IrfanView"
	target: $NewExe$
	parameters:
	working_dir: $InstallDir$
	icon_file: $NewExe$
	icon_index: 0
end_link
 
set_link
	name: "IrfanView - Thumbnails"
	target: $NewExe$
	parameters: /thumbs
	working_dir: $InstallDir$
	icon_file: $NewExe$
	icon_index: 7
end_link
 
[Patches_INI]
set [Language] DLL=DEUTSCH
set [Language] Lang=DEUTSCH
userspace/irfanview_4.3.1355314805.txt.gz · Last modified: 2021/08/23 08:37 (external edit)