VeroFess/PalWorld-Server-Unoffical-Fix

分享个Linux/Docker的Patch脚本

xlongshu opened this issue · 3 comments

作者可以考虑优化集成一下。release包太大了希望能附带上patch.bin。

注意

以下脚本暂时不能使用 需要作者提供Linux的补丁文件patch.bin。脚本仅仅作为示例

PALWORLD_PATH="/palworld"
PATCH_URL="https://github.com/VeroFess/PalWorld-Server-Unoffical-Fix/raw/main/patch/0.1.3.0/windows/patch.bin"

mkdir "${PALWORLD_PATH}/patch"
cd "${PALWORLD_PATH}/patch"
echo "Download: patch"
wget "${PATCH_URL}" -O patch.bin
wget -c https://github.com/sisong/HDiffPatch/releases/download/v4.6.9/hdiffpatch_v4.6.9_bin_linux64.zip -O hdiffpatch.zip
unzip -u hdiffpatch.zip

echo "Backup: "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak""
cp -u "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"  "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak"
echo "Patch ..."
"${PALWORLD_PATH}/patch/linux64/hpatchz" -f "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak" patch.bin "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"
echo "Patch: done"

# cp -f "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak" "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"

作者可以考虑优化集成一下。release包太大了希望能附带上patch.bin。

PALWORLD_PATH="/palworld"
PATCH_URL="https://github.com/VeroFess/PalWorld-Server-Unoffical-Fix/raw/main/patch/0.1.3.0/windows/patch.bin"

mkdir "${PALWORLD_PATH}/patch"
cd "${PALWORLD_PATH}/patch"
echo "Download: patch"
wget "${PATCH_URL}" -O patch.bin
wget -c https://github.com/sisong/HDiffPatch/releases/download/v4.6.9/hdiffpatch_v4.6.9_bin_linux64.zip -O hdiffpatch.zip
unzip -u hdiffpatch.zip

echo "Backup: "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak""
cp -u "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"  "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak"
echo "Patch ..."
"${PALWORLD_PATH}/patch/linux64/hpatchz" -f "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak" patch.bin "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"
echo "Patch: done"

# cp -f "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test.bak" "${PALWORLD_PATH}/Pal/Binaries/Linux/PalServer-Linux-Test"

PALWORLD_PATH="/palworld"是指PalServer-Linux-Test所在的路径对吗

PALWORLD_PATH是PalWorld-Server的根目录

/palworld
├── backups
├── DefaultPalWorldSettings.ini
├── Engine
├── linux64
├── Manifest_DebugFiles_Linux.txt
├── Manifest_NonUFSFiles_Linux.txt
├── Manifest_UFSFiles_Linux.txt
├── Pal
├── PalServer.sh
├── patch
├── steamapps
└── steamclient.so