do i have to switch between .love and .zip files every time?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
worldaway
Prole
Posts: 44
Joined: Thu Sep 08, 2011 2:22 am

do i have to switch between .love and .zip files every time?

Post by worldaway »

(im a noob to this)
This is the way i modify my code:
I change the .love to .zip
I open the .zip folder
I open the main.lua with notepad++
I modify code/save
I get out of the main.lua and .zip folder
I rename the .zip folder to .love
Now I run the program.

Is this the best way to modify and run code, because It seems very cumbersome?
Rad3k
Citizen
Posts: 69
Joined: Mon Aug 08, 2011 12:28 pm

Re: do i have to switch between .love and .zip files every t

Post by Rad3k »

You can run your code just from a directory, it doesn't have to be zipped - I do this all the time when I'm working on something. But that's easy on Linux...
If you're on Windows, you can try this doesn't work:
1. Unzip your .love into an empty directory
2. Place a shortcut to love (Löve executable) in that directory
3. In the shortcut properties, set "working directory" (or something like that, I don't remember) to this directory.

Then I think you should be able to run your project with this shortcut. I don't know for sure if it works, but that's what I would try first.

EDIT: Just checked, it didn't work.
But you can drag the folder (or .zip file) onto the Löve shortcut and it should work (works for me).
Last edited by Rad3k on Fri Sep 09, 2011 3:02 am, edited 1 time in total.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: do i have to switch between .love and .zip files every t

Post by Jasoco »

Keep it in a folder during development. Zip it into a .love when you release it or want to upload a demo here.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: do i have to switch between .love and .zip files every t

Post by T-Bone »

If you've installed Löve properly, you should be able to be able to run your game from a command line, so you should be able to make a sort of launcher, that runs your game as a folder when you double click on it. I think you should make a .bat file containing

Code: Select all

love PATHTOFOLDER
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: do i have to switch between .love and .zip files every t

Post by Taehl »

If you're in Windows, you can make a shortcut to have Love run a folder. (Love can run folders, .zip files, and .love files). The shortcut path should be the filepath to Love, then the filepath to the your project. For example, I use:

Code: Select all

D:\Dev\Love\love.exe "D:\Dev\Love\Underlife b2"
Last edited by Taehl on Fri Sep 09, 2011 7:44 am, edited 1 time in total.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

Re: do i have to switch between .love and .zip files every t

Post by nevon »

Or if you add the love executable (love.exe) to your PATH, you can just open up a terminal and run:

Code: Select all

cd C:\path\to\your\game\
love.exe .
At least I think that should work (not sure if . works in Windows). If not, just:

Code: Select all

love.exe C:\path\to\your\game\
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: do i have to switch between .love and .zip files every t

Post by Kadoba »

Since you're using notepad++ you can also enter run commands by hitting F5. Notepad++ will remember the command until you close it.

It's really handy.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: do i have to switch between .love and .zip files every t

Post by tentus »

Kadoba wrote:Since you're using notepad++ you can also enter run commands by hitting F5. Notepad++ will remember the command until you close it.

It's really handy.
For reference, this is the command (depending on your love location, of course):

Code: Select all

"C:\path\to\love\love.exe" "$(CURRENT_DIRECTORY)"
You can also give it a shortcut if you save it. I always set it up to be Ctrl-Shift-Enter, that way no matter what main.lua I am editing, it is one shortcut away from running.
Kurosuke needs beta testers
User avatar
GijsB
Party member
Posts: 380
Joined: Wed Jul 20, 2011 10:19 pm
Location: Netherlands

Re: do i have to switch between .love and .zip files every t

Post by GijsB »

right click on the .love
open with winrar
edit
save
play

;)
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: do i have to switch between .love and .zip files every t

Post by T-Bone »

tentus wrote:
Kadoba wrote:Since you're using notepad++ you can also enter run commands by hitting F5. Notepad++ will remember the command until you close it.

It's really handy.
For reference, this is the command (depending on your love location, of course):

Code: Select all

"C:\path\to\love\love.exe" "$(CURRENT_DIRECTORY)"
You can also give it a shortcut if you save it. I always set it up to be Ctrl-Shift-Enter, that way no matter what main.lua I am editing, it is one shortcut away from running.
The same works if you're running Linux if you're using gedit, if you have "external commands" activated. The linux command is

Code: Select all

love .
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 65 guests