[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Delivering application to MacOS and static linking
From: |
Yen-Ju Chen |
Subject: |
Re: Delivering application to MacOS and static linking |
Date: |
Thu, 24 May 2007 09:40:44 -0700 |
On 5/24/07, Benjamin Dasnois <benjamin.dasnois@gmail.com> wrote:
Hello Yen-Ju,
thanks for your help. I prefer using gnustep-make, I read the articles
you've sent but I don't really see how to do that with gnustep-make...
Could you give me an actual example?
Regards,
Here is my GNUmakefile.postamble.
It is a little messy at the first sight because I have frameworks,
libraries and bundles.
For framework, you can just look at OrganizeKit.framework.
First, you need to copy it after the compilation:
@mkdir -p $(CURDIR)/$(APP_NAME).app/Contents/Frameworks
@cp -fr $(CURDIR)/OrganizeKit/OrganizeKit.framework \
$(CURDIR)/$(APP_NAME).app/Contents/Frameworks/
Then you change the symbol of it:
install_name_tool -id
@executable_path/../Frameworks/OrganizeKit.framework/OrganizeKit
$(APP_NAME).app/Contents/Frameworks/OrganizeKit.framework/OrganizeKit
Finally, tell application where it is by changing the default symbol:
install_name_tool -change
OrganizeKit.framework/OrganizeKit
@executable_path/../Frameworks/OrganizeKit.framework/OrganizeKit
$(APP_NAME).app/Contents/MacOS/$(APP_NAME)
To know the default symbol in application,
do
'otool -L $(APP_NAME).app/Contents/MacOS/$(APP_NAME)'
The last step make sure the symbol in application point to the right place.
Yen-Ju
DASNOIS Benjamin
On 5/21/07, Yen-Ju Chen <yjchenx@gmail.com> wrote:
> On 5/21/07, Benjamin Dasnois <benjamin.dasnois@gmail.com> wrote:
> > Hello,
> > as my first post to this list, I would like to say that this project
> > is really impressing and that's something I'm going to use from now.
> > :) I hope I will be able later to give back to the community.
> >
> > But, nowadays I have some problems; I'm a student in a computing
> > school and I have to develop a tool that will work on MacOS. My main
> > concern is that once compiled I should be able to distribute my
> > application to MacOS users without telling them to install gnustep and
> > renaissance. I can compile on a MacOS so I think that gnustep is not a
> > problem but what about renaissance? I thought about static linking but
> > I've to admit that I don't really know how to do that... (I use
> > gnustep's make system)
>
> The way I do is that I build application on Unix with GNUstep
> and on Mac with Cocoa.
> In that case, you don't need to include GNUstep on Mac.
> If you are using 3rd party frameworks on Mac, ex, Renaissance,
> you can include that framework inside your application for delivery.
> Therefore, users don't need to install that framework in advance.
>
> There are 2 ways of doing it:
> 1. Use xcode for your project on Mac. It should be easier,
> but you have to maintain both GNUmakefile for GNUstep and xcode
> project for Cocoa.
> 2. If you like gnustep-make as me,
> you can use GNUmakefile.postamble to move that framework into
> AppName.app/Contents/Frameworks/
> You also need to use 'install_name_tool' to change symbols.
> You can google it or these two links may be useful:
> http://qin.laya.com/tech_coding_help/dylib_linking.html
> http://doc.trolltech.com/qq/qq09-mac-deployment.html
>
> Yen-Ju
>
> >
> > Thank you in advance.
> >
> > Regards,
> >
> > --
> > DASNOIS Benjamin
> >
> >
> > _______________________________________________
> > Help-gnustep mailing list
> > Help-gnustep@gnu.org
> > http://lists.gnu.org/mailman/listinfo/help-gnustep
> >
GNUmakefile.postamble
Description: Binary data