This shows you the differences between two versions of the page.
userspace:freepdf_4.06 [2012/09/19 13:14] bhubal |
userspace:freepdf_4.06 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Freepdf 4.06 ====== | ||
- | 2012-08-28\\ | ||
- | Script by uib GmbH \\ | ||
- | Comments and improvements welcome \\ | ||
- | id: freepdf\\ | ||
- | name: FreePDF Printer\\ | ||
- | version: 4.06\\ | ||
- | |||
- | ghostscript is needed, so make a dependency \\ | ||
- | |||
- | Full package: https:// | ||
- | |||
- | ==== setup.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; 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:// | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | ; the path were we find the product after the installation | ||
- | Set $InstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | else | ||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | Message " | ||
- | |||
- | |||
- | comment "Start setup program" | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | |||
- | Winbatch_install_printer | ||
- | Sub_check_exitcode | ||
- | |||
- | comment " | ||
- | LinkFolder_install | ||
- | |||
- | endif | ||
- | |||
- | [Winbatch_install] | ||
- | " | ||
- | |||
- | [Winbatch_install_printer] | ||
- | rundll32 printui.dll, | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== delsub.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; 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:// | ||
- | |||
- | |||
- | Set $MsiId$ = ' | ||
- | Set $UninstallProgram$ = $InstallDir$ + " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram$) | ||
- | comment " | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | if not (GetRegistryStringValue32(" | ||
- | comment "MSI id " + $MsiId$ + " found in registry, starting msiexec to uninstall" | ||
- | Winbatch_uninstall_msi | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_uninstall /32Bit | ||
- | |||
- | [Winbatch_uninstall] | ||
- | " | ||
- | |||
- | [Winbatch_uninstall_msi] | ||
- | msiexec /x $MsiId$ /qb! REBOOT=ReallySuppress | ||
- | |||
- | [Files_uninstall] | ||
- | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
- | ; | ||
- | del -sf " | ||
- | del -sf " | ||
- | |||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | </ | ||
- | |||
- | |||
- | ==== uninstall.ins ==== | ||
- | |||
- | <code winst> | ||
- | ; 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:// | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $InstallDir$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | </ |