You are here: osflash » fxr_howto
Create a base folder to work in
  • This tutorial will work inside a folder called ‘xul’

sh:~$ mkdir xul

Get 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
  • 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 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 a folder called ‘test’ inside ‘~/xul’

sh:~$mkdir ~/xul/test

  • Create a folder called ‘chrome’ inside ‘~/xul/test’

sh:~$mkdir ~/xul/test/chrome

  • Create a folder called ‘content’ inside ‘~/xul/test/chrome’

sh:~$mkdir ~/xul/test/chrome/content

  • Create a folder called ‘test’ inside ‘~/xul/test/chrome/content’

sh:~$mkdir ~/xul/test/chrome/content/test

  • Create a folder called ‘defaults’ inside ‘~/xul/test’

sh:~$mkdir ~/xul/test/defaults

  • Create a folder called ‘preferences’ inside ‘~/xul/test/defaults’

sh:~$mkdir ~/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
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
	title="Test"
	xmlns:html="http://www.w3.org/1999/xhtml"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
	style="width:750px;height:550px;margin:0px;padding:0px;"> 
  <html:embed src="app.swf" width="750" height="550"/>
</window>
  • 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



Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
About - Site design by Aral Balkan, based on the original design by Nicolas Coevoet. OSFlash © 2005 Aral Balkan.
OSFlash, the OSFlash logo and mascot are trademarks of Ariaware Limited.

You are here: osflash » fxr_howto OSFlash footer graphic (graffiti).