Filename case sensitivity
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Filename case sensitivity
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.
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.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
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...PyTom wrote:I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
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.
Server error: user 'Jake' not found
HFS+, the default filesystem for OS X, is also case-insensitive.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.
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.
-
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
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.
- 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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
-
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
Well... this is bad practice, even on a UNIX system. I'd assume most UNIX users would understand not to do this.If I [carelessly] wrote a script on Linux that uses three totally different backgrounds called bg.PNG, BG.png and Bg.png
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.I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
-
- Eileen-Class Veteran
- Posts: 1314
- Joined: Mon Sep 19, 2005 2:15 am
- Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
- Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
- Organization: Watercolorheart Studios
- IRC Nick: BCS
- Tumblr: adminwatercolor
- Deviantart: itsmywatercolorheart
- Github: Watercolordevdev
- Skype: heartnotes
- Soundcloud: Watercollider
- itch: watercolorheart
- Location: Florida
- Contact:
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], piinkpuddiin