-
-
Notifications
You must be signed in to change notification settings - Fork 619
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 os.ios
option in xcode4
#1180
Conversation
modules/xcode/_preload.lua
Outdated
-- Register the ios extension | ||
-- | ||
|
||
local osoption = p.option.get("os") |
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.
This should be part of the os
option by default, I've used gmake
, gmake2
and xcode4
for iOS builds. Same thing goes for the os.systemTags
.
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 see. I will do so.
modules/xcode/_preload.lua
Outdated
|
||
-- add system tags for ios. | ||
if not os.systemTags[p.IOS] then | ||
os.systemTags[p.IOS] = { "ios", "mobile" } |
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.
For both this and the p.MACOSX
entry, it might be worth adding an "apple"
entry? This would allow all of the checks you changed below to be apple
instead and they'd work for tvOS and watchOS - and whatever comes next. Thoughts?
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 see. I think that it looks very 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 feel it is better to define darwin
instead of apple
.
macosx
already has that value.
os.systemTags =
{
["aix"] = { "aix", "posix" },
["bsd"] = { "bsd", "posix" },
["haiku"] = { "haiku", "posix" },
["ios"] = { "ios", "darwin", "mobile" },
["linux"] = { "linux", "posix" },
["macosx"] = { "macosx", "darwin", "posix" },
["solaris"] = { "solaris", "posix" },
["windows"] = { "windows", "win32" },
}
It may be better to include posix
.
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 agree, perhaps both darwin
and posix
?
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 think this is getting closer to being flexible for other Darwin-based systems being added! Thanks for this!
src/base/os.lua
Outdated
@@ -69,7 +69,7 @@ | |||
elseif os.istarget("haiku") then | |||
path = os.getenv("LIBRARY_PATH") or "" | |||
else | |||
if os.istarget("macosx") then | |||
if os.istarget("macosx") or os.istarget("ios") 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.
This could be os.istarget("darwin")
instead. Same goes for other checks like this that you've modified in other files.
src/base/config.lua
Outdated
@@ -48,7 +48,7 @@ | |||
local bundlename = "" | |||
local bundlepath = "" | |||
|
|||
if cfg.system == p.MACOSX and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype)) then | |||
if (cfg.system == p.MACOSX or cfg.system == p.IOS) 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.
This could probably use table.contains(os.getSystemTags(cfg.system), "darwin")
instead of checking for each OS? Same goes for other checks like this that you've modified in other files.
This is really cool! Thanks for this! |
No description provided.