Big Blue Button: How to compile bbb-client on Ubuntu using mxmlc [BASH SCRIPT]


One of the problems, that I have encountered when installed Big Blue Button client on Ubuntu, was that Flash Builder does not work on Unix platforms. So there were no options for me compiling a single module. The only options I found was recompiling all modules at once. It would be ok, if it won’t took at least a minute for each compilation. Than I realized that there is this wonderful thing “mxmlc” which compiles mxml files, however it needs libraries and bundles. I spend some time writing the “compilation line”.

So to make story short…. I have created script that does everything for you. It is easy modified, so feel free to modify it for your needs. This script implies that your Big Blue Button client is installed on account called “firstuser”, if not, just change the path and you are ok.

If you need some more information how to use it , I’ve posted detailed instruction here.

Script:

  #!/bin/bash


#Checks number of arguments
if [ ! -n "$1" ]
then
  echo ""       
  echo "ERROR:Syntax for this command is ./compile-module <moduleName> (without extension just name) "
  echo " "
  exit 
fi  
# Shows current version of script
if [ "$1" == "-v" ]
        then
                echo " bbb-client Module Compiler"
                echo "     v 1.0  Created: September 28, 2011"
                echo "          by Anatoly Spektor  << http://myprogrammingblog.com  >>"
                exit
fi

#if number of arguments are correct check if file name that user passed exist
if [ -f "/home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/src/$1.mxml" ]
then
 #if exist compile using mxmlc parameters such as sourcepath libraries etc
  mxmlc  /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/src/$1.mxml -sp /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/src  -l /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/libs -locale -accessible
 else
        echo "$1.mxml does not exist, please choose another name"
fi

#if compilation went well compilable file should be in the directory
if [ -f "/home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/src/$1.swf" ]
  then

        #IF  COMPILABLE FILE EXIST --> MOVE TO "BIN"
                
        mv  /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/src/$1.swf /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/bin
        #OUTPUT SUCCESS
        echo " ----------------------------------------------------- "
        echo "CONGRATULATIONS FILE: $1.swf  COMPILED AND MOVED TO:"
        echo "                                          /home/firstuser/dev/source/bigbluebutton/bigbluebutton-client/bin " 
        echo " ----------------------------------------------------- "
  else
        #OUTPUT ERROR
        echo " ----------------------------"
        echo "$1.swf was not created"
        echo " ----------------------------"
  fi

Advertisements

About Anatoly Spektor

My name is Anatoly Spektor (originally Anatolijs Spektors) I am Software and Web Developer. I have worked in Seneca Center for Development of Open Technology on Big Blue Button Add-on - Polling Module, Red Hat and some other places :) I am an author of the book 'Eclipse Debugging How To', Muay Thai fighter and amateur photographer ;)
This entry was posted in Bash (Unix Shell), Project BBB, Ubuntu and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s