trifid/build_windows.sh

19 lines
926 B
Bash
Raw Permalink Normal View History

2023-10-10 13:21:37 +00:00
#!/bin/bash
set -e
cargo build --target x86_64-pc-windows-gnu --release --bin tfclient
rm -rf target/x86_64-pc-windows-gnu/release/tfclient_dist/
mkdir -p target/x86_64-pc-windows-gnu/release/tfclient_dist/
cp target/x86_64-pc-windows-gnu/release/tfclient.exe target/x86_64-pc-windows-gnu/release/tfclient_dist/tfclient.exe
echo "[*] Downloading WinTun"
mkdir -p target/x86_64-pc-windows-gnu/release/tfclient_dist/dist/windows/
wget https://www.wintun.net/builds/wintun-0.14.1.zip -O /tmp/wintun.zip
echo "[*] Unzipping WinTun"
unzip -d target/x86_64-pc-windows-gnu/release/tfclient_dist/dist/windows/ /tmp/wintun.zip
echo "[*] Copying nebula.dll"
cp target/x86_64-pc-windows-gnu/release/nebula.dll target/x86_64-pc-windows-gnu/release/tfclient_dist/nebula.dll
echo "[*] Building zip bundle"
cd target/x86_64-pc-windows-gnu/release
zip -r tfclient.zip tfclient_dist/*
cd ../../../
echo "[*] Windows production build success!"