13 December 06 - 18:00Starting with Mono.Xna
I've started committing patches to the
Mono.Xna project. They need more developers. If you have any C# or game development experience, consider getting in touch with Rob and offering your expertise.
Remember, only you can prevent platform hegemony.
Doctor Ravuya - Mono.Xna -
-
§ ¶
02 December 06 - 11:11Mac OS X Allegro: Embedding dylibs
Turns out the reason that my use of the Allegro dylib was throwing an "image not found" error from dyld was because the library's internal paths are somehow set up wrong. If you want to embed the Allegro dylib in your app bundle so other people don't have to install Allegro to run your application, this isn't ideal:
ToastyBook$ otool -L liballeg-4.2.dylib
liballeg-4.2.dylib:
liballeg-4.2.dylib (compatibility version 4.2.0, current version 4.2.1)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 11.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.4)
/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime (compatibility version 1.0.0, current version 6.0.0)
Here's how you fix it. After making your application bundle in Xcode and copying your Allegro library to your Resources folder inside it (using a Copy Files build step), you should run this command:
install_name_tool -change liballeg-4.2.dylib @executable_path/../Frameworks/liballeg-4.2.dylib MyApp.app/Contents/MacOS/MyApp
Replace MyApp with whatever you've got, obviously.
Is there a way to fix this at the library level? Having a shell script step in Xcode is kind of a pain to manage this automatically when developing with Allegro.
This page is promising, but I can't figure out how to strip out the extraneous reference to liballeg-4.2.dylib using libtool. I end up with
ToastyBook$ otool -L liballeg-4.2-linkable.dylib
liballeg-4.2-linkable.dylib:
@executable_path/../Frameworks/liballeg-4.2.dylib (compatibility version 4.2.0, current version 4.2.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.4)
liballeg-4.2.dylib (compatibility version 4.2.0, current version 4.2.1)
Note that performing
make install-framework EMBED=1, as specified in docs/build/macosx.txt, may allow us to subvert this by just embedding the Allegro framework in your application bundle. I will test this and report back.
Doctor Ravuya - Software Engineering -
-
§ ¶