Install and run your XULRunner application
Instructions to create an application XUL Runner can run under Windows.
- Download the XULRunner runtime for Windows.
- Get a sample application, there is one inside the XULRunner archive or along with the Scriptol compiler.
- install this example into the directory of your application.
- the hierarchy of folders looks as this:
myapplication
|___ chrome
|___ content
|___ myapplication
|___ locale
|___ en-US
|___ myapplication
|___ defaults
|___ preferences
- install this example into the directory of your application.
- Put your XUL and RDF files into myapplication\chrome\content\myapplication\
- the XUL source must include this line:
- myapplication\application.ini (the name of the .ini file is not important).
- Vendor=MyOrganization
- Name=myapplication
- ID={}
You need for a UUID/GUID generator. See at this site, or go to mozilla.org.
- Min Version=1.8
- Remove the Max Version line.
- myapplication\defaults\preferences\myapplication-prefs.js
- pref("toolkit.defaultChromeURI", "chrome://myapplication/content/myapplication.xul");
Be aware that "myapplication" before "content" is not a folder. You may have a directory for your application in content if there are several applications:
"chrome://myapplication/content/myapplication/myapplication.xul"
- myapplication\chrome\chrome.manifest
- content myapplication content/myapplication/
- locale myapplication en-US locale/en-US/myapplication/
- optionally: myapplication\chrome\locale\en-US\myapplication\myapplication.dtd
- locale DTD for foreign languages may be found on XulPlanet.com
- for the command line, create a batch file: xulrunner.bat to call Xul Runner. It has just one line:
c:\Program Files\xulrunner\xulrunner %1
- to run the application, type: xulrunner C:\myapplication\myapplication.ini
- For the icon, put this in the target field of properties:
"C:\Program Files\xulrunner\xulrunner.exe" c:\myapplication\myapplication.ini
全站熱搜