
Usually, after installing Mozilla products in a corporate environment, you must additionally install:
- company standard set of plugins
- make typical settings
Why not integrate the necessary plug-ins and typical settings into the distribution kit?
The purpose of this article is to show how you can repack the Mozilla distribution by adding the necessary components.
I ’ll just
make a reservation : I’ll not discuss the installation of any distribution in a corporate environment - there are a lot of articles written about it and there are many ready-made or self-made tools.
The second disclaimer : distributing a modified Mozilla distribution outside your organization without signing an additional agreement with Mozilla will violate the license agreement.
')
But our goal is to prepare an internal distribution for your organization, so everything is in order.
Repacking will require:
The product distribution (in this example, Firefox) -
www.mozilla.org/en-US/firefox/organizations/all7zip Archiver -
www.7-zip.org/download.htmlSFX module for 7zip -
svn.smedbergs.us/cck-repack/trunk/resources/7zSD.sfxTraining.
“Once Gerasim caught a goldfish.
And how he did not try to explain that he wanted a big house, a cool car and a beautiful wife — he received only three cows.
Competently formulated - half doneTherefore, before repacking the distribution, you should prepare:
- List of plug-ins that need to be integrated into the distribution kit, and their distribution kits
- The list of settings is the default with the values ​​that need to be integrated into the distribution (It may be necessary to add default settings for integrable plug-ins)
Unpacking
There is nothing easier: go to the folder with the downloaded distribution and unpack it 7zip.
I got this command:
"C:\Program Files (x86)\7-Zip\7z.exe" x .\"Firefox Setup 24.4.0esr.exe" -o"Firefox Setup 24.4.0.esr"
Modification.
In after unpacking the resulting folder, we are primarily interested in the core \ browser \ extensions path. For Firefox up to version 24esr and for Thunderbird this path will be core \ extensions (I do not follow the non-ESR versions).
If you add extensions to this folder, they are integrated into the rebuilt distribution. I add the
Mozilla GPO plugin extension so that in the future you can manage any settings from group policies. You can put an xpi file right away, you can unpack it and put an extension folder. There may be a problem with the name of the file / folder - see the problem solving at the end of the article.
You can also set some default settings.
Personally, I prefer to lower them through a GPO, but maybe the distribution will be installed on a PC not in the domain, so you shouldn’t ignore these settings either.
To do this, in the core \ defaults \ pref folder, you must create a file with default settings. The file must be in UTF-8 encoding and it should be called all- <company name> .js. For example all-contoso.js:
pref("extensions.autoDisableScopes", "11");
Without this setting, Mozilla will ask the user whether to install plug-ins. By default, this parameter value is 15. You can read more
here.We pack.
After modification, go to the folder with the corrected distribution (where the core, win32 and setup.exe folders are located) and pack it into the archive. I got this command:
"C:\Program Files (x86)\7-Zip\7z.exe" a -r -t7z app.7z -mx
Create an app.tag file (in the UFT-8 encoding!) In the same folder that tells sfx what to run after unpacking the archive, with the contents:
;!@Install@!UTF-8! Title="Firefox 24.4.0 ESR customized" RunProgram="setup.exe" ;!@InstallEnd@!
We copy in the same folder 7zSD.sfx.
We “glue” the sfx module, app.tag and the archive of the application:
copy /B 7zSD.sfx+app.tag+app.7z "Firefox Setup 24.4.0.esr.custom.exe"
Is done.
Now after installing from the created distribution:
- All included add-ons will automatically be installed.
- In all user profiles, your default settings will be applied (If the profile does not explicitly indicate the setting value)
Possible problems and their solution.
If your default settings do not apply:
- Check the name and location of the settings file in the distribution (unwanted national characters, spaces and special characters in the file name)
- Check the encoding of the default settings file (Must be only UTF-8 without BOM)
If integrated plug-ins did not catch up:
- Check the value of the extensions.autoDisableScopes parameter. If the plugins from the Firefox folder are prohibited, then the user will be notified that someone is trying to install the plugin.
- Check that you have correctly named the file (or plugin folder). The plugin file must have a name of the form id.xpi, where id is the id of the plugin as in install.rdf in the em: id field inside the plugin. The folder name of the plugin must match its id.
The surest way to ensure that this condition is met: install the plug-in through the Mozilla plug-in management interface, and then copy the plug-in folder (or file) from the user profile to the corporate distribution you are creating.
PS "Inspiration" drew from the article:
mike.kaply.com/2007/07/27/manually-repackaging-the-firefox-installer-on-windowsBut I had to additionally deal with the file name for the default settings, as well as to understand why some plugins did not want to integrate.