-
Notifications
You must be signed in to change notification settings - Fork 66
Make the MacOS build universal, and in an app bundle #230
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
base: master
Are you sure you want to change the base?
Conversation
Adding back a couple of lines that were unintentionally removed.
|
Realized that I should probably add a little more to my thought process. Made this PR with the goal of being a middle ground between #180 and #107, along with it being a slightly different approach. The middle ground being this is easier to use than a command line alias like #180, but also not going as far as making a whole new copy of the game as #107. While still having the same goal as both of making the usage process significantly easier on MacOS. With the choice of using a app bundle that is downloaded, allowing the default MacOS security processes to work. Which allows the user to accept the exception as a "normal" application in System Preferences, overall vastly easier than any command line tool, and completely built into MacOS. Then to feel more in line with ethangreen-dev's comment "make lovely as game-agnostic as much as possible" than the other PRs, it is actively not treating itself as an installation process, but an independent executable. So there is no requirement for game specific installation steps the other two are doing, only acting as the most basic shim required to inject the dylib into the LÖVE 2d executable. I would note that this is not currently game-agnostic since the run_lovely.sh script still has the hard coded string "Balatro" (also the name of the bundle, but that's an arbitrary choice), but having this work on a different game (in theory) would be as simple as changing that one line. I did also have a rough idea that could make it probably near game agnostic, and closer to the Windows install process of placing the downloaded contents beside the original app. It's not perfect 1-1 since it would still require running this app bundle, and not just starting through steam, but the general process of how the code could have a dynamic game it injects into is this outline. Get the path of the app bundle
Go up 1 directory relative to the app bundle
Check all directories, but our own for an executable named "love"
If one is found (likely meaning it was a game using LÖVE 2d) do some checks to make sure it's actually a correct executable
Run the found executable with DYLD_INSERT_LIBRARIES set for this executable to load in the library. |
|
I can't test your PR because I don't own a Mac but this looks great so far. |
|
@english5040 or @WilsontheWolf try this out when you get a chance. |
WilsontheWolf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work fine. Theres a few nitpicks but otherwise looks good:
- No app icon
- I don't quite like the name BalatroLovely
- it probably makes sense to just have it be "Lovely Injector"
- the bundle id is weird and should be something more like io.github.ethangreen-dev.lovely-injector or nodomain.ethangreen-dev.lovely-injector for correctness (@ethangreen-dev do you have a domain?)
|
|
||
| Note: You cannot run your game through Steam on Mac due to a bug within the Steam client. You must run it with the `run_lovely_macos.sh` script. | ||
| 1. Download the [latest release](https://github.com/ethangreen-dev/lovely-injector/releases) for Mac. | ||
| 2. Open the archive, and click on `BalatroLovely.app`, this will raise a an alert saying "Apple could not verify “BalatroLovely.app'". Click "Done" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to reword this as the alert is not guranteed. Also the user interface hides the .app iirc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My laptop does not hide the .app in the dialog that opens and is why I had it, but that could very easily be some configuration change I made at one point in time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's likely a configuration change I made somewhere along the line, but it's not guaranteed.
No domain, |
|
For the app icon, I am not an artist at all, so don't really have any good idea what to do. But it would be easy to add the icon from @MisutaaAsriel in this comment if they were okay with it being used! |
I'm not sure about that icon due to it being balatro centered and not generic lovely. Lovely does have an icon that's used for some other stuff |

Makes the library a universal binary by packing both architectures into the same file, and then putting that into a really basic app bundle to make it easier to add the security exception since it will now be in System Preferences. Also updated the README with the new instructions to run it.
The release action does fail to build, action and release. However, The current head of the master branch also fails to build with the same error, action and release, so it is not from these changes.
Going back to the last working build for MacOS and applying the same exact patches to the last working build on a branch, the action and release do work just fine.