Changeset 885
- Timestamp:
- 07/11/07 09:14:47 (1 year ago)
- Location:
- trunk/installer/osx
- Files:
-
- 3 modified
-
create_app (modified) (7 diffs)
-
create_dmg (modified) (1 diff)
-
fixup_install_names (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/installer/osx/create_app
r862 r885 18 18 # 19 19 # dylibs="space separated list of dylibs" 20 # frameworks="space separated list of frameworks" 20 21 # theme_dylibs="space separated list of theme dylibs" 22 # olib_names="space separated list of olib directories to copy e.g. openpluginlib etc 23 # open*lib_plugins="space separated list of openimagelib, etc plugins" 24 # python_modules="space separated list of python modules to copy" 25 # 26 # For all above an empty string means use the default list. Or "_NONE_" means copy none. 21 27 22 28 if [ $# -lt 2 ] ; then 23 echo "Usage: create_app --prefer-ppc --gpl --py_ver=<python_ver> --jahwidgets_dir=<jahwidgets> --olib_prefix=<olib_prefix> --olib_ver=<olib_ver> -- lib_prefix=<lib_prefix> --qt_prefix=<qt_prefix> script --theme=<theme.dylib> --bundle_version=bundle_ver"29 echo "Usage: create_app --prefer-ppc --gpl --py_ver=<python_ver> --jahwidgets_dir=<jahwidgets> --olib_prefix=<olib_prefix> --olib_ver=<olib_ver> --olib_names=<openlibnamelist> --lib_prefix=<lib_prefix> --qt_prefix=<qt_prefix> script --theme=<theme.dylib> --bundle_version=bundle_ver" 24 30 echo 25 31 echo "By default create_app will read from a config file, either ca_config in pwd or .ca_config in ~" … … 32 38 script_root=${0%/*} 33 39 40 # defaults - all can be overridden in ca_config 34 41 enable_gpl=0 42 43 dylibs="" 44 frameworks="" 45 theme_dylibs="" 46 47 # olib lib names to copy e.g. openpluginlib etc 48 # default is all 49 olib_names="" 50 python_modules="" 51 52 # plugins to copy. Default is all 53 openassetlib_plugins="" 54 openeffectslib_plugins="" 55 openimagelib_plugins="" 56 openmedialib_plugins="" 57 openobjectlib_plugins="" 35 58 36 59 # Get config … … 60 83 ;; 61 84 85 --olib_names*) 86 olib_names=${1##*=} 87 ;; 88 62 89 --lib_prefix*) 63 90 lib_prefix=${1##*=} … … 158 185 159 186 # We have to exclude all our own python modules because py2app can't handle them 160 python setup.py py2app $prefer_ppc --excludes openpluginlib,openmedialib,openassetlib,openimagelib,jahwidgets 187 python setup.py py2app $prefer_ppc --excludes openpluginlib,openmedialib,openassetlib,openimagelib,jahwidgets,$excludes 161 188 162 189 bundle="$py_script_root/dist/$app_name.app" … … 214 241 215 242 for dylib in $dylibs ; do 216 echo "cp $dylib" 217 # Don't use cp -R here because we want to copy the target, not the symlink 218 cp "$dylib" "$bundle/Contents/Frameworks" 243 if [ -e $dylib ] ; then 244 echo "cp $dylib" 245 # Don't use cp -R here because we want to copy the target, not the symlink 246 cp "$dylib" "$bundle/Contents/Frameworks" 247 else 248 echo "Unable to find dylib: $dylib" 249 exit 1 250 fi 219 251 done 252 253 # Frameworks 254 if [ "$frameworks" == "" ] ; then 255 # default set 256 frameworks="Cg" 257 fi 258 259 if [ "$frameworks" != "_NONE_" ] ; then 260 for name in $frameworks ; do 261 framework="/Library/Frameworks/${name}.framework" 262 if [ -d $framework ] ; then 263 cp -R $framework "$bundle/Contents/Frameworks/" 264 dep_dylibs="$dep_dylibs "`$fixup_install_names_cmd "$bundle/Contents/Frameworks/${name}.framework/$name"` 265 else 266 echo "Unable to find framework: $name" 267 exit 1 268 fi 269 done 270 fi 220 271 221 272 # Olibs - drop the 'openlibraries-X.X.X' prefix in the destination so scripts don't need to worry about it 222 273 echo "cp $olib_src_path" 223 cp -R "$olib_src_path"/open* "$bundle/Contents/Frameworks/" 274 if [ "$olib_names" != "" ] ; then 275 # Custom list 276 for olib in $olib_names ; do 277 cp -R $olib_src_path/$olib "$bundle/Contents/Frameworks/" 278 done 279 else 280 # Copy it all 281 cp -R "$olib_src_path"/open* "$bundle/Contents/Frameworks/" 282 fi 224 283 225 284 # Remove python dylibs, these are copied later into the correct python location … … 227 286 find "$bundle/Contents/Frameworks" -name "*_py.*" -print0 | xargs -0 rm > /dev/null 228 287 288 # If any olib plugins have been specified remove existing and re-copy 289 copy_custom_olib_plugins() 290 { 291 base=$1 292 plugins=$2 293 294 if [ "$plugins" == "" ] ; then 295 return 296 fi 297 298 dest_plugin_dir="$bundle/Contents/Frameworks/$base/plugins" 299 300 if [ -d $dest_plugin_dir ] ; then 301 rm -f $dest_plugin_dir/* 302 fi 303 304 if [ "$plugins" == "_NONE_" ] ; then 305 return 306 fi 307 308 echo "Copying $base plugins..." 309 310 # Else copy new ones 311 src_plugin_dir="$olib_src_path/$base/plugins" 312 for name in $plugins ; do 313 # -R presevers symlinks 314 cp -R $src_plugin_dir/lib${base}_${name}*.dylib "$dest_plugin_dir" 315 cp $src_plugin_dir/${name}_plugin.opl "$dest_plugin_dir" 316 done 317 } 318 319 copy_custom_olib_plugins "openassetlib" "$openassetlib_plugins" 320 copy_custom_olib_plugins "openeffectslib" "$openeffectslib_plugins" 321 copy_custom_olib_plugins "openimagelib" "$openimagelib_plugins" 322 copy_custom_olib_plugins "openmedialib" "$openmedialib_plugins" 323 copy_custom_olib_plugins "openobjectlib" "$openobjectlib_plugins" 324 229 325 # Fixup install names 230 326 bundle_dylibs=`find "$bundle/Contents/Frameworks" -name "*.dylib"` 231 327 dep_dylibs=`$fixup_install_names_cmd $bundle_dylibs` 232 233 # Cg Framework234 if [ -e /Library/Frameworks/Cg.framework ] ; then235 cp -R /Library/Frameworks/Cg.framework "$bundle/Contents/Frameworks"236 dep_dylibs="$dep_dylibs "`$fixup_install_names_cmd "$bundle/Contents/Frameworks/Cg.framework/Cg"`237 else238 echo "Error: Unable to find Cg.framework"239 exit -1240 fi241 328 242 329 # libthemes must go in Contents/PlugIns/style … … 283 370 fi 284 371 285 modules="$jahwidgets_dir/src/qt3/python/jahwidgets.so \ 372 if [ "$python_modules" == "" ] ; then 373 python_modules="$jahwidgets_dir/src/qt3/python/jahwidgets.so \ 286 374 $olib_sitepackages/openassetlib.so \ 287 375 $olib_sitepackages/openimagelib.so \ 288 376 $olib_sitepackages/openmedialib.so \ 289 377 $olib_sitepackages/openpluginlib.so" 290 291 for module in $modules ; do 292 cp "$module" "$module_dest" 378 fi 379 380 for module in $python_modules ; do 381 if [ -e $module ] ; then 382 cp $module "$module_dest" 383 else 384 echo "Unable to copy module: $module" 385 exit 1 386 fi 293 387 done 294 388 -
trunk/installer/osx/create_dmg
r701 r885 23 23 fi 24 24 25 hdiutil convert tmp.dmg -format UDZO -imagekey zlib_level=9 -o "$dmg" 25 # Bzip2 compression only works on 10.4 or later 26 hdiutil convert tmp.dmg -format UDBZ -o "$dmg" 27 # Use Gzip compression otherwise 28 #hdiutil convert tmp.dmg -format UDZO -imagekey zlib_level=9 -o "$dmg" 29 26 30 rm tmp.dmg 27 31 -
trunk/installer/osx/fixup_install_names
r714 r885 2 2 3 3 if [ $# -eq 0 ] ; then 4 echo "Usage: fixup_install_names --check --custom _prefix <prefix1> --custom_prefix <prefix2> <dylib-files>"4 echo "Usage: fixup_install_names --check --custom-prefix <prefix1> --custom-prefix <prefix2> <dylib-files>" 5 5 echo "--check just outputs warning if any old prefix is found" 6 6 exit … … 11 11 /usr/local/lib/ \ 12 12 /usr/local/qt/lib/ \ 13 /opt/local/qt/lib/ \ 13 14 /Library/Frameworks/ \ 14 15 /opt/local/Library/Frameworks/ \
