Help building Native standalone LÖVE games

poetaster, please be aware that there are no repositories for the mobile versions of the game, and there are a lot of significant differences between the desktop and mobile versions. You rarely be able to run desktop games on mobile. Sorry for the confusion I may have created, I can create repositories with the source of the mobile versions of the game but as I said the source of the desktop repository will never work on mobiles (they also not have touch controls)… I hope this helps clarify…
I will start with boxclip and create a repository for the mobile version with all the needed tweaks, you can fork then that repository, the current boxclip you forked is useless for mobile I’m afraid.

1 Like

Ok, all clear, I was just forking so that I don’t forget ! :slight_smile:

1 Like

I just had a chance to test a couple of games running on the chum build of the engine and they run.

I’ll try to push the games to chum in the coming weeks. Thanks for working on them!

1 Like

amazing! thanks for working on building the runtime!

Ah, @nephros did most of the work. I just set up a repo and did some tweaks. I’ll try to get to the games after I look at how I solved some issues with Godot. There is overlap in the issues and I managed with Godot (or @sashikknox solved) audio issues.

1 Like

thanks @nephros too. I added a .spec and .desktop file to the mobile repository of boxclip. I’m not sure if the paths on the spec files are correct because I’ve never done automatic builds so feel free to correct them. I think it is also worth saying that I also zip and rename the games to .love manually, I guess that needs to be added to the spec file but not sure how to do it (I guess if it is like any script then you need to add something like zip -q boxclip.zip *.* and rn boxclip.zip boxclip.love

Ok, I’ll have a look at the repo today. The build steps can all be accomplished with the .spec.

Ok. If I understand correctly, you had the zip, renamed .love in the ‘Boxclip’ directory and were using:

install -m 0644 %{_sourcedir}/Boxclip/boxclip-mobile-fork-v0.1-3-8b.love %{buildroot}/usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-8b.love

to install it.

yes that’s it, all that is missing in the spec file is the two steps that convert the game to .love file. Only the content of the src folder needs to be zipped, not the folder and not anything outside it.

something like this should work:

BuildRequires: zip
[...]
%build
pushd gamefolder
zip ../game.love *
popd
[...]
%install
[...]

sounds like it should work to me, feel free to let me know when you have a working spec and I will update the codeberg repo with it.

Heh, I’m probably doing it wrong, but it’s building on chum as I type…

Where (or what?) is gamefolder ?

%install
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/games/love/Boxclip
cd %{buildroot}%{_datadir}/%{name}/
zip -q %{_sourcedir}boxclip.zip src/*
mv %{_sourcedir}boxclip.zip %{_sourcedir}boxclip.love

install -m 0755 %{_sourcedir}/Boxclip/boxclip.desktop %{buildroot}/usr/share/applications/boxclip.desktop
install -m 0644 %{_sourcedir}/boxclip.love %{buildroot}/usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-8b.love
install -m 0644 %{_sourcedir}/Boxclip/boxclip.png %{buildroot}/usr/share/games/love/Boxclip/boxclip.png

%files
/usr/share/applications/boxclip.desktop
/usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-8b.love
/usr/share/games/love/Boxclip/boxclip.png

I’ve checked the spec file you created and I would suggest just using boxclip.love and avoiding " ```
boxclip-mobile-fork-v0.1-3-8b.love
``
it seems to me that there is a discrepancy between the “mv %{_sourcedir}boxclip.zip %{_sourcedir}boxclip.love” you created and the name of the love file you are trying to install here: install -m 0644 %{_sourcedir}/boxclip.love %{buildroot}/usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-8b.love

am I wrong? I think if you write only boxclip.love everywhere it may work…

the error here was that I’m making assumptions about buildroot. but you’re not doing a ‘normal install’. I’ve fixed that I’m I’m on the install part now.

1 Like

I think it’d be easier if we just move some files around. I had to move rpm (it has to be in the root) and desktop and icon could also be done as they usually are in sfos apps. so:

src
rpm
Boxclip.desktop
Boxclip.png

I’m fine with that, the mobile repo has been created to automate the process so go ahead. Once it works I would adopt the changes.

I’ve just seen that at least on 4.3 and 4.5 versions it builds on all architectures, congratulations!

I just fixed the desktop category (it’s Game, not Games). But, looks clean.

So, you can adapt this approach for builds of all your games on chum.

1 Like

Sorry, I mean the folder with all the resources that should go into the zip file.