Skip to content

Explicitly add lmorandomizer bin crate to cargo for Tauri#25

Merged
progre merged 1 commit intoprogre:mainfrom
jeremydk:cargo
Jul 27, 2024
Merged

Explicitly add lmorandomizer bin crate to cargo for Tauri#25
progre merged 1 commit intoprogre:mainfrom
jeremydk:cargo

Conversation

@jeremydk
Copy link
Contributor

@jeremydk jeremydk commented Jul 27, 2024

The introduction of lmocodec broke application bundling via Tauri.

On MacOS, we can see this due to the generated plist:

❯ cat Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>lmorandomizer</string>
	<key>CFBundleExecutable</key>
	<string>lmocodec</string>
...

This appears to be undocumented(?) behavior in Tauri, but by adding a binary to our cargo.toml matching our tauri application name, it appears to successfully pick up both binaries, and correctly link the bundle.

Prior to this change, the generated .app bundle on MacOS only contains the lmocodec binary, and I have a similar report from a friend on Windows.

@progre
Copy link
Owner

progre commented Jul 27, 2024

Thank you for confirming this!

I prefer to define the main module before all the bins, so it would be helpful if you could change it that way.

By the way, is it true that it works on mac? This was the default behavior of the build tool, so I left it as is, but I figured no one would use it on a mac and was going to remove it.
Surely it would have been possible to make the game work on mac, so should I leave the mac binary in place?

@jeremydk
Copy link
Contributor Author

jeremydk commented Jul 27, 2024

I'll get this updated momentarily, I think I'm interpreting what you mean correctly.

The randomizer does indeed work on Mac (arm). One of the big benefits of Rust. Ironically, I don't play La Mulana on my mac, but since it's my primary development machine, I ran into this.

@progre progre merged commit f1322df into progre:main Jul 27, 2024
@progre
Copy link
Owner

progre commented Jul 27, 2024

Thank you!

@jeremydk jeremydk deleted the cargo branch July 27, 2024 12:40
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.

2 participants