-
Notifications
You must be signed in to change notification settings - Fork 78
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
Crude initial port to macOS. #3
Conversation
…on executing PsdSamples. Path to sample PSD currently hard-coded, because Xcode build locations are complex ;-)
Thank you for this. Two minor things:
One major thing: What happens when starting two async. reads, e.g. WaitForRead(op1) should only wait until the first operation has finished. |
Thank you! These are exactly the sorts of guidances I wanted to understand. Style guidelines, no problem. I'll push a commit to fix those later today. Async, I was thinking about this overnight and realized that if I use the MemoryAllocator, I can defer the read operation until |
So @MolecularMatters, I'm having a challenging time getting some Mac-specific constructs to play nicely with the existing APIs. I tried to use the What are your thoughts on dynamically allocating the memory outside of the passed-in The types:
And the allocation attempts look like this:
|
Your new code looks good. |
I implemented the necessary changes in this commit: |
Thank you. I'll merge that in and try to wrap up this initial port. |
…wer of 2. Some of our invocation paths were passing in sizeof(char), so we find the smallest compliant alignment value.
…only have the file descriptor. Still thinking.
Hey @MolecularMatters:
Almost there… |
The More fundamentally, Xcode is pretty weird about the working directory of your executable in debug, building it somewhere deep inside of the developer directory hierarchy. Using relative paths to locate files is thus a bit of a problem. Perhaps a configuration file of some sort would help here? We could have per-platform config files, each plain text, which the executable will read and parse on launch to know where to find the input sample PSD, and where to write the output as well (they need not be the same path). I can write up a first pass, but I think I'd want to break that out into its own issue and PR. That might make this story blocked by that one, but I think it'd be the right call. |
I added new code that should make it easy for you to add macOS-specific paths for the samples' output data: |
…e forward separators have been adopted. Note that macOS/Xcode will still require that a custom working directory be set by editing the build scheme.
Turns out I can use the same paths now, since we're using the same separator. Thank you! There's no easy solve for the relative path issue; best I can recommend is adding a portion to the ReadMe that explains how to set a custom working directory when debugging under macOS. As for building from the command line (via
Please consider this branch ready to merge, @MolecularMatters. Thank you. I'll leave the full ReadMe update to indicate the existence of macOS support up to you. Please include the following:
|
Thank you for your work, I'll update the ReadMe accordingly! |
Compiles, but misparses PSD file header upon executing PsdSamples.
Path to sample PSD currently hard-coded, because Xcode build locations are complex ;-)
I'll spend some time this week debugging the core flow, and then raise some issues around design ergonomics. There are a few places in
NativeFile
where Windows-centric assumptions have constrained the API.