add linux
This commit is contained in:
@@ -5,7 +5,7 @@ set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
echo "============================================="
|
||||
echo " BUILDING SECURE WAILS CLIENT FOR MACOS "
|
||||
echo " BUILDING SECURE WAILS CLIENT "
|
||||
echo "============================================="
|
||||
|
||||
# Setup Go path for tools like garble and wails
|
||||
@@ -46,10 +46,21 @@ else
|
||||
fi
|
||||
BUILD_FLAGS+=(-ldflags "-s -w")
|
||||
|
||||
echo "[*] Building macOS Apple Silicon (arm64)..."
|
||||
"$WAILS_CMD" build -platform darwin/arm64 "${BUILD_FLAGS[@]}"
|
||||
# Detect host OS
|
||||
HOST_OS=$(go env GOOS)
|
||||
|
||||
echo "[*] Building macOS Intel (amd64)..."
|
||||
"$WAILS_CMD" build -platform darwin/amd64 "${BUILD_FLAGS[@]}"
|
||||
if [ "$HOST_OS" = "darwin" ]; then
|
||||
echo "[*] Building macOS Apple Silicon (arm64)..."
|
||||
"$WAILS_CMD" build -platform darwin/arm64 "${BUILD_FLAGS[@]}"
|
||||
|
||||
echo "[+] macOS arm64 and amd64 builds completed successfully!"
|
||||
echo "[*] Building macOS Intel (amd64)..."
|
||||
"$WAILS_CMD" build -platform darwin/amd64 "${BUILD_FLAGS[@]}"
|
||||
echo "[+] macOS arm64 and amd64 builds completed successfully!"
|
||||
elif [ "$HOST_OS" = "linux" ]; then
|
||||
echo "[*] Building Linux Intel/AMD64 (amd64)..."
|
||||
"$WAILS_CMD" build -platform linux/amd64 -tags webkit2_41 "${BUILD_FLAGS[@]}"
|
||||
echo "[+] Linux amd64 build completed successfully!"
|
||||
else
|
||||
echo "[!] Unsupported host OS: $HOST_OS. Please build manually using 'wails build'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user