Install and run your XULRunner application

Instructions to create an application XUL Runner can run under Windows.

  1. Download the XULRunner runtime for Windows.

  2. 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:


    |___ chrome

              |___ content

                       |___ myapplication

              |___ locale

                       |___ en-US

                                |___ myapplication

              |___ defaults

                       |___ preferences

  3. Put your XUL and RDF files into myapplication\chrome\content\myapplication\

    • the XUL source must include this line:

  4. Eedit the four following configuration files:

    • 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

      • 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:


    • 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

  5. Run your XUL program at command line or from within a Windows's icon:

    • 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



狼翔月影 發表在 痞客邦 留言(0) 人氣()