diff --git a/scripts/android/build_all_duo.sh b/scripts/android/build_all_duo.sh index f1b1e4d71..12729db01 100755 --- a/scripts/android/build_all_duo.sh +++ b/scripts/android/build_all_duo.sh @@ -2,10 +2,16 @@ set -e -./configure_duo.sh -cd .. -./configure_duo.sh -cd android +../app_config/configure_duo.sh + +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/build.gradle +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/src/debug/AndroidManifest.xml +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/src/main/AndroidManifest.xml +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/src/main/profile/AndroidManifest.xml +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../android/app/src/profile/AndroidManifest.xml + +# todo: revisit following at some point # libepiccash requires old rust source ../rust_version.sh diff --git a/scripts/android/configure_duo.sh b/scripts/android/configure_duo.sh deleted file mode 100755 index a375b7de2..000000000 --- a/scripts/android/configure_duo.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Configure Android for Duo. -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/build.gradle -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/src/debug/AndroidManifest.xml -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/src/main/AndroidManifest.xml -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/src/main/kotlin/com/cypherstack/stackwallet/MainActivity.kt -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/src/main/profile/AndroidManifest.xml -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../android/app/src/profile/AndroidManifest.xml diff --git a/scripts/app_config/configure_duo.sh b/scripts/app_config/configure_duo.sh new file mode 100755 index 000000000..8f4d73194 --- /dev/null +++ b/scripts/app_config/configure_duo.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +# Configure files for Duo. +export ORIGINAL_NAME="Stack Wallet" +export ORIGINAL_APP_ID="com.cypherstack.stackwallet" + +export NEW_NAME="Stack Duo" +export NEW_APP_ID="com.cypherstack.stackduo" + +if [[ "$(uname)" == 'Darwin' ]]; then + # macos specific sed + sed -i '' 's/Wallet/Duo/g' ../../lib/app_config.dart + sed -i '' "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../pubspec.yaml +else + sed -i 's/Wallet/Duo/g' ../../lib/app_config.dart + sed -i "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../pubspec.yaml +fi \ No newline at end of file diff --git a/scripts/configure_duo.sh b/scripts/configure_duo.sh deleted file mode 100755 index fe4faf116..000000000 --- a/scripts/configure_duo.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Configure files for Duo. -sed -i 's/Wallet/Duo/g' ../lib/app_config.dart -sed -i 's/Stack Wallet/Stack Duo/g' ../pubspec.yaml diff --git a/scripts/ios/build_all_duo.sh b/scripts/ios/build_all_duo.sh index 6d10156a2..0b264c541 100755 --- a/scripts/ios/build_all_duo.sh +++ b/scripts/ios/build_all_duo.sh @@ -2,10 +2,13 @@ set -e -./configure_duo.sh -cd .. -./configure_duo.sh -cd ios +../app_config/configure_duo.sh + +# Configure ios for Duo. +sed -i '' "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../ios/Runner/Info.plist +sed -i '' "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../ios/Runner.xcodeproj/project.pbxproj + +# todo: revisit following at some point # libepiccash requires old rust source ../rust_version.sh diff --git a/scripts/ios/configure_duo.sh b/scripts/ios/configure_duo.sh deleted file mode 100755 index 3a6806305..000000000 --- a/scripts/ios/configure_duo.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Configure iOS for Duo. -sed -i 's/Stack Wallet/Stack Duo/g' ../ios/Runner/Info.plist -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../ios/Runner.xcodeproj/project.pbxproj diff --git a/scripts/linux/build_all_duo.sh b/scripts/linux/build_all_duo.sh index a22a77005..bbba76855 100755 --- a/scripts/linux/build_all_duo.sh +++ b/scripts/linux/build_all_duo.sh @@ -2,10 +2,13 @@ set -e -./configure_duo.sh -cd .. -./configure_duo.sh -cd linux +../app_config/configure_duo.sh + +# Configure Linux for Duo. +sed -i "s/${ORIGINAL_APP_ID}/${NEW_APP_ID}/g" ../../linux/CMakeLists.txt +sed -i "s/${ORIGINAL_NAME}/${NEW_NAME}/g" ../../linux/my_application.cc + +# todo: revisit following at some point # libepiccash requires old rust source ../rust_version.sh diff --git a/scripts/linux/configure_duo.sh b/scripts/linux/configure_duo.sh deleted file mode 100755 index 6505c551d..000000000 --- a/scripts/linux/configure_duo.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Configure Linux for Duo. -sed -i 's/com.cypherstack.stackwallet/com.cypherstack.stackduo/g' ../../linux/CMakeLists.txt -sed -i 's/Stack Wallet/Stack Duo/g' ../../linux/my_application.cc diff --git a/scripts/macos/build_all_duo.sh b/scripts/macos/build_all_duo.sh index deb1d2f64..08be98f32 100755 --- a/scripts/macos/build_all_duo.sh +++ b/scripts/macos/build_all_duo.sh @@ -2,10 +2,12 @@ set -e -./configure_duo.sh -cd .. -./configure_duo.sh -cd macos +../app_config/configure_duo.sh + +# Configure macOS for Duo. +sed -i '' 's/com.cypherstack.stackWallet/com.cypherstack.stackDuo/g' ../../macos/Runner.xcodeproj/project.pbxproj + +# todo: revisit following at some point # libepiccash requires old rust source ../rust_version.sh diff --git a/scripts/macos/configure_duo.sh b/scripts/macos/configure_duo.sh deleted file mode 100755 index 05e23dfc7..000000000 --- a/scripts/macos/configure_duo.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Configure macOS for Duo. -sed -i 's/com.cypherstack.stackWallet/com.cypherstack.stackDuo/g' ../macos/Runner.xcodeproj/project.pbxproj diff --git a/scripts/windows/build_all_duo.sh b/scripts/windows/build_all_duo.sh index 676c4899f..2f401237a 100755 --- a/scripts/windows/build_all_duo.sh +++ b/scripts/windows/build_all_duo.sh @@ -2,10 +2,12 @@ set -e -./configure_duo.sh -cd .. -./configure_duo.sh -cd windows +../app_config/configure_duo.sh + +# Configure Windows for Duo. +sed -i 's/Stack Wallet/Stack Duo/g' ../../windows/runner/Runner.rc + +# todo: revisit following at some point # libepiccash requires old rust source ../rust_version.sh diff --git a/scripts/windows/configure_duo.sh b/scripts/windows/configure_duo.sh deleted file mode 100755 index f49528e70..000000000 --- a/scripts/windows/configure_duo.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Configure Windows for Duo. -sed -i 's/Stack Wallet/Stack Duo/g' ../windows/runner/Runner.rc