GoldenEye: Source Forums

  • November 27, 2024, 06:46:11 am
  • Welcome, Guest
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Fix for case sensitive files  (Read 5753 times)

0 Members and 1 Guest are viewing this topic.

DeaD_EyE

  • 00 Newbie
  • Posts: 4
  • Reputation Power: 0
  • DeaD_EyE has no influence.
  • Offline Offline
    • SourceServer.info
Fix for case sensitive files
« on: December 22, 2010, 02:23:13 pm »

The developers doesn't know the problem of case sensitve paths/files. Under Linux you will get following errors in your console:
Code: [Select]
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/BLACKMETAL.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/BLACKMETAL.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL7.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL7.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL6.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL7.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL7.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL4.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)
Failed to load $include VMT file (materials/GOLDENEYE/COMPLEX/COMPLEXWALL1,8,9AND10.vmt)

I've written a little script with a recursive function to create symlinks of the missing files to fix the messages. I don't know if the bug is affecting clients. I've tesed until yet only the dedicated server under Linux without connecting with a client.

The Shell-Script:
Code: [Select]
#!/bin/bash

usage() {
        echo "Creates recursivly upper typed symlinks from the directory orangebox/gesource/materials/Goldeneye"
        echo "$0 ServerRootDirectory"
        exit
}

lower2upper() {
        ln -s "$@" "`echo $@ | tr 'a-z' 'A-Z'`"
}

sym_upper() {
        cd "$1"
        ls | while read path; do
                if (echo "$path" | grep -q [a-z]); then
                        lower2upper "$path"
                fi
                [[ -d "$path" ]] && sym_upper "$path"
        done
        cd ..
}

if [ $# -eq 0 -o ! -d "$1/orangebox/gesource/materials/Goldeneye" ]; then usage; fi
echo "Changing dir to $1/orangebox/gesource/materials"
cd $1/orangebox/gesource/materials
echo "Create a symlink of Goldeneye"
ln -s Goldeneye GOLDENEYE
echo "Starting recursive function for creating symlinks"
sym_upper "$1/orangebox/gesource/materials/Goldeneye"
echo "Changing file extensions in $1/orangebox/gesource/materials/Goldeneye from .VMT to .vmt"
find "$1/orangebox/gesource/materials/Goldeneye" -name "*.VMT" | while read vmtfile; do mv "$vmtfile" "`echo "$vmtfile" | sed 's/.VMT$/.vmt/'`" &> /dev/null; done
echo "Done, pray that everything works"

When your server is in /home/someuser/anywhere, you have to call the script with the following argument:
Code: [Select]
./symlinks_UPPER.sh ~someuser/anywhere

Output:
Code: [Select]
./symlinks_UPPER.sh ~/publicserver/gesorce/
Changing dir to /home/server/publicserver/gesorce//orangebox/gesource/materials
Create a symlink of Goldeneye
Starting recursive function for creating symlinks
Changing file extensions in /home/server/publicserver/gesorce//orangebox/gesource/materials/Goldeneye from .VMT to .vmt
Done, pray that everything works

After the fix, the console doesn't show the pasted errors. I hope the developer will fix this soon. The problem is already known from the modification Synergy. There are all files required in lower case, but they are given with mixed upper and lower case. Creating symlinks for this is a simple fix to override this error. Someone gives a solution to mount the filesysem for the server as FAT32. But this requires root-privilegues and this is not the best fix to mount for everey server a filesystem with non case-sensitive. There are also missing the ACL for Linux.

PS: To run the server, you need libcurl3. Under Debian you can install the package with 'apt-get install libcurl3-gnutls'. apt-file rulez :-)
Logged
Visit our german support board for HL2-Servers:
http://sourceserver.info

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Fix for case sensitive files
« Reply #1 on: December 22, 2010, 06:06:02 pm »

Those errors mean nothing, they affect niether client nor server to my knowledge.

They are actually generated because Hammer, for whatever reason, sometimes capitalizes the resource names for materials.
Logged

DeaD_EyE

  • 00 Newbie
  • Posts: 4
  • Reputation Power: 0
  • DeaD_EyE has no influence.
  • Offline Offline
    • SourceServer.info
Re: Fix for case sensitive files
« Reply #2 on: December 22, 2010, 08:19:33 pm »

Ah, ok. Well to know this. But it's a little bit annoying. Lot of erros which spam the console. I don't like this.
Logged
Visit our german support board for HL2-Servers:
http://sourceserver.info

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Fix for case sensitive files
« Reply #3 on: December 22, 2010, 10:27:59 pm »

Yah I dislike the console spam as well, but Valve is le suck so meh. Thanks for the script fix, I will include it with the server distro from now on (obviously links need to be made on a personal level and not in the zip file)
Logged

DeaD_EyE

  • 00 Newbie
  • Posts: 4
  • Reputation Power: 0
  • DeaD_EyE has no influence.
  • Offline Offline
    • SourceServer.info
Re: Fix for case sensitive files
« Reply #4 on: December 22, 2010, 11:13:04 pm »

You can create a tar.gz or tar.bz2 (bzip2 give a better compression) file for Linux-Servers. Tar archives can contain symlinks. So the enduser don't need to execute the script.

Code: [Select]
cd publish_dir
#for bzip2 an installed bzip2 package is required, not all distributions does have this default installed
tar -cjf GoldenEye_Source_v4_1_Server.tar.bz2 gesource
#for gzip (works for all distributions)
#tar -czf GoldenEye_Source_v4_1_Server.tar.gz gesource

I've seen, that the Mod contains some files with white spaces. Most of this files are only copys from some other files ('* copy.vmt').
Logged
Visit our german support board for HL2-Servers:
http://sourceserver.info

killermonkey

  • GES Programmer
  • Retired Lead Developer
  • GE:S Fanatic
  • *
  • Posts: 5,473
  • Reputation Power: 346
  • killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!killermonkey is awe-inspiring!
  • Offline Offline
    • DroidMonkey Apps
Re: Fix for case sensitive files
« Reply #5 on: December 23, 2010, 01:57:36 am »

hazzah I like your bug finding. I shall see about all this :-)

We don't release server as tar balls / zipped tar balls because the zip also encompasses windows servers and we don't need to deal with unzipping issues.
Logged

DeaD_EyE

  • 00 Newbie
  • Posts: 4
  • Reputation Power: 0
  • DeaD_EyE has no influence.
  • Offline Offline
    • SourceServer.info
Re: Fix for case sensitive files
« Reply #6 on: December 23, 2010, 09:34:23 pm »

It was a little bit complicated to find out how to put only symlinks with the find command into a tar-archive. Because there are over 2100 arguments, which are too much, they are cutted off and not every file were put into the archive.

The solution is following code:
Code: [Select]
cd /path/to/rootdir/of/server/
find -type l -exec tar -rf GoldenEye_Source_v4_1_Server_symlinkfix.tar '{}' \;
gzip GoldenEye_Source_v4_1_Server_symlinkfix.tar

The -r switch adds files to an archive. When the archive doesn't exist, the archiv will be created.

Here is the link to the tar-archive: http://rapidshare.com/files/438946457/GoldenEye_Source_v4_1_Server_symlinkfix.tar.gz

You can put the archive into the root directory of your Modification. Some users dislike to execute shell scripts, which they don't understand.

You can extract the archive with following command:
Code: [Select]
tar -xzf GoldenEye_Source_v4_1_Server_symlinkfix.tar.gz -C /rootdirectory_of_the_Server
« Last Edit: December 25, 2010, 02:09:33 am by DeaD_EyE »
Logged
Visit our german support board for HL2-Servers:
http://sourceserver.info
Pages: [1]   Go Up