Page 1 of 1
Filename case sensitivity
Posted: Mon Aug 14, 2006 9:26 pm
by RedSlash
I'm not sure if this has been addresed before, but I know that ren'py is supposed to be multi-platform, but there is something that breaks this platform portability and I think that maybe people should be notified about this and this issue is filename case-sensitivity.
I noted this problem when I tried to download BCS's CC game here:
http://lemmasoft.renai.us/forums/viewto ... 2&start=15
and found out that it crashed out on me. It tried to load a file called 'titlescreen1.JPG', and when I looked in the game directory, I found a file called 'titlescreen1.jpg'. Only problem is that on windows, this loads fine b/c windows does not care about the case in filenames, but on case-sensitive OS's like Linux, it crashes because the two filenames are different.
I was thinking itd be a good idea to include a note about this in the new documentation or tutorial.
Posted: Mon Aug 14, 2006 9:39 pm
by PyTom
Lint checks for this. It's a common enough sort of mistake, however, that I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Posted: Tue Aug 15, 2006 7:54 am
by Jake
PyTom wrote:I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Along the same lines, I've not tried this, but does Ren'Py raise an error when someone tries to load a graphic that has two potential sources discriminated only by case? If I [carelessly] wrote a script on Linux that uses three totally different backgrounds called bg.PNG, BG.png and Bg.png then it presumably would work how I expect, but those files would overwrite each other on an Windows/NTFS system...
Making the whole thing platform-independently case-insensitive may or may not at least highlight the problem on a non-Windows machine, I guess, depending on how you go about it.
Posted: Tue Aug 15, 2006 10:40 am
by shaja
Jake wrote:I expect, but those files would overwrite each other on an Windows/NTFS system...
Making the whole thing platform-independently case-insensitive may or may not at least highlight the problem on a non-Windows machine, I guess, depending on how you go about it.
HFS+, the default filesystem for OS X, is also case-insensitive.
It seems like a pretty edge case that someone would actually give their files names differing only in case, even on filesystems that support it.
So, making Ren'Py case-insensitive sounds like a good idea to me.
Posted: Tue Aug 15, 2006 11:33 am
by Watercolorheart
Oy, I didn't even know this. I'll fix it before the next release, when I finish writing Chapter Three. I'm sure with the implementation of a limited set of sprites, I missed more errors somewhere in there ...
Posted: Tue Aug 15, 2006 12:08 pm
by PyTom
I have a couple of other ideas on tap for 5.6, related to making things easier to use:
- We will allow colors to be expressed as "#rrggbb" and "#rrggbbaa" strings, along with 4-tuples, everywhere colors are used.
- We will allow images to be given as strings, everywhere images are used. (Including in styles).
- We will check, and complain if a style is used but not defined.
I'm also trying to come up with a better way of handling selected button styles, as the current way seems to be pretty lousy. I'm leaning towards allowing one to prefix style properties with selected_, but I'm not sure that's the best solution. It breaks backwards compatibility, so I'm not sure it's worth it.
Posted: Tue Aug 15, 2006 12:45 pm
by Watercolorheart
PyTom, I left you a message about transitions in the private PM system of this forum, because I was a bit embarassed to ask ... I also e-mailed you a mock-up ...
Posted: Tue Aug 15, 2006 7:46 pm
by RedSlash
If I [carelessly] wrote a script on Linux that uses three totally different backgrounds called bg.PNG, BG.png and Bg.png
Well... this is bad practice, even on a UNIX system. I'd assume most UNIX users would understand not to do this.
I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Well, something that could be handy would be a flag I can pass to ren'py on the commandline to treat filenames as case-insensitive. I think having some note in the doc or tutorial would be enough; I wouldn't want to bother you to go through the trouble of adding extra code for such a minor problem.
Posted: Wed Aug 16, 2006 12:31 am
by Watercolorheart
Furthermore, it only took me like 3 seconds to fix the problem, once I knew where to look ........
Which I did fix it, and added more stuff, the latest file is in the Second Origins thread on the Gamemaker's forum, as always ......