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