There are useful use cases to have several RTPs on the same PC. For example, you want to play games made with Don’s RTP 1.32 and KVlad’s RTP (which includes all the Don’s RTP), but develop games with Don’s RTP 1.0.
To reduce duplication, I’ve written a script which replaces all the RTP files with simlinks to “/some-path/unified/{$extension}/{$md5_hash}.{$extension}”. I’m adding it here in hope it can be useful for someone else.
#!/bin/bash
UNIFIED_RTP_PATH="$HOME/Soft/RM2k/RTPs/unified/"
dirs=`for x in *; do if [ -d "$x" ]; then echo -n "$x "; fi done`
for dir in $dirs; do
cd "$dir"
echo -n "Processing $dir... "
i=0
for fn in *; do
if [ -f "$fn" -a ! -L "$fn" ]; then
i=`expr $i + 1`
extension="${fn#*.}"
md5sum=`md5sum "${fn}"|cut -d' ' -f1,1`
ext=`echo "$extension" | awk '{print tolower($0)}'`
mkdir -p "$UNIFIED_RTP_PATH/${ext}/"
mv "$fn" "$UNIFIED_RTP_PATH/${ext}/${md5sum}.${ext}"
ln -s "$UNIFIED_RTP_PATH/${ext}/${md5sum}.${ext}" "$fn"
fi
done
echo "$i files moved."
cd ..
Replace UNIFIED_RTP_PATH with your target path, and run this script inside all the RTP folders (i.e. in a folder that contains Backdrop, CharSet, etc.).
This should teoretically work on game folders too, but I wouldn’t recommend it (there is no way to remove files for a specific game, so your UNIFIED_RTP_PATH will quickly become polluted).
MD5 hashes will be different if the files that were re-compressed. I don’t know if some RTPs distributed recompressed files, hopefully they didn’t.