== Create a base folder to work in == * This tutorial will work inside a folder called 'xul' ''sh:~$ mkdir xul'' == Get XULRunner == * [[http://developer.mozilla.org/en/docs/XULRunner|XULRunner]] * This walk-through uses the Linux release 1.8.0.1 * Unzip the tar.gz file you just downloaded ''sh:location_of_downloaded_xulrunner$ tar zxvf xulrunner-1.8.0.1.en-US.linux-i686.tar.gz'' * Copy the resulting xulrunner folder to be under the ~/xul folder ''sh:~$ cp -r location_of_downloaded_xulrunner/xulrunner ~/xul/xulrunner'' == Get the Flash plugins == * [[http://www.macromedia.com|Macromedia's website]] has a link near the bottom that allows you to download the flash player. * The current link for the linux tar.gz 'installer' is [[http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash|here]] * Unzip this file ''sh:location_of_downloaded_flash_installer$tar zxvf install_flash_player_7_linux.tar.gz'' == Install the Flash plugins == * Copy the two files flashplayer.xpt and libflashplayer.so in the tar.gz file you previously unzipped and paste the into the xulrunner folder we created. ''sh:~$cp -r location_of_downloaded_flash_installer/flashplayer.xpt ~/xul/xulrunner/plugins/flashplayer.xpt'' ''sh:~$cp -r location_of_downloaded_flash_installer/libflashplayer.so ~/xul/xulrunner/plugins/libflashplayer.so'' == Create application directory skeleton == * The folder structure were getting looks like this >>xul >>>>test >>>>>>chrome >>>>>>>>content >>>>>>>>>>test >>>>>>defaults >>>>>>>>preferences >>>>xulrunner * Create folder structure '~/xul/test/chrome/content/test' ''sh:~$ mkdir -p ~/xul/test/chrome/content/test'' * Create folder structure '~/xul/test/defaults/preferences' ''sh:~$ mkdir -p ~/xul/test/defaults/preferences'' == Create application files == * Create a file inside ~/xul/test called 'runapp.sh' with the contents ''#!/bin/sh\\ PATH=$PATH:$(pwd)/../xulrunner xulrunner application.ini'' * Create a file inside ~/xul/test called 'application.ini' with the contents ''[App]\\ Vendor=companyname\\ Name=test\\ Version=0.1\\ BuildID=20060220\\ Copyright=Nonsense\\ ID=somespecialidprobablyrelatedtosomekindofsubversioninfo\\ \\ [Gecko]\\ MinVersion=1.8\\ MaxVersion=1.8'' * Create a file inside ~/xul/test/chrome called 'chrome.manifest' with the contents ''content test file:content/test/'' * Create a file inside ~/xul/test/chrome/content/test called 'start.xul' with the contents * Create a file inside '~/xul/defaults/preferences' called 'prefs.js' with the contents ''pref("toolkit.defaultChromeURI","chrome://test/content/start.xul");'' == Wrap up == * You'll need to place your SWF file in the ~/xul/test/chrome/content/test folder. * You might need to tweak the width and height settings of the XULRunner window as well as the attributes on the html:embed tag in the start.xul file to fit your application * Make sure that the name of the main SWF matches the file referenced in the src attribute of the html:embed tag * Make sure the runapp.sh file is executable ''sh:~$chmod u+x ~/xul/test/runapp.sh'' == Executing your application == * Run the 'runapp.sh' executable script file from the test folder and enjoy!! ''sh:~$cd ~/xul/test'' ''sh:~$./runapp.sh''