add bao mat
All checks were successful
Deploy on Master Change / deploy (push) Successful in 38s

This commit is contained in:
2026-07-01 14:07:55 +07:00
parent a3b986674e
commit 385103a0bf
5 changed files with 123 additions and 34 deletions

View File

@@ -5,9 +5,24 @@ set -e
cd "$(dirname "$0")"
echo "============================================="
echo " BUILDING WAILS CLIENT FOR MACOS "
echo " BUILDING SECURE WAILS CLIENT FOR MACOS "
echo "============================================="
# Setup Go path for tools like garble and wails
GOPATH=$(go env GOPATH)
if [ -n "$GOPATH" ] && [ -d "$GOPATH/bin" ]; then
export PATH="$GOPATH/bin:$PATH"
fi
if [ -d "$HOME/go/bin" ]; then
export PATH="$HOME/go/bin:$PATH"
fi
# Ensure Garble is installed
if ! command -v garble &> /dev/null; then
echo "[*] Garble is not installed. Installing mvdan.cc/garble@latest..."
go install mvdan.cc/garble@latest || echo "[!] Failed to install Garble. Will use default Go compiler."
fi
# Check if wails is installed
WAILS_CMD="wails"
if ! command -v wails &> /dev/null; then
@@ -21,10 +36,19 @@ if ! command -v wails &> /dev/null; then
fi
fi
# Set compiler and obfuscation flags if garble is available
BUILD_FLAGS="-clean -obfuscated -trimpath -m -ldflags -s -w"
if command -v garble &> /dev/null; then
echo "[*] Garble found. Compiling with Obfuscator..."
BUILD_FLAGS="-compiler garble $BUILD_FLAGS"
else
echo "[!] Garble not found. Compiling with default Go compiler..."
fi
echo "[*] Building macOS Apple Silicon (arm64)..."
"$WAILS_CMD" build -platform darwin/arm64
"$WAILS_CMD" build -platform darwin/arm64 $BUILD_FLAGS
echo "[*] Building macOS Intel (amd64)..."
"$WAILS_CMD" build -platform darwin/amd64
"$WAILS_CMD" build -platform darwin/amd64 $BUILD_FLAGS
echo "[+] macOS arm64 and amd64 builds completed successfully!"