profman wrote:The same customizations that the Netscape CCK took care of for a customized distribution to other people. This includes, but not limited to, pre-set bookmarks; pre-set personal toolbar; putting a custom label on the Title Bar and the start button folder; replace the throbber and throbber label; customize the UserAgent line; and give options for what components to install. This last option is not as big of a deal with Mozilla as it was with Netscape since Mozilla does not have all the "extra baggage" of Netscape.
I'd be a happy person if you could point me to info that would make all that possible!:)
You'll need to have a file zipper application, such as WinZip, and the Mozilla offline installer, which contains all the components in one file.
Run the installer. When you get your first setup window, go to your Windows TEMP directory. If you are using a Windows NTFS system, such as Windows XP, the TEMP directory will appear in Documents and Settings folder. Example: C:\Documents and Settings\Chris\Local Settings\Temp. Within the temp directory there will be a folder named ns_temp. This folder is the equivalent of the Output folder, when using the CCK. Copy it to a safe place, and cancel the open setup window.
Within ns_temp, you'll see:
setup.exe, which starts the setup process
config.ini, which is the contents of the setup process
An XPI installer for each component
ZIP files for components that can be installed separately
Other files that you won't need to worry about.
Anything you want to customize regarding the setup process is done through editing config.ini. You can edit it with any text editor. It is very well documented, so it should be quite easy to find your way around.
Each of the XPI files are zipped archives that get unzipped during install. You can use WinZip to edit the files within each of those.
By editing config.ini and the XPI files directly, you'll find that you can do can customize it much more than you would with a CCK tool. Holger's Netscape Compact is a great example of this.
First, lets start with install process, first of which is the name of the Start menu folder.
Open GONFIG.INI, and search for Program Folder Name=Mozilla. Replace Mozilla with whatever you want the folder to be called.
Next is configuring the setup types. A little further down you'll see a section that starts with [Dialog Setup Type].
You can set up as much as 4 different types.
Description Short= is the description you see beside the check box
Description Long= is the detailed description seen at the bottom of the window.
From there you can choose which components go into that setup type. The only thing you need to keep in mind is to make sure the first component is numbered C0 and it increases numerically from there. (C1, C2, etc.)
The rest is just a matter of knowing where the default settings lie, and how to change them.
The default bookmarks (which contains the personal toolbar folder) is different for every region pack, so that is the XPI that it is kept in. If you are going to use the US region pack the XPI's to edit are REGUS.XPI and DEFLENUS.XPI. As stated earlier, XPI's are archives that can be viewed and edited using WinZip. Within REGUS.XPI, you'll find bookmarks.html under bin\defaults\profile\US\. Within DEFLENUS.XPI, you'll find bookmarks.html under bin\defaults\profile\. You can customize your own bookmarks file by opening a new profile in a current install, and adding/subtracting whichever site you want. You can even edit it via Notepad, if you wish. Replace the archived file with the your custom made bookmarks.html and your default bookmarks are taken care of.
The label on the title bar depends on the language pack. The XPI is LANGENUS.XPI. With that, you'll see en-US.jar, which is another archive. You'll have to unzip that too. The file to edit is brand.dtd. You can edit it via Notepad.
The throbber and user-agent are both kept in BROWSER.XPI. The throbber is specific to each skin, so within BROWSER.XPI, you'll have to unzip both classic.jar, and modern.jar.
throbber-single.gif is the inactive throbber.
throbber-anim.gif is the active throbber.
throbber16-single.gif is the inactive throbber for full screen mode.
throbber16-anim.gif is the active throbber for full screen mode.
Replace those file with whatever you want.
The tooltip for the throbber is in LANGENUS.XPI -> en-US.jar -> navigator.dtd
Look for the line:
<!ENTITY throbber.tooltip "Go to the &vendorShortName; home page">
&vendorShortName; is a place holder for the item we edited in brand.dtd.
Finally the user agent. BROWSER.XPI -> browser-prefs.js.
Open it via Notepad and add these lines:
The settings in the lines above are what is used for Netscape 7.1 Compact. You can edit those to your liking.
And there you go. One thing to remember is, when you replace files within archives, make sure you maintain the file paths. For instance, browser-prefs.js is kept in bin\defaults\pref\.
As you probably figured, by editing the XPI files and CONFIG.INI directly, the possibilities are almost endless. The file structure of Netscape 7.1 is a little different, since it's based on Mozilla 1.4. For instance the user-agent pref lines are kept in all.js (actually all-ns.js, but that's another story). Since there is no all.js for Mozilla 1.7Beta, and assumed browser-prefs.js would work, since that seems to be the replacement.
The last step, if you'd like, is to turn ns_temp into one self-extracting EXE file. WinZip Self-Extractor can be used to accomplish this.
Some more info:
UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316