ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.73k stars 376 forks source link

Update INSTALL.md #9245

Closed jakubpawlowicz closed 2 weeks ago

jakubpawlowicz commented 3 weeks ago

The game expects original game data folders to be in lowercase but install instructions doesn't mention it:

https://github.com/ihhub/fheroes2/blob/master/script/homm2/extract_homm2_resources.sh#L119

oleg-derevenetz commented 3 weeks ago

The game expects original game data folders to be in lowercase but install instructions doesn't mention it:

That's because the game does not expect them to be in lowercase. It works with these folders in the case-insensitive manner (except Windows and Android, where it is not needed, because their filesystems are already case-insensitive).

jakubpawlowicz commented 3 weeks ago

The thing is it didn't work for me under Linux unless I changed the folders to lowercase. Is it possible that if a filesystem is case-sensitive then the folders lookup will fail? I use ext4 in case-sensitive mode.

oleg-derevenetz commented 3 weeks ago

The thing is it didn't work for me under Linux unless I changed the folders to lowercase. Is it possible that if a filesystem is case-sensitive then the folders lookup will fail? I use ext4 in case-sensitive mode.

Just tried the master branch on my Ubuntu with the following directory layout:

$ uname -a
Linux ubuntu 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

$ pwd
/home/oleg/.local/share/fheroes2

$ ls -l
total 16
drwxrwxr-x 2 oleg oleg 4096 сен 17 04:42 dAtA
drwx------ 5 oleg oleg 4096 сен 17 05:29 files
drwxrwxr-x 2 oleg oleg 4096 сен 17 13:02 Maps
drwxrwxr-x 4 oleg oleg 4096 сен 17 04:41 MUsIc

(in fact, this is my usual layout on Ubuntu to check the operation of this very case-insensitive logic), everything works just fine. And yes, filesystem is case-sensitive:

$ mkdir data

$ ls -l
total 20
drwxrwxr-x 2 oleg oleg 4096 окт 31 21:05 data
drwxrwxr-x 2 oleg oleg 4096 сен 17 04:42 dAtA
drwx------ 5 oleg oleg 4096 сен 17 05:29 files
drwxrwxr-x 2 oleg oleg 4096 сен 17 13:02 Maps
drwxrwxr-x 4 oleg oleg 4096 сен 17 04:41 MUsIc

Please note that fheroes2 should be able to read the directory contents in order to resolve such names, so the parent directory should have the r permission for a corresponding user, and not just x.

jakubpawlowicz commented 2 weeks ago

Ok, I admit I don't know whar's wrong with my setup, but changing directory names to lowercase helped and that was the only change I made. I'm closing this issue - maybe someone will find it useful in the future.