Running a .exe with Love2D

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
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Running a .exe with Love2D

Post by Bannana97 »

I am trying to make an automatic update .exe file.
Is it possible to execute .exe files with Love2D api?
Last edited by Bannana97 on Sat Jun 09, 2012 5:13 am, edited 1 time in total.
worldaway
Prole
Posts: 44
Joined: Thu Sep 08, 2011 2:22 am

Re: Running a .exe with Love2D

Post by worldaway »

https://love2d.org/wiki/Game_Distribution

scroll down, it should help.

Also you made a typo.*love2d, not love3d
Bannana97
Citizen
Posts: 77
Joined: Wed May 16, 2012 2:49 pm

Re: Running a .exe with Love2D

Post by Bannana97 »

No not for distribution.
I wish to RUN a .exe file FROM the game, e.g.

love.run("C:/WINDOWS/system32/cmd.exe") or similar
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Running a .exe with Love2D

Post by josefnpat »

Bannana97 wrote:I am trying to make an automatic update .exe file.
Is it possible to execute .exe files with Love2D api?
Unless you recompile love, you will not be able to run external executables. Consider doing it a bit differently:

Either:
a) Write up a bat file that runs your exe first, and then the game on launch
b) If the game is out of date, tell your users to run update.exe
c) Attempty to do the update via lua's io system (I haven't tried this) and then have the user restart the game.

I hope this helps a bit.
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
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Running a .exe with Love2D

Post by Nixola »

Is a .bat file needed? Shouldn't "os.execute('nameofthe.exe')" be enough?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Running a .exe with Love2D

Post by josefnpat »

Nixola wrote:Is a .bat file needed? Shouldn't "os.execute('nameofthe.exe')" be enough?
Yeah, Boolsheet just corrected me on irc.

I am so out of it; os.execute() should do the trick as well.
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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Running a .exe with Love2D

Post by Robin »

It is possible (and pretty easy) to make a LÖVE game self-updating, that way your game is not platform-dependent and doesn't need an external program for updating.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 212 guests