- map-extract agents: 요원 30명 agent_<코드>.glb (위/아래 몸 애니메이션 분리, ACL 풀기용 CUE4Parse-Natives 를 g++ 로 빌드), 무기 weapon_<이름>.glb - pack.py: 요원 · 무기도 압축해 index.json agents · weapons - 사이트: AgentRig (이동 방향 · 속도로 다리 애니메이션 섞기, 오른손에 총), 1인칭 · 자유시점에서 이름표 작게 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
3.1 KiB
Bash
Executable File
67 lines
3.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# 맵 3D 자동 갱신을 이 리눅스 서버(.9)에 설치한다. 저장소에서: tools/map-extract/scripts/install.sh
|
|
# - gvr-map-extract 를 빌드해 $GVR_MAPS_HOME/bin 에 둔다 (저장소 작업 폴더가 바뀌어도 타이머는 그대로 돈다)
|
|
# - systemd 사용자 타이머 gvr-maps-update.timer (30분마다 update.sh). 메모리 6GB · CPU 3코어 상한, 봇과 다른 cgroup
|
|
# 코드를 고쳤으면 다시 실행하면 된다. 지금 바로 한 번 돌리기: systemctl --user start gvr-maps-update
|
|
set -euo pipefail
|
|
here="$(cd "$(dirname "$0")/.." && pwd)"
|
|
GVR_MAPS_HOME="${GVR_MAPS_HOME:-$HOME/gvr-maps}"
|
|
export PATH="$HOME/.dotnet:$PATH" DOTNET_ROOT="${DOTNET_ROOT:-$HOME/.dotnet}" DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
"$here/fetch-cue4parse.sh"
|
|
rm -rf "$GVR_MAPS_HOME/bin.new"
|
|
CUE4PARSE_SKIP_NATIVE=1 dotnet build "$here/MapExtract.csproj" -c Release -o "$GVR_MAPS_HOME/bin.new" -v quiet -nologo -clp:ErrorsOnly
|
|
# CUE4Parse-Natives (ACL 애니메이션 풀기만, cmake 없이 g++): 요원 애니메이션 추출에 필요
|
|
nat="$here/vendor/CUE4Parse/CUE4Parse-Natives"
|
|
g++ -shared -fPIC -O2 -std=c++17 -DWITH_ACL -I"$nat/ACL/external/acl/includes" -I"$nat/ACL/external/acl/external/rtm/includes" -I"$nat/common" -I"$nat/ACL/includes" \
|
|
"$nat/ACL/ACL.cpp" "$nat/Features.cpp" -o "$GVR_MAPS_HOME/bin.new/CUE4Parse-Natives.so"
|
|
rm -rf "$GVR_MAPS_HOME/bin.old"
|
|
[ -d "$GVR_MAPS_HOME/bin" ] && mv "$GVR_MAPS_HOME/bin" "$GVR_MAPS_HOME/bin.old"
|
|
mv "$GVR_MAPS_HOME/bin.new" "$GVR_MAPS_HOME/bin"
|
|
# Oodle 압축 풀기 라이브러리: 처음 실행 때 받는다. 이전 설치에 있으면 옮겨 둔다
|
|
[ -f "$GVR_MAPS_HOME/bin.old/liboodle-data-shared.so" ] && cp "$GVR_MAPS_HOME/bin.old/liboodle-data-shared.so" "$GVR_MAPS_HOME/bin/"
|
|
rm -rf "$GVR_MAPS_HOME/bin.old"
|
|
mkdir -p "$GVR_MAPS_HOME/scripts"
|
|
cp "$here/scripts/update.sh" "$here/scripts/pack.py" "$here/scripts/preview.py" "$GVR_MAPS_HOME/scripts/"
|
|
chmod +x "$GVR_MAPS_HOME/scripts/update.sh"
|
|
|
|
unit="$HOME/.config/systemd/user"
|
|
mkdir -p "$unit"
|
|
node_dir="$(dirname "$(command -v node)")"
|
|
cat > "$unit/gvr-maps-update.service" <<EOF
|
|
[Unit]
|
|
Description=겜녹이: 발로란트 맵 3D 자동 갱신 (uedb 매핑 · 라이브 패치 확인 → 추출 → 사이트 반영)
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
Environment=GVR_MAPS_HOME=$GVR_MAPS_HOME
|
|
Environment=DOTNET_ROOT=$DOTNET_ROOT
|
|
Environment=PATH=$node_dir:$HOME/.dotnet:/usr/local/bin:/usr/bin:/bin
|
|
Environment=TMPDIR=$HOME/.tmp
|
|
Environment=NOTIFY_CHANNEL=${NOTIFY_CHANNEL:-}
|
|
Environment=NOTIFY_ENV=${NOTIFY_ENV:-}
|
|
ExecStart=$GVR_MAPS_HOME/scripts/update.sh
|
|
MemoryMax=6G
|
|
MemorySwapMax=0
|
|
CPUQuota=300%
|
|
CPUWeight=50
|
|
Nice=10
|
|
TimeoutStartSec=2h
|
|
EOF
|
|
cat > "$unit/gvr-maps-update.timer" <<EOF
|
|
[Unit]
|
|
Description=겜녹이: 발로란트 맵 3D 자동 갱신 (30분마다)
|
|
|
|
[Timer]
|
|
OnBootSec=5min
|
|
OnUnitActiveSec=30min
|
|
RandomizedDelaySec=2min
|
|
Persistent=true
|
|
|
|
[Install]
|
|
WantedBy=timers.target
|
|
EOF
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable --now gvr-maps-update.timer
|
|
echo "설치 완료: $GVR_MAPS_HOME · $(systemctl --user list-timers gvr-maps-update.timer --no-legend | head -1)"
|