Skip to content
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

Build a macOS app bundle and publish macOS and Linux distributables, clean up binary asset names. #264

Merged
merged 14 commits into from
May 29, 2024

Conversation

dgavedissian
Copy link
Collaborator

@dgavedissian dgavedissian commented May 27, 2024

Changes:

  • ltheory-bin-win32.zip -> dev-binaries-windows.zip
  • ltheory-bin-macos.zip -> dev-binaries-macos.zip
  • ltheory-bin-ubuntu2004.zip -> dev-binaries-linux.zip
  • ltheory-distro-win32.zip -> ltheory-windows.zip.
  • Added ltheory-macos.zip, containing the macOS app bundle (x86_64 only).
  • Added ltheory-linux.zip, containing the Ubuntu binaries.

I also renamed lt64 to ltr in the binary and distro packages.

These changes will break the launcher, but should make the assets much more obvious in the future.

Closes #263

This doesn't work in macOS app bundles, as they're mounted in a
read-only filesystem. In the future, we should put logs in the AppData
directory.
on macOS, rename release assets and add macOS distributable.
// TODO: do we really need this magic?
std::env::set_current_dir("../").expect("Cannot change folder to parent");
// If we can't find it, set the current dir to one above the executable path and try that instead.
let mut dir = std::env::current_exe().expect("Cannot get the path to the executable");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this so that we always try relative to the actual executable, rather than relative to whatever the working directory happens to be right now.

@dgavedissian
Copy link
Collaborator Author

Final artifacts:

Screenshot 2024-05-27 at 23 52 45

@dgavedissian
Copy link
Collaborator Author

I added rust-cache to the PR build as well in d39b86e, and changed the release workflow to use the shared cache key, so now I think the cache should be shared across all branches when the dependencies don't change. Reduce the macOS and Windows build+test times down from 16 minutes to 8 minutes.

@dgavedissian dgavedissian changed the title Build a macOS app bundle and publish a macOS distributable, clean up binary asset names. Build a macOS app bundle and publish macOS and Linux distributables, clean up binary asset names. May 28, 2024
@IllustrisJack IllustrisJack merged commit 67f3fc9 into main May 29, 2024
4 checks passed
@IllustrisJack IllustrisJack deleted the dga/macos-bundle branch May 29, 2024 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create macOS universal app bundle
2 participants