If the Mozilla application you are working on is more autonomous than a package that sits up on a Mozilla installation, you may want to add extra customization. Here are two common features: the program icon and the splash screen. Some features require that you build the source code yourself, even just a particular module instead of the whole tree. Refer to Appendix A for more details on obtaining and building the source code.
In Windows, create your own icon and then follow these steps:
// Program icon. IDI_APPLICATION ICON "mozdev.ico"
C:\mozilla\src>cd mozilla\xpfe\bootstrap C:\mozilla\src\mozilla\xpfe\bootstrap>nmake -f makefile.win
An alternative to Steps 2 and 3 is to give your icon the same name as the Mozilla icon (mozilla.ico) and just drop it into the tree, replacing the existing one shown in Figure 6-6.
![]() | If you want to change icons on a window-by-window basis, do it only in Mozilla on the Windows platform. In the chrome root, there exists a directory \icons\default\. Within this directory, you can place any number of icons for windows in your application. The filename has to be the same as the XUL window ID: <window_id>.ico. One example of an icon being used in this way is the DOM Inspector window in Mozilla. In the \icons\default\ directory you will find the file winInspectorMain.ico on Windows. This option is good for package authors who add windows to the Mozilla application and do not want to hijack this resource completely. Icons can be installed as part of an XPI. |
Are splash screens a necessary startup feature for a program or a shameless plug? The answer is probably somewhere in between, leaning toward the necessary in the case of Mozilla (Figure 6-7 shows Mozilla's splash screen).