User Tools

Site Tools


userspace:gimp

This is an old revision of the document!


Table of Contents

Gimp

2012-12-10
Script by uib gmbh
Comments and improvements welcome

type: localboot
id: gimp
name: GNU Image Manipulation Program
description: GNU Image Manipulation Program
version: 2.8.0

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

gimp.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
setloglevel = 6
 
DefVar $LogDir$
Set $LogDir$ = "%SystemDrive%\tmp"
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $NewExe$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $OSArchitecture$
 
set $OSArchitecture$ = GetSystemType
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "gimp"
if $OSArchitecture$ = "64 Bit System"
	Set $MinimumSpace$    = "300 MB"
	Set $InstallDir$      = "%ProgramFiles64Dir%\GIMP 2"
else
	Set $MinimumSpace$    = "250 MB"
	Set $InstallDir$      = "%ProgramFiles32Dir%\GIMP 2"
endif
 
Set $NewExe$          = $InstallDir$ + "\bin\gimp-2.8.exe"
; ----------------------------------------------------------------
 
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" "GIMP"
 
	if FileExists("%ScriptPath%\delsub.ins")
		comment "Start uninstall sub section"
		Sub "%ScriptPath%\delsub.ins"
	endif
 
	Message "Installing GNU Image Manipulation Program ..."
 
	comment "Start setup program"
	Winbatch_install
	Sub_check_exitcode
 
	comment "Test for installation success"
	if not(FileExists($NewExe$))
		logError "Fatal: After Installation '" + $NewExe$ + "' not found"
		isFatalError
	endif
endif
 
[Winbatch_install]
"%ScriptPath%\gimp-2.8.0-setup.exe" /SILENT /SUPPRESSMSGBOXES /NOCANCEL
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to GIMP exit codes see help
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	logError "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1")
		logError "Setup failed to initialize."
	else
		if ( ($ExitCode$ = "2") or ($ExitCode$ = "5") )
			logError "The user aborted installation."
		else
			if ( ($ExitCode$ = "3") or ($ExitCode$ = "4") )
				logError "A fatal error occurred."
			endif
		endif
	endif
	isFatalError
endif

delsub.ins

; 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/
 
DefVar $MsiId$
Set $MsiId$ = '{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}'
 
Message "Uninstalling GNU Image Manipulation Program ..."
 
if FileExists($InstallDir$ + "\uninst\unins000.exe")
	comment "Uninstall program found, starting uninstall"
	Winbatch_uninstall
	sub_check_exitcode
endif
 
[Winbatch_uninstall]
"$InstallDir$\uninst\unins000.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to GIMP exit codes see help
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	logError "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1")
		logError "Setup failed to initialize."
	else
		if ( ($ExitCode$ = "2") or ($ExitCode$ = "5") )
			logError "The user aborted installation."
		else
			if ( ($ExitCode$ = "3") or ($ExitCode$ = "4") )
				logError "A fatal error occurred."
			endif
		endif
	endif
	isFatalError
endif
userspace/gimp.1355154097.txt.gz · Last modified: 2021/08/23 08:37 (external edit)