dev
sh 48 lines 2.15 KB
Raw
1 #!/bin/bash
2 source "$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/functions.sh"
3
4 MONERO_COM="monero.com"
5 CAKEWALLET="cakewallet"
6 DIR=`pwd`
7
8 if [ -z "$APP_MACOS_TYPE" ]; then
9 echo "Please set APP_MACOS_TYPE"
10 exit 1
11 fi
12
13 cd .. # go to scripts
14 ./gen_android_manifest.sh
15 cd .. # go to root
16 cp -rf ./macos/Runner/InfoBase.plist ./macos/Runner/Info.plist
17 /usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName ${APP_MACOS_NAME}" ./macos/Runner/Info.plist
18 /usr/libexec/PlistBuddy -c "Set :CFBundleName ${APP_MACOS_NAME}" ./macos/Runner/Info.plist
19 /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${APP_MACOS_BUNDLE_ID}" ./macos/Runner/Info.plist
20 /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${APP_MACOS_VERSION}" ./macos/Runner/Info.plist
21 /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${APP_MACOS_BUILD_NUMBER}" ./macos/Runner/Info.plist
22
23 # Fill entitlements Bundle ID
24 cp -rf ./macos/Runner/DebugProfileBase.entitlements ./macos/Runner/DebugProfile.entitlements
25 cp -rf ./macos/Runner/ReleaseBase.entitlements ./macos/Runner/Release.entitlements
26 cp -rf ./macos/Runner/RunnerBase.entitlements ./macos/Runner/Runner.entitlements
27 cp -rf ./macos/Runner/Configs/AppInfoBase.xcconfig ./macos/Runner/Configs/AppInfo.xcconfig
28 universal_sed "s/\${BUNDLE_ID}/${APP_MACOS_BUNDLE_ID}/g" ./macos/Runner/DebugProfile.entitlements
29 universal_sed "s/\${BUNDLE_ID}/${APP_MACOS_BUNDLE_ID}/g" ./macos/Runner/Release.entitlements
30 universal_sed "s/\${BUNDLE_ID}/${APP_MACOS_BUNDLE_ID}/g" ./macos/Runner/Runner.entitlements
31 universal_sed "s/\${PRODUCT_NAME}/${APP_MACOS_NAME}/g" ./macos/Runner/Configs/AppInfo.xcconfig
32 universal_sed "s/PRODUCT_BUNDLE_IDENTIFIER = .*;/PRODUCT_BUNDLE_IDENTIFIER = $APP_MACOS_BUNDLE_ID;/g" ./macos/Runner/Configs/AppInfo.xcconfig
33 CONFIG_ARGS=""
34
35 case $APP_MACOS_TYPE in
36 $MONERO_COM)
37 CONFIG_ARGS="--monero";;
38 $CAKEWALLET)
39 CONFIG_ARGS="--monero --bitcoin --ethereum --polygon --nano --bitcoinCash --solana --tron --wownero --dogecoin --base --arbitrum --bsc";;
40 esac
41
42 cp -rf pubspec_description.yaml pubspec.yaml
43 flutter pub get
44 dart run tool/generate_pubspec.dart
45 flutter pub get
46 dart run tool/configure.dart $CONFIG_ARGS
47 cd $DIR
48 $DIR/app_icon.sh