We need to compare the difference between the configuration changes between the new vision of the FF and the previous version
We wish to compare the configuration setting in plain text. Then we could use the compare tools such as beyond compare or winmerge to give us a quick visual for the difference.
There is not a official way to export the about:confg page from FF into plain text file. There is a prefs.js file locate in the firefox profile folder, it contains some of the configuration setting but not all.
Known solutions to export the about:config but not well enough:
- User prefs.js for only export the custom settings, check the link(http://superuser.com/questions/165164/how-to-export-firefox-aboutconfig-into-plain-text-file). But it is not fit for our requirement.
- User python to analyze the entire profile folder and parse the preference relative *.js files. But it is not sure works for the new versions of the FF(http://stackoverflow.com/questions/24548306/how-to-read-firefoxs-aboutconfig-entries-using-python)
Solution for export the about:config:
Use the GUI automation tool(autoit) to help export the configuration directly from the about:config page. The script is export-opened-firefox-config.au3 which could be download from my github repot
- Install autoit, which double be download from official website follow the previous link
- Download the export-opened-firefox-config.au3
- Before run the script close all the Firefox process existed in the current system
- Run the script export-opened-firefox-config.au3
- Open the Firefox that you want to export the about the configure content
- The script will start automatically and wait for it stops, please make any user input during the script execution
- The output.txt will be generated at the same location of the script file export-opened-firefox-config.au3 which contain all the configuration values
- Check the last line of the output.txt contain the last item of the about:config. If the values are same then all is well. If not please modify the sleep time for the script to give more calculate time for the low performance system.
Solution for generate the difference compilation results:
Use python to parse and generate the previous generate configuration files and the current user.js settings which contain in the LR-INSTALL-DIRECTORY\dat\FFProfile\user.js. The python script could be check out from my personal tools repo from github
- Install python 2.7.x, if current system doesn’t contain python environment
- Install xlsxwriter from pip or download the package install manually. Check this link, if you doesn’t familiar with python
- Download the script
- Copy and replace the about config content files and the user.js into the data folder to make it follow this file structure
5. Execute the python script the output files will be overwrite and generated automatically Note: If the excel file is not required you could common the script lines relative to generate excel to only generate plain text report. The key/value pair is separate by semicolons like this:
- A addon for add description information for the about:config page https://addons.mozilla.org/en-US/firefox/addon/config-descriptions/
- The wiki page for the about:config, http://kb.mozillazine.org/About:config_entries
- Some of the preference documents for the about:config, http://kb.mozillazine.org/Category:Preferences
- Document for user.js, http://kb.mozillazine.org/User.js
Note: the content of the wiki may adapt to the old version of FF to check the new version please follow the link supplied in the wiki pages.