====== Inkscape Ver. 0.48.4 ====== * Tested with opsi 4.0.3.x * requiredWinstVersion >= 4.10.8.6 * Files can be downloaded at http://inkscape.org/download By --- //[[florian.knodt@finzelberg.de|adlerweb]] 2013/04/17 13:59// Tree:\\ ├ delsub.ins ├ inkscape-0.48.4-1-win32.exe ├ inkscape.png ├ setup.ins └ uninstall.ins ==== setup.ins ==== [Actions] requiredWinstVersion >= "4.10.8.6" DefVar $UninstallProgram$ DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ DefVar $UninstallCommand$ Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "Inkscape" Set $MinimumSpace$ = "250 MB" Set $InstallDir$ = "%ProgramFiles32Dir%\Inkscape" 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$ if FileExists("%ScriptPath%\delsub.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub.ins" endif comment "installing" Message "Installing " + $ProductId$ comment "Start setup program" Winbatch_install Sub_check_exitcode endif [Winbatch_install] "%ScriptPath%\Inkscape-0.48.4-1-win32.exe" /S [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 ==== uninstall.ins ==== [Actions] requiredWinstVersion >= "4.10.8.6" DefVar $UninstallProgram$ DefVar $LogDir$ DefVar $ProductId$ DefVar $MinimumSpace$ DefVar $InstallDir$ DefVar $ExitCode$ DefVar $UninstallCommand$ Set $LogDir$ = "%SystemDrive%\tmp" Set $ProductId$ = "Inkscape" Set $MinimumSpace$ = "250 MB" Set $InstallDir$ = "%ProgramFiles32Dir%\Inkscape" comment "Show product picture" ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ Message "Uninstalling " + $ProductId$ + " ..." if FileExists("%ScriptPath%\delsub.ins") comment "Start uninstall sub section" Sub "%ScriptPath%\delsub.ins" endif ==== delsub.ins ==== if FileExists($InstallDir$+"\Uninstall.exe") set $UninstallCommand$ = $InstallDir$+"\Uninstall.exe /S" Winbatch_uninstall sub_check_exitcode endif [Winbatch_uninstall] $UninstallCommand$ [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