Building JW Player on linux

To build JW Player on linux, you need:

For all of them you should find corresponding packages for your distribution, I use archlinux.

Clone the project:

git clone git@github.com:jwplayer/jwplayer.git  
cd jwplayer  

Install dependencies:

yaourt -S jdk8-openjdk apache-ant apache-flex-sdk python2  

Ensure you have the right environment variables set:

source /etc/profile.d/apache-flex-sdk.sh  
# this script does this:
# export PLAYERGLOBAL_HOME=/opt/apache-flex-sdk/player
# export PATH="${PATH}":/opt/apache-flex-sdk/bin

Then in build/properties, change:

  • flexsdk = /Developer/SDKs/flex_sdk_4 to flexsdk = /opt/apache-flex-sdk
  • flexsdk.target = 10.1.0 to flexsdk.target = 11.1

Ensure that 11.1 exists by using ls /opt/apache-flex-sdk/player/, otherwise update the player version target.

Then in build/build.xml, change:

  • <exec executable="python" outputproperty="minifiedSkin"> to <exec executable="python2" outputproperty="minifiedSkin">

You are now ready to build:

ant -buildfile build/build.xml  
# [...]
# [...]
# BUILD SUCCESSFUL
# Total time: 8 seconds

You can find the build files in bin-release:

> ls -lha bin-release 
total 344K  
drwxr-xr-x 2 vvo vvo 4.0K Sep 23 12:06 .  
drwxr-xr-x 8 vvo vvo 4.0K Sep 23 13:23 ..  
-rw-r--r-- 1 vvo vvo 119K Sep 23 13:23 jwplayer.flash.swf
-rw-r--r-- 1 vvo vvo 158K Sep 23 13:23 jwplayer.html5.js
-rw-r--r-- 1 vvo vvo  56K Sep 23 13:23 jwplayer.js

Happy building!

comments powered by Disqus