-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·41 lines (34 loc) · 923 Bytes
/
run.sh
File metadata and controls
executable file
·41 lines (34 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Default values
BUILD_TYPE="Release"
BUILD_MODE="--release"
EXTRA_ARGS=""
# Parse arguments
for arg in "$@"; do
case $arg in
--debug)
#BUILD_TYPE="Debug"
BUILD_MODE="--debug"
;;
*)
EXTRA_ARGS="$EXTRA_ARGS $arg -v"
;;
esac
done
# Detect host platform
OS="$(uname -s)"
case "$OS" in
Linux*) PLATFORM="linux";;
Darwin*) PLATFORM="macos";;
CYGWIN*|MINGW*|MSYS*) PLATFORM="windows";;
*) echo "Unsupported platform: $OS"; exit 1;;
esac
export CMAKE_ARGUMENTS="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DGENIUS_DEPENDENCY_BRANCH=TestNet-Phase-3.1 -DBRANCH_IS_TAG=ON"
# Generate tokens
if command -v quicktype >/dev/null 2>&1; then
./tools/generate_tokens.sh
else
echo "quicktype is not installed. Skipping generate_tokens.sh."
fi
# Build for detected platform
flutter run $EXTRA_ARGS $BUILD_MODE