-
Notifications
You must be signed in to change notification settings - Fork 60
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
CI enhancements: app bundling, build wasm #486
Conversation
Trying to create an .app bundle for macos-latest, built using https://github.com/burtonageo/cargo-bundle. It builds (locally) but when I double-click to run it, nothing happens. cargo bundle --release
target/release/bundle/osx/Stevenarella.app/Contents/MacOS/stevenarella # runs ok
target/release/bundle/osx/Stevenarella.app # nothing?
open -R target/release/bundle/osx/Stevenarella.app # then double-click: nothing Adding code in src/main.rs to write to a file, confirms the code is executed, just no window pops up... Logging to a file (#359) would be helpful here to debug further But the problem is the current working directory, std::env::current_dir() shows it is set to "/". Setting with std::env::set_current_dir() to a hardcoded path with the assets fixes the launch problem. Setting cwd to the same directory as the executable works: ⚠ if let Some(parent) = std::env::current_exe().unwrap().parent() {
⚠ std::env::set_current_dir(parent);
} but then it downloads index/objects into Contents/MacOS. An app-specific prefs dir would make more sense, but on the other hand when launched from the CLI, or from Linux, may make sense to leave it as the current directory.. |
… preserving compatibility with existing installations, but use OS config directories otherwise
Update configuration for GitHub Actions: