Changes

Jump to: navigation, search

XUL Application Packaging

2,027 bytes added, 14:50, 9 March 2009
The File Picker
}
There are different modes which the File Picker can operate which can be found [http://www.xulplanet.com/references/xpcomref/ifaces/nsIFilePicker.html here]
 
==== The Wizard ====
In a push to get the UI to work with the program, I looked into XUL wizards. When I think about it, there is really only two buttons to push, one to load the app directory location, and the other to package the app, it's just a matter of doing it in the right order to get an output file. After a talk with Dave Humphrey a while back, he put it into my head that I should make it a wizard, which is essentially what my program is.<br />
Creating a wizard in XUL, is really a matter of knowing what you want the user to enter for each step, and then making a wizard page for it.
 
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<wizard id="example-window" title="My First Wizard"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<wizardpage>
<description>
This is my first wizard"
</description>
<label value="What do you want to know?"/>
<menulist>
<menupopup>
<menuitem label="How to make a wizard"/>
<menuitem label="How to make a wizard page"/>
<menuitem label="All about XUL"/>
</menupopup>
</menulist>
</wizardpage>
<wizardpage description="This second wizard page">
<label value="Anything else to it?"/>
</wizardpage>
</wizard>
For XRap however, I wanted separate pages for each platform, depending on what the user is working on. Especially since packaging for Mac can only be done on a Mac, and cross packaging for Linux and Windows is quite buggy right now. Its the best solution to keep them separate. I used the 'navigator.platform' on the first wizard page to filter the platform, and direct the user the platform specific second wizard page. The second page will be where the app actually gets packaged. Finally the third page is just a generic Packaging completed page.
* I recently got some feedback on my blog, that I should add a button to open the location for where the package was created. I'll definitely add this for my next release!
----
1
edit

Navigation menu