<HTML>
<HEAD>
<TITLE>Re: V4CC deployment - script given.</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On 12/27/09 1:49 PM, "Ernesto Giannotta" <ernestogiannotta@tiscalinet.it> wrote:<BR>
<BR>
Hi Erne,<BR>
<BR>
This is working script. I have test it on V4CC example.<BR>
<BR>
You need make in your project’s target new build phase “Run Script”<BR>
And copy paste this script there.<BR>
<BR>
Now, both DEBUG and RELEASE builds of your app,<BR>
will get copy of V4CC and vcomponents inside.<BR>
Yes, even debug.<BR>
<BR>
Let me know if you will find any troubles <BR>
<BR>
<BR>
#####################################<BR>
# PREPARE variables:<BR>
#<BR>
app="$BUILT_PRODUCTS_DIR/$PRODUCT_NAME.app/"<BR>
app_exe="$app"Contents/MacOS/$PRODUCT_NAME<BR>
<BR>
app_vcomp="$app"Contents/vcomponents<BR>
app_frmw="$app"Contents/Frameworks<BR>
<BR>
<BR>
#####################################<BR>
# COPY files of vcomponents into APP.<BR>
#####################################<BR>
if [ ! -d "$app_vcomp" ] ; then<BR>
mkdir "$app_vcomp"<BR>
fi<BR>
<BR>
# VSHARED<BR>
if [ ! -e "$app_vcomp"/libvshared_fat_release.dylib ] ; then<BR>
cp /usr/local/lib/vcomponents/libvshared_fat_release.dylib "$app_vcomp"<BR>
fi<BR>
<BR>
# VKERNEL<BR>
if [ ! -e "$app_vcomp"/libvkernel_fat_release.dylib ] ; then<BR>
cp /usr/local/lib/vcomponents/libvkernel_fat_release.dylib "$app_vcomp"<BR>
fi<BR>
<BR>
# VCLIENT<BR>
if [ ! -e "$app_vcomp"/libvclient_fat_release.dylib ] ; then<BR>
cp /usr/local/lib/vcomponents/libvclient_fat_release.dylib "$app_vcomp"<BR>
fi<BR>
<BR>
# WX (required for VREPORT only)<BR>
if [ ! -e "$app_vcomp"/libwx_mac.dylib ] ; then<BR>
cp /usr/local/lib/vcomponents/libwx_mac.dylib "$app_vcomp"<BR>
fi<BR>
<BR>
# VREPORT<BR>
if [ ! -e "$app_vcomp"/libvreport_fat_release.dylib ] ; then<BR>
cp /usr/local/lib/vcomponents/libvreport_fat_release.dylib "$app_vcomp"<BR>
fi<BR>
<BR>
# VSDK - v1 engine - Copy as recursive folder:<BR>
if [ ! -d "$app_vcomp"/VSDK.framework ] ; then<BR>
if [ -d /usr/local/lib/vcomponents/VSDK.framework ] ; then<BR>
cp -R /usr/local/lib/vcomponents/VSDK.framework "$app_vcomp"<BR>
fi<BR>
fi<BR>
<BR>
# vresources<BR>
cp -R /usr/local/lib/vcomponents/vresources "$app_vcomp"<BR>
<BR>
<BR>
<BR>
#####################################<BR>
# COPY /Library/Frameworks/V4CC.framework into app/Frameworks<BR>
#####################################<BR>
if [ ! -d "$app_frmw" ] ; then<BR>
mkdir "$app_frmw"<BR>
fi<BR>
<BR>
cp -R /Library/Frameworks/V4CC.framework "$app_frmw"<BR>
<BR>
<BR>
<BR>
#####################################<BR>
# CHANGE executable_path for VCOMPONENTS dylibs:<BR>
#####################################<BR>
<BR>
# change id of VSHARED<BR>
install_name_tool -id "@executable_path/../vcomponents/libvshared_fat_release.dylib" "$app_vcomp"/libvshared_fat_release.dylib<BR>
<BR>
# change id of VKERNEL<BR>
install_name_tool -id "@executable_path/../vcomponents/libvkernel_fat_release.dylib" "$app_vcomp"/libvkernel_fat_release.dylib<BR>
<BR>
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<BR>
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<BR>
<BR>
# change id of VCLIENT<BR>
install_name_tool -id "@executable_path/../vcomponents/libvclient_fat_release.dylib" "$app_vcomp"/libvclient_fat_release.dylib<BR>
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<BR>
<BR>
# change id of WX<BR>
install_name_tool -id "@executable_path/../vcomponents/libwx_mac.dylib" "$app_vcomp"/libwx_mac.dylib<BR>
<BR>
# change id of VREPORT<BR>
install_name_tool -id "@executable_path/../vcomponents/libvreport_fat_release.dylib" "$app_vcomp"/libvreport_fat_release.dylib<BR>
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<BR>
install_name_tool -change "/usr/local/lib/vcomponents/libwx_mac.dylib" "@executable_path/../vcomponents/libwx_mac.dylib" "$app_vcomp"/libvreport_fat_release.dylib<BR>
<BR>
# change id of VSDK.framework<BR>
install_name_tool -id "@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK" "$app_vcomp"/VSDK.framework/Versions/A/VSDK<BR>
<BR>
<BR>
#####################################<BR>
# CHANGE executable_path for V4CC.framework dylibs:<BR>
#####################################<BR>
app_frmw_v4cc="$app_frmw"/V4CC.framework/Versions/A/V4CC<BR>
<BR>
install_name_tool -change "/usr/local/lib/vcomponents/libvshared_fat_release.dylib" "@executable_path/../vcomponents/libvshared_fat_release.dylib" "$app_frmw_v4cc"<BR>
install_name_tool -change "/usr/local/lib/vcomponents/libvkernel_fat_release.dylib" "@executable_path/../vcomponents/libvkernel_fat_release.dylib" "$app_frmw_v4cc"<BR>
install_name_tool -change "/usr/local/lib/vcomponents/libvclient_fat_release.dylib" "@executable_path/../vcomponents/libvclient_fat_release.dylib" "$app_frmw_v4cc"<BR>
install_name_tool -change "/usr/local/lib/vcomponents/libvreport_fat_release.dylib" "@executable_path/../vcomponents/libvreport_fat_release.dylib" "$app_frmw_v4cc"<BR>
install_name_tool -change "/usr/local/lib/vcomponents/VSDK.framework/Versions/A/VSDK" "@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK" "$app_frmw_v4cc"<BR>
<BR>
<BR>
#####################################<BR>
# now we need to update yet AppName.app/Contents/MacOS/AppName executable:<BR>
#####################################<BR>
<BR>
install_name_tool -change "/Library/Frameworks/V4CC.framework/Versions/A/V4CC" "@executable_path/../Frameworks/V4CC.framework/Versions/A/V4CC" "$app_exe"<BR>
</SPAN></FONT></FONT>
</BODY>
</HTML>