Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: FreeSpaceFreak on June 17, 2012, 07:03:09 am

Title: Linux: Case sensitive directory names?
Post by: FreeSpaceFreak on June 17, 2012, 07:03:09 am
I just got FSO rev 8896 from SVN and compiled; apparently, filenames are now case sensitive when not packed in VPs. The MVPs run fine, but the test mod attached will not work like it should: the "Data" folder is not recognized as a game directory. Rename it to "data" and it will work (you'll get a black choose-pilot screen).

Can anyone reproduce this, or did I simply mess something up in compiling?

[attachment deleted by a ninja]
Title: Re: Recent SVN builds case sensitive?
Post by: niffiwan on June 17, 2012, 07:55:43 am
I've seen this before on Linux, I assumed it had always been that way.  I believe Windows has a non-case-sensitive filesystem, so it doesn't care, Data & data are the same to it.
Title: Re: Recent SVN builds case sensitive?
Post by: FreeSpaceFreak on June 18, 2012, 03:00:17 am
If that's expected behaviour, it makes modding on Linux a pain... The Windows modders can and will use arbitrary capitalization without errors, but the same modpack will produce loads of errors on a case-sensitive system. Granted, with FRED Windows-only, there's not many Linux modders around, but still.
How hard would it be to fix this? I'd think it's simply a matter of converting all filename strings to lowercase before storing/using them?
Title: Re: Recent SVN builds case sensitive?
Post by: niffiwan on June 18, 2012, 03:24:33 am
Well, you can get around this particular issue by using softlinks - i.e. ln -s Data data, a hard link would work as well (ln Data data) - I've used this before when necessary.

I haven't looked at the relevant code, so I'm not sure how easy this would be to change.  In theory it would be quite simple (as you say) - and the VP reading code seems to do this already.

(and yes, modding on Linux is a pain - I can't get FRED 3.6.14RC6 to save anything when running under wine - always CTD's :()
Title: Re: Recent SVN builds case sensitive?
Post by: FreeSpaceFreak on June 21, 2012, 02:06:23 am
Huh, apparently it's only the folder names that are affected - filenames can be capitalized no problem, but the directories must be all lowercase. Odd...
Title: Re: Linux: Case sensitive directory names?
Post by: jr2 on June 21, 2012, 04:13:29 am
Wait.  IIRC   .vp files aren't case-sensitive.  So, you can do w/e with the filename, provided it resides in a .vp file.  You could test this theory out.  Extract a .vp to the appropriate directories, then move the .vp away and rename one of the files using another case.
Title: Re: Linux: Case sensitive directory names?
Post by: FreeSpaceFreak on June 23, 2012, 12:53:43 am
Aye, the MVPs work fine - they have capitals in directory names, right? (Anyone know of a VP viewer that compiles on *nix?)
But in a non-VPed setup, the directory names must all be lowercase for FSO to recognize them.
Title: Re: Linux: Case sensitive directory names?
Post by: niffiwan on June 23, 2012, 01:30:48 am
MajaExpress is what I've been using: http://www.hard-light.net/wiki/index.php/Maja_Express (requires Java, OpenJDK seems to work fine)
Title: Re: Linux: Case sensitive directory names?
Post by: FreeSpaceFreak on June 25, 2012, 06:58:29 am
Great, thanks :yes: