Batch file help

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Durfingle
Prole
Posts: 2
Joined: Wed Jan 29, 2014 11:36 pm

Batch file help

Post by Durfingle »

Im very new to love2d so please pardon my simple question, but i have a conf.lua and a main.lua script in a folder, and a batch file and i want the batch file to run both scripts in love2d,
i currently have this in the batch file code:
@ECHO OFF
start "" "%PROGRAMFILES%\LOVE\love.exe" .


but it says "no game!" with the plastic piggy so, please help?
Rehnrald
Prole
Posts: 29
Joined: Fri Jul 19, 2013 6:11 am

Re: Batch file help

Post by Rehnrald »

Why don't you just make it into an EXE file?

http://www.love2d.org/wiki/Game_Distribution

Scroll down to "Creating a Windows Executable".
User avatar
JovialFeline
Prole
Posts: 28
Joined: Wed Jan 08, 2014 2:32 pm

Re: Batch file help

Post by JovialFeline »

You'll have to hand LÖVE the folder path or it'll load the "no game found" screen. To use your batch as an example:

Code: Select all

@ECHO OFF
start "" "%PROGRAMFILES%\LOVE\love.exe" "C:\path_to\LOVE Projects\PuzzleMania"
I would personally just use:

Code: Select all

@ECHO OFF
cd "%PROGRAMFILES%\LOVE"
love "C:\path_to\LOVE Projects\PuzzleMania"
Per Getting Started, you can also add --console after the path to bring up the terminal. You can use this to print debug messages and the like.

Oh! And welcome to the forum. :awesome:
Rehnrald wrote:Why don't you just make it into an EXE file?
Probably because he doesn't have something he's finished and wants to distribute yet. Building my work-in-progress code into an executable whenever I want to test a change sounds like a lousy way to use my time. :P
Durfingle
Prole
Posts: 2
Joined: Wed Jan 29, 2014 11:36 pm

Re: Batch file help

Post by Durfingle »

perfect, thanks so much!
Post Reply

Who is online

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