This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
userspace:mozilla_thunderbird [2011/10/11 12:32] pgs |
userspace:mozilla_thunderbird [2021/08/23 08:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Winst-Script for Mozilla Thunderbird ===== | ===== Winst-Script for Mozilla Thunderbird ===== | ||
- | by Christoph Schineller / Patrick G. Stößer | + | by Sven Noherr |
- | This script has no uninstaller yet since Mozilla | + | Dieses Script installiert |
- | The Thunderbird setup file has to be in /files and has to be renamed to setup.exe. | + | ==== 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 | ||
- | Tested on WinXP and Win7. | + | ==== files\mozilla.cfg ==== |
+ | <code js> | ||
+ | // | ||
+ | lockPref(" | ||
+ | </ | ||
- | ==== thunderbird.ins ==== | + | ==== 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> | <code winst> | ||
+ | [Actions] | ||
+ | requiredWinstVersion >= " | ||
+ | if FileExists(" | ||
+ | Sub " | ||
+ | else | ||
+ | logError " | ||
+ | isFatalError " | ||
+ | endif | ||
- | [Initial] | + | if not(HasMinimumSpace (" |
- | ; | + | LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$ |
- | Message=Installiere Mozilla Thunderbird 7.1 | + | isFatalError "No Space" |
- | StayOnTop=false | + | ; Stop process and set installation status to failed |
- | LogLevel=2 | + | else |
- | ExitOnError=False | + | comment "Show product picture" |
- | ScriptErrorMessages=on | + | ShowBitmap " |
- | TraceMode=off | + | |
- | [Aktionen] | + | if FileExists(" |
- | WinBatchInstall | + | comment "Start uninstall sub section" |
+ | Sub " | ||
+ | endif | ||
- | [WinBatchInstall] | + | Message " |
- | %SCRIPTPATH%\files\setup.exe -ms | + | |
+ | 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 | ||
+ | </ | ||
+ |