From 7147de20f5ea877840f5091cffc60e7ff59fdd15 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 28 Apr 2026 18:24:51 -0700 Subject: [PATCH] Add -s flag to build_app.sh to use system jsoncpp and libsecret Add back in secure storage dependencies until docker branch is merged --- .github/workflows/test.yaml | 4 ++-- scripts/build_app.sh | 7 +++++-- scripts/linux/build_secure_storage_deps.sh | 6 ++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ba518c1904..1196231691 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -23,7 +23,7 @@ jobs: rustup install 1.85.1 1.89.0 rustup target add x86_64-unknown-linux-gnu --toolchain 1.89.0 sudo apt update - sudo apt install -y meson ninja-build libglib2.0-dev libgcrypt20-dev libgirepository1.0-dev unzip automake build-essential file pkg-config git python3 libtool cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm debhelper libclang-dev opencl-headers libssl-dev ocl-icd-opencl-dev libc6-dev-i386 valac libtss2-dev + sudo apt install -y meson ninja-build libglib2.0-dev libgcrypt20-dev libgirepository1.0-dev unzip automake build-essential file pkg-config git python3 libtool cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm debhelper libclang-dev opencl-headers libssl-dev ocl-icd-opencl-dev libc6-dev-i386 valac libtss2-dev libsecret-1-dev libjsoncpp-dev # - name: Build Epic Cash #run: | #cd crypto_plugins/flutter_libepiccash/scripts/linux/ @@ -32,7 +32,7 @@ jobs: - name: Configure app run: | cd scripts - echo "yes" | ./build_app.sh -v "0.0.1" -b "1" -p "linux" -a "stack_wallet" + echo "yes" | ./build_app.sh -v "0.0.1" -b "1" -p "linux" -a "stack_wallet" -s - name: Get dependencies run: flutter pub get diff --git a/scripts/build_app.sh b/scripts/build_app.sh index 30bbc8215b..36721003c2 100755 --- a/scripts/build_app.sh +++ b/scripts/build_app.sh @@ -9,7 +9,7 @@ APP_NAMED_IDS=("stack_wallet" "stack_duo" "campfire") # Function to display usage. usage() { - echo "Usage: $0 -v -b -p -a [-i] [-f]" + echo "Usage: $0 -v -b -p -a [-i] [-f] [-s]" exit 1 } @@ -34,9 +34,10 @@ unset -v APP_NAMED_ID # optional args (with defaults) BUILD_CRYPTO_PLUGINS=0 BUILD_ISAR_FROM_SOURCE=0 +USE_SYSTEM_SECURE_STORAGE_DEPS=0 # Parse command-line arguments. -while getopts "v:b:p:a:i:f" opt; do +while getopts "v:b:p:a:i:fs" opt; do case "${opt}" in v) APP_VERSION_STRING="$OPTARG" ;; b) APP_BUILD_NUMBER="$OPTARG" ;; @@ -44,6 +45,7 @@ while getopts "v:b:p:a:i:f" opt; do a) APP_NAMED_ID="$OPTARG" ;; i) BUILD_CRYPTO_PLUGINS=1 ;; f) BUILD_ISAR_FROM_SOURCE=1 ;; + s) USE_SYSTEM_SECURE_STORAGE_DEPS=1 ;; *) usage ;; esac done @@ -74,6 +76,7 @@ set -x source "${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates/configure_template_files.sh" export BUILD_ISAR_FROM_SOURCE +export USE_SYSTEM_SECURE_STORAGE_DEPS # checks for the correct platform dir and pushes it for later if printf '%s\0' "${APP_PLATFORMS[@]}" | grep -Fxqz -- "${APP_BUILD_PLATFORM}"; then diff --git a/scripts/linux/build_secure_storage_deps.sh b/scripts/linux/build_secure_storage_deps.sh index 737508ab0d..e84572bcaa 100755 --- a/scripts/linux/build_secure_storage_deps.sh +++ b/scripts/linux/build_secure_storage_deps.sh @@ -1,4 +1,10 @@ #!/bin/bash + +if [ "${USE_SYSTEM_SECURE_STORAGE_DEPS:-0}" = "1" ]; then + echo "USE_SYSTEM_SECURE_STORAGE_DEPS is set; skipping build of jsoncpp and libsecret (using system packages)" + exit 0 +fi + LINUX_DIRECTORY=$(pwd) JSONCPP_TAG=1.7.4 LIBSECRET_TAG=0.21.4