Files
hash-wallet/scripts/linux/build_cake_release.sh
T
e4806ad141 CW948: feat: bitcoin view-only (#2261)
* feat: bitcoin view-only

* fix: add UR to cw_bitcoin, fix payjoin issue

* feat: add unsignedPsbt to PendingBitcoinTransaction

* wip

* feat: xpub restore from bitcoin URI QR

* feat(dev): debug UR codes [skip ci]

* fix: master fingerprint default in create bitcoin transaction

* fix: handle empty private key in bitcoin transaction building

* fix: show success dialog after btc ur transaction

* fix(ui): remove SP from UI in view only wallet

* fix(cw_bitcoin): tx sending on non-airgap

* fix(cw_bitcoin): disable all non-segwit addresses

* feat(ur): support BBQR for coldcard qr

* flutter 3.27.0 -> 3.27.4

* feat: raw xpub qr support for coldcard q

* fix: update ledger_bitcoin
fix: update switching button

* fix: restore button not showing up after scanning

* feat: commit raw tx (from coldcard Q)

* feat: legacy crypto-psbt support for seed signer

* chore: address comments from review

* fix(cw_bitcoin): disable sp and payjoin for cupcake

* feat: enable DNSSEC BIP353 in PSBT (#2397)

* feat: enable DNSSEC BIP353 in PSBT

* chore: put bitcoin view only behind a featureflag

* fix: update Monero wallet to work with new internal URQR return format

* feat: add "Restore from Cupcake App" option with localized strings

* feat: enable DNSSEC BIP353 in PSBT using dnssec-prover (#2401)

* fix: use dnssec-prover
chore: bump ndk to r28c

* fix: validate DNSSEC proof before updating the UI

* fix: rename button to copy debug info to not hide actions on URQR widget

---------

Co-authored-by: Konstantin Ullrich <konstantinullrich12@gmail.com>
2025-07-29 17:01:33 +03:00

99 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
# build_cake_release.sh - Script to build Cake Wallet for Linux
# Usage: ./build_cake_release.sh --amd64 [--arm64] [--app=cakewallet|monero.com]
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Default values
BUILD_AMD64=false
BUILD_ARM64=false
APP_TYPE="cakewallet"
DOCKER_IMAGE="ghcr.io/cake-tech/cake_wallet:debian12-flutter3.27.4-ndkr28-go1.24.1-ruststablenightly"
# Parse arguments
for arg in "$@"
do
case $arg in
--amd64)
BUILD_AMD64=true
shift
;;
--arm64)
BUILD_ARM64=true
shift
;;
--app=*)
APP_TYPE="${arg#*=}"
shift
;;
*)
echo "Unknown argument: $arg"
echo "Usage: ./build_cake_release.sh --amd64 [--arm64] [--app=cakewallet|monero.com]"
exit 1
;;
esac
done
cd ../..
# Validate arguments
if [[ "$BUILD_AMD64" == "false" && "$BUILD_ARM64" == "false" ]]; then
echo "Error: At least one architecture (--amd64 or --arm64) must be specified."
echo "Usage: ./build_cake_release.sh --amd64 [--arm64] [--app=cakewallet|monero.com]"
exit 1
fi
if [[ "$APP_TYPE" != "cakewallet" && "$APP_TYPE" != "monero.com" ]]; then
echo "Error: App type must be either 'cakewallet' or 'monero.com'"
echo "Usage: ./build_cake_release.sh --amd64 [--arm64] [--app=cakewallet|monero.com]"
exit 1
fi
# Function to build for a specific architecture
build_for_arch() {
local arch=$1
local flutter_arch=$2
echo "Building $APP_TYPE for Linux ($arch)"
docker run --privileged -v$(pwd):$(pwd) -w $(pwd) -i --rm --platform linux/$arch $DOCKER_IMAGE bash -x << EOF
set -x -e
pushd scripts
./gen_android_manifest.sh
popd
pushd scripts/linux
source ./app_env.sh $APP_TYPE
./app_config.sh
./build_monero_all.sh
popd
flutter clean
./model_generator.sh
dart run tool/generate_localization.dart
flutter build linux
rm -rf build/linux/current
cp -r build/linux/$flutter_arch build/linux/current
rm -rf .flatpak-builder
flatpak-builder --force-clean flatpak-build com.cakewallet.CakeWallet.yml
flatpak build-export export flatpak-build
flatpak build-bundle export build/linux/current/cake_wallet.flatpak com.cakewallet.CakeWallet
cp build/linux/current/cake_wallet.flatpak build/linux/$flutter_arch/
EOF
}
# Build for specified architectures
echo "Building $APP_TYPE for Linux"
if [[ "$BUILD_AMD64" == "true" ]]; then
build_for_arch "amd64" "x64"
fi
if [[ "$BUILD_ARM64" == "true" ]]; then
build_for_arch "arm64" "arm64"
fi
echo "Build process completed."