diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index f74085f3f6a2b995f8ad1f9ff7b2c46dc118a9e0..428eb361622fc80a398549107f435d3608d8cbe8 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,12 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="?android:colorBackground" /> - <!-- You can insert your own image assets here --> - <!-- <item> + <item> <bitmap android:gravity="center" android:src="@mipmap/launch_image" /> - </item> --> + </item> </layer-list> diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index 304732f8842013497e14bd02f67a55f2614fb8f7..e4551e90d03b1a7d9ca652bc2054d62b479cc84f 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,12 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Modify this file to customize your launch splash screen --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@android:color/white" /> - <!-- You can insert your own image assets here --> - <!-- <item> + <item> <bitmap android:gravity="center" android:src="@mipmap/launch_image" /> - </item> --> + </item> </layer-list> diff --git a/android/app/src/main/res/mipmap-hdpi/launch_image.png b/android/app/src/main/res/mipmap-hdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..928173ee263c9ecdea58483bc3f5f165abf56c7a Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/launch_image.png b/android/app/src/main/res/mipmap-mdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..7d498125f16b3e05bf884a605fc64e43110fa604 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/launch_image.png b/android/app/src/main/res/mipmap-xhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..2273917a6e950eadecf0490322ec571f687c6672 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/launch_image.png b/android/app/src/main/res/mipmap-xxhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..3f7eb04853596c7df85d4cf4449e8b3839b4b3c1 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/launch_image.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png b/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png new file mode 100644 index 0000000000000000000000000000000000000000..95cc2161ca93db2118d167a8378debb40516b88e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index 449a9f930826851b495d039f0c0d57f247536615..c6e7031f33f4c950119a059603cf058d16983dd3 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -1,17 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> - <!-- Show a splash screen on the activity. Automatically removed when - Flutter draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> - <!-- Theme applied to the Android Window as soon as the process has started. - This theme determines the color of the Android Window while your - Flutter UI initializes, as well as behind your Flutter UI while its - running. - - This Theme is only used starting with V2 of Flutter's Android embedding. --> <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> <item name="android:windowBackground">?android:colorBackground</item> </style> diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index d74aa35c28261a8e78264252be7f0f6f9406ec35..ff81bae863800e62cfd23ccf572c4ba607128496 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,17 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> - <!-- Show a splash screen on the activity. Automatically removed when - Flutter draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> - <!-- Theme applied to the Android Window as soon as the process has started. - This theme determines the color of the Android Window while your - Flutter UI initializes, as well as behind your Flutter UI while its - running. - - This Theme is only used starting with V2 of Flutter's Android embedding. --> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <item name="android:windowBackground">?android:colorBackground</item> </style> diff --git a/android/gradle.properties b/android/gradle.properties index 65eed6426393974efb5a056ec44936d42b5ef2a1..4bb5439f682100f8ef4ba80a557fe4f2f0ab14c2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.8 -app.versionCode=8 +app.versionName=0.0.9 +app.versionCode=9 diff --git a/fastlane/metadata/android/en-US/changelogs/9.txt b/fastlane/metadata/android/en-US/changelogs/9.txt new file mode 100644 index 0000000000000000000000000000000000000000..484bf5c4031946fe4ecd84b007c03592c64a33ab --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/9.txt @@ -0,0 +1 @@ +Enable launch screen with image diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png new file mode 100644 index 0000000000000000000000000000000000000000..d94cd4c48e61c0b2a131b828585ef141878cbe03 Binary files /dev/null and b/fastlane/metadata/android/en-US/images/featureGraphic.png differ diff --git a/fastlane/metadata/android/fr-FR/changelogs/9.txt b/fastlane/metadata/android/fr-FR/changelogs/9.txt new file mode 100644 index 0000000000000000000000000000000000000000..57ab64681f606443e40e7fce941bf9d4788d5a54 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/9.txt @@ -0,0 +1 @@ +Activation de l'écran de chargement avec image diff --git a/icons/build_application_icons.sh b/icons/build_application_icons.sh index 7909dd523da1283627fabba793bdc7b458aa0d51..27dbe2647fe4e6d562fbd99451716d1b7d448570 100755 --- a/icons/build_application_icons.sh +++ b/icons/build_application_icons.sh @@ -8,60 +8,111 @@ command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "${CURRENT_DIR}")" +SOURCE_ICON="${CURRENT_DIR}/icon.svg" +SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" +SOURCE_LAUNCH_IMAGE="${CURRENT_DIR}/icon.svg" + OPTIPNG_OPTIONS="-preserve -quiet -o7" -# optimize svg +if [ ! -f "${SOURCE_ICON}" ]; then + echo "Missing file: ${SOURCE_ICON}" +fi + +if [ ! -f "${SOURCE_FASTLANE}" ]; then + echo "Missing file: ${SOURCE_FASTLANE}" +fi + +if [ ! -f "${SOURCE_LAUNCH_IMAGE}" ]; then + echo "Missing file: ${SOURCE_LAUNCH_IMAGE}" +fi + function optimize_svg() { - SOURCE="$1" + SVG="$1" - cp ${SOURCE} ${SOURCE}.tmp + cp ${SVG} ${SVG}.tmp scour \ --remove-descriptive-elements \ --enable-id-stripping \ --enable-viewboxing \ --enable-comment-stripping \ --nindent=4 \ - -i ${SOURCE}.tmp \ - -o ${SOURCE} - rm ${SOURCE}.tmp + --quiet \ + -i ${SVG}.tmp \ + -o ${SVG} + rm ${SVG}.tmp } +# optimize source svg files +optimize_svg ${SOURCE_ICON} +optimize_svg ${SOURCE_FASTLANE} +optimize_svg ${SOURCE_LAUNCH_IMAGE} + # build icons -function build_asset_image() { - ICON_SIZE=192 - SOURCE="$1" +function build_application_icon() { + ICON_SIZE="$1" TARGET="$2" - optimize_svg "${SOURCE}" + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" inkscape \ --export-width=${ICON_SIZE} \ --export-height=${ICON_SIZE} \ - --export-filename=${TARGET} \ - ${SOURCE} + --export-filename=${TARGET_PNG} \ + ${SOURCE_ICON} - optipng ${OPTIPNG_OPTIONS} ${TARGET} + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -function build_icons_for_skin() { - SKIN_CODE="$1" +# build fastlane image +function build_fastlane_image() { + WIDTH="$1" + HEIGHT="$2" + TARGET="$3" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${WIDTH} \ + --export-height=${HEIGHT} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_FASTLANE} - build_icon_for_skin ${SKIN_CODE} tile_empty - build_icon_for_skin ${SKIN_CODE} tile_black - build_icon_for_skin ${SKIN_CODE} tile_white + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -function build_icon_for_skin() { - SKIN_CODE="$1" - IMAGE_CODE="$2" +# build launch images (splash screen) +function build_launch_image() { + ICON_SIZE="$1" + TARGET="$2" + + echo "Building ${TARGET}" - build_asset_image ${CURRENT_DIR}/skins/${SKIN_CODE}/${IMAGE_CODE}.svg ${BASE_DIR}/assets/skins/${SKIN_CODE}_${IMAGE_CODE}.png + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_LAUNCH_IMAGE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -# Game icons -build_asset_image ${CURRENT_DIR}/button_restart.svg ${BASE_DIR}/assets/icons/button_restart.png -build_asset_image ${CURRENT_DIR}/empty.svg ${BASE_DIR}/assets/icons/empty.png -build_asset_image ${CURRENT_DIR}/game_win.svg ${BASE_DIR}/assets/icons/game_win.png +build_application_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher +build_application_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher +build_application_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher +build_application_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher +build_application_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher +build_application_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon + +build_launch_image 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image +build_launch_image 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image +build_launch_image 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image +build_launch_image 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/launch_image +build_launch_image 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/launch_image -# Skins -build_icons_for_skin "default" +build_fastlane_image 1024 500 ${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic diff --git a/icons/featureGraphic.svg b/icons/featureGraphic.svg new file mode 100644 index 0000000000000000000000000000000000000000..2033f317c082bce27115e88ca068d358b08318d0 --- /dev/null +++ b/icons/featureGraphic.svg @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 1024 500" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="1024" height="500" rx="0" ry="0" fill="#977cff"/></svg>