mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
WIP campfire scripts
This commit is contained in:
parent
5fa6aa9328
commit
debcb71d89
8 changed files with 180 additions and 5 deletions
22
scripts/android/build_all_campfire.sh
Executable file
22
scripts/android/build_all_campfire.sh
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# libepiccash requires old rust
|
||||||
|
source ../rust_version.sh
|
||||||
|
set_rust_to_1671
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
. ./config.sh
|
||||||
|
./install_ndk.sh
|
||||||
|
|
||||||
|
PLUGINS_DIR=../../crypto_plugins
|
||||||
|
|
||||||
|
(cd "${PLUGINS_DIR}"/flutter_liblelantus/scripts/android && ./build_all.sh )
|
||||||
|
(cd "${PLUGINS_DIR}"/flutter_libepiccash/scripts/android && ./build_all.sh )
|
||||||
|
(cd "${PLUGINS_DIR}"/flutter_libmonero/scripts/android/ && ./build_all.sh )
|
||||||
|
set_rust_to_1720
|
||||||
|
(cd "${PLUGINS_DIR}"/frostdart/scripts/android && ./build_all.sh )
|
||||||
|
|
||||||
|
wait
|
||||||
|
echo "Done building"
|
59
scripts/app_config/configure_campfire.sh
Executable file
59
scripts/app_config/configure_campfire.sh
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# Configure files for Duo.
|
||||||
|
APP_BUILD_PLATFORM=$1
|
||||||
|
|
||||||
|
export NEW_NAME="Campfire"
|
||||||
|
if [[ "$APP_BUILD_PLATFORM" != "ios" ]]; then
|
||||||
|
export NEW_APP_ID="com.cypherstack.campfire"
|
||||||
|
else
|
||||||
|
# for some reason this was different in the old campfire code for ios
|
||||||
|
export NEW_APP_ID="com.cypherstack.campfirefirowallet"
|
||||||
|
fi
|
||||||
|
export NEW_APP_ID_CAMEL="com.cypherstack.campfire"
|
||||||
|
export NEW_APP_ID_SNAKE="com.cypherstack.campfire"
|
||||||
|
export NEW_BASIC_NAME="campfire"
|
||||||
|
|
||||||
|
NEW_PUBSPEC_NAME="paymint" # paymint used in original pubspec for some reason
|
||||||
|
PUBSPEC_FILE="${APP_PROJECT_ROOT_DIR}/pubspec.yaml"
|
||||||
|
|
||||||
|
# String replacements.
|
||||||
|
if [[ "$(uname)" == 'Darwin' ]]; then
|
||||||
|
# macos specific sed
|
||||||
|
sed -i '' "s/name: PLACEHOLDER/name: ${NEW_PUBSPEC_NAME}/g" "${PUBSPEC_FILE}"
|
||||||
|
sed -i '' "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
|
||||||
|
else
|
||||||
|
sed -i "s/name: PLACEHOLDER/name: ${NEW_PUBSPEC_NAME}/g" "${PUBSPEC_FILE}"
|
||||||
|
sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pushd "${APP_PROJECT_ROOT_DIR}"
|
||||||
|
BUILT_COMMIT_HASH=$(git log -1 --pretty=format:"%H")
|
||||||
|
popd
|
||||||
|
|
||||||
|
APP_CONFIG_DART_FILE="${APP_PROJECT_ROOT_DIR}/lib/app_config.g.dart"
|
||||||
|
rm -f "$APP_CONFIG_DART_FILE"
|
||||||
|
cat << EOF > "$APP_CONFIG_DART_FILE"
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'app_config.dart';
|
||||||
|
|
||||||
|
const _prefix = "Campfire";
|
||||||
|
const _separator = "";
|
||||||
|
const _suffix = "";
|
||||||
|
const _appDataDirName = "campfire";
|
||||||
|
const _commitHash = "$BUILT_COMMIT_HASH";
|
||||||
|
|
||||||
|
const ({String light, String dark})? _appIconAsset = (
|
||||||
|
light: "assets/in_app_logo_icons/stack-duo-icon_light.svg",
|
||||||
|
dark: "assets/in_app_logo_icons/stack-duo-icon_dark.svg",
|
||||||
|
);
|
||||||
|
|
||||||
|
final List<CryptoCurrency> _supportedCoins = List.unmodifiable([
|
||||||
|
Firo(CryptoCurrencyNetwork.main),
|
||||||
|
Firo(CryptoCurrencyNetwork.test),
|
||||||
|
]);
|
||||||
|
|
||||||
|
EOF
|
|
@ -54,13 +54,15 @@ TEMPLATE_FILES=(
|
||||||
"${WIN_TF_2}"
|
"${WIN_TF_2}"
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ ! -f "${ACTUAL_PUBSPEC}" ]; then
|
if [ -f "${ACTUAL_PUBSPEC}" ]; then
|
||||||
cp "${T_PUBSPEC}" "${ACTUAL_PUBSPEC}"
|
rm "${ACTUAL_PUBSPEC}"
|
||||||
fi
|
fi
|
||||||
|
cp "${T_PUBSPEC}" "${ACTUAL_PUBSPEC}"
|
||||||
|
|
||||||
for TF in "${TEMPLATE_FILES[@]}"; do
|
for TF in "${TEMPLATE_FILES[@]}"; do
|
||||||
FILE="${APP_PROJECT_ROOT_DIR}/${TF}"
|
FILE="${APP_PROJECT_ROOT_DIR}/${TF}"
|
||||||
if [ ! -f "${FILE}" ]; then
|
if [ -f "${FILE}" ]; then
|
||||||
cp -rp "${TEMPLATES_DIR}/${TF}" "${FILE}"
|
rm "${FILE}"
|
||||||
fi
|
fi
|
||||||
|
cp -rp "${TEMPLATES_DIR}/${TF}" "${FILE}"
|
||||||
done
|
done
|
|
@ -94,7 +94,7 @@ if printf '%s\0' "${APP_NAMED_IDS[@]}" | grep -Fxqz -- "${APP_NAMED_ID}"; then
|
||||||
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/shared/update_version.sh" -v "${APP_VERSION_STRING}" -b "${APP_BUILD_NUMBER}"
|
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/shared/update_version.sh" -v "${APP_VERSION_STRING}" -b "${APP_BUILD_NUMBER}"
|
||||||
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/shared/link_assets.sh" "${APP_NAMED_ID}" "${APP_BUILD_PLATFORM}"
|
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/shared/link_assets.sh" "${APP_NAMED_ID}" "${APP_BUILD_PLATFORM}"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "${APP_PROJECT_ROOT_DIR}/scripts/app_config/configure_${APP_NAMED_ID}.sh"
|
source "${APP_PROJECT_ROOT_DIR}/scripts/app_config/configure_${APP_NAMED_ID}.sh" "${APP_BUILD_PLATFORM}"
|
||||||
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/platforms/${APP_BUILD_PLATFORM}/platform_config.sh"
|
"${APP_PROJECT_ROOT_DIR}/scripts/app_config/platforms/${APP_BUILD_PLATFORM}/platform_config.sh"
|
||||||
|
|
||||||
if [[ "$APP_BUILD_PLATFORM" != "linux" ]]; then
|
if [[ "$APP_BUILD_PLATFORM" != "linux" ]]; then
|
||||||
|
@ -111,6 +111,8 @@ if [ "$BUILD_CRYPTO_PLUGINS" -eq 0 ]; then
|
||||||
./build_all.sh
|
./build_all.sh
|
||||||
elif [[ "$APP_NAMED_ID" = "stack_duo" ]]; then
|
elif [[ "$APP_NAMED_ID" = "stack_duo" ]]; then
|
||||||
./build_all_duo.sh
|
./build_all_duo.sh
|
||||||
|
elif [[ "$APP_NAMED_ID" = "campfire" ]]; then
|
||||||
|
./build_all_campfire.sh
|
||||||
else
|
else
|
||||||
echo "Invalid app id: ${APP_NAMED_ID}"
|
echo "Invalid app id: ${APP_NAMED_ID}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
28
scripts/ios/build_all_campfire.sh
Executable file
28
scripts/ios/build_all_campfire.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# libepiccash requires old rust
|
||||||
|
source ../rust_version.sh
|
||||||
|
set_rust_to_1671
|
||||||
|
|
||||||
|
# ensure ios rust triples are there
|
||||||
|
rustup target add aarch64-apple-ios
|
||||||
|
rustup target add x86_64-apple-ios
|
||||||
|
|
||||||
|
# ensure ios rust triples are there
|
||||||
|
rustup target add aarch64-apple-ios
|
||||||
|
rustup target add x86_64-apple-ios
|
||||||
|
|
||||||
|
(cd ../../crypto_plugins/flutter_liblelantus/scripts/ios && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libepiccash/scripts/ios && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libmonero/scripts/ios/ && ./build_all.sh )
|
||||||
|
set_rust_to_1720
|
||||||
|
(cd ../../crypto_plugins/frostdart/scripts/ios && ./build_all.sh )
|
||||||
|
|
||||||
|
wait
|
||||||
|
echo "Done building"
|
||||||
|
|
||||||
|
# ensure ios rust triples are there
|
||||||
|
rustup target add aarch64-apple-ios
|
||||||
|
rustup target add x86_64-apple-ios
|
24
scripts/linux/build_all_campfire.sh
Executable file
24
scripts/linux/build_all_campfire.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# libepiccash requires old rust
|
||||||
|
source ../rust_version.sh
|
||||||
|
set_rust_to_1671
|
||||||
|
|
||||||
|
# for arm
|
||||||
|
# flutter-elinux clean
|
||||||
|
# flutter-elinux pub get
|
||||||
|
# flutter-elinux build linux --dart-define="IS_ARM=true"
|
||||||
|
mkdir -p build
|
||||||
|
./build_secure_storage_deps.sh
|
||||||
|
(cd ../../crypto_plugins/flutter_liblelantus/scripts/linux && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libepiccash/scripts/linux && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libmonero/scripts/linux && ./build_all.sh )
|
||||||
|
set_rust_to_1720
|
||||||
|
(cd ../../crypto_plugins/frostdart/scripts/linux && ./build_all.sh )
|
||||||
|
|
||||||
|
./build_secp256k1.sh
|
||||||
|
|
||||||
|
wait
|
||||||
|
echo "Done building"
|
19
scripts/macos/build_all_campfire.sh
Executable file
19
scripts/macos/build_all_campfire.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# libepiccash requires old rust
|
||||||
|
source ../rust_version.sh
|
||||||
|
set_rust_to_1671
|
||||||
|
|
||||||
|
(cd ../../crypto_plugins/flutter_liblelantus/scripts/macos && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libepiccash/scripts/macos && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libmonero/scripts/macos/ && ./build_all.sh )
|
||||||
|
set_rust_to_1720
|
||||||
|
(cd ../../crypto_plugins/frostdart/scripts/macos && ./build_all.sh )
|
||||||
|
|
||||||
|
wait
|
||||||
|
echo "Done building"
|
||||||
|
|
||||||
|
# set rust (back) to a more recent stable release to allow stack wallet to build tor
|
||||||
|
set_rust_to_1720
|
19
scripts/windows/build_all_campfire.sh
Executable file
19
scripts/windows/build_all_campfire.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x -e
|
||||||
|
|
||||||
|
# libepiccash requires old rust
|
||||||
|
source ../rust_version.sh
|
||||||
|
set_rust_to_1671
|
||||||
|
|
||||||
|
mkdir -p build
|
||||||
|
(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh )
|
||||||
|
(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh)
|
||||||
|
set_rust_to_1720
|
||||||
|
(cd ../../crypto_plugins/frostdart/scripts/windows && ./build_all.sh )
|
||||||
|
|
||||||
|
./build_secp256k1_wsl.sh
|
||||||
|
|
||||||
|
wait
|
||||||
|
echo "Done building"
|
Loading…
Reference in a new issue