-
Notifications
You must be signed in to change notification settings - Fork 3
adds macos config #9
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
base: main
Are you sure you want to change the base?
Changes from all commits
757eb55
f332d0a
d9b6f07
82b40bf
be6195a
275e830
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| .name = .sdl, | ||
| .fingerprint = 0xec638ccbd103848b, | ||
| .version = "0.0.0", | ||
| .minimum_zig_version = "0.15.0-dev.1218+bc8e1a74c", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure this is ok, my VSCode toolchain for zig couldn't locate the specific dev version |
||
| .minimum_zig_version = "0.15.1", | ||
| .dependencies = .{ | ||
| .sdl = .{ | ||
| .url = "https://github.com/libsdl-org/SDL/archive/refs/tags/release-3.2.22.tar.gz", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -635,6 +635,8 @@ pub fn build( | |
| .HAVE_LIBDECOR_H = 1, | ||
| .HAVE_LIBURING_H = 1, | ||
|
|
||
| .HAVE_SIGTIMEDWAIT = 1, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wasn't able to cross compile from macOS to linux, nor natively compile on Steam Deck without adding this. I got a compile error caused by SDL's static declaration of |
||
|
|
||
| .USE_POSIX_SPAWN = 1, | ||
|
|
||
| // Enable various audio drivers | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
The way I've set the YAML up here is a bit confusing. This list you've updated here is the list of operating systems the tests run on, however the actual tests also need to be updated.
Right now they look like this:
The first one attempts to cross compile to Windows from the host platform, the second attempts to cross compile to Linux from the host platform. If the macOS config is able to be used as a cross compile target, then all you need to do is add it to the above list as well and cross compilation to a macOS app will be tested on all three platforms.
That's the ideal scenario, I'd like to achieve it if possible. OTOH if this is impossible (e.g. maybe it requires sharing files that Apple forbids us from sharing) then the macOS test can just be made conditional to only run on macOS. I'm not an expert on GitHub's CI, but I'm guessing there's a way to wrap it in an if statement or something.
Uh oh!
There was an error while loading. Please reload this page.
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.
Technically, it is possible to cross compile to macOS from Linux or Windows. I was able to make a proof of concept of that on another branch by placing the necessary
MacOSX.sdkin the repo'sdepsdirectory. I tested by cross compiling from my Steam Deck's linux desktop. It is more difficult for me to test on Windows right now, so I haven't tried there yet.Based on the wording of the Mac SDK license, I'm not sure we're allowed to use the SDK on non-apple branded hardware, so it may be legally troublesome even though it is technically simple.