jorio / Bugdom

🐛 Pangea Software's Bugdom for modern systems
https://pangeasoft.net/bug
Other
371 stars 24 forks source link

Trying to create a desktop starter for my bugdom build #16

Open github-userx opened 3 years ago

github-userx commented 3 years ago

[Desktop Entry] Name=Bugdom GenericName=3D Game Comment=Game Exec=./home/pi/Desktop/Bugdom/build/Bugdom Icon=/home/pi/bugdom.png Terminal=false Type=Application StartupNotify=false Categories=Game

Also doesn’t work when I remove the dot before the exec command

jorio commented 3 years ago

What's not working exactly? Are you getting any errors?

You may have to write a launcher script that cd's into the right directory so the game can find its assets. You can look at how the AUR package for Bugdom does it.

Poking @jpenguin because I think he has XP with this stuff as well.

jpenguin commented 3 years ago

You can either install the bugdom executable in /usr/lib/bugdom and use cd /usr/lib/bugdom/; ./Bugdom to launch the game or put a launcher in the same directory as the executable and data folder with cd "$(dirname "$(readlink -f "$0")")";./Bugdom

github-userx commented 3 years ago

Thanks. 

How do I install it to that directory? I did everything (git clone, cmake build) on /home/user/Desktop

Can I just use the mv command ? Do I move the entire Bugdom build folder to /usr/lib ?

I had tried to create a .desktop starter file on my Desktop but it gave me either error window/message or just showed a terminal for a second and then closed.

jpenguin commented 3 years ago

cd to your build directory

To install

mkdir -p /usr/lib/Budom/
mv {Data,%{name}} /usr/lib/Budom/
echo -e '#!/usr/bin/sh\n\ncd /usr/lib/Budom/;./Budom' > '/usr/bin/Budom.sh'
chmod +x /Budom

or without installing echo -e '#!/usr/bin/sh\n\ncd "cd "$(dirname "$(readlink -f "$0")")";./Bugdom' > ./Run.sh

(These cript have not been tested) Then just point the desktop file to Bugdom.sh or Run.sh

github-userx commented 3 years ago

Thanks @jpenguin ! I got it to work.

I wanted bugdom to autostart after my raspberry pi has booted up but when I put the .desktop file in ~/.config/autostart Bugdom does start after the desktop has initialized but we don’t have Control over the mouse and Keyboard anymore. I already searched for fixes…but I experience the same behavior when using .config/lxsession/lxde/autostart etc. 

github-userx commented 3 years ago

Or I guess I should try doing it through systemd?