Installing LOVE (and now ZeroBrane) on the Steam Deck - A Quick Guide

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
normanlove
Prole
Posts: 3
Joined: Sat Nov 12, 2022 11:17 pm

Installing LOVE (and now ZeroBrane) on the Steam Deck - A Quick Guide

Post by normanlove »

Hi,

So, ive been recently inspired to learn gamedev with Lua and wanted to use my steam deck as the developemnt machine (and only the deck) to emulate the bedroom coders of the 80s on their microcomputers. However, this led to me very quickly finding out that the flatpak version of LOVE doesnt work very well on the deck, and there doesnt appear to be a way apparent that will allow you to point your own interpreter to the LOVE executable. Thankfully, the chaps on discord have been instrumental on helping me find a workaround, and thankfully its rather simple.

This guide will also install LOVE in such a way that it avoids being a part of any system critical directories, meaning readonly mode does not need to be disabled and will therefore persist after a system update has been applied, so it will be a permenant installation.


1) Download the AppImage_X86_64 from the main homepage, and save it in your downloads folder

2) navigate to your /home/deck/ folder in Dolphin and create the directory you want LOVE to sit in (i chose love2d - so /home/deck/love2d/). Once the directory is created, place the appimage file into this directory.

3) open up Konsole and drag the appimage icon into your Konsole, this should populate the command with the full filepath. on the end of this add on --appimage-extract and then press enter . Image

4) the appimage should extract almost instantly. you should see this if it has been done correctly Image

5) once done, go up a level into /home/deck, and in here you should see the squashfs-root folder in here now. It will easily be identifiable as the folder icon should have the LOVE logo on it. Right click this directory, click Rename, and then rename it to the same folder that you placed your appimage file into (i.e. love2d, if you used my example). This will come up with a naming conflict and ask what you would like to do. chose "Write Into..."

6) This is now complete. You will notice in this folder there is an executable in here called "AppRun". This is file you will want your interpreter to point to when setting up LOVE within it. For example. here is a screenshot of mine set up in Visual Studio Code - Image


This should be all. Once i learn how to actually script and code i plan to make a little installer to streamline this process, but given ive had to make this post before i have even learned and wrote my first line of Lua, then it might be a short while.
Last edited by normanlove on Sun Nov 13, 2022 12:00 pm, edited 2 times in total.
MrFariator
Party member
Posts: 509
Joined: Wed Oct 05, 2016 11:53 am

Re: Installing LOVE on the Steam Deck - A Quick Guide

Post by MrFariator »

Good of you to write this guide for those who might need it. Just fyi, you tried to embed the imgur gallery, as opposed to the individual images:
1. step 3
Image
2. step 4
Image
3. step 6
Image
normanlove
Prole
Posts: 3
Joined: Sat Nov 12, 2022 11:17 pm

Re: Installing LOVE on the Steam Deck - A Quick Guide

Post by normanlove »

Thanks!. ive fixed the post now. Ironicallly id written the guide on my deck and the screen was too small for me to notice the errors easily (it was midnight and id left my glasses off).
normanlove
Prole
Posts: 3
Joined: Sat Nov 12, 2022 11:17 pm

Re: Installing LOVE on the Steam Deck - A Quick Guide

Post by normanlove »

How to install ZeroBrane on deck (permenantly) and point it to the LOVE interpreter manually.


So zbstudio works on deck but requires the steamos-readonly feature to be disabled, as it gets installed in /opt/ which of course is a root folder. Not only does this mean that zbstudio will be wiped out next system update, but it also means that you can't save any changes to config files because the /opt/ folder is locked down. This is especially annoying in our case, as the LOVE interpreter we've had to install in a custom directory. Unfortunately we will still have to disable the readonly status and therefore implement a sudo password, so DO THIS AT YOUR OWN RISK.


Pre Steps - You will need to create a sudo password, and then run the "steamos-readonly disable" command in your konsole. i will not instruct you how to do this, but rather link you to the valve page on how to. This will make some significant changes to your system that can't really be reversed, so understand that it will shape your desktop environment into one that will require a sudo password for most things you do. This is typical for experienced users of a linux OS, but probably super annoying for anyone used to windows. Long story short...... you're gonna have to deal with it.

https://help.steampowered.com/en/faqs/v ... operations.

Anyway, now thats covered, onto the installation;-

1) download the ZeroBrane shell script from the ZB website - https://studio.zerobrane.com/download - and if you would like to pay, please do so. if not, click "hot this time". Once there, right click on the "Linux" link and choose "Save Link As....", and put it in your downloads folder. As this is a shell script, if you click the link it will just display the script as a text file in your browser, so thats why that happened after you glossed over the second half of this step.

2) open a konsole window and type "sudo steamos-readonly disable" if you havent already, and allow the installation to happen.
type sudo again, with a space after, and then drag your shell script into your konsole window (exactly the same way from the LOVE install) and press enter. this will install zbstudio

3) Once installed, navigate to your /opt/ folder by just typic /opt/ into your Dolphin file manager path. In this folder, you will see a folder named "zbstudio". Right click on this folder and copy it.

4) go back to your /home/deck folder and paste the zbstudio folder into there (the same place we put the love2d folder). This part is essentially complete.

5) go back to your konsole window and type "sudo zbstudio-uninstall" and hit enter. This will remove the installation from /opt/ and prevent any confusion at a later date with having two installs in different locations. Yes this will get wiped in the next update so its not a strictly necessary step, but who knows what valve will do in future updates and you will not use this is installation of zbstudio so its best to just get rid of it now.

6) do a "steamos-readonly enable" in the konsole to re-enable the safe mode.

7) Navigate to your /home/deck/zbstudio folder (NOT ZeroBrandeStudio-linux folder next to it, this is something else you can just ignore if its there). in here you should see a file called zbstudio.sh. This is your ZeroBrane "executable" as it were, so double click this to run ZeroBrane, and create a symlink to the desktop if you want a desktop shortcut etc. You can do this by left-click dragging this .sh file to the desktop and selecting "Link here..." Anyway, once this is done, run ZeroBrane.

8) go to Edit > Preferences > Settings: System - this will open up a tab in ZB. at the bottom of the tab add the following line ;-

path.love2d = '/home/deck/love2d/AppRun'

and of course change the path to wherever you extracted the love2d appimage in the previous post. close this tab, and click yes to save the changes.

9) Finally, go to Projects > Lua Interpreter > select LOVE.

And now this should all be done!, and if you try to run your script it should automatically open it in love2d.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 16 guests