Changes

Jump to: navigation, search

XUL Application Packaging

2,510 bytes added, 17:41, 17 March 2009
To Do
[http://jsdoodnauth.wordpress.com/2008/11/25/how-to-read-files-in-xul/ Reading Files in XUL]<br />
[http://jsdoodnauth.wordpress.com/2008/11/26/xul-file-io-write-files/ Writing Files in XUL]
----
==== The File Picker ====
One of the goals of this packager is for it to be platform independent. By using the File Picker, not only does it make it easy for the end-user to select the location of their application, but nsIFilePicker will return a platform specific path to the program.
}
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!
----
* <strike>Clean up code</strike>
* <strike>Do some validation</strike>
 
* 0.8
** Merge completed Mac packaging into XRap
** Create a log file, storing:
*** all output from status box
*** guid's created
*** errors
** Mac
*** get correct package name from application.ini
* 0.9
** Add icon support in Wix script
** Windows
*** zip files for Mac and Linux distro and add script to run '--install-app' for each
** Linux
*** zip files for Mac distro and add script to run '--install-app'
** Mac
*** zip file for Linux distro and add script to run '--install-app'
==External Links==
1
edit

Navigation menu