This shows you the differences between two versions of the page.
userspace:mozilla_thunderbird [2014/06/11 10:19] SvenN |
userspace:mozilla_thunderbird [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Winst-Script for Mozilla Thunderbird ===== | ||
- | by Sven Noherr | ||
- | |||
- | Dieses Script installiert Mozilla Thunderbird und deaktiviert die Suche nach neuen Updates. | ||
- | |||
- | ==== Struktur ==== | ||
- | +-files\ +-mozilla.cfg | ||
- | | +-Thunderbird-Setup-24.6.0.exe | ||
- | +-a_defaults.ins | ||
- | +-setup.ins | ||
- | +-sub_exitcode.ins | ||
- | +-sub_uninstall.ins | ||
- | +-thunderbird.png | ||
- | +-uninstall.ins | ||
- | |||
- | ==== files\mozilla.cfg ==== | ||
- | <code js> | ||
- | // | ||
- | lockPref(" | ||
- | </ | ||
- | |||
- | ==== a_defaults.ins ==== | ||
- | Dieses Skript muss als einziges " | ||
- | <code winst> | ||
- | DefVar $MsiId$ | ||
- | DefVar $Version$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | Set $LogDir$ = " | ||
- | |||
- | ; Diesen Wert bei einer neuen Version ändern | ||
- | Set $Version$ | ||
- | |||
- | Set $ProductId$ | ||
- | |||
- | Set $MinimumSpace$ | ||
- | |||
- | Set $InstallDir$ | ||
- | </ | ||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | logError " | ||
- | isFatalError " | ||
- | endif | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError "No Space" | ||
- | ; 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" | ||
- | ChangeDirectory " | ||
- | killtask " | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | PatchTextFile_noupdate $InstallDir$+" | ||
- | Files_install | ||
- | endif | ||
- | |||
- | [Winbatch_install] | ||
- | " | ||
- | |||
- | [PatchTextFile_noupdate] | ||
- | Set_Mozilla_Pref(" | ||
- | Set_Mozilla_Pref(" | ||
- | |||
- | [Files_install] | ||
- | copy " | ||
- | |||
- | [Sub_check_exitcode] | ||
- | if FileExists(" | ||
- | Sub " | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== sub_exitcode.ins ==== | ||
- | Da dieser Code-Schnipsel mehrfach gebraucht wird, habe ich ihn einfach als Sub ausgelagert. | ||
- | <code winst> | ||
- | set $ExitCode$ = getLastExitCode | ||
- | 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 | ||
- | </ | ||
- | |||
- | ==== sub_uninstall.ins ==== | ||
- | <code winst> | ||
- | Set $UninstallProgram$ = $InstallDir$ + " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram$) | ||
- | comment " | ||
- | Winbatch_uninstall | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | [Winbatch_uninstall] | ||
- | " | ||
- | |||
- | [Sub_check_exitcode] | ||
- | if FileExists(" | ||
- | Sub " | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | logError " | ||
- | isFatalError " | ||
- | endif | ||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | </ | ||