Changes

Jump to: navigation, search

How to do an application using XULRunner

1,320 bytes added, 22:18, 23 October 2006
References
content myapp file:content/
'''References:'''== Setting up the prefs.js file == *[http://blogsThe prefs.accelerationjs file tells XULRunner which XUL file contains the main window.net/ryan/archive/2005/05/06/1073 The following was used for this simple application.aspx]*[http://developer.mozilla pref("toolkit.org/en/docs/Getting_started_with_XULRunner]*[httpdefaultChromeURI", "chrome://developer.mozilla.org/enmyapp/docscontent/XULRunner:Deploying_XULRunner_1main.8]*[http://developer.mozilla.org/en/docs/XUL_Application_Packaging XUL Application Packaging]xul");
== Setting up the prefs.js file ==
The '''pref''' function needs to be passed in two arguements. In this scenario, this document provided an explaination on what those two arguements are:
:*'''toolkit.defaultChromeURI''' is a preferences which allows a simple XULRunner-based application to open a new window
:*'''chrome://myapp/content/main.xul''' is the location of the main XUL file.
== Creating some XUL ==
For the similicity of this application, we're going to create a simple XUL window that says hello world.
<pre>
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 
<window id="main" title="My App" width="300" height="300"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<caption label="Hello World"/>
</window>
</pre>
== Running the application ==
 
To run the application, type the following:
If your on Windows:
xulrunner.exe application.ini
 
If your on Linux:
xulrunner application.ini
 
If your on Mac:
/Library/Frameworks/XUL.framework/xulrunner-bin application.ini
 
Make sure your in the application level of the XULRunner application.
 
== References ==
*[http://blogs.acceleration.net/ryan/archive/2005/05/06/1073.aspx XULRunner Tutorial]
*[http://developer.mozilla.org/en/docs/Getting_started_with_XULRunner Getting started with XULRunner]
*[http://developer.mozilla.org/en/docs/XULRunner:Deploying_XULRunner_1.8 Deploying XULRunner]
*[http://developer.mozilla.org/en/docs/XUL_Application_Packaging XUL Application Packaging]
1
edit

Navigation menu