From fbf4976d04bbbd2c8bfbdc2c0d663b6e803ff909 Mon Sep 17 00:00:00 2001 From: w1z7ard Date: Tue, 6 May 2008 00:18:20 +0000 Subject: [PATCH] updates to bundle script. almost there git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1007 6778bc44-b910-0410-a7a0-be141de4315d --- src/projectM-jack/make_bundle.sh | 63 +++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/src/projectM-jack/make_bundle.sh b/src/projectM-jack/make_bundle.sh index c452ba185..a34b33a53 100644 --- a/src/projectM-jack/make_bundle.sh +++ b/src/projectM-jack/make_bundle.sh @@ -1,21 +1,56 @@ #!/bin/sh -PATH_TO_QT = /Developer/Frameworks/.../ +### make_bund.sh A simple script to create a mac bundle #### +### Author: Carmelo Piccione (carmelo.piccione+projectM@gmail.com) ### + +# Path to installed qt framework on your machine +PATH_TO_QT = /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ + +# the version of qt to bundle QT_VERSION = 4.3 + +# The bundle top level directory APP = projectM-jack.app -mkdir ${APP}/Contents/Frameworks -cp -R ${PATH_TO_QT}/QtCore.framework projectM-jack.app/Contents/Frameworks -cp -R ${PATH_TO_QT}/QtGui.framework projectM-jack.app/Contents/Frameworks +## [1] Create framework directory +mkdir -f ${APP}/Contents/Frameworks -install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore \ - projectM-jack.app/Contents/Frameworks/QtCore.framework/Versions/4.0/QtCore -install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui \ - projectM-jack.app/Contents/Frameworks/QtGui.framework/Versions/4.0/QtGui +## [2] Copy each qt framework into the bundle +cp -R ${PATH_TO_QT}/QtCore.framework ${APP}/Contents/Frameworks +cp -R ${PATH_TO_QT}/QtGui.framework ${APP}/Contents/Frameworks +cp -R ${PATH_TO_QT}/QtXml.framework ${APP}/Contents/Frameworks +cp -R ${PATH_TO_QT}/QtOpenGL.framework ${APP}/Contents/Frameworks -install_name_tool -change path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore - @executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore - projectM-jack.app/Contents/MacOs/projectM-jack -install_name_tool -change path/to/qt/lib/QtGui.framework/Versions/4.0/QtGui - @executable_path/../Frameworks/QtGui.framework/Versions/4.0/QtGui - projectM-jack.app/Contents/MacOs/projectM-jack \ No newline at end of file + +## [3] Change id of each qt framework to specialized one for this bundle +install_name_tool -id @executable_path/../Frameworks/QtCore.framework/Versions/${QT_VERSION}/QtCore \ + ${APP}/Contents/Frameworks/QtCore.framework/Versions/${QT_VERSION}/QtCore + +install_name_tool -id @executable_path/../Frameworks/QtGui.framework/Versions/${QT_VERSION}/QtGui \ + ${APP}/Contents/Frameworks/QtGui.framework/Versions/${QT_VERSION}/QtGui + +install_name_tool -id @executable_path/../Frameworks/QtXml.framework/Versions/${QT_VERSION}/QtXml \ + ${APP}/Contents/Frameworks/QtXml.framework/Versions/${QT_VERSION}/QtXml + +install_name_tool -id @executable_path/../Frameworks/QtOpenGL.framework/Versions/${QT_VERSION}/QtOpenGL \ + ${APP}/Contents/Frameworks/QtOpenGL.framework/Versions/${QT_VERSION}/QtOpenGL + + +## [4] Change reference ids in projectM-jack to the local referred to id's +install_name_tool -change ${PATH_TO_QT}/QtCore.framework/Versions/${QT_VERSION}/QtCore + @executable_path/../Frameworks/QtCore.framework/Versions/${QT_VERSION}/QtCore + ${APP}/Contents/MacOs/projectM-jack + +install_name_tool -change ${PATH_TO_QT}/QtGui.framework/Versions/${QT_VERSION}/QtGui + @executable_path/../Frameworks/QtGui.framework/Versions/${QT_VERSION}/QtGui + ${APP}/Contents/MacOs/projectM-jack + + +install_name_tool -change ${PATH_TO_QT}/QtXml.framework/Versions/${QT_VERSION}/QtXml + @executable_path/../Frameworks/QtXml.framework/Versions/${QT_VERSION}/QtXml + ${APP}/Contents/MacOs/projectM-jack + +install_name_tool -change ${PATH_TO_QT}/QtOpenGL.framework/Versions/${QT_VERSION}/QtOpenGL + @executable_path/../Frameworks/QtOpenGL.framework/Versions/${QT_VERSION}/QtOpenGL + ${APP}/Contents/MacOs/projectM-jack + \ No newline at end of file