1#!/bin/sh
2### make_bundle-no-qt.sh A simple script to create a mac bundle without qt
3### included in the bundle (depends on standard framework paths instead)
4### Author: Carmelo Piccione (carmelo.piccione+projectM@gmail.com)
5
6# Path to installed qt framework on your machine
7PATH_TO_QT=/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/
8BUILD_PATH=/Users/struktured/projects/projectm_trunk/src
9PROJECTM_QT_BUILD_PATH=${BUILD_PATH}/projectM-qt/libprojectM-qt.1.dylib
10
11# the version of qt to bundle
12QT_VERSION=4
13
14# The bundle top level directory
15APP=projectM-jack.app
16
17## [0] Clean
18rm -rf ${APP}
19
20## [1] Create framework directory
21mkdir ${APP}
22mkdir ${APP}/Contents
23mkdir ${APP}/Contents/Frameworks
24mkdir ${APP}/Contents/Plugins
25mkdir ${APP}/Contents/MacOs
26mkdir ${APP}/Contents/Resources
27mkdir ${APP}/Contents/Resources/fonts
28mkdir ${APP}/Contents/Resources/presets
29
30cp projectM-jack ${APP}/Contents/MacOs/
31cp -f ${PROJECTM_QT_BUILD_PATH} ${APP}/Contents/Plugins/libprojectM-qt.dylib
32cp -Rf ../../fonts/*.ttf ${APP}/Contents/Resources/fonts
33cp -Rf ../../presets_projectM/*.prjm ${APP}/Contents/Resources/presets
34cp -Rf ../../presets_projectM/*.milk ${APP}/Contents/Resources/presets
35cp -f ${BUILD_PATH}/projectM-engine/config.inp ${APP}/Contents/Resources
36
37## [3] Change id of each qt framework to specialized one for this bundle
38
39install_name_tool -id @executable_path/../Plugins/libprojectM-qt.dylib ${APP}/Contents/Plugins/libprojectM-qt.dylib
40
41install_name_tool -change ${PROJECTM_QT_BUILD_PATH} @executable_path/../Plugins/libprojectM-qt.dylib ${APP}/Contents/MacOs/projectM-jack
42
43