Tuesday, January 26, 2010

How to run Firefox 3.7a in headless mode

This post is inspired by a need to get Selenium testsuites running faster. This is done on Ubuntu Linux x86_64 platform.
I will assume you have Firefox 3.7a from the daily repositories installed on your system.
First you have to get the sources for a incubator project called 'Offscreen':
  • wget http://hg.mozilla.org/incubator/offscreen/archive/tip.zip
Unzip them:
  • unzip tip.zip
Download compile configurations for Offscreen and put them in the newly created directory:
  • wget -O mozconfig https://bug446591.bugzilla.mozilla.org/attachment.cgi?id=350162
Inside the new directory, run:
  • make -f client.mk build
You might need some dependencies. Make will tell you what you are missing, I will not describe how to get the dependencies needed, except this:
  • apt-get install autoconf2.13
If everything went correctly, you should now be able to do:
  • ../obj-x86_64-unknown-linux-gnu/dist/bin/xulrunner /usr/lib/firefox-3.7a1pre/application.ini
You should now be presented with lots of output from your newly compiled Xulrunner, most notably when it stops:
  • [url = chrome://ubufox/content/startpage.html]
Congratulations, you now have your very own headless Firefox!

Friday, July 11, 2008

How to set up Zend Studio Neon with a SVN project

  1. In Zend Studio, select File -> Import
  2. Select SVN -> Projects from SVN and click 'Next'
  3. Create a new repository location to your SVN server
  4. Select the Folder you want to be the root of your project
  5. Click Finish
  6. A new dialogue should appear. Select the option to "Check out as a project configured using the New Project Wizard"
  7. Click Finish
  8. Select PHP -> PHP Project and click 'Next'
  9. Give the new project a name and set up any specific project configurations you may have. Click 'finish'.
  10. Voila!

Tuesday, July 8, 2008

How to set up Eclipse and PDT for Cola and DocShare through ECF

1. Follow the instructions to install ECF:
http://www.eclipse.org/ecf/downloads.php

2. In my example let's use gmail as a communications protocol:
  • Open the 'Communications' perspective
  • Click the icon that says 'Connect to Provider'
  • Select XMPPS
  • Input your gmail account and password
3. ECF has a limitation so that you can only use it with the default text editor and the Java editor, but we want to use it with PDT:
  • Open ../eclipse/plugins/org.eclipse.ecf.docshare_2.0.0.v20080623-0024.jar
  • Open the file plugin.xml
  • Paste in this XML:
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:org.eclipse.php.core.phpsource.source.EditorContext">
<dynamic class="org.eclipse.ecf.internal.provisional.docshare.menu.DocShareRosterMenuContributionItem"
id="org.eclipse.ecf.docshare.php.dynamic3">
</dynamic>
</menuContribution>
</extension>
Now you should have a new menu entry in PHP editing mode that displays "Share Editor With"

How to set up Eclipse, Subversive, JavaHL and Ubuntu

1. Get Subversion sources from here:
https://launchpad.net/ubuntu/intrepid/+source/subversion/1.5.0dfsg1-1ubuntu2

2. Unpack it:
tar zxvf subversion_1.5.0dfsg1.orig.tar.gz

3. Get the needed dependencies packages:
apt-get install libapr1-dev
apt-get install libaprutil1-dev

4. Install Subversion 1.5:
cd subversion-1.5.0dfsg1

./configure --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun/
make install
make javahl
make install-javahl

5. Specify where Eclipse can find the new java classes you just installed (I have wrapped this in a shell script, but you can also put this in eclipse.ini):
/some/path/eclipse -vmargs -Djava.library.path=/usr/local/lib

6. Add Polarion SVN connector weekly update site:
http://www.polarion.org/projects/subversive/download/eclipse/2.0/weekly-site/

7. Add Subversive weekly update site:
http://download.eclipse.org/technology/subversive/0.7/weekly-site/

8. Install Subversive and your Native JavaHL Connector for Subversion 1.5 through the update tool in Eclipse.

9. Enjoy!

I hope I didn't miss anything important, since I wrote this after I successfully got it all installed.