How to Build and run the Flash portion of Kaltura KMC

Kaltura has a management console called KMC to manage content under a given publisher.
It contains a significant portion written in Flash and in order to make changes or debug issues with it, compilation is needed.
I have compiled it in order to add Korean localization support, required by one of our customers.

This has been done using Flash Builder 4.7 on Mac OS X.

Now we will start the Kaltura KMC build itself

  1. 1. Clone the Kaltura KMC git branch from our repository: (Currently the patches that make the process like in this post are in review and are not merged upstream).
  2. 2. Create a new workspace in Flash Builder in the directory in which you cloned the branch.
  3. 3. Download and add Flash SDK 3.5 to your flash builder.
  4. 4. Download hamcrest for as3 version 1.1.3 and extract it to the /libs directory in your workspace.
  5. 5. Import the projects in the following order:
    1. 1. as3FlexClient (SDK 3.5)
    2. 2. KvMC (SDK 3.5)
    3. 3. AutoComplete (SDK 3.5)
    4. 4. Cairngorm (SDK 3.5, under vendors)
    5. 5. as3corelib (SDK 3.5, under vendors)
    6. 6. KalturaLib (SDK 3.5)
    7. 7. KedLib (SDK 3.5)
    8. 8. KMC (SDK 3.6A)
  6. 6. You will probably need to remove unneeded references to non existing directories for the KMC to build.
  7. 7. The default configuration will build the projects automatically.
  8. 8. Edit the file KMC/html-template/index.template.html and edit the necessary values, the flash vars are starting from line 108, and instructions on how to obtain the values are here.
  9. 9. Make the changes you would like to do in the project.
  10. 10. If you are using a version of Flash Builder that is different than 4.7 or running on an OS different than Mac OS X, you’ll need to create or edit the relevant file for your OS under /ant/ (like Mac OS and set the correct path to the Flex SDK.
  11. 11. Create a Run/Debug configuration for the Kaltura KMC and set the URL or path to launch as the location of the KMC.html file in the bin-debug dir of the Kaltura KMC project:
    Kaltura KMC launch configuration
  12. 12. If you make changes to locale files (adding locales will be described in another post) you should compile the locale files separately:
    1. 1. Open a terminal/command prompt and cd to the /KMC/ant directory.
    2. 2. Run Apache Ant to compile locales:
      ANT_OPTS="-Xmx1024M -XX:MaxPermSize=384m" ant -f compile.xml compile_locales
    3. 3. You may need to adjust the memory arguments according to the amount of locales you are trying to build for The Kaltura KMC.
  13. 13. Unfortunately, Flash Builder 4.7 crashes when trying to export a release build so to make a release KMC build you’ll need version 4.5 or 4.6 and to do the following:
    1. 1. I would recommend that you comment out the locale compiles (or part of them) from /ant/compile.xml since they are precompiled in the git repository and if you needed to change them you already did that in step 12, and that compilation is heavy.
    2. 2. In the project properties, go to builder settings:
      builders - KMC
    3. 3. Create a new Ant Builder:
      new builder -KMC
    4. 4. Set it’s settings to use the compile.xml file and the project base directory:
      And builder settings - KMC
    5. 5. Now when building the project it should build a release version of the Kaltura KMC.

If you face any issues with building Kaltura KMC, please contact us.