Page 1 of 1

Could not set write Directory - Only occurs with .exe

Posted: Mon Sep 26, 2011 5:52 pm
by JDFight
Hello Everyone -

I have recently be toying around with creating an executable for my Love game. I am running into issues regarding love.filesystem.write when the .love file is merged into an .exe file.

When I run my game from the .love file, everything works fine - However, when I merge it into the .exe file, I now get the error "Could not set write directory"
I have tried setting t.identity in conf.lua - but it always yields the same error - When I get rid of all love.filesystem calls in my project, the .exe version runs perfectly fine - So I think the exe is getting created properly.... This is in Windows 7 Home 64 bit. Love version is 0.7.2

To create the exe - I am using the command "copy /b love.exe BoxBreaker.love BoxBreaker.exe"

The project in question is located here:
https://github.com/jdfight/BoxBreaker

Re: Could not set write Directory - Only occurs with .exe

Posted: Mon Sep 26, 2011 6:53 pm
by thelinx
You're not setting a filesystem identity. Either specify t.identity in your conf.lua or call love.filesystem.setIdentity at the start of love.load.

Re: Could not set write Directory - Only occurs with .exe

Posted: Mon Sep 26, 2011 7:46 pm
by JDFight
hmmm - the same error occurs when I add the following line to conf.lua:

t.identity = "data"

- again, the .love file works fine - the .exe fails.. could it be a file permissions issue?

Re: Could not set write Directory - Only occurs with .exe

Posted: Mon Sep 26, 2011 9:11 pm
by JDFight
Ah - I solved it! : I changed t.identity to the following in conf.lua:

Code: Select all

 t.identity = "'%appdata%\Love\'" 
Now it is working just fine - Thanks!

Re: Could not set write Directory - Only occurs with .exe

Posted: Mon Sep 26, 2011 9:38 pm
by Robin
That... is bad. A bug in LÖVE?

Re: Could not set write Directory - Only occurs with .exe

Posted: Tue Sep 27, 2011 8:38 am
by thelinx
Try using "BoxBreaker" as t.identity. Maybe that will solve it?

Re: Could not set write Directory - Only occurs with .exe

Posted: Tue Sep 27, 2011 1:58 pm
by JDFight
Yes - Setting t.identity as "BoxBreaker" also works - and is preferable to %appdata/Love% - Looking back on this error makes me realize I was being total noob! - which of course, I am...

Thanks!