Trouble packaging as an executable

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
coolbob44
Prole
Posts: 1
Joined: Sun Mar 18, 2012 5:50 am

Trouble packaging as an executable

Post by coolbob44 »

Hey, I'm having trouble creating an exe file for my game. I have this:

copy /b "C:\Program Files (x86)\LOVE\love.exe"+Game.love Game.exe

...But when I try to run the executable it creates, it gives the following error:

The application was unable to start correctly (0xc000007b) Click OK to close the application.

But if I drag the executable onto the shortcut to love.exe, it runs fine. I have the executable with all of the required DLLs. Any help here? Am I doing something wrong?
User avatar
richapple
Citizen
Posts: 65
Joined: Sun Dec 25, 2011 10:25 am

Re: Trouble packaging as an executable

Post by richapple »

I'll shamelessy copy my old post:

---
  • Open notepad
  • Paste this:

    Code: Select all

    @echo off
    copy /b love.exe+yourloveprojectnamehere.love yourexecutableloveprojectnamehere.exe
    pause
  • Save as test.bat (Well, basically you can you use any name, but it must end with .bat)
  • Go to folder you downloaded (or un-archived) love.
  • Copy love.exe and all the .dll 's to the folder with your love project
  • Launch your .bat file
  • Enjoy your fresh executable
---

There are several mistakes in your .bat file:
  • AFAIK, in batch files you provide a directory to a file inside a folder with .bat file
  • You don't need to use quotation marks in describing a directory
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: Trouble packaging as an executable

Post by Nixola »

In .bat files you can use relatives and absolute paths, and you HAVE to use quotation marks if the path of the directory has spaces
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
richapple
Citizen
Posts: 65
Joined: Sun Dec 25, 2011 10:25 am

Re: Trouble packaging as an executable

Post by richapple »

Nixola wrote:In .bat files you can use relatives and absolute paths, and you HAVE to use quotation marks if the path of the directory has spaces
Ok, I didn't know that.

Yet it's strange that nothing worked.

This is my folder setup:
folder-setup.png
folder-setup.png (3.68 KiB) Viewed 2641 times
and this is what in genexe.bat:

Code: Select all

@echo off
copy /b love.exe+cube.love cube.exe
pause
Everything works like a charm.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Trouble packaging as an executable

Post by bartbes »

I think the problem is in fact, that he's doing it from another dir. But nothing command-wise, it's just that the dll's are needed as well.
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Trouble packaging as an executable

Post by tsturzl »

bartbes wrote:I think the problem is in fact, that he's doing it from another dir. But nothing command-wise, it's just that the dll's are needed as well.
I was going to say the same thing.

Unfortunately due to licensing issues the DLL's cannot be statically linked into the exe. You'll have to ship them all with your game. I think the DLL's are for SDL, OpenAL, and DevIL. All of these libraries are LGPL, which conflicts with Love's license.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 8 guests