-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild-defaults.inc
More file actions
50 lines (36 loc) · 1.19 KB
/
build-defaults.inc
File metadata and controls
50 lines (36 loc) · 1.19 KB
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
42
43
44
45
46
47
48
49
50
#!/bin/bash
if [ -z "${FLUTTER_SWIFT_BUILD_CONFIG}" ]; then
FLUTTER_SWIFT_BUILD_CONFIG=debug
fi
export FLUTTER_SWIFT_BUILD_CONFIG
if [ -z "${FLUTTER_SWIFT_BACKEND}" ]; then
FLUTTER_SWIFT_BACKEND=wayland
fi
export FLUTTER_SWIFT_BACKEND
if [ -z "${APP_PACKAGE_NAME}" ]; then
APP_PACKAGE_NAME=counter
fi
export APP_PACKAGE_NAME
set -Eeu
pwd=`pwd`
ARCH=`arch`
if [ "X${ARCH}" == "Xaarch64" ]; then
ARCH=arm64
elif [ "X${ARCH}" == "Xx86_64" ]; then
ARCH=x64
fi
# Path to Flutter SDK
export FLUTTER_ROOT=/opt/flutter-elinux
export FLUTTER_SDK=${FLUTTER_ROOT}/flutter
export FLUTTER_CACHE_ENGINEDIR=${FLUTTER_SDK}/bin/cache/artifacts/engine
export DART_CACHE_BINDIR=${FLUTTER_SDK}/bin/cache/dart-sdk/bin
export ELINUX_ENGINE_BASE_URL="https://github.com/flutter-elinux/flutter-embedded-linux/releases"
export PATH=$PATH:${FLUTTER_ROOT}/bin:${FLUTTER_SDK}/bin:${HOME}/.local/share/swiftly/bin
# Package name of the build target Flutter app
export SOURCE_DIR=${pwd}/Examples/${APP_PACKAGE_NAME}
# The build data.
export RESULT_DIR=${pwd}/build/elinux/${ARCH}
export BUNDLE_DIR=${RESULT_DIR}/${FLUTTER_SWIFT_BUILD_CONFIG}/bundle
if [ ! -d "${FLUTTER_CACHE_ENGINEDIR}" ]; then
flutter-elinux precache
fi