link assets based on config

This commit is contained in:
julian 2024-05-21 15:40:10 -06:00
parent 8c0eba3c38
commit f02634f635
21 changed files with 63 additions and 14 deletions

4
.gitignore vendored
View file

@ -46,6 +46,10 @@ test/services/coins/particl/particl_wallet_test_parameters.dart
# Exceptions to above rules. # Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
# asset symlinks
/assets/default_themes
/assets/icon
# other # other
coverage coverage
scripts/**/build scripts/**/build

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -254,8 +254,6 @@ class _SVG {
class _PNG { class _PNG {
const _PNG(); const _PNG();
String get splash => "assets/images/splash.png";
String get glasses => "assets/images/glasses.png"; String get glasses => "assets/images/glasses.png";
String get glassesHidden => "assets/images/glasses-hidden.png"; String get glassesHidden => "assets/images/glasses-hidden.png";
String get mascot => "assets/images/mascot.png"; String get mascot => "assets/images/mascot.png";

View file

@ -213,7 +213,7 @@ flutter_launcher_icons:
image_path: assets/icon/macos-icon.png image_path: assets/icon/macos-icon.png
flutter_native_splash: flutter_native_splash:
image: assets/images/splash.png image: assets/icon/splash.png
color: "F7F7F7" color: "F7F7F7"
android_disable_fullscreen: true android_disable_fullscreen: true

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_wallet"
# libepiccash requires old rust # libepiccash requires old rust
source ../rust_version.sh source ../rust_version.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/configure_duo.sh ../app_config/configure_duo.sh

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_duo"
# Configure files for Duo. # Configure files for Duo.
export ORIGINAL_NAME="Stack Wallet" export ORIGINAL_NAME="Stack Wallet"

View file

@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -x -e
if [ $# -ne 1 ]; then
echo "Usage: $0 <theme specific assets dir name (ex. stack_wallet)>"
exit 1
fi
SELECT_ASSETS_DIR=$1
# set project root
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
pushd "${SCRIPT_DIR}/../../../"
PROJECT_ROOT="$(pwd)"
popd
# declare full paths
ASSET_SOURCES_DIR="${PROJECT_ROOT}/asset_sources"
ASSETS_DIR="${PROJECT_ROOT}/assets"
# finally update symlinks
rm -f "${ASSETS_DIR}/default_themes"
ln -s "${ASSET_SOURCES_DIR}/bundled_themes/${SELECT_ASSETS_DIR}" "${ASSETS_DIR}/default_themes"
rm -f "${ASSETS_DIR}/icon"
ln -s "${ASSET_SOURCES_DIR}/icon/${SELECT_ASSETS_DIR}" "${ASSETS_DIR}/icon"
# todo run flutter_native_splash
# todo run flutter_launcher_icons

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_wallet"
# libepiccash requires old rust # libepiccash requires old rust
source ../rust_version.sh source ../rust_version.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/configure_duo.sh ../app_config/configure_duo.sh

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_wallet"
# libepiccash requires old rust # libepiccash requires old rust
source ../rust_version.sh source ../rust_version.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/configure_duo.sh ../app_config/configure_duo.sh

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_wallet"
# libepiccash requires old rust # libepiccash requires old rust
source ../rust_version.sh source ../rust_version.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/configure_duo.sh ../app_config/configure_duo.sh

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/shared/link_assets.sh "stack_wallet"
# libepiccash requires old rust # libepiccash requires old rust
source ../rust_version.sh source ../rust_version.sh

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -e set -x -e
../app_config/configure_duo.sh ../app_config/configure_duo.sh