How can I make a exe file to distribute my game ? [Answered]

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
User avatar
zalander
Citizen
Posts: 72
Joined: Mon Jan 09, 2023 5:58 am
Location: India

How can I make a exe file to distribute my game ? [Answered]

Post by zalander »

I just finished making a game and I was wondering that how can I make a exe file to distribute my game
I hope you guys will help me :ultraglee:
Last edited by zalander on Thu Jan 26, 2023 5:49 am, edited 1 time in total.
Using LOVE to make everything except games :crazy:

Code: Select all

astring = "pog"
print(astring)
--pog
User avatar
Bigfoot71
Party member
Posts: 287
Joined: Fri Mar 11, 2022 11:07 am

Re: How can I make a exe file to distribute my game ?

Post by Bigfoot71 »

This is explained in the Löve2D documentation: https://love2d.org/wiki/Game_Distribution
  • Compress your game in a ".zip" and rename the ".zip" to ".love".
  • Then in a directory put your ".love" and the Löve2D files that you can download here (zipped version, think about the fact that the exe can be 32 or 64 bit) or recover in the directory where Löve2D is installed
  • Then run this command in the current folder from a terminal changing "SuperGame" to the name of your ".love" file:

    Code: Select all

    copy /b love.exe+SuperGame.love SuperGame.exe
And now you have an ".exe"! Do not forget the DLLs otherwise the ".exe" may produce errors on other machines. Also note that if you change the ".exe" to ".zip" you can recover the Lua files contained in it so this will not prevent you from recovering your code, if that is what you were looking to do, you will then have to either precompile it with LuaJIT or use any other obfuscation technique.

If you want to modify the ".exe" icon and/or change the info of the executable you can use software like Resource Hacker.

Note that you can also do this using love-release which you can install with LuaRocks, there are probably others.
There is also LÖVE Builder on Ivan's site that you can use to do this online.

Now you should know pretty much everything about publishing on Windows ^^
Last edited by Bigfoot71 on Wed Jan 25, 2023 6:33 pm, edited 1 time in total.
My avatar code for the curious :D V1, V2, V3.
User avatar
darkfrei
Party member
Posts: 1168
Joined: Sat Feb 08, 2020 11:09 pm

Re: How can I make a exe file to distribute my game ?

Post by darkfrei »

zalander wrote: Wed Jan 25, 2023 5:32 pm I just finished making a game and I was wondering that how can I make a exe file to distribute my game
I hope you guys will help me :ultraglee:
https://love2d.org/wiki/Game_Distribution
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
zalander
Citizen
Posts: 72
Joined: Mon Jan 09, 2023 5:58 am
Location: India

Re: How can I make a exe file to distribute my game ?

Post by zalander »

Thanks guys !
I now know how to make a exe file for my games.
:awesome:
Using LOVE to make everything except games :crazy:

Code: Select all

astring = "pog"
print(astring)
--pog
Post Reply

Who is online

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