Add macOS support - #50
Conversation
On macOS, there were collission with file names
|
I can confirm that the forked project compiles and runs on my Mac. Would be nice to have it included here :) |
On macOS, there were collission with file names
FineFindus
left a comment
There was a problem hiding this comment.
Thanks for the PR and sorry for the late response. I appreciate the work you have done, however I'm not a macOS user, so I'm hesitant to merge this, as I cannot ensure the (continued) quality of the app on macOS or fix bugs related to that version.
I think there are 3 possible ways forward:
- It is maintained as a soft-fork, thus making clear, that it is not an official version
- Someone (e.g. you) agrees to help with the app and fix macOS-specific issues and we experimentally merge it
- No one steps up, in which case I would have to unfortunately decline the PR
| id = base64.b64encode(id.encode("utf-8")) | ||
| id = str(id, "utf-8") | ||
| id = id.rstrip("=") | ||
| id = id.encode("utf-8").hex() |
There was a problem hiding this comment.
I would like to avoid changing the IDs, as that also requires changing them on the server, a database migration, all the scripts, etc.
| #[cfg(target_os = "macos")] | ||
| let (resources_file, localedir) = match macos_bundle_share_dir() { | ||
| Some(share) => ( | ||
| share | ||
| .join("hieroglyphic") | ||
| .join("resources.gresource") | ||
| .to_string_lossy() | ||
| .into_owned(), | ||
| share.join("locale").to_string_lossy().into_owned(), | ||
| ), | ||
| None => (RESOURCES_FILE.to_string(), LOCALEDIR.to_string()), | ||
| }; | ||
| #[cfg(not(target_os = "macos"))] | ||
| let (resources_file, localedir) = (RESOURCES_FILE, LOCALEDIR); |
There was a problem hiding this comment.
I'm a bit confused by this, as this doesn't seem to be required in other GTK apps with macOS support.
| # On macOS, ort-sys needs help finding the ONNX Runtime dynamic library | ||
| if host_machine.system() == 'darwin' | ||
| onnxruntime_dep = dependency('libonnxruntime') | ||
| ort_lib_dir = onnxruntime_dep.get_variable(pkgconfig: 'libdir') | ||
| cargo_env += [ 'ORT_LIB_PATH=' + ort_lib_dir ] | ||
| cargo_env += [ 'ORT_PREFER_DYNAMIC_LINK=1' ] | ||
| endif | ||
|
|
There was a problem hiding this comment.
This is also required for the Flatpak build. Considering there is already a macOS-specific build script, it's probably better to set them there.
Addresses #49 and also #40
Edit: Sorry, I was so busy with this I missed the Contributing part of the README :(