Could not set write Directory - Only occurs with .exe

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
JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

Could not set write Directory - Only occurs with .exe

Post 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
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

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

Post 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.
User avatar
JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

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

Post 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?
User avatar
JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

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

Post 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!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

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

Post by Robin »

That... is bad. A bug in LÖVE?
Help us help you: attach a .love.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

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

Post by thelinx »

Try using "BoxBreaker" as t.identity. Maybe that will solve it?
User avatar
JDFight
Prole
Posts: 27
Joined: Tue Sep 13, 2011 2:44 am
Location: USA

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

Post 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!
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests