App Store still complaining

Ernesto Giannotta erne at apimac.com
Mon Feb 21 05:28:38 CST 2011


Hi Ruslan,

On 21-feb-2011, at 12:17, Ruslan Zasukhin wrote:

> On 2/20/11 5:36 PM, "Ernesto Giannotta" <erne at apimac.com> wrote:
> 
> Hi Erne,
> 
>> what do you think of a line like this?
>> 
>> 
>> # change id of V4CC
>> install_name_tool -id "@executable_path/../Frameworks/V4CC.framework/V4CC"
>> "$app_frmw"/V4CC.framework/Versions/A/V4CC
> 
> Yes looks, as wrong line.
> I will download scripts now and check once again
> 

Well, this is the one I added to try fix it!

It appears to be working since otool does not find any more references to external libs now.

Of course this is a line added to the install script as a whole.

I've made some modifications to this script for the sake of App Store approval.

One is this removal of IB plugin:

#####################################
# 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"
rm -d -f -r "$app_frmw"/V4CC.framework/Resources/V4CC.ibplugin


other one is this change of id of V4CC:

#####################################
# CHANGE executable_path for VCOMPONENTS dylibs:
#####################################

# change id of V4CC
	install_name_tool -id "@executable_path/../Frameworks/V4CC.framework/V4CC" "$app_frmw"/V4CC.framework/Versions/A/V4CC


I've also commented out the copy of unused libs for VReport

This is the whole script (mostly taken from the Valentina wiki):


#####################################
# 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


####################################
# Copy Folders:
####################################

# VSDK - v1 engine - Copy as a recursive folder:
# Starting from v4.5 VSDK was deprecated, so we check if it exists in the vcomponents 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"
rm -d -f -r "$app_frmw"/V4CC.framework/Resources/V4CC.ibplugin


#####################################
# CHANGE executable_path for VCOMPONENTS dylibs:
#####################################

# change id of V4CC
	install_name_tool -id "@executable_path/../Frameworks/V4CC.framework/V4CC" "$app_frmw"/V4CC.framework/Versions/A/V4CC

# 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
if [ -d "$app_vcomp"/VSDK.framework ] ; then
   install_name_tool -id "@executable_path/../vcomponents/VSDK.framework/Versions/A/VSDK" "$app_vcomp"/VSDK.framework/Versions/A/VSDK
fi


#####################################
# 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"


> 
> Erne, am I right, that right now your   .app
> Do not runs on clean mac ?
> 

No man, it runs just fine
only Apple complains ;-)

> This should be tested up to success
> Before submit next time.
> 

Cool Runnings,
Erne.



More information about the Valentina mailing list