7

I was wondering what I need to do to create an executable (.exe) file that will run my XUL application?

I'm trying to create an application using Mozilla's XUL format.

Paolo Forgia
  • 6,572
  • 8
  • 46
  • 58
escapebattle
  • 73
  • 1
  • 3

2 Answers2

6

Here are the steps:

  1. Compress your application folder tree using WinZip.
  2. Rename the .zip file to have a .xpi extension. (i.e., myApp.xpi).
  3. Assuming you have xulrunner in your PATH, execute: xulrunner --install-app myApp.xpi.

On Windows, this installs your app to

c:\Program Files\<Vendor>\<Application Name>\<Application Name>.exe

Where and match exactly with what is in your application.ini file.

On Linux, the process is similar. On OS X, though, things are quite a bit different. I haven't completed mastered the OS X process yet.

See also Deploying XULRunner.

retrodrone
  • 5,850
  • 9
  • 39
  • 65
  • I've been working more with xulrunner applications so I understand them better to know what your talking about :P Thanks for the help! – escapebattle Jul 06 '11 at 07:22
  • Sorry it's taken me so long to reply! I've finaly learned how to build a XUL applicaton. Thanks for the info! – escapebattle Oct 03 '11 at 18:16
  • Ready to use build scripts for packaging a minimal xulrunner application are available [here](https://github.com/neam/webapp-xul-wrapper). – Motin Dec 02 '12 at 21:10
  • --install-app option was recently replaced with the script install_app.py https://bugzilla.mozilla.org/show_bug.cgi?id=747597 – shuji Jul 14 '14 at 20:54
1

It is too bad that xulrunner can not run a zipped .xpi or .xulapp directly, but it is possible to package most of your .js, .xul, .css and .png files into a jar and wrap everything up with a private copy of xulrunner, without having to run --install-app

These are the steps I went through to package our XUL application.

The first step is to put all your files (except application.ini, chrome.manifest, and prefs.js) into a .jar file like this (all of this was carried out under Windows, make appropriate adjustments for Linux and OSX)

zip -r d:\download\space\akenispace.jar * -i *.js *.css *.png *.xul *.dtd 

Then in d:\download\space, layout your files as follows:

D:\download\space\akenispace.jar
D:\download\space\application.ini
D:\download\space\chrome.manifest
D:\download\space\defaults
D:\download\space\defaults\preferences
D:\download\space\defaults\preferences\prefs.js

The content of the files are as follows. All three files need to be adjusted to reflect your own application.

application.ini

[App]
Vendor=Akeni.Technologies
Name=Akeni.Space
Version=1.2.3
BuildID=20150125
Copyright=Copyright (c) 2015
ID=space@akeni.com

[Gecko]
MinVersion=1.8
MaxVersion=35

chrome.manifest

content     akenispace             jar:akenispace.jar!/chrome/content/
skin        akenispace    default  jar:akenispace.jar!/chrome/skin/
locale      akenispace    en-US    jar:akenispace.jar!/chrome/locale/en-US/
resource    akenispace             jar:akenispace.jar!/chrome/resource/

prefs.js

pref("toolkit.defaultChromeURI", "chrome://akenispace/content/space.xul");

Now you can put these files into your .wxs for WiX and produce a MSI file for Wndows. Of course you need to include all the files for XULRunner as well.

tst
  • 479
  • 4
  • 7