V4CC deployment - script given.
Ruslan Zasukhin
ruslan_zasukhin at valentina-db.com
Sun Dec 27 17:19:17 CST 2009
On 12/27/09 1:49 PM, "Ernesto Giannotta" <ernestogiannotta at tiscalinet.it>
wrote:
Hi Erne,
This is working script. I have test it on V4CC example.
You need make in your project¹s target new build phase ³Run Script²
And copy paste this script there.
Now, both DEBUG and RELEASE builds of your app,
will get copy of V4CC and vcomponents inside.
Yes, even debug.
Let me know if you will find any troubles
#####################################
# PREPARE variables:
#
app="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/"
app_exe="$app"Contents/MacOS/$PRODUCT_NAME
app_vcomp="$app"Contents/vcomponents
app_frmw="$app"Contents/Frameworks
#####################################
# COPY files of vcomponents into APP.
#####################################
if [ ! -d "$app_vcomp" ] ; then
mkdir "$app_vcomp"
fi
# VSHARED
if [ ! -e "$app_vcomp"/libvshared_fat_release.dylib ] ; then
cp /usr/local/lib/vcomponents/libvshared_fat_release.dylib "$app_vcomp"
fi
# VKERNEL
if [ ! -e "$app_vcomp"/libvkernel_fat_release.dylib ] ; then
cp /usr/local/lib/vcomponents/libvkernel_fat_release.dylib "$app_vcomp"
fi
# VCLIENT
if [ ! -e "$app_vcomp"/libvclient_fat_release.dylib ] ; then
cp /usr/local/lib/vcomponents/libvclient_fat_release.dylib "$app_vcomp"
fi
# WX (required for VREPORT only)
if [ ! -e "$app_vcomp"/libwx_mac.dylib ] ; then
cp /usr/local/lib/vcomponents/libwx_mac.dylib "$app_vcomp"
fi
# VREPORT
if [ ! -e "$app_vcomp"/libvreport_fat_release.dylib ] ; then
cp /usr/local/lib/vcomponents/libvreport_fat_release.dylib "$app_vcomp"
fi
# VSDK - v1 engine - Copy as recursive folder:
if [ ! -d "$app_vcomp"/VSDK.framework ] ; then
if [ -d /usr/local/lib/vcomponents/VSDK.framework ] ; then
cp -R /usr/local/lib/vcomponents/VSDK.framework "$app_vcomp"
fi
fi
# vresources
cp -R /usr/local/lib/vcomponents/vresources "$app_vcomp"
#####################################
# COPY /Library/Frameworks/V4CC.framework into app/Frameworks
#####################################
if [ ! -d "$app_frmw" ] ; then
mkdir "$app_frmw"
fi
cp -R /Library/Frameworks/V4CC.framework "$app_frmw"
#####################################
# CHANGE executable_path for VCOMPONENTS dylibs:
#####################################
# change id of VSHARED
install_name_tool -id
"@executable_path/../vcomponents/libvshared_fat_release.dylib"
"$app_vcomp"/libvshared_fat_release.dylib
# change id of VKERNEL
install_name_tool -id
"@executable_path/../vcomponents/libvkernel_fat_release.dylib"
"$app_vcomp"/libvkernel_fat_release.dylib
install_name_tool -change
"/usr/local/lib/vcomponents/libvshared_fat_release.dylib"
"@executable_path/../vcomponents/libvshared_fat_release.dylib"
"$app_vcomp"/libvkernel_fat_release.dylib
install_name_tool -change
"/usr/local/lib/vcomponents/VSDK.framework/Versions/A/VSDK"
"@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK"
"$app_vcomp"/libvkernel_fat_release.dylib
# change id of VCLIENT
install_name_tool -id
"@executable_path/../vcomponents/libvclient_fat_release.dylib"
"$app_vcomp"/libvclient_fat_release.dylib
install_name_tool -change
"/usr/local/lib/vcomponents/libvshared_fat_release.dylib"
"@executable_path/../vcomponents/libvshared_fat_release.dylib"
"$app_vcomp"/libvclient_fat_release.dylib
# change id of WX
install_name_tool -id "@executable_path/../vcomponents/libwx_mac.dylib"
"$app_vcomp"/libwx_mac.dylib
# change id of VREPORT
install_name_tool -id
"@executable_path/../vcomponents/libvreport_fat_release.dylib"
"$app_vcomp"/libvreport_fat_release.dylib
install_name_tool -change
"/usr/local/lib/vcomponents/libvshared_fat_release.dylib"
"@executable_path/../vcomponents/libvshared_fat_release.dylib"
"$app_vcomp"/libvreport_fat_release.dylib
install_name_tool -change "/usr/local/lib/vcomponents/libwx_mac.dylib"
"@executable_path/../vcomponents/libwx_mac.dylib"
"$app_vcomp"/libvreport_fat_release.dylib
# change id of VSDK.framework
install_name_tool -id
"@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK"
"$app_vcomp"/VSDK.framework/Versions/A/VSDK
#####################################
# CHANGE executable_path for V4CC.framework dylibs:
#####################################
app_frmw_v4cc="$app_frmw"/V4CC.framework/Versions/A/V4CC
install_name_tool -change
"/usr/local/lib/vcomponents/libvshared_fat_release.dylib"
"@executable_path/../vcomponents/libvshared_fat_release.dylib"
"$app_frmw_v4cc"
install_name_tool -change
"/usr/local/lib/vcomponents/libvkernel_fat_release.dylib"
"@executable_path/../vcomponents/libvkernel_fat_release.dylib"
"$app_frmw_v4cc"
install_name_tool -change
"/usr/local/lib/vcomponents/libvclient_fat_release.dylib"
"@executable_path/../vcomponents/libvclient_fat_release.dylib"
"$app_frmw_v4cc"
install_name_tool -change
"/usr/local/lib/vcomponents/libvreport_fat_release.dylib"
"@executable_path/../vcomponents/libvreport_fat_release.dylib"
"$app_frmw_v4cc"
install_name_tool -change
"/usr/local/lib/vcomponents/VSDK.framework/Versions/A/VSDK"
"@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK"
"$app_frmw_v4cc"
#####################################
# now we need to update yet AppName.app/Contents/MacOS/AppName executable:
#####################################
install_name_tool -change
"/Library/Frameworks/V4CC.framework/Versions/A/V4CC"
"@executable_path/../Frameworks/V4CC.framework/Versions/A/V4CC"
"$app_exe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macserve.net/pipermail/valentina/attachments/20091228/0b497651/attachment.html
More information about the Valentina
mailing list