Re: Problem having a framework working in one of my targets (a screensaver)

2015-09-03 Thread Juanjo Conti
I think ScreensaverNinja target does not affect Saver target. The Saver target builds a screen saver (a plugin in terms of XCode) I'm trying to use the Paddle framework in both, a desktop app (ScreensaverNinja target) and in the screensaver (Saver target). In the desktop app works and in the scre

Re: Problem having a framework working in one of my targets (a screensaver)

2015-09-03 Thread Juanjo Conti
If I use install_name_tool to change the path where the image is looked for for a absolute path, I make the screensaver run. On Thu, Jul 2, 2015 at 8:22 PM, Juanjo Conti wrote: > Like this? http://i.imgur.com/4L974ZH.png > > The problem continues. I'll read the article. Thanks. > > On Thu, Jul 2

Re: Problem having a framework working in one of my targets (a screensaver)

2015-09-03 Thread Juanjo Conti
Like this? http://i.imgur.com/4L974ZH.png The problem continues. I'll read the article. Thanks. On Thu, Jul 2, 2015 at 6:22 PM, Contact Zukini wrote: > Hi Juanjo, > > I had similar issues when wanting to load a framework. My specific problem > was loading the framework in an application that wa

Problem having a framework working in one of my targets (a screensaver)

2015-09-03 Thread Juanjo Conti
Hi! I've an XCode Swift project with 2 targets, an traditional app and a screensaver. I want to use a framework in both (I've tried with at least 2 frameworks with no luck). In the app they work ok but in the screensaver, despite that I'm able to compile (I have a bridging file with the appropria

Re: Problem having a framework working in one of my targets (a screensaver)

2015-09-03 Thread Roland King
Perhaps it was only one - thought it was two - either way I learned most of what I knew about how dynamic loading works from that article + a bit of reading afterwards. So I have finally 15 minutes before Friday’s guests turn up, if I understand this rather long thread .. You have a 3rd party

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
I also tried to change the name in the original framework, but that result in a compilation error <-- and that was because the name was a path instead of a file. Thanks! Now it's working! Thanks for the help Roland and Kevin, if you use Mac, we're happy to offer you a free license of https://scree

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
for a start @rpath/ won’t work. The id name is the actual name of the file, when you substitute the value of ‘rpath’ in it needs to resolve to an file. So it needs to be @rpath/ You must be install_name_tool’ing the wrong file. The file you’re changing, the one in BUILT_PRODUCTS_DIR is not t

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
Roland, thanks for taking the time for explaining this. I think I'm closer to the solution but I didn't make it work yet. The screensaver ends installed in ~/Library/Screen Savers/Ninja.saver/ I was able to cd there and cd Contents/Frameworks/Paddle.framework/Versions/A, run install_name_tool com

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
Downloading the zip file referenced earlier and using a simple main.c $ clang -x c -o main.o -c main.c $ clang main.o -o main $ otool -L main main: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0) adding the framew

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
> > I don’t know what the executable_path is for a screensaver, you’d think it > was very much the same thing. So first simplest option is to work out what > that is and then just put the library at the place it expects to be, > @executable_path/../Frameworks/. As long as that’s within > your

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
Resending because the last one was > 25K and got held, apologies for the dupe which will no-doubt eventually arrive Perhaps it was only one - thought it was two - either way I learned most of what I knew about how dynamic loading works from that article + a bit of reading afterwards.

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
Sorry, Roland talked about the 2 articles on install_name_tool. On Fri, Jul 3, 2015 at 7:26 AM, Juanjo Conti wrote: > Yes, but he doesn't explain install_name_tool there. You said there were > 2 articles about install_name_tool. > > On Fri, Jul 3, 2015 at 6:56 AM, Kevin Meaney wrote: > >> First

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
Yes, but he doesn't explain install_name_tool there. You said there were 2 articles about install_name_tool. On Fri, Jul 3, 2015 at 6:56 AM, Kevin Meaney wrote: > First result is the mike ash article I included in my first e-mail to this > thread. > > Kevin > > On 3 Jul 2015, at 10:48, Roland Ki

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
First result is the mike ash article I included in my first e-mail to this thread. Kevin > On 3 Jul 2015, at 10:48, Roland King wrote: > > www.google.com > > "mike ash install_name_tool” > > >> On 3 Jul 2015, at 17:45, Juanjo Conti wrote: >> >> Could you point me

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
I've done that before asking. On Fri, Jul 3, 2015 at 6:48 AM, Roland King wrote: > www.google.com > > "mike ash install_name_tool” > > > On 3 Jul 2015, at 17:45, Juanjo Conti wrote: > > Could you point me to that articles please? > > On Fri, Jul 3, 2015 at 6:38 AM, Roland King wrote: > >> >> O

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
www.google.com "mike ash install_name_tool” > On 3 Jul 2015, at 17:45, Juanjo Conti wrote: > > Could you point me to that articles please? > > On Fri, Jul 3, 2015 at 6:38 AM, Roland King > wrote: > >> On 3 Jul 2015, at 17:29, Kevin Meaney > > wr

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
Could you point me to that articles please? On Fri, Jul 3, 2015 at 6:38 AM, Roland King wrote: > > On 3 Jul 2015, at 17:29, Kevin Meaney wrote: > > I’m not sure either of those will work. > > On 3 Jul 2015, at 10:07, Roland King wrote: > > > There’s two other options > > 1) Use install_name_to

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
> On 3 Jul 2015, at 17:29, Kevin Meaney wrote: > > I’m not sure either of those will work. > > On 3 Jul 2015, at 10:07, Roland King mailto:r...@rols.org>> > wrote: >> >> There’s two other options >> >> 1) Use install_name_tool to change the name in the library to the one you >> want. If it’

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
I asked because I've read the man before and I understood it wasn't possible to change installation dir with it. On Fri, Jul 3, 2015 at 6:28 AM, Roland King wrote: > Type ‘install_name_tool’ into your favourite search engine and follow in > the footsteps of the many who went before. > > or type

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
I’m not sure either of those will work. On 3 Jul 2015, at 10:07, Roland King wrote: > > There’s two other options > > 1) Use install_name_tool to change the name in the library to the one you > want. If it’s shorter, and it should be as the install name in that library > seems rather long, yo

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
Type ‘install_name_tool’ into your favourite search engine and follow in the footsteps of the many who went before. or type ‘man install_name_tool’ but the manual page is a bit terse. > On 3 Jul 2015, at 17:25, Juanjo Conti wrote: > > How can I do 1)? > > On Fri, Jul 3, 2015 at 6:07 AM, R

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
How can I do 1)? On Fri, Jul 3, 2015 at 6:07 AM, Roland King wrote: > There’s two other options > > 1) Use install_name_tool to change the name in the library to the one you > want. If it’s shorter, and it should be as the install name in that library > seems rather long, you can do that > > 2)

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
The settings for the Installation Directory is @executable_path/../Frameworks On Fri, Jul 3, 2015 at 6:23 AM, Juanjo Conti wrote: > From one of the frameworks they replied: > > > On Fri, Jul 3, 2015 at 5:56 AM, Kevin Meaney wrote: > >> You are correct making that change would break other apps.

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
From one of the frameworks they replied: On Fri, Jul 3, 2015 at 5:56 AM, Kevin Meaney wrote: > You are correct making that change would break other apps. I’m not sure > what the answer is. They might need to build 2 frameworks one with the > changed installation directory and one without. They

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
> On 3 Jul 2015, at 17:12, dangerwillrobinsondan...@gmail.com wrote: > > This all really needs a DWIM button in Xcode with human friendly > descriptions. > > Sent from my iPhone > Perhaps - remember the last time Xcode had a DWIM button however, it was the first attempt at AutoLayout and Xc

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread dangerwillrobinsondanger
This all really needs a DWIM button in Xcode with human friendly descriptions. Sent from my iPhone > On 2015/07/03, at 18:07, Roland King wrote: > > There’s two other options > > 1) Use install_name_tool to change the name in the library to the one you > want. If it’s shorter, and it should

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Roland King
There’s two other options 1) Use install_name_tool to change the name in the library to the one you want. If it’s shorter, and it should be as the install name in that library seems rather long, you can do that 2) Craft the way you package your final product so the library IS in that path rela

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
You are correct making that change would break other apps. I’m not sure what the answer is. They might need to build 2 frameworks one with the changed installation directory and one without. They might choose to do that for you now but in the future, update the installation directory for the fra

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
I can do that. What do I ask, to change installation directory to @rpath? Would that break the other apps using it? On Fri, Jul 3, 2015 at 5:36 AM, Kevin Meaney wrote: > Ah, You might need to talk to the makers of the framework then. > > Kevin > > On 3 Jul 2015, at 09:27, Juanjo Conti wrote: >

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
Ah, You might need to talk to the makers of the framework then. Kevin > On 3 Jul 2015, at 09:27, Juanjo Conti wrote: > > Paddle.framework is not one of my targets, it's built by a third party, so I > can't change it. It's this > https://github.com/PaddleHQ/Mac-Framework/archive/master.zip >

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
If I otool -l the binary of the framework, I can read Load command 3 cmd LC_ID_DYLIB cmdsize 96 name @executable_path/../Frameworks/Paddle.framework/Versions/A/Paddle (offset 24) On Fri, Jul 3, 2015 at 5:27 AM, Juanjo Conti wrote: > Paddle.framework is not one of my tar

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Juanjo Conti
Paddle.framework is not one of my targets, it's built by a third party, so I can't change it. It's this https://github.com/PaddleHQ/Mac-Framework/archive/master.zip On Fri, Jul 3, 2015 at 5:23 AM, Kevin Meaney wrote: > Ah, the clarification helps. > > Does that mean the framework you are loading

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
Ah, the clarification helps. Does that mean the framework you are loading is none of the targets you are listing? and that it is built in a different project? Then you have set Runpath Search paths to @loader... in the correct target (Saver) but you need to remove setting Installation Directory

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-03 Thread Kevin Meaney
You need to set the Runpath Search paths in your ScreensaverNinja target to @loader_path/../Frameworks not the target Saver which I’m assuming is building your framework. I’m assuming here your ScreenSaver is built from the ScreensaverNinja target (the one with the application icon). Kevin >

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-02 Thread Kevin Meaney
I had similar issues when wanting to load a framework. My specific problem was loading the framework in an application that was then being loaded when I was using IBDesignable. This article by Mike Ash was extremely helpful at understanding what was happening. https://www.mikeash.com/pyblog/fr

Re: Problem having a framework working in one of my targets (a screensaver)

2015-07-02 Thread Juanjo Conti
More on this. It I change the Runpath Search Path for the target in question to use loader_path instead of executable_path, the error still mention executable_path. Why? http://i.imgur.com/yIoTWNe.png On Wed, Jul 1, 2015 at 5:04 PM, Juanjo Conti wrote: > Hi! > > I've an XCode Swift project with

Problem having a framework working in one of my targets (a screensaver)

2015-07-01 Thread Juanjo Conti
Hi! I've an XCode Swift project with 2 targets, an traditional app and a screensaver. I want to use a framework in both (I've tried with at least 2 frameworks with no luck). In the app they work ok but in the screensaver, despite that I'm able to compile (I have a bridging file with the appropria