livesim2_async icon indicating copy to clipboard operation
livesim2_async copied to clipboard

macOS Automated Builds

Open MikuAuahDark opened this issue 2 years ago • 8 comments

Starting from bb3bd9c503bbf8a0ac0ecd942c0ec60d1c2f7455 (master branch) and 22e51889c32d5a1888a57cbfa4e95495ba4468f1 (over_the_rainbow branch), GitHub Actions automatically creates build of the game on each commit.

However, it only build Windows binaries and Linux AppImages for now (and Android coming soon; all of them 64-bit only). LOVE itself has automated macOS build however LS2 needs certain libraries to work optimally hence the macOS workflow steps is commented out.

If anyone has experience dealing with macOS, please let me know so we can discuss things further.

MikuAuahDark avatar Aug 06 '23 16:08 MikuAuahDark

would like to help

louy2 avatar Nov 15 '23 12:11 louy2

Sure, feel free to submit PR for it.

MikuAuahDark avatar Nov 15 '23 13:11 MikuAuahDark

As a beginning, building ls2x with CMake generated Xcode project gives a ls2xlib.so. Putting that ls2xlib.so in the simulator directory, and love . to run the simulator, runs fine and gives no "ls2xlib module not found" error. Will go on to try to build ls2x on Github Action macOS runner.

louy2 avatar Jan 30 '24 06:01 louy2

What about putting ls2xlib.so in the LS2 save directory?

MikuAuahDark avatar Jan 30 '24 06:01 MikuAuahDark

Love2D has a default list of directories it searches for .so files, listed on launch, shown below. If ls2xlib.so is put in the LS2 save directory, I need to find a way to tell Love2D how to find it. Where is the LS2 save directory btw?

warning: no features.
module 'ls2xlib' not found:
	no field package.preload['ls2xlib']
	no 'ls2xlib' in LOVE game directories.
	no file 'ls2xlib' in LOVE paths.
	no file './ls2xlib.lua'
	no file '/usr/local/share/luajit-2.1/ls2xlib.lua'
	no file '/usr/local/share/lua/5.1/ls2xlib.lua'
	no file '/usr/local/share/lua/5.1/ls2xlib/init.lua'
	no file './ls2xlib.so'
	no file '/usr/local/lib/lua/5.1/ls2xlib.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'

louy2 avatar Jan 30 '24 06:01 louy2

The save directory can be found in Settings -> System Information -> R/W Directory. LOVE itself also has its own C module loader with its own search paths controlled using love.filesystem.get/setCRequirePath.

MikuAuahDark avatar Jan 30 '24 06:01 MikuAuahDark

I see.

I also had misunderstandings. I thought zipping up the repo with the ls2xlib.so file would work, but it seems './ls2xlib.so' is relative to pwd not to the root directory, because the warning still shows when I love livesim2.love.

That said, when I try Autoplaying some beatmaps it does not seem affected. What exactly does ls2x do? Are there test cases I can run to cover more ground?

louy2 avatar Jan 30 '24 08:01 louy2

ls2x is required to export your beatmap to video.

MikuAuahDark avatar Jan 30 '24 10:01 MikuAuahDark