diff --git a/client/build.sh b/client/build.sh index 75b8baf..d2e89bf 100755 --- a/client/build.sh +++ b/client/build.sh @@ -37,18 +37,19 @@ if ! command -v wails &> /dev/null; then fi # Set compiler and obfuscation flags if garble is available -BUILD_FLAGS="-clean -obfuscated -trimpath -m -ldflags -s -w" +BUILD_FLAGS=(-clean -obfuscated -trimpath -m) if command -v garble &> /dev/null; then echo "[*] Garble found. Compiling with Obfuscator..." - BUILD_FLAGS="-compiler garble $BUILD_FLAGS" + BUILD_FLAGS+=(-compiler garble) else echo "[!] Garble not found. Compiling with default Go compiler..." fi +BUILD_FLAGS+=(-ldflags "-s -w") echo "[*] Building macOS Apple Silicon (arm64)..." -"$WAILS_CMD" build -platform darwin/arm64 $BUILD_FLAGS +"$WAILS_CMD" build -platform darwin/arm64 "${BUILD_FLAGS[@]}" echo "[*] Building macOS Intel (amd64)..." -"$WAILS_CMD" build -platform darwin/amd64 $BUILD_FLAGS +"$WAILS_CMD" build -platform darwin/amd64 "${BUILD_FLAGS[@]}" echo "[+] macOS arm64 and amd64 builds completed successfully!"