• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bundle creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bundle creation


  • Subject: Re: Bundle creation
  • From: Michael Ryan Bannon <email@hidden>
  • Date: Wed, 10 May 2006 11:36:34 -0400
  • Organization: Humagade

Hello all,

OK, another newbie question.
I got my frameworks in just fine. But is there a way to package dynamic libraries into the bundle?
From the video tutorial I saw, all libraries have their paths hardcoded
inside them, but as I can see I can't change that path. (My bundle is looking for the dylib in MacOS and I can solve the problem by putting it there, but I assume this isn't good practice...)

Thanks,

Ryan

----- Original Message ----- From: "j o a r" <email@hidden>
To: "Michael Ryan Bannon" <email@hidden>
Cc: <email@hidden>
Sent: Tuesday, May 09, 2006 3:26 PM
Subject: Re: Bundle creation




On 9 maj 2006, at 21.01, Michael Ryan Bannon wrote:

First, I decided I needed a bundle so I could package all my resources and private libs/frameworks into one. So I decided to make a Legacy Bundle and then update to a native project. I was able to get everything built with little trouble. At this point I didn't yet copy the frameworks or libs...I wanted to see what would happen when I just ran the bundle. And this is where my first problem came up...

What is a "Legacy Bundle", and why did you choose that project type?

I realize that it is not possible to run a bundle through Xcode without making a custom executable. So, I did that and had it execute the bundle (I assume this is the correct way to go...?). However, when I ran the executable, I simply got the "session started" menu and that's it. The bundle didn't seem to execute, no errors were given. What did I do wrong?

A bundle is like a dylib/dll, but packed in a bundle folder structure. You can't execute a dynamic library. You're supposed to load it into some other application.


At this point I decided to make an Application instead. So, I created a Legacy Application and made it native (I do this because I don't want to create a Cocoa or Carbon or whatever app...I don't want the extra junk in there; is there a better way to do this?)

Another "Legacy XXX" project type... What is "extra junk"? If you just want to build a simple command line utility, choose one of these project types. If you want to build a GUI app, you need to use one of the GUI frameworks - ie. Cocoa or Carbon.


When I looked at my Application product, I was suprised to see that it had the same structure as a bundle...so an XCode application is a bundle? I knew that applications could be bundled, but I assuemd the way to do that would be to create a bundle and not an application.

You say "XCode application" when you mean a "Mac OS X Application".
Yes, apps are bundled on Mac OS X per default (Just check all the apps that you have installed on your machine!). While you can build unbundled apps, I would advice against it, as it has drawbacks, including - but not limited to - being non-standard and difficult.


Anyways, at this point I was ready to copy my libs/frameworks into the product. All my libs and frameworks were in seperate projects, so I just went ahead and wrote a script to put all my stuff in the product (MyApp.app/Contents/Frameworks). But when I run the app it can't find any of that stuff. It's looking in its executable path and /Library/Frameworks. So, assuming that my app actually is a bundle, how do I get the bundle to actually look in its frameworks directory for the libs/frameworks?

Read this for detailed information on creating an embedded framework:

<http://developer.apple.com/documentation/MacOSX/Conceptual/ BPFrameworks/index.html>

Also note that you don't have to write scripts to copy resources into bundles, there are special "copy files build phases" in Xcode to do that.

j o a r




_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Bundle creation (From: Michael Ryan Bannon <email@hidden>)
 >Re: Bundle creation (From: j o a r <email@hidden>)

  • Prev by Date: Re: Still cannot get it to link - please help.
  • Next by Date: A problem about StripAddress
  • Previous by thread: Re: Bundle creation
  • Next by thread: Debugging static library used by a plugin?
  • Index(es):
    • Date
    • Thread