How to pack standalone xulrunner app

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

I am trying to create an application using the Mozilla XUL format.

+7
source share
2 answers

Here are the steps:

  • Compressing the application folder tree using WinZip.
  • Rename the zip file to have a .xpi extension. (i.e. myApp.xpi).
  • Assuming you have xulrunner in your PATH, do: xulrunner --install-app myApp.xpi.

On Windows, this installs your application in

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

Where exactly matches what is in your application.ini file.

On Linux, the process is similar. In OS X, however, things are quite different. I have not completed the OS X process.

See also XULRunner Deployment .

+6
source

Too bad that xulrunner cannot run zipped.xpi or .xulapp directly, but you can pack most of your .js, .xul, .css and .png files in a jar and wrap everything with a private copy of xulrunner, without having to run -install -app

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

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

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

Then in d: \ download \ space, place 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 contents of the files are as follows. All three files must 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 in your .wxs for WiX and create an MSI file for Wndows. Of course, you also need to include all the files for XULRunner.

+1
source

All Articles