macos template files

This commit is contained in:
julian 2024-05-23 17:28:59 -06:00
parent b89e07118c
commit 9abb25cc81
5 changed files with 26 additions and 6 deletions

5
.gitignore vendored
View file

@ -83,3 +83,8 @@ secp256k1.dll
/linux/CMakeLists.txt
/linux/my_application.cc
/macos/Runner/Configs/AppInfo.xcconfig
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
/macos/Runner.xcodeproj/project.pbxproj
/macos/Runner/Assets.xcassets/AppIcon.appiconset

View file

@ -2,9 +2,24 @@
set -x -e
F0="macos/Runner.xcodeproj/project.pbxproj"
F1="macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme"
F2="macos/Runner/Configs/AppInfo.xcconfig"
TEMPLATES="${APP_PROJECT_ROOT_DIR}/scripts/app_config/templates"
for (( i=0; i<=2; i++ )); do
VAR="F${i}"
FILE="${APP_PROJECT_ROOT_DIR}/${!VAR}"
if [ -f "${FILE}" ]; then
rm "${FILE}"
fi
cp "${TEMPLATES}/${!VAR}" "${FILE}"
done
# Configure macOS for Duo.
sed -i '' "s/${APP_ID_PLACEHOLDER_CAMEL}/${NEW_APP_ID_CAMEL}/g" "${APP_PROJECT_ROOT_DIR}/macos/Runner.xcodeproj/project.pbxproj"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/macos/Runner.xcodeproj/project.pbxproj"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/macos/Runner/Configs/AppInfo.xcconfig"
sed -i '' "s/${APP_ID_PLACEHOLDER_SNAKE}/${NEW_APP_ID_SNAKE}/g" "${APP_PROJECT_ROOT_DIR}/macos/Runner/Configs/AppInfo.xcconfig"
sed -i '' "s/${APP_ID_PLACEHOLDER_CAMEL}/${NEW_APP_ID_CAMEL}/g" "${APP_PROJECT_ROOT_DIR}/${F0}"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F0}"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F1}"
sed -i '' "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F2}"
sed -i '' "s/${APP_ID_PLACEHOLDER_SNAKE}/${NEW_APP_ID_SNAKE}/g" "${APP_PROJECT_ROOT_DIR}/${F2}"