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

love - allow installation of v0.10.2 in addition to latest version #2425

Merged
merged 1 commit into from Jul 1, 2018

Conversation

rsn8887
Copy link
Contributor

@rsn8887 rsn8887 commented Jun 12, 2018

Many games for Love are incompatible with the latest version (v11). For example, the bundled game Mari0 requires v0.10.2, and the amazing game Not Tetris requires 0.7.2.

With this PR, I am trying to add the option to install versions 0.10.2 and 0.7.2 as additional emulators for the system "love". I looked at advmame-x.xx as examples how this might work.

The goal is to allow users to use the runcommand menu to choose the version of Love on a per-game basis, similar to how it works with Advmame. The choices should be love (latest version, currently v11.1, the default), love-0.10.2, or love-0.7.2.

I am pretty sure I probably forgot something in this PR. I just copy-pasted from love.sh and made the obvious adjustments.

Can someone who is more familiar with RetroPie-Setup look over my first attempt and see if I forgot something before merging this?

Thank you!

@rsn8887 rsn8887 changed the title love - allow installation of v0.10.2 and v0.7.2 in addition to latest love - allow installation of v0.10.2 and v0.7.2 in addition to latest version Jun 12, 2018
@joolswills
Copy link
Member

If we do implement more than one version, it will need to be done in a way to avoid code duplication - eg, there should be a single module that does the work, and other modules that share it. I cannot include this as it is currently, sorry.

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 14, 2018

Thanks for looking over this.

At the moment, I really don't know enough about bash scripting and RetroPie-Setup to improve this PR much.

I just used AdvanceMame for reference, since it has two versions. But that also has code-duplication.

Is there another module that does something similar, that you could recommend as a reference?

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 14, 2018

I force pushed a change. The code duplication is removed. Is this what you had in mind?

@joolswills
Copy link
Member

thanks. We don't use () when calling functions elsewhere, so please remove those, and I will test / merge.

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 16, 2018

Thanks for looking into this. I removed () on function calls.

@joolswills
Copy link
Member

Did you build and test the 0.7.2 version on the RPI ? It uses SDL1 by the looks of it, so it can't share the main love.sh dependencies.

@joolswills
Copy link
Member

If 0.7.2 builds and works fine on the RPI with SDL1 and the other dependencies are the same with the main love.sh, the main love.sh depends function can be adjusted to include sdl1/sdl2 depending on the module id.

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 25, 2018

I pushed a change that hopefully fixes it, but it is untested at the moment. I should be able to test it later today.

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 26, 2018

I finally did a little bit of testing.

At the moment, it seems like everything works as it should apart from launching games with Love v.0.7.2. I tested this by putting Not Tetris 2.love from stabyourself.net into my roms/love folder. Then I pressed a button during the runcommand menu to change the emulator for that game from love to love-0.7.2. But the game didn't start, it went back to Emulationstation.

It might still have to do with the dependencies. To get v0.7.2 to compile, I had to change the dependencies for 0.7.2 from libsdl2 to libsdl1.2, and from libluajit to liblua (see love-0.7.2.sh).

@joolswills
Copy link
Member

I don't think it's dependencies since it built. It's probably down to the SDL support being incompatible with the RPI or something.

I had assumed when you posted the PR that the binaries produced had been tested etc.

@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 26, 2018

I will do some further testing and hopefully fix this PR with another commit today or tomorrow. If Love 0.7.2 really does not run for some reason, it will still be worthwhile to add 0.10.2 at least.

@rsn8887 rsn8887 changed the title love - allow installation of v0.10.2 and v0.7.2 in addition to latest version love - allow installation of v0.10.2 and (maybe) v0.7.2 in addition to latest version Jun 26, 2018
@rsn8887 rsn8887 changed the title love - allow installation of v0.10.2 and (maybe) v0.7.2 in addition to latest version love - allow installation of v0.10.2 and v0.7.2 in addition to latest version Jun 26, 2018
@rsn8887 rsn8887 changed the title love - allow installation of v0.10.2 and v0.7.2 in addition to latest version love - allow installation of v0.10.2 in addition to latest version Jun 27, 2018
@rsn8887
Copy link
Contributor Author

rsn8887 commented Jun 27, 2018

It looks like SDL 1.2 is built without OpenGL support, but Love 0.7.2 requires it. Since it is a very old version anyways, I don't think it is worth the trouble. I removed Love 0.7.2.

So this PR is ready to merge now. It will now allow users to easily run all the games that require Love 0.10 such as Mari0.

@joolswills
Copy link
Member

There is no opengl on the RPI on the default gpu driver. Will check and merge.

@joolswills
Copy link
Member

(gles can work with sdl, but likely requires some custom code)

@joolswills
Copy link
Member

Thanks.

@joolswills joolswills merged commit 7f3f35b into RetroPie:master Jul 1, 2018
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.

None yet

3 participants