Help building Native standalone LÖVE games

These are the boxclip desktop and spec files:

[Desktop Entry]
Type=Application
Name=Boxclip
Comment=Boxclip
Icon=/usr/share/games/love/Boxclip/boxclip.png
Exec=/usr/bin/love /usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-5.love
Terminal=false
Categories=Games;
Name=boxclip.desktop

[X-Sailjail]
Permissions=Love2D


Name:       Boxclip
Version:    0.1.2
Release:    1%{?dist}
Summary:    
2D platformer engine using LÖVE and Lua forked from: https://github.com/Jigoku/boxclip

License:    GPLv2+
BuildArch:  noarch

%description

%define _sourcedir /home/user


%prep

%build

%install
mkdir -p %{buildroot}/usr/share/applications
mkdir -p %{buildroot}/usr/share/games/love/Boxclip
install -m 0755 %{_sourcedir}/Spiele/Sailfish/desktopFiles/Boxclip/boxclip.desktop %{buildroot}/usr/share/applications/boxclip.desktop
install -m 0644 %{_sourcedir}/Spiele/Sailfish/desktopFiles/Boxclip/boxclip-mobile-fork-v0.1-3-5.love %{buildroot}/usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-5.love
install -m 0644 %{_sourcedir}/Spiele/Sailfish/desktopFiles/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-5.love
/usr/share/games/love/Boxclip/boxclip.png

%changelog

I don’t know what else can I do to solve the sailjail permission problem.
It seems that I made a mistake with the desktop file on boxclip, I uploaded again and now it should have the sailjail permissions correct… hopefully…

I’m a bit tight on time at the moment, but am willing to help on that front. I’m a bit behind on my duties, though!

7 Likes

Very cool,thank you.

I have submitted to testing, but have not set up a packaging repo.

Will you do a fork, or do we package at Chum git?

Nitpicks:

The Name keys are duplicate, and the second one, Name=boxclip.desktop will lead to the name on the destop/launcher to be “boxclip.desktop”. So, remove that line.

You can place the Icon at /usr/share/games/love/, as long as you use the corresponding absolute path in the Icon key, but the more common localtion is /usr/share/icons/hicolor/NxN/apps with N being the resolution.
If the icon file is there, you can just use Icon=boxclip (no path, no extension, but case-sensitive) and the correct icon should be chosen.

Which ever packaging repo makes sense and which I have access to :slight_smile: Where is it :slight_smile:

Currently there is no git repo for packaging.

Love as I built it is now at
https://build.sailfishos.org/package/show/sailfishos:chum:testing/love2d

But contains a tarball of the tree at GitHub - savegame/love at sailfish, and my spec/yaml and the SJ permission file.

I can create a packaging repo at chum-git, and point the upstream git module to ?your fork of love?

Hm, that sounds weird.

Ok, so I fork GitHub - savegame/love: LÖVE is an awesome 2D game framework for Lua. and apply your changes? I suppose it might sound ‘less strange’ if we wrote LÖVE … and then, that sounds strange :0

right, I will submit soon boxclip again following your guidelines, just to make sure I understood this would be the new desktop file:

[Desktop Entry]
Type=Application
Name=Boxclip
Comment=Boxclip
Icon=boxclip.png
Exec=/usr/bin/love /usr/share/games/love/Boxclip/boxclip-mobile-fork-v0.1-3-5.love
Terminal=false
Categories=Games;

[X-Sailjail]
Permissions=Love2D

Update: not writing the full path of the icon on the .desktop files causes in my phone that the app has no visible icon, therefore I won’t do that for now.

I built boxclip and submited it again, feel free to provide further feedback.

Sure! (And fee free to drop the .yaml if you want :stuck_out_tongue: )

And then point the _service file from Show sailfishos:chum:testing - SailfishOS Open Build Service to that. You are a maintainer of that OBS project.

1 Like

I did not release all the games and apps I ported to mobile to openrepos because I want to see the feedback and how they work on modern versions of sailfish once we are done with all the changes, but also because I did some quality filters and tried to upload the best. There are much more in my repository (packaged as rpm and ready to install), feel free to test them and if you think any other is worth uploading or you have any feedback on how to improve them / guidelines to make them run just let me know.
A shared document with the list of games ported so far can be found here: CryptPad (password: “love2dtouch”)

1 Like

Thought I should try one or two, but love-11.3-1.2.1.jolla.aarch64.rpm from chum test, didn’t install on my X10III. Just saying.

Edit:
Hmmm… I was side loading and that didn’t work.
It did install with Chum GUI.

1 Like

One question, it seems your changes may be ‘in the tar ball’ on obs? Or is that just a snapshot from samegame’s repo?

Not 100% sure but I think it’s just that, download of the sailfishos branch.

1 Like

Ok, it’s building (I’m doing this while working so the means I’m 10 times slower than usual and make 4 times the errors. or the other way around).

If I understand correctly, the games themselves need to be built themselves? But can currently be installed from openrepos?

So, a quick question. The glitchapp repos don’t seem to contain your sailfish rpm / build data. You’re building on a pc and uploading to openrepos, or? Be nice to have the rpms (and rpm applied patches) in the repos. Then I could start building them on chum.

The engine builds, but I have yet to test.

1 Like

I’m not sure what you want me to do poetaster, the last rpm builds are on openrepos and on codeberg, do you need all the spec and source files? I can send them to you. If you want me to apply some specific spec so that it builds upon your new maintained love builds just let me know what I need to do.

I was hoping the rpm files land in the root of the repository directories. Then, we can automate the build of the games directly from the codeberg repos. Otherwise, for chum, we need to setup further repos which contain the rpm directories.

I’ll do some testing in the coming days and then suggest a concrete solution. Best case, one automates the builds on the git platform & chum.

I’ve never done automatic builds through a repository, I always build myself from pc, but feel free to contact me directly if you want me to do it and explain me what I need to do (I don’t know how to prepare the files for automatic build).

In short, create a directory called rpm in the root of each repository containing the required (usually just .spec file) … I can then test if the spec can be executed on obs. If you want to learn how that works we can go on from there. I have to take a look if codeberg supports actions that spin up virtual machines. If so, you can have builds done on, for instance, git tag or push to a certain branch.

Main thing, need an rpm with spec to automate.

EDIT: how about just adding the rpm/spec for Boxclip to poetaster/Boxclip: 2D platformer engine using LÖVE and Lua forked from: https://github.com/Jigoku/boxclip - Codeberg.org and I’ll test later…