Mozilla Thunderbird 13 arrived this week. Guess what? Our customized build process broke again. Now, when you start TB for the first time, you get greeted with the option to create a new email account with one of Thunderbird’s “partners” (in other words, email providers who paid for the honor of being put in the “welcome to Thunderbird” start dialog).
With the assistance of the awesome Ben Coddington (who does not keep a blog, but should so that you can bask in his awesomeness), I was able to track down the place that the new-new account dialog is called, and kill it by switching a preference in the “thunderbird-all.js” file.
The preference is a Boolean named “mail.provider.enabled”, set in the thunderbird-all.js file, as documented here:
http://hg.mozilla.org/releases/comm-beta/rev/879e8d044e36
and referenced here:
https://bugzilla.mozilla.org/show_bug.cgi?id=718792#c3
and here:
https://wiki.mozilla.org/index.php?title=Thunderbird/Support/TB13UserChanges
I updated our Thunderbird build script to set this preference to “false”:
Echo modifying default "All Thunderbird" preferences... ..\..\..\bin\sed.exe --binary "s/pref(\"mail.provider.enabled\", true);/pref(\"mail.provider.enabled\", false);/" .\defaults\pref\all-thunderbird_new.js if errorlevel 1 goto err MOVE /Y .\defaults\pref\all-thunderbird_new.js .\defaults\pref\all-thunderbird.js
The whole ugly build script is provided below:
REM Thunderbird customized build script for UVM. REM Updated June 2012 for Thunderbird 13 support. REM REQUIRES: REM - 7z.exe, 7zr.exe and sed.exe in parallel "..\bin" directory REM - Unmodified Thunderbird installer in .\source directory REM - all required config files in .\config directory REM (including 7z control file, ISP Hook RDF file, and modified prefs.js) REM - local JDK install with "jar.exe". Path to jar.exe will need to be updated in the jdk environment variable REM OUTPUT: Fully modified Thunderbird installer in .\Installer directory. REM @echo on set jdk="c:\Program Files (x86)\Java\jdk1.6.0_27\bin" Echo Cleaning up old builds... del .\Installer\*.exe rmdir /s /q .\build set /P tbver=Enter Thunderbird version number to build (i.e. "6.0.2"): Echo Extracting setup files from OEM Installer... mkdir .\build\temp ..\bin\7zr x .\source\*.exe -o.\build Echo Extracting omni.ja contents... mkdir .\build\temp cd .\build\temp %jdk%\jar.exe xf ..\core\omni.ja if errorlevel 1 goto err Echo modifying messenger functions... ..\..\..\bin\sed.exe --binary "s/NewMailAccount(msgWindow, okCallback);/MsgAccountWizard(okCallback);/" .\chrome\messenger\content\messenger\msgMail3PaneWindow_new.js if errorlevel 1 goto err MOVE /Y .\chrome\messenger\content\messenger\msgMail3PaneWindow_new.js .\chrome\messenger\content\messenger\msgMail3PaneWindow.js Echo modifying default "All Thunderbird" preferences... ..\..\..\bin\sed.exe --binary "s/pref(\"mail.provider.enabled\", true);/pref(\"mail.provider.enabled\", false);/" .\defaults\pref\all-thunderbird_new.js if errorlevel 1 goto err MOVE /Y .\defaults\pref\all-thunderbird_new.js .\defaults\pref\all-thunderbird.js Echo modifying default mailnews preferences... ..\..\..\bin\sed.exe --binary "s/try_ssl\", 0)/try_ssl\", 2)/" .\defaults\pref\mailnews_new.js if errorlevel 1 goto err MOVE /Y .\defaults\pref\mailnews_new.js .\defaults\pref\mailnews.js Echo moving UVM modified prefs.js into place (note that this file is not actually used by Thunderbird!) copy /Y ..\..\config\prefs.js .\defaults\profile\prefs.js Echo Repacking omni.ja... del /f /q ..\core\omni.ja %jdk%\jar.exe cf ..\core\omni.ja * Echo Copying UVM Custom ISP file to source... cd ..\..\ mkdir .\build\core\isp\en-US copy /Y .\config\UVMMail.rdf .\build\core\isp\en-US\UVMMail.rdf if errorlevel 1 goto err Echo Copying UVM default prefs.js to core directory (tbird no longer has a prefs.js by default, but it will be used if present)... mkdir .\build\core\defaults\profile copy /Y .\config\prefs.js .\build\core\defaults\profile\prefs.js if errorlevel 1 goto err Echo Deleting temporary files that should not be present in the installer... rmdir /s /q .\build\temp Echo Repackaging Thunderbird installer... ..\bin\7zr a .\Installer\UVM_Thunderbird_setup_%tbver%.7z .\build\* copy /b ..\bin\7zS.sfx + .\config\config.txt + .\Installer\UVM_Thunderbird_setup_%tbver%.7z .\Installer\UVM_Thunderbird_setup_%tbver%.exe Echo Cleaning up installation source... del /s /f /q .\build\*.* rmdir /s /q .\build\core rmdir /s /q .\build del /f /q .\Installer\UVM_Thunderbird_setup_%tbver%.7z goto end :err echo There was an error running a command. :end