-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sharedlibtype
in xcode4
#1144
Add sharedlibtype
in xcode4
#1144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put down request changes, but it's more for clarification than actual changes.
Loving this XCode work! Do you happen to target iOS too? 😛
@@ -48,7 +48,7 @@ | |||
local bundlename = "" | |||
local bundlepath = "" | |||
|
|||
if cfg.system == p.MACOSX and kind == p.WINDOWEDAPP then | |||
if cfg.system == p.MACOSX and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype)) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be mistaken here, but this will place the DyLib in proj.framework/Contents/MacOS
correct? At work the framework I generate doesn't have that path, it's laid out like this:
- Headers/
- ...
- Versions/
- A/
- Headers/
- <proj dylib>
- Current/
- Headers/
- <proj dylib>
- <proj dylib>
I think the Versions
folder is just a bunch of symlinks though. Am I doing it wrong, or are there multiple ways of doing this? I'm certain that I copied an existing Framework when doing this, perhaps it was doing it the old way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right.
I would like to modify it to "proj.framework/Versions/A".
Do you think that is good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think my hacks at work to generate a Framework did anything special to generate that structure, I believe it was automatically done by XCode. I'll have another look at what I do tomorrow if I get a chance, but you might only need to do this when cfg.system == p.MACOSX and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype == "OSXBundle"))
? If you have a Mac available you might be able to test this out faster than I can get back to you about what I do. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info.bundlepath
is a token like %{cfg.buildtarget.bundlepath}
, isn't it?
Xcode outputs the entity of dylib to "proj.framework/Versions/A".
And create a symbolic link for dylib in "proj.framework".
"proj.framework/Versions/Current" is a symbolic link for "proj.framework/Versions/A".
As such, when sharedlibtype
is OSXFramework
, I think it is better to make it "proj.framework/Versions/A".
if cfg.system == p.MACOSX and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype)) then
bundlename = basename .. extension
bundlepath = path.join(bundlename, iif(kind == p.SHAREDLIB and cfg.sharedlibtype == "OSXFramework", "Versions/A", "Contents/MacOS"))
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so sorry, I though that these variables were used to output something specific into the XCode project files. I didn't realize it was part of the token system instead, what you're suggesting makes sense!
src/base/config.lua
Outdated
bundlename = basename .. extension | ||
bundlepath = path.join(bundlename, "Contents/MacOS") | ||
bundlepath = path.join(bundlename, iif(kind == p.SHAREDLIB and cfg.sharedlibtype == "OSXFramework", "Versions/A", "Contents/MacOS")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the indentation went a bit wonky in that last commit.
Nice! |
Add support for CocoaBundle(.bundle) and Framework(.framework).