Monday, August 12, 2013

How to create Jitsi Mac installer

Requirements for building source code and create installer

  1. Java ->> by default mac ships with Java (Make sure it is up-to date update)
  2. Ant ->> by default mac ships with ant
  3. Command line developer tools ->> you can install this from Xcode or download the developer command line tools package and install. We need "SetFile" tool for creating the installer, by default these tool is install under "/usr/bin/" but "ant" looks for this tool under "/Developer/tools/" directory. So, to over come this issue, create a soft link ->> create directory  "/Developer/tools", then run this command "sudo ln -s /usr/bin/SetFile /Developer/Tools/SetFile"
  4. jarbundler 2.2.0 ->> you can download it from here http://sourceforge.net/projects/jarbundler/ extract the zip and Move the file jarbundler-2.2.0.jar into /usr/share/ant/lib

Tested on Mac

  • OS X 10.8.3 
  • Java - version "1.6.0_45"  
    • Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)  
    • Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode) 
  • Apache Ant(TM) version 1.8.2 compiled on June 20 2012

Before you start creating a installer

  1. Get the source code (zip) from GitHub ->> https://github.com/jitsi/jitsi
  2. Extract the downloaded zip package to "jitsi-master" directory
  3. Open terminal and go to the extracted "jitsi-master" directory
  4. Run "ant rebuild" ->> to build(compile) the jitsi source code
  5. If  "ant" builds the source code with out any issues, then you are go to follow steps to create installer

Steps to create Installer(dmg) on mac

  1. Create a directory called "classes" under "jitsi-master/resources/install" directory
  2. Copy "jitsi-master/sc-bundles" directory to "jitsi-master/resources/install" directory
  3. Run this command "rm -rf resources/install/sc-bundles/*-slick.jar" ->> to remove all unit test files
  4. Copy "jitsi-master/lib/" directory contents(files & directories) except "installer-exclude" directory to "jitsi-master/resources/install/lib/" directory
  5. Copy the logo image "jitsi-master/resources/images/logo/logosc_logo_128x128.icns" to "jitsi-master/resources/install/"
  6. Edit "jitsi-master/resources/install/build.xml" and replace ' icon="resources/images/logo/sc_logo_128x128.icns" ' with ' icon="sc_logo_128x128.icns" '
  7. In Terminal go to this directory "jitsi-master/resources/install"
  8. Run this command "sudo ant dmg" ->> you need to run this command as sudo user because as a normal user you may not have the permissions to create the dmg files
  9. Once the command has finished and you see "BUILD SUCCESSFUL", then you are done. 

You have created the installer for mac. Go to "jitsi-master/resources/install/release/macosx" directory you can find the "dmg" mac installer for jitsi.


No comments:

Post a Comment