Page 1 of 1
Batch file help
Posted: Thu Jan 30, 2014 2:55 am
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?
Re: Batch file help
Posted: Thu Jan 30, 2014 3:19 am
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".
Re: Batch file help
Posted: Thu Jan 30, 2014 3:37 am
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.
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.
Re: Batch file help
Posted: Thu Jan 30, 2014 3:46 am
by Durfingle
perfect, thanks so much!