Request: Folder Shortcut Drag 'n Drop

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
mastastealth
Prole
Posts: 30
Joined: Thu Jul 03, 2008 2:44 am
Location: Barranquilla, Colombia
Contact:

Request: Folder Shortcut Drag 'n Drop

Post by mastastealth »

Something that would help me out while coding Lua would be for a folder shortcut on my desktop be drag 'n droppable on to the LÖVE shortcut, and launch like usual. It would cut another step off digging into my coding folder, having to maintain an explorer window open, and Alt-tabbing back and forth while I change code. :D
User avatar
Xfcn
Citizen
Posts: 65
Joined: Sat Jul 12, 2008 6:53 am

Re: Request: Folder Shortcut Drag 'n Drop

Post by Xfcn »

1) Create a Text Document in your LOVE directory where LOVE EXE is located. Name this "draglove.bat"

2) Edit said "draglove.bat" file with Notepad. Please place the following into the document:

Code: Select all

love.exe %1
*Please note: I don't know the name of the love.exe so please replace love.exe with something else if that is not the main EXE filename. I also don't know if there are miscellaneous commands that have to be entered to get Love to run.

3) Create a shortcut to this "draglove.bat" on the desktop. Et voila. It's simple, you see, when you employ the right tools.

Hope that was helpful.
"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
User avatar
Kaze
Party member
Posts: 189
Joined: Sat Jul 19, 2008 4:39 pm
Location: Dublin, Ireland

Re: Request: Folder Shortcut Drag 'n Drop

Post by Kaze »

Xfcn wrote:1) Create a Text Document in your LOVE directory where LOVE EXE is located. Name this "draglove.bat"

2) Edit said "draglove.bat" file with Notepad. Please place the following into the document:

Code: Select all

love.exe %1
*Please note: I don't know the name of the love.exe so please replace love.exe with something else if that is not the main EXE filename. I also don't know if there are miscellaneous commands that have to be entered to get Love to run.

3) Create a shortcut to this "draglove.bat" on the desktop. Et voila. It's simple, you see, when you employ the right tools.

Hope that was helpful.
Unnecessary, a simple shortcut to the love executable does the exact same. (And has a sexy icon.)
User avatar
Xfcn
Citizen
Posts: 65
Joined: Sat Jul 12, 2008 6:53 am

Re: Request: Folder Shortcut Drag 'n Drop

Post by Xfcn »

Fine, be accurate. See if I care. I'll just sit here and use Linux, as usual.
"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
User avatar
mike
Administrator
Posts: 364
Joined: Mon Feb 04, 2008 5:24 pm

Re: Request: Folder Shortcut Drag 'n Drop

Post by mike »

What I want to see (why am I adding suggestions to my own forum???) is the ability to run LÖVE and then click-and-drag a .love file (or folder, for that matter) into the game window which will cause it to kill any running game and start that one. I am not sure how SDL handles dragging and dropping and whether it is possible to do on Win/Linux/Mac without having to do too much platform-specific coding.
Has this been discussed before? I think I have talked to rude about it...
Now posting IN STEREO (where available)
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Request: Folder Shortcut Drag 'n Drop

Post by rude »

Not supported by SDL, as far as I know.

It has been discussed; it would involve way too many dependencies to be worth it.
surtic
Citizen
Posts: 74
Joined: Sat Jul 12, 2008 12:18 am

Re: Request: Folder Shortcut Drag 'n Drop

Post by surtic »

I have another suggestion.

How about love.exe doing the following:
Check if the last path element (without extension) of argv[0] is "love". If so - behave as normal. Otherwise, if argv[0] is a/b/c/d/efg[.exe] then take a/b/c/d/efg.love (file) and a/b/c/d/efg (directory) as candidates, in that order. If any of them exists, run them.

That way, one can develop as usual (using love or love.exe), but to distribute (or debug) the code, one can rename love to "game" (or "game.exe") and a double click would just run the game. Even a shortcut would work in that case.

If that suggestion sounds reasonable, that how about trying to load "game.ico" as the icon of the game (if it exists), otherwise using the standard love icon?
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Request: Folder Shortcut Drag 'n Drop

Post by Merkoth »

I've already suggested something similar. You can hack it yourself if you aren't afraid of recompiling stuff :)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 22 guests