Jan 13

A standalone Helloworld XUL example (XULRunner)

Scribbled on Sunday, January 13th, 2008

  • I know it was tedious to create that hierarchy but then you are about to learn something thats worth it.
  • Now write the Following lines into “application.ini”
[App]

Vendor=Visio

Name=Hello World

Version=1.0

BuildID=20080114

Copyright=Copyright (c) 2008 jit

ID=visio159@wordpress.com[Gecko]

MinVersion=1.8

MaxVersion=1.9.0.*
  • And in “chrome.manifest” write: Its basically maps the file URI to chrome URI
content helloworld file:content/
  • In “main.xul” write: The main file that will create the windows and GUI.
<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?><window id="main" title="Hello World" width="300" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <caption label="Hello World"/>

</window>
  • In “prefs.js” write: Silly way to provide the address of main file
pref("toolkit.defaultChromeURI","chrome://helloworld/content/main.xul");

Now the final step is to run the application:

Execute the Example:

  • Open command prompt window
  • Execute example by providing “application.ini” as an argument to the “xulrunner.exe” as shown:
  • Yay the standalone application (which is now pretty much bland) is ready, cheers :)


Enjoyed this post? Subscribe to Full Feeds or by Email and receive free daily updates on this Blog.

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

  1. 3 Responses to “A standalone Helloworld XUL example (XULRunner)”

  2. 1

    kekmkN great site man thanks http://peace.com

    By bob on Thu 27th Mar, 2008

  3. 2

    in windows, gecko get an error that minversion is required. just add a gecko part in application .ini just like below.

    [App]

    Vendor=Visio

    Name=Hello World

    Version=1.0

    BuildID=20080114

    Copyright=Copyright (c) 2008 jit

    ID=visio159@wordpress.com[Gecko]

    [Gecko]
    MinVersion=1.8

    MaxVersion=1.9.0.*

    By adem on Tue 01st Apr, 2008

  1. 1 Trackback(s)

  2. May 15, 2008: A standalone Helloworld XUL example (XULRunner) « A Bittersweet Life | blog

Post a Comment

January 2008
M T W T F S S
« Dec   Mar »
 123456
78910111213
14151617181920
21222324252627
28293031