Mac Developers and the EnterMedia DAM
EnterMedia's media database is a Mac friendly platform. The following guide is for developers working in Mac environments.
1. Install Git and clone repositories
Mac user: Go here: http://code.google.com/p/git-osx-installer/downloads/list?can=3
Download the latest build of Git. Once the download is complete, run the .pkg file and follow installating instructions provided by the wizard. Once the installation is complete open Terminal and create a new folder structure for your git repositories by typing the following command mkdir ~/git/master
then navigate to your new folder by typing cd ~/git/master
. Clone the EnterMedia git repositories by running the following code block. Copy and paste it into terminal and the cloning process will begin immediately.
git clone git://github.com/entermedia-community/entermedia-core.git git clone git://github.com/entermedia-community/entermedia-server.git git clone git://github.com/entermedia-community/demoall.git git clone git://github.com/entermedia-community/app-emshare.git git clone git://github.com/entermedia-community/extension-ooffice.git git clone git://github.com/entermedia-community/extension-openedit.git
Depending on your development responsibilities you may also need some or all of the following repositories:
2. Install and Setup Eclipse
Go here: Eclipse IDE Java EE Developers
Download the latest build of Eclipse. Once the download is complete unzip the tar.gz file and move the resulting folder into your Applications Folder. The first time you open Eclipse, if you do not have a Java Runtime Environment downloaded, the system will prompt you to download the latest version. Once Java is installed you will be prompted to create a workspace within Eclipse, which allows you to separate projects within separate instance of Eclipse so there is no overlap between projects.
- First, you need to download and install the EGit extension for Eclipse.
Go to the application menu and select options in this order Help > Install new software... This will bring up a wizard, click “Available Software Sites” and put a check mark next to the location http://download.eclipse.org/egit/updates If the site is not listed hit Add... type egit for the name and paste the above URL for the address and hit OK Follow the wizard through to its conclusion and Eclipse will download and install the extension. Groovy
- Second, you need to download and install the groovy extension for Eclipse.
Go to the application menu and select options in this order Help > Install new software... This will bring up a wizard, click “Available Software Sites” and put a check mark next to the location http://dist.springsource.org/milestone/GRECLIPSE/e3.5/ If the site is not listed hit Add... type groovy for the name and paste the above URL for the address and hit OK Follow the wizard through to its conclusion and Eclipse will download and install the extension.
3. Set Up Your Workspace
Once egit & groovy have been installed successfully you can go about setting up you Eclipse Workspace. Go the the application menu and follow this path File > Import. A wizard will open asking what type of import is to be executed, under the Git folder select the option for Projects from Git and hit Next. A new wizard will open to select a Git repository to be imported. Your select field will be blank so you will need to add the folder where the git repositories are stored. Click Add.. navigate to the folder your git repositories are stored using the Browse button and hit Search. Git will find all the repositories in that folder and any subfolders within that folder. Hit OK and then select the repository you wish to add to the workspace. Only one repository can be selected at a time. Repeat this process until the workspace has all the repositories that you will need for development. Install Homebrew and EnterMedia dependencies. First open the App Store and download. Open Terminal and type the following command: /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)”
This will install Homebrew which is a simple way to install the software dependencies that EnterMedia relies on in order to work properly. These next steps are all executed within the Terminal and will install the various software dependencies. (note: You must have xcode installed for homebrew installs to work) wget - brew install wget
ffmepg - brew install ffmpeg (note: You may need to use brew install ffmpeg --use-clang *
if the regular build fails (1/6/12) ) Continued.. imagemagick - brew install imagemagick
ghostscript - brew install ghostscript - After installing ghostscript you will need to create a symbolic link to the /usr/bin area through the terminal. Run this command in terminal to do this: sudo ln -s /usr/local/bin/gs /sw/bin/gs
Continued.. exiftool - brew install exiftool
apache tomcat - brew install tomcat Navigate to your new Tomcat installation’s webapps folder: cd /usr/local/Cellar/tomcat/7.0.23/libexec/webapps
Type the following command to download the latest EnterMedia build: wget /dam/download/files/2011/may/ROOT.war
Now, if you want EnterMedia to be the root of your new webserver, delete Tomcat’s original ROOT folder so that EnterMedia’s ROOT.war file will override and become the root of the server. Do this by entering the following commands: - cd /usr/local/Cellar/tomcat/7.0.23/libexec/webapps
- rm -rf ROOT
Now you are ready to start your EnterMedia server: catalina start
There may be an issue where the ffmpeg and imagemagick installs are updated passed the version that is defaulted with an EnterMedia installation. If this is the case there will be conversion errors when a new asset is uploaded. To fix this issue go here: demoall/webapp/WEB-INF/bin/commandmap.xml
When you open the file it should look like the script below. Update the lines in red to point to the correct, updated versions of those programs. ./WEB-INF/bin/mac ./exiftoolthumb.sh ./aspera/upload.sh ./qt-faststart /usr/local/bin/exiftool /usr/local/bin/convert /usr/local/bin/ffmpeg ./WEB-INF/bin/linux ./exiftoolthumb.sh ./aspera/upload.sh ./WEB-INF/bin/windows .\lame\lame.exe .\ffmpeg\ffmpeg.exe .\imageMagick\convert.exe .\imageMagick\composite.exe .\gs8.71\bin\gswin32c.exe .\exiftool\exiftool.exe .\exiftool\exiftoolthumb.bat .\ffmpeg\qt-faststart.exe .\unlocker\unlocker.exe
Resetting a Catalog demoall > webapp > WEB-INF > data > media > catalogs Delete the catalog’s assets, conversiontasks and generated folders and reset the server.