I can't find it on the wiki but is there a peice of code that forces the filesystem to look at the source directory? I ask because currently my libaries are stored in the love directory and my database has to be located there. I've got it to locate the database in the user directory, which would be a half work around and is likely to be the location for my saves anyway but not the core data.
thanks
Source Directory Code
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Source Directory Code
I'm not sure what you want to do, but PhysFS abstracts the two places away, so LÖVE can't see any difference between the .love and the write dir.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3726
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Source Directory Code
A question I've been meaning to ask but never got around to testing is which directory does Löve prefer? If both the .love file and the game's working directory both include a file with the same filename at the same location, which one does Löve load?
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: Source Directory Code
Jasoco wrote:A question I've been meaning to ask but never got around to testing is which directory does Löve prefer? If both the .love file and the game's working directory both include a file with the same filename at the same location, which one does Löve load?
http://love2d.org/wiki/love.filesystemLove wiki wrote:Files that are opened for read will be looked for in the save directory, and then in the game root folder (in that order). So if a file with a certain filename (and path) exist in both the .love-file and the save folder, the one in the save directory takes precedence.
Re: Source Directory Code
Basically I want the source code to automatically look for libaries (.dll) in the source code directory and not where LOVE.exe is located. I have a database that is accessed through a libary located currently in the same directory as Love.exe but I want it in the directory of main.lua.Robin wrote:I'm not sure what you want to do, but PhysFS abstracts the two places away, so LÖVE can't see any difference between the .love and the write dir.
Where can I find info on PhysFS?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Source Directory Code
Well, it should never look in the same directory as the love executable, but since you're using dlls, all bets are off. I don't think LÖVE supports dll loading from the .love or write dir.Richyg wrote:Basically I want the source code to automatically look for libaries (.dll) in the source code directory and not where LOVE.exe is located. I have a database that is accessed through a libary located currently in the same directory as Love.exe but I want it in the directory of main.lua.
Let Me Duck Duck Go That For YouRichyg wrote:Where can I find info on PhysFS?
Help us help you: attach a .love.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Semrush [Bot] and 7 guests