mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Add auto generation of manifest file for android project even for iOS, macOS, Windows.
This commit is contained in:
parent
00f79a393e
commit
ae1fe4023d
6 changed files with 29 additions and 6 deletions
|
@ -7,6 +7,10 @@ set secrets_file_path=lib\.secrets.g.dart
|
|||
set release_dir=build\windows\x64\runner\Release
|
||||
@REM Path could be different
|
||||
if [%~1]==[] (set tools_root=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.38.33135\x64\Microsoft.VC143.CRT) else (set tools_root=%1)
|
||||
@REM Generate android manifest file
|
||||
cd scripts
|
||||
bash.exe gen_android_manifest.sh
|
||||
cd /d %cw_root%
|
||||
echo === Generating pubspec.yaml ===
|
||||
copy /Y pubspec_description.yaml pubspec.yaml > nul
|
||||
call flutter pub get > nul
|
||||
|
|
|
@ -8,5 +8,5 @@ fi
|
|||
./app_properties.sh
|
||||
./app_icon.sh
|
||||
./pubspec_gen.sh
|
||||
./manifest.sh
|
||||
./manifest.sh true #force overwrite manifest
|
||||
./inject_app_details.sh
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd ../..
|
||||
cp -rf ./android/app/src/main/AndroidManifestBase.xml ./android/app/src/main/AndroidManifest.xml
|
||||
cd scripts/android
|
||||
|
||||
if [ "$1" = true ]; then
|
||||
cp -rf ./android/app/src/main/AndroidManifestBase.xml ./android/app/src/main/AndroidManifest.xml
|
||||
else
|
||||
cp -n ./android/app/src/main/AndroidManifestBase.xml ./android/app/src/main/AndroidManifest.xml
|
||||
fi
|
||||
cd scripts/android
|
||||
|
|
10
scripts/gen_android_manifest.sh
Executable file
10
scripts/gen_android_manifest.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
ANDROID_SCRIPTS_DIR=`pwd`/android
|
||||
if [ ! -d $ANDROID_SCRIPTS_DIR ]; then
|
||||
echo "no android scripts directory found at ${ANDROID_SCRIPTS_DIR}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd $ANDROID_SCRIPTS_DIR
|
||||
./manifest.sh
|
|
@ -10,7 +10,9 @@ if [ -z "$APP_IOS_TYPE" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cd ../.. # go to root
|
||||
cd .. # go to scipts
|
||||
./gen_android_manifest.sh
|
||||
cd .. # go to root
|
||||
cp -rf ./ios/Runner/InfoBase.plist ./ios/Runner/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName ${APP_IOS_NAME}" ./ios/Runner/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${APP_IOS_BUNDLE_ID}" ./ios/Runner/Info.plist
|
||||
|
|
|
@ -9,7 +9,9 @@ if [ -z "$APP_MACOS_TYPE" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cd ../.. # go to root
|
||||
cd .. # go to scipts
|
||||
./gen_android_manifest.sh
|
||||
cd .. # go to root
|
||||
cp -rf ./macos/Runner/InfoBase.plist ./macos/Runner/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName ${APP_MACOS_NAME}" ./macos/Runner/Info.plist
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleName ${APP_MACOS_NAME}" ./macos/Runner/Info.plist
|
||||
|
@ -40,4 +42,4 @@ flutter pub run tool/generate_pubspec.dart
|
|||
flutter pub get
|
||||
flutter packages pub run tool/configure.dart $CONFIG_ARGS
|
||||
cd $DIR
|
||||
$DIR/app_icon.sh
|
||||
$DIR/app_icon.sh
|
||||
|
|
Loading…
Reference in a new issue