Page 1 of 1

LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Thu Dec 06, 2012 7:52 am
by sanjiv
Normally I use Windows (XP or 7), but I just upgraded the Ubuntu version on a weaker net book, and used the Ubuntu Software Center to get LÖVE. Is there a way to get a LÖVE short cut on the desktop (or wherever), and freely drag project folders onto it to run code? Right now I compress the lua files into a Zip file, and change the extension to Love, but that's not convenient for making and testing quick changes.

Actually, does any one around here even use Ubuntu? I'll take any advice that'll make using LÖVE on Ubuntu more convenient. I.e. what text editor do you use?

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Thu Dec 06, 2012 10:12 am
by Saegor
i suggest you to try GEANY, which is IMHO the coolest IDE for Löve in Linux

you can launch project you work on with the F5 command if you edit the launch command for lua files (love "%p" instead of lua "%f")
you also have tons of color schemes, options, etc... but it's fairly simple to use directly
theme_scrot.png
theme_scrot.png (9.88 KiB) Viewed 10852 times

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Fri Dec 07, 2012 12:09 am
by sanjiv
thanks, I'll check it out. But I may have to come back to ask questions later. Being able to run the game by pressing f5 seems easier than dragging around folders and shortcuts anyway.

I think my problem with creating the desktop shortcut has to do with the...I dunno, type "unity vs gnome shell" on YouTube, and it seems that Ubuntu's desktop and file managing system just works differently from Windows.

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Fri Dec 07, 2012 10:24 am
by nevon
sanjiv wrote:thanks, I'll check it out. But I may have to come back to ask questions later. Being able to run the game by pressing f5 seems easier than dragging around folders and shortcuts anyway.

I think my problem with creating the desktop shortcut has to do with the...I dunno, type "unity vs gnome shell" on YouTube, and it seems that Ubuntu's desktop and file managing system just works differently from Windows.
If you want to run a love project without having configured your IDE to launch it for you, open up a terminal and run:

Code: Select all

love path/to/love/project/
Love expects a directory as its first argument, so if you want to run it on the directory you're in, you just run:

Code: Select all

love .

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Fri Dec 07, 2012 2:34 pm
by Saegor
sanjiv wrote:I think my problem with creating the desktop shortcut has to do with the...I dunno, type "unity vs gnome shell" on YouTube, and it seems that Ubuntu's desktop and file managing system just works differently from Windows.
[troll]
i have just one advice : remove unity, by installing gnome-shell yourself or switching to lubuntu or antoher user-friendly debian distribution. unity is shaped to fit on futuristics touchscreen materials and have not the goal to be user-frienldy (or... usable ?) and will never teach you anything how to use linux efficiently (or maybe trough a lot of pain)

maybe this can help you
[/troll]

you can create a small bash script which launch love with the files in the folder who contain the script

open a text editor, write this :

Code: Select all

#! /bin/bash
/usr/bin/love /home/user_name/path/to/your/code/.
save, make the file executable by the properties menu or by typing in a terminal :

Code: Select all

sudo chmod +x /home/user_name/path/to/your_script
launch !

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Sat Dec 08, 2012 6:01 am
by T-Bone
A really easy way to do this is to just use Ubuntu's built in text editor (called Gedit) which has among its add-ons a tool called "external commands" or something like that. Activate that, and add a command for Ctrl+L for example. Set the command as "love .". This solution is 100% GUI and can be set up in about 30 seconds.

Re: LÖVE and Ubuntu -- drag and drop over LÖVE shortcut?

Posted: Sat Dec 08, 2012 7:09 am
by sanjiv
Hey, I've used gedit. I didn't think to look into what else it could do, but now I will.

I will also venture forth into the Terminal, because really it's time. Thanks for the advice on where to start, otherwise I'd likely have kept on avoiding it.

@ GEANY recommendation: I'm about to install it through the Ubuntu Software Center, and there are lots and LOTS of add ons available. Since I don't know any better, the only one I selected was the Lua scripting plug in. So I'll play around with that too and see how it goes.