comparison deploy/osx/paths.sh @ 1304:6e47bd2263e2 piper

Merge from branch project-file-rework
author Chris Cannam
date Fri, 28 Oct 2016 15:19:12 +0100
parents 2d48532a074b
children
comparison
equal deleted inserted replaced
1282:5b4f4de87892 1304:6e47bd2263e2
28 find "$app.app" -name \*.dylib -print | while read x; do 28 find "$app.app" -name \*.dylib -print | while read x; do
29 install_name_tool -id "`basename \"$x\"`" "$x" 29 install_name_tool -id "`basename \"$x\"`" "$x"
30 done 30 done
31 31
32 for fwk in $frameworks; do 32 for fwk in $frameworks; do
33 find "$app.app" -type f -print | while read x; do 33 find "$app.app" -type f -print | while read x; do
34 current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }') 34 if [ -x "$x" ]; then
35 [ -z "$current" ] && continue 35 current=$(otool -L "$x" | grep "$fwk" | grep amework | grep -v ':$' | awk '{ print $1; }')
36 echo "$x has $current" 36 [ -z "$current" ] && continue
37 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \ 37 echo "$x has $current"
38 -e 's,[^/]*/,../,g' -e 's,/[^/]*$,/Frameworks/'"$fwk"',' ) 38 relative=$(echo "$x" | sed -e "s,$app.app/Contents/,," \
39 echo "replacing with relative path $relative" 39 -e 's,[^/]*/,../,g' \
40 install_name_tool -change "$current" "@loader_path/$relative" "$x" 40 -e 's,/[^/]*$,/Frameworks/'"$fwk"',' )
41 done 41 echo "replacing with relative path $relative"
42 install_name_tool -change "$current" "@loader_path/$relative" "$x"
43 fi
44 done
42 done 45 done
43 46
44 find "$app.app" -type f -print | while read x; do 47 find "$app.app" -type f -print | while read x; do
45 qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }') 48 if [ -x "$x" ]; then
46 if [ -n "$qtdep" ]; then 49 qtdep=$(otool -L "$x" | grep Qt | grep amework | grep -v ':$' | grep -v '@loader_path' | awk '{ print $1; }')
47 echo 50 if [ -n "$qtdep" ]; then
48 echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:" 51 echo
49 echo $qtdep 52 echo "ERROR: File $x depends on Qt framework(s) not apparently present in the bundle:"
50 exit 1 53 echo $qtdep
54 exit 1
55 fi
51 fi 56 fi
52 done 57 done
53 58
54 echo "Done: be sure to run the app and see that it works!" 59 echo "Done: be sure to run the app and see that it works!"
55 60