[SOLVED] Can I open Löve2D with .bat
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
[SOLVED] Can I open Löve2D with .bat
Hi!
I am watching this tutorial http://www.youtube.com/watch?v=6ZBAxKoJ ... B05A624D91
and he makes a .bat file which opens löve2D and runs the lua files.
I have made the same .bat file.
The first time i launched the .bat file it worked fine.
The second (and some more) time(s) when i launched the .bat file it opened Löve2D it showed a picture of a pig and som hearts rotating.
So I googled and found out to zip the files and drag them to the Löve2D program.
But the .bat would so much easier.
So the question is; Can I open my Lua files in Löve2D with a .bat file?
-Ryno
I am watching this tutorial http://www.youtube.com/watch?v=6ZBAxKoJ ... B05A624D91
and he makes a .bat file which opens löve2D and runs the lua files.
I have made the same .bat file.
The first time i launched the .bat file it worked fine.
The second (and some more) time(s) when i launched the .bat file it opened Löve2D it showed a picture of a pig and som hearts rotating.
So I googled and found out to zip the files and drag them to the Löve2D program.
But the .bat would so much easier.
So the question is; Can I open my Lua files in Löve2D with a .bat file?
-Ryno
Last edited by Ryno on Fri Mar 08, 2013 3:41 pm, edited 1 time in total.
- Taehl
- Dreaming in associative arrays
- Posts: 1025
- Joined: Mon Jan 11, 2010 5:07 am
- Location: CA, USA
- Contact:
Re: Can I open Löve2D with .bat
You just need to call Love with your game's folder as the first parameter. For example:
Code: Select all
C:\Games\Love\love.exe "C:\Games\Love\my game"
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+.
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
- monsieur_h
- Citizen
- Posts: 69
- Joined: Tue Oct 30, 2012 4:43 pm
Re: Can I open Löve2D with .bat
Personally I have two files in every project I make:
love32.bat, containing:
love64.bat, containing:
It allows my fellows from art and sound to run the project from any windows computer they have, with love installed.
love32.bat, containing:
Code: Select all
"C:\Program Files\LOVE\love.exe" "%CD%"
Code: Select all
"C:\Program Files (x86)\LOVE\love.exe" "%CD%"
- slime
- Solid Snayke
- Posts: 3170
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Can I open Löve2D with .bat
You don't have to zip the files, you can just drag the folder containing your main.lua onto the LÖVE executable.Ryno wrote: So I googled and found out to zip the files and drag them to the Löve2D program.
But the .bat would so much easier.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Can I open Löve2D with .bat
Conversely, if you're on OS X you can create a .command file to do the same thing. It even opens the Terminal for debugging.
Put this in an empty text file with a .command extension:
Then use the Terminal to make it executable:
(Easier if you type the chmod 755 part first with a trailing space then drag the file in the Finder into the window and press Enter.)
Then you can just double-click it to launch it.
[The More You Know...]
Put this in an empty text file with a .command extension:
Code: Select all
#!/bin/bash
/Path/to/love.app/Contents/MacOS/love /Path/to/Love/Project/File/
Code: Select all
chmod 755 YourCommandFile.command
Then you can just double-click it to launch it.
[The More You Know...]
- monsieur_h
- Citizen
- Posts: 69
- Joined: Tue Oct 30, 2012 4:43 pm
Re: Can I open Löve2D with .bat
We should have a FAQ tackling this on the wiki, it's asked often enough to justify a page imo.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Can I open Löve2D with .bat
I think this would be a good idea actually.monsieur_h wrote:We should have a FAQ tackling this on the wiki, it's asked often enough to justify a page imo.
How about a page like this?
https://www.love2d.org/wiki/Development_Scripting
It could contain;
- Windows .bat setup
- OS X bash
- Linux bash
- Makefile
- Build Script
- IDE configs (e.g. Geany custom build commands.)
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Can I open Löve2D with .bat
So what is it I have to put into my .bat file instead of
-Ryno
Code: Select all
@Echo off
start "" "C:\Program Files (x86)\LOVE\love.exe"
-Ryno
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Can I open Löve2D with .bat
Doesn't this work:
?
Code: Select all
@echo off
"C:\Program Files (x86)\LOVE\love.exe" .
Help us help you: attach a .love.
Re: Can I open Löve2D with .bat
Thank you alot Robin.
Thougt I had tried that, but now it works.
-Ryno
Thougt I had tried that, but now it works.
-Ryno
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 19 guests