User Tools

Site Tools


userspace:mozilla_thunderbird

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
userspace:mozilla_thunderbird [2011/10/11 12:30]
pgs created
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 zhunderbird has to be setup on all our machines and there's no need to uninstall it. Also, updating over an existing install works fine.+Dieses Script installiert Mozilla Thunderbird und deaktiviert die Suche nach neuen Updates.
  
-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
  
 +==== files\mozilla.cfg ====
 +<code js>
 +//
 +lockPref("app.update.enabled", false);
 +</code>
  
-==== thunderbird.ins ====+==== a_defaults.ins ==== 
 +Dieses Skript muss als einziges "geändert" werden, wenn ein Update erscheint. 
 +<code winst> 
 +DefVar $MsiId$ 
 +DefVar $Version$ 
 +DefVar $UninstallProgram$ 
 +DefVar $LogDir$ 
 +DefVar $ProductId$   
 +DefVar $MinimumSpace$ 
 +DefVar $InstallDir$ 
 +DefVar $ExitCode$ 
 +Set $LogDir$ = "%SystemDrive%\tmp"
  
 +; Diesen Wert bei einer neuen Version ändern
 +Set $Version$         = "24.6.0"
 +
 +Set $ProductId$       = "thunderbird"
 +
 +Set $MinimumSpace$    = "50 MB"
 +
 +Set $InstallDir$      = "%ProgramFiles32Dir%\Mozilla Thunderbird"
 +</code>
 +
 +==== setup.ins ====
 <code winst> <code winst>
 +[Actions]
 +requiredWinstVersion >= "4.11.2.6"
 +if FileExists("%ScriptPath%\a_defaults.ins")
 + Sub "%ScriptPath%\a_defaults.ins"
 +else
 + logError "Fatal: a_defaults.ins nicht vorhanden!!!"
 + isFatalError "a_defaults.ins nicht vorhanden!!!"
 +endif
  
-[Initial] +if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$)) 
-;thunderbird 6.206_10_2011, cs/pgs + 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 "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
-TraceMode=off+
  
-[Aktionen] + if FileExists("%ScriptPath%\sub_uninstall.ins") 
-WinBatchInstall+ comment "Start uninstall sub section" 
 + Sub "%ScriptPath%\sub_uninstall.ins" 
 + endif
  
-[WinBatchInstall] + Message "Installing " + $ProductId$ + " ..."
-%SCRIPTPATH%\files\setup.exe -ms+
  
 + comment "Start setup program"
 + ChangeDirectory "%SCRIPTPATH%"
 + killtask "thunderbird.exe"
 + Winbatch_install
 + Sub_check_exitcode
 + PatchTextFile_noupdate $InstallDir$+"\defaults\pref\channel-prefs.js"
 + Files_install
 +endif
 +
 +[Winbatch_install]
 +"%ScriptPath%\files\Thunderbird-Setup-$Version$.exe" -ms
 +
 +[PatchTextFile_noupdate]
 +Set_Mozilla_Pref("pref","general.config.obscure_value", 0)
 +Set_Mozilla_Pref("pref","general.config.filename", "mozilla.cfg")
 +
 +[Files_install]
 +copy "%ScriptPath%\files\mozilla.cfg" $InstallDir$
 +
 +[Sub_check_exitcode]
 +if FileExists("%ScriptPath%\sub_exitcode.ins")
 + Sub "%ScriptPath%\sub_exitcode.ins"
 +endif
 </code> </code>
 +
 +==== sub_exitcode.ins ====
 +Da dieser Code-Schnipsel mehrfach gebraucht wird, habe ich ihn einfach als Sub ausgelagert.
 +<code winst>
 +set $ExitCode$ = getLastExitCode
 +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
 +</code>
 +
 +==== sub_uninstall.ins ====
 +<code winst>
 +Set $UninstallProgram$ = $InstallDir$ + "\uninstall\helper.exe"
 +
 +Message "Uninstalling " + $ProductId$ + " ..."
 +
 +if FileExists($UninstallProgram$)
 + comment "Uninstall program found, starting uninstall"
 + Winbatch_uninstall
 + sub_check_exitcode
 +endif
 +
 +[Winbatch_uninstall]
 +"$UninstallProgram$" -ms
 +
 +[Sub_check_exitcode]
 +if FileExists("%ScriptPath%\sub_exitcode.ins")
 + Sub "%ScriptPath%\sub_exitcode.ins"
 +endif
 +</code>
 +
 +==== uninstall.ins ====
 +<code winst>
 +[Actions]
 +requiredWinstVersion >= "4.11.2.6"
 +if FileExists("%ScriptPath%\a_defaults.ins")
 + Sub "%ScriptPath%\a_defaults.ins"
 +else
 + logError "Fatal: a_defaults.ins nicht vorhanden!!!"
 + isFatalError "a_defaults.ins nicht vorhanden!!!"
 +endif
 +
 +comment "Show product picture"
 +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
 +
 +Message "Uninstalling " + $ProductId$ + " ..."
 +
 +if FileExists("%ScriptPath%\sub_uninstall.ins")
 + comment "Start uninstall sub section"
 + Sub "%ScriptPath%\sub_uninstall.ins"
 +endif
 +</code>
 +
userspace/mozilla_thunderbird.1318336252.txt.gz · Last modified: 2021/08/23 08:37 (external edit)