Excecutable will run only if it is at the same folder with source code

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
CrazyEce91
Prole
Posts: 3
Joined: Sun Jun 14, 2020 12:13 pm
Location: Kalamata, Greece

Excecutable will run only if it is at the same folder with source code

Post by CrazyEce91 »

Hello fellow devs,
I have made a demo of my game that I want to distribute to some BETA testers. I made an .exe file of my game , however when I try to run it it will complain that it can not find some particular source files . If I move the excecutable to the folder where I have my source files , the application runs without any issue. The excetutable should run regardless its location, shouldn't it? I have uploaded a .love file with my game on google drive, click here if you want to access it.
Thank you in advance :3
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: Excecutable will run only if it is at the same folder with source code

Post by ReFreezed »

In the code you're requiring things from a folder named "states" but the zip file has a folder named "States" with an uppercase S. Zip files and most non-Windows systems have case sensitive filenames which is why the game works with the unpacked files next to it.

As to why LÖVE says there's no game, I'm not completely sure why. Might be because the error happened in the main chuck of the main.lua file and LÖVE hasn't prepared any proper error handlers yet or something. I would suggest putting all loading code, including require calls (you're requiring "src/Dependencies" at the top of the file), in love.load().
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Excecutable will run only if it is at the same folder with source code

Post by zorg »

Also, even if you combine love.exe with your .love file, you still need all the .dll files next to it for it to work.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
CrazyEce91
Prole
Posts: 3
Joined: Sun Jun 14, 2020 12:13 pm
Location: Kalamata, Greece

Re: Excecutable will run only if it is at the same folder with source code

Post by CrazyEce91 »

zorg wrote: Mon Jun 15, 2020 1:09 am Also, even if you combine love.exe with your .love file, you still need all the .dll files next to it for it to work.
Yes I did that step in the first place, the problem was the one ReFreezed suggested.
CrazyEce91
Prole
Posts: 3
Joined: Sun Jun 14, 2020 12:13 pm
Location: Kalamata, Greece

Re: Excecutable will run only if it is at the same folder with source code

Post by CrazyEce91 »

ReFreezed wrote: Sun Jun 14, 2020 11:34 pm In the code you're requiring things from a folder named "states" but the zip file has a folder named "States" with an uppercase S. Zip files and most non-Windows systems have case sensitive filenames which is why the game works with the unpacked files next to it.

As to why LÖVE says there's no game, I'm not completely sure why. Might be because the error happened in the main chuck of the main.lua file and LÖVE hasn't prepared any proper error handlers yet or something. I would suggest putting all loading code, including require calls (you're requiring "src/Dependencies" at the top of the file), in love.load().
Yes that was excactly the problem , thank you :D
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests