# XULMaker Project

## Deployment for Development
- Packaging, Installing and Launching

### Packaging for Development

During development we use CVS in "xulmaker.mozdev.org" to store all our source (including "xulmaker.mozdev.org" web pages). The "sandbox" on our development machine reflects the directory structure in CVS.

The directory structure reflects the requirements for a "chrome:" application. This is the packaging for XULMaker in development mode. (Note that this is not a jar file.)

### Installing (Registration) for Development

Installing for development is essentially a registration process.

We have registered the XULMaker application - development mode, by making entries in the "installed-chrome.txt" file in Mozilla's "chrome" directory. For example, we have Mozilla installed on our development machine at "E:/Program_Files/mozilla.org/Mozilla_1-0-1/" which has the "chrome/" directory - the registration file is "E:/Program_Files/mozilla.org/Mozilla_1-0-1/chrome/installed-chrome.txt". And we have our sandbox at "D:/Project_Files/mozilla/xulmaker/"

The entries in the "installed-chrome.txt" are as follows:

- content,install,url,file:/d:/Project%20Files/mozilla/xulmaker/content/
- skin,install,url,file:/d:/Project%20Files/mozilla/xulmaker/skin/modern/
- locale,install,url,file:/d:/Project%20Files/mozilla/xulmaker/locale/en-US/

Each of these directories contains an appropriate "contents.rdf" file that is used by Mozilla upon startup to perform the registration.

What actually happens is that Mozilla reads the `installed-chrome.txt` file upon startup (each time), and creates a `chrome.rdf` file. (You need to remove the `chrome.rdf` file to ensure that any changes in the `installed-chrome.txt` file take affect. Changes do happen under some circumstances but, not knowing what they are, the easiest thing to do is to simply remove the file and let the system re-create it.)

It's also important to note that locales and skins refer to packages that are defined in content. As such, you can't have a locale or a skin without a content

### Launching for Development

To run the XULMaker application we have created a desktop icon, a copy of the mozilla icon, and have modified its properties to execute with the xulmaker chrome. This is equivalent to giving this as a DOS command. The command is as follows:

`"E:\Program Files\mozilla.org\Mozilla\mozilla.exe" -chrome chrome://xulmaker/content/`

(We frequently need to bring up the Task Manager to kill any remnants of a running "mozilla.exe" before we can successfully launch XULMaker. This ensures that any caches are flushed and we are truelly running the application as we have just modified.)

## Deployment
- Packaging, Installing and Launching

### Packaging

We use XPIMaker to create "chrome:" packages. XPIMaker originally comes from XUL Planet. (This link is not given anywhere in XUL Planet so be prepared to loose it here. We will publish a (corrected?) copy if and when it disappears from XULPlanet.)

We use the sandbox files to create a deployed package.

### Installing (Download and Registration)

### Launching

#### Launching as a Local `chrome:` Application

The following identifies various ways of launching the XUL Maker application as a local chrome application. Each of these methods assumes that `xulmaker` is already registered as a chrome application. (see Installation.)

Launch to run within the browser
  (This launches the xulmaker application within the browsers content view.)

1. Run Mozilla browser and enter the url: "`chrome://xulmaker/content/`" or "`chrome://xulmaker/content/xulmaker.xul`"

Launch to run as a stand-alone application
  (This launches the XUL Maker application independent of the browser.)

1. With the "chrome launcher" installed in the browser, select this menu item (it's under the File menu) and enter "xulmaker" in the prompt dialog. (The "chrome launcher" I believe originated from XULPlanet, but it's no longer available from there.)
2. Run Mozilla browser with "xulmaker" as a chrome argument - `"mozilla -chrome chrome://xulmaker/content/"`. There are several ways of doing this.
   - (a) simple enter the command at a DOS command prompt;
   - (b) enter the command at Start | Run ;
   - (c) create an image icon on the desktop (copy the Mozilla one), right click to get the properties dialog and then enter the command as the target. (see "Creating Applications with Mozilla - Chapter 2 Getting Started - Launching the Application".)

#### Launching as a Local or Remote non-`chrome:` Application

Instead of using the `chrome:` protocol we launch the application using the `file:` protocol to run locally or the `http:` protocol to run remotely.

In either case, security protocol blocks certain behaviour that is not an issue when running locally as a `chrome:` application.