Page 1 of 1
How to get source directory's path?
Posted: Mon Nov 05, 2012 2:07 pm
by Factis
I'm stuck with this :/
Which function can return source directory's path?
(My .love archive is located in "C:/Love/Test/", how do I return this path?)
Thanks.
Re: How to get source directory's path?
Posted: Mon Nov 05, 2012 4:47 pm
by Roland_Yonaba
Re: How to get source directory's path?
Posted: Tue Nov 06, 2012 9:59 am
by Factis
My game is located at C:/Love/Test
and this function returns me:
C:/Documents and Settings/ADMIN
nothing else
Re: How to get source directory's path?
Posted: Tue Nov 06, 2012 10:20 am
by Boolsheet
Hm, I don't think the path to the game directory/archive is exposed in any way. You could check the table passed to
love.load. That usually contains the directory or archive in 1, but it depends how you start LÖVE of course. Fused games start differently, for them you would need the program path and that's not in the table from love.load, but I think it saves it somewhere in the love table.
Re: How to get source directory's path?
Posted: Tue Nov 06, 2012 11:02 am
by Roland_Yonaba
I'd just like to point out that this works perfect for me, when I drag the *.love file on "love.exe".
But, as it's likely to work in all cases, as BoolSheet said, so it might not be a valuable option.