Page 1 of 1
Trouble packaging as an executable
Posted: Sun Mar 18, 2012 5:54 am
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?
Re: Trouble packaging as an executable
Posted: Sun Mar 18, 2012 8:50 am
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
Re: Trouble packaging as an executable
Posted: Sun Mar 18, 2012 9:56 am
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
Re: Trouble packaging as an executable
Posted: Sun Mar 18, 2012 10:57 am
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 (3.68 KiB) Viewed 2638 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.
Re: Trouble packaging as an executable
Posted: Sun Mar 18, 2012 11:02 am
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.
Re: Trouble packaging as an executable
Posted: Tue Mar 20, 2012 5:46 pm
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.