windows template files

This commit is contained in:
julian 2024-05-23 17:32:20 -06:00
parent 9abb25cc81
commit 2519b6feaf
5 changed files with 24 additions and 4 deletions

7
.gitignore vendored
View file

@ -87,4 +87,9 @@ secp256k1.dll
/macos/Runner/Configs/AppInfo.xcconfig
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
/macos/Runner.xcodeproj/project.pbxproj
/macos/Runner/Assets.xcassets/AppIcon.appiconset
/macos/Runner/Assets.xcassets/AppIcon.appiconset
/windows/runner/Runner.rc
/windows/runner/main.cpp
/windows/CMakeLists.txt
/windows/runner/resources/app_icon.ico

View file

@ -2,7 +2,22 @@
set -x -e
F0="windows/runner/Runner.rc"
F1="windows/runner/main.cpp"
F2="windows/CMakeLists.txt"
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 Windows for Duo.
sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/windows/runner/Runner.rc"
sed -i "s/${APP_NAME_PLACEHOLDER}/${NEW_NAME}/g" "${APP_PROJECT_ROOT_DIR}/windows/runner/main.cpp"
sed -i "s/${APP_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/windows/CMakeLists.txt"
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_BASIC_NAME_PLACEHOLDER}/${NEW_BASIC_NAME}/g" "${APP_PROJECT_ROOT_DIR}/${F2}"