Home » MODDING HQ 1.13 » v1.13 Bug Reports » case-sensitiv stuff (linux related)
case-sensitiv stuff (linux related)[message #345177] Mon, 25 April 2016 11:04 Go to next message
killerpfiffi

 
Messages:25
Registered:December 2009
Location: Austria
If you are playing JA under wine, you will eventually stumble upon case-sensitive problems. It seems not to happen if you are using the old stable SCI and maybe it's even language dependend. It definitely will not happen if your a using a virtual-box or compile on your own. If you are using svn you will have this problem. This is because most - if not all - developers of 1.13 are using case-insensitv windows versions.

All in all, it's just a copy & paste problem as I will show on the file structure:
GameDir 2315       latest rev(ger8176)  original game(ger1.01)
Data/              Data/                Data/
 BigItems/           -                   bigitems/
 BinaryData/        binarydata/          binarydata/
 Interface/         interface/            -
 Maps/              maps/                maps/
 MercEdt            Mercedt/              -
 Sounds/            sounds/              sounds/
 Tilecache/         TILECACHE/           TILECACHE/

so if you merge all your stuff together, there will be a directory maps/ and another directory Maps/. The game engine doesn't seem to care, it just takes the first one - whichever one this is - and ignores the other one. Of course some files wont be found by the game this way.

This directory name confusion seems only to be in the Data/ folder and could be easily changed. But it repeats with the file name extensions, e.g.:
GameDir2315             rev8176
Data-1.13/BattleSNDS/   Data-1.13/BattleSNDS/  
 149_ATTN.WAV            149_ATTN.wav

As file name extensions as in win OS doesnt exist, these are two different file names.

Workarounds:
- compile on your own (possible?)
- virtual box
- use windows emulating tools to merge your stuff:
both seem bad to handle but should work. try
> wine explorer

or
> winefile

- use a script to change your file names accordingly (I'll work on it and post it)
Re: case-sensitiv stuff (linux related)[message #345178 is a reply to message #345177] Mon, 25 April 2016 12:12 Go to previous messageGo to next message
tais

 
Messages:809
Registered:February 2008
Location: NL
Well, maybe you have a list of files that are wrongly named? this could be fixed in SVN and with that the whole problem would be solved!



IRC, pretty much the place to be! | Now also on Discord!


Re: case-sensitiv stuff (linux related)[message #345179 is a reply to message #345178] Mon, 25 April 2016 14:12 Go to previous messageGo to next message
grodrigues

 
Messages:26
Registered:June 2010
I am assuming you are using Wine; in that case, Wine takes care of normalizing the filename's case before opening them. So the only problem left is when you are copying around and merging mods. The solution I have used is to lower-case everything in sight -- a script to do that is easily cobbled, although what I usually use is the tolower tool from the WeiDU linux version, a program to handle mod installation for Baldur's Gate games.
Re: case-sensitiv stuff (linux related)[message #345180 is a reply to message #345179] Mon, 25 April 2016 15:16 Go to previous messageGo to next message
killerpfiffi

 
Messages:25
Registered:December 2009
Location: Austria
Yes, the problem is moving those files around. As I said, it's mainly a copy & paste problem. I was thinking of lowercase everything (as we already know the game engine doesn't care... in fact nothing that is actually started under wine does care), but then I would need an official SVN version and a lowercase version of this. Hmm, actually easy and managable. Thanks for making me think of this again.

Way easier than this script I was thinking of:
GameDirOld  #this one is gonna be changed
GameDirNew  #this one is the one we change to
- recurse through GameDirOld
   - recurse through GameDirNew
      - does lowercase[GameDirOld[this_entry] == GameDirNew[that_entry]]?
         - yes
            - does GameDirOld[this_entry] != GameDirNew[that_entry]
               - rename this_entry to that_entry 
         - no: try next one
now you can copy New over Old

actually it's only 2 loops, but having them recursively search into nested folders is a bit complicated for me. The pro on this solution would be, that you never have to change your svn checkout directory. And if you started modding, your file names would be correct too.

Your idea is way easier:
- have a lowercase original game
- have a lowercase working GameDir
- have a "as is" SVN
- copy this, make it lowercase
- merge it all together in correct order

How to lowercase only is easy google-fu.


@tais: there is no real sense in doing this as it would be broken the next time somebody commits a file with different upper/lower cases. and it will happen. even if people took care (and they seem to take much care in 1.13), you'll never know if programm adds .MP3 or .mp3 to the file you just modified for example.
Re: case-sensitiv stuff (linux related)[message #345181 is a reply to message #345180] Mon, 25 April 2016 15:51 Go to previous messageGo to next message
killerpfiffi

 
Messages:25
Registered:December 2009
Location: Austria
this gives some helpful information and why it's good you use tortoise:

http://stackoverflow.com/questions/5393395/why-svn-import-option-fails-to-detect-file-duplication

the python script they talk about seems to be server-sided


i am out for now
Re: case-sensitiv stuff (linux related)[message #345206 is a reply to message #345177] Wed, 27 April 2016 09:59 Go to previous messageGo to next message
killerpfiffi

 
Messages:25
Registered:December 2009
Location: Austria
Here is the script.

I tested it with rev8176 (as found at https://ja2svn.mooo.com/source/ja2/trunk/GameData/German_Version/) and GameDir2315 (as found at https://ja2svn.mooo.com/source/ja2_v1.13_data/GameDir/) and it takes hours to complete (7h on my laptop, to be more exact).

It found several difference in the game folders I wasn't aware of and 2298 difference in file names.

I conceed that the most easiest and convient way to merge your 1.13 stuff if you are on a case-sensitiv os is using the wine explorer...

If you want to change something server side at the svn is not mine to decide. Also remember it must be testet with other language trunks as well. Maybe it's not worth the trouble.

the script:
edit: forget this script - below is a better on
Toggle Spoiler


the folder diff:
Toggle Spoiler


the file names diff:
Toggle Spoiler

[Updated on: Fri, 06 May 2016 19:13]

Re: case-sensitiv stuff (linux related)[message #345328 is a reply to message #345206] Fri, 06 May 2016 19:11 Go to previous message
killerpfiffi

 
Messages:25
Registered:December 2009
Location: Austria
Here comes a better script doing the same in 10 to 15 minutes. See header for details and dependencies.

But after several days of thinking about this I came to the conlcusion that this complicated script is a dead end. I only did this to, yea, proove my stubornness... All you actually need should be done with a simple scripted 'cp' that doublechecks for different lettercasing and puts the new one in. That's all in one step. I'll post that solution as soon as I found some new motivation for doing it.

Toggle Spoiler
Previous Topic: Crash after longer playing sessions + possible fix
Next Topic: knuckle duster does not respect PUNCH_APS_REDUCTION
Goto Forum:
  


Current Time: Tue Jun 25 21:12:51 EEST 2019

Total time taken to generate the page: 0.01428 seconds