diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index 45f76d95c9302b1b1c4193919a2084fcbdfc15f1..66f164940c801c1d55e93fe7a0cd8231a22a6fe7 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 5b71b37c052886c098c914dcab07b840c914cc49..2f8947ec28ad4f038256ec2272435d90255bfc78 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 77a66f5c36cad38b77d4e444771a921bfc7cc43e..dd57ac7d372c96fba16e35cac17375c7c454ce1c 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index a075e3e23c0fe28a47bb7250a99fcaf040beb42a..37e824fb169123542ef296746ea8a290820d3c88 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index cde3798ae864958a4ba7c20b509de6f30c73f9dc..30205f58f1df727b464700bdb147e4eb70568e1c 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/gradle.properties b/android/gradle.properties index a316c7ce348427549dc57861194389d019399733..483a54e247dfee28ae422a49bba587c026e5417e 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -2,5 +2,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true android.enableR8=true -app.versionName=1.2.5 -app.versionCode=16 +app.versionName=1.2.6 +app.versionCode=17 diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index fe91a9db34e6b6b64b226c84003d9b36032d941e..041fd9884b213cb932cab2e80a3e3ce1ebf453f0 100644 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -1 +1 @@ -<p>Hangman game, simple and classic.</p> +Hangman, simple and classic, a game of guessing a word one letter at a time \ No newline at end of file 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/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png index cde3798ae864958a4ba7c20b509de6f30c73f9dc..1481c900bd5d0c52731cffd368428dcacd05adbe 100644 Binary files a/fastlane/metadata/android/en-US/images/icon.png and b/fastlane/metadata/android/en-US/images/icon.png differ diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt index 3d399340855455e428118aef2417afd4a993181f..a24321cd375fa8637bcb891886a1f6bd34fe0a3e 100644 --- a/fastlane/metadata/android/en-US/short_description.txt +++ b/fastlane/metadata/android/en-US/short_description.txt @@ -1 +1 @@ -Hangman game, simple and classic. +Hangman, simple and classic \ No newline at end of file diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt new file mode 100644 index 0000000000000000000000000000000000000000..a24321cd375fa8637bcb891886a1f6bd34fe0a3e --- /dev/null +++ b/fastlane/metadata/android/en-US/title.txt @@ -0,0 +1 @@ +Hangman, simple and classic \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/full_description.txt b/fastlane/metadata/android/fr-FR/full_description.txt new file mode 100644 index 0000000000000000000000000000000000000000..ed9fb611d0a0d7a86f3c7956a8d54f3baea0574c --- /dev/null +++ b/fastlane/metadata/android/fr-FR/full_description.txt @@ -0,0 +1 @@ +Jeu du pendu, simple et classique \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/short_description.txt b/fastlane/metadata/android/fr-FR/short_description.txt new file mode 100644 index 0000000000000000000000000000000000000000..ed9fb611d0a0d7a86f3c7956a8d54f3baea0574c --- /dev/null +++ b/fastlane/metadata/android/fr-FR/short_description.txt @@ -0,0 +1 @@ +Jeu du pendu, simple et classique \ No newline at end of file diff --git a/fastlane/metadata/android/fr-FR/title.txt b/fastlane/metadata/android/fr-FR/title.txt new file mode 100644 index 0000000000000000000000000000000000000000..e78c74c9ffbb0dc0ab5b07b66ceea5794c05b7f8 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/title.txt @@ -0,0 +1 @@ +Jeu du pendu \ No newline at end of file diff --git a/fastlane/metadata/android/fr/full_description.txt b/fastlane/metadata/android/fr/full_description.txt deleted file mode 100644 index 9888a1207f5f01e323206230c1e3ebac17a04a15..0000000000000000000000000000000000000000 --- a/fastlane/metadata/android/fr/full_description.txt +++ /dev/null @@ -1 +0,0 @@ -<p>Jeu du pendu, simple et classique.</p> diff --git a/fastlane/metadata/android/fr/short_description.txt b/fastlane/metadata/android/fr/short_description.txt deleted file mode 100644 index ba530a8013c5263dd4b646cb2bc89dbac83f2dae..0000000000000000000000000000000000000000 --- a/fastlane/metadata/android/fr/short_description.txt +++ /dev/null @@ -1 +0,0 @@ -Jeu du pendu, simple et classique. diff --git a/fdroid_metadata.yml b/fdroid_metadata.yml new file mode 100644 index 0000000000000000000000000000000000000000..5d0a98c47ef8d0ab8c94de5a88a1aee1d29acf68 --- /dev/null +++ b/fdroid_metadata.yml @@ -0,0 +1,17 @@ +AuthorName: 'BenoƮt Harrault' +Categories: + - Games +Name: Hangman Game +AutoName: Hangman +License: GPL-3.0-only +WebSite: 'https://git.harrault.fr/android/hangman' +SourceCode: https://git.harrault.fr/android/hangman +IssueTracker: https://git.harrault.fr/android/hangman/issues +Changelog: https://git.harrault.fr/android/hangman/-/tags +Summary: '' + +Description: |- + Hangman, simple and classic, a game of guessing a word one letter at a time. + +RepoType: git +Repo: 'https://git.harrault.fr/android/hangman.git' diff --git a/icons/build_icons.sh b/icons/build_application_icons.sh similarity index 54% rename from icons/build_icons.sh rename to icons/build_application_icons.sh index a605267fe7744fa5f6720fc9087b8df8a4fa1610..7d5ebb61276b80b4034edfc0f4703c7e60c4f5fe 100755 --- a/icons/build_icons.sh +++ b/icons/build_application_icons.sh @@ -9,8 +9,18 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" BASE_DIR="$(dirname "${CURRENT_DIR}")" SOURCE="${CURRENT_DIR}/icon.svg" +SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" + OPTIPNG_OPTIONS="-preserve -quiet -o7" +if [ ! -f "${SOURCE}" ]; then + echo "Missing file: ${SOURCE}" +fi + +if [ ! -f "${SOURCE_FASTLANE}" ]; then + echo "Missing file: ${SOURCE_FASTLANE}" +fi + # optimize svg cp ${SOURCE} ${SOURCE}.tmp scour \ @@ -19,6 +29,7 @@ scour \ --enable-viewboxing \ --enable-comment-stripping \ --nindent=4 \ + --quiet \ -i ${SOURCE}.tmp \ -o ${SOURCE} rm ${SOURCE}.tmp @@ -28,9 +39,9 @@ function build_icon() { ICON_SIZE="$1" TARGET="$2" - TARGET_PNG="${TARGET}.png" + echo "Building ${TARGET}" - mkdir -p "$(dirname "${TARGET_PNG}")" + TARGET_PNG="${TARGET}.png" inkscape \ --export-width=${ICON_SIZE} \ @@ -38,13 +49,45 @@ function build_icon() { --export-filename=${TARGET_PNG} \ ${SOURCE} - optipng ${TARGET_PNG} ${TARGET_PNG} + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +# build fastlane image +function build_fastlane_image() { + WIDTH="$1" + HEIGHT="$2" + TARGET="$3" + + echo "Building ${TARGET}" + + cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp + scour \ + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SOURCE_FASTLANE}.tmp \ + -o ${SOURCE_FASTLANE} + rm ${SOURCE_FASTLANE}.tmp + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${WIDTH} \ + --export-height=${HEIGHT} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_FASTLANE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} } -build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher -build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher -build_icon 216 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher -build_icon 192 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon -build_icon 192 ${BASE_DIR}/fastlane/metadata/android/fr-FR/images/icon +build_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher +build_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher +build_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher +build_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon + +build_fastlane_image 1024 500 ${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic diff --git a/icons/build_game_icons.sh b/icons/build_game_icons.sh new file mode 100755 index 0000000000000000000000000000000000000000..218080d1eb12952690ba1e182a468f6e3cf03d65 --- /dev/null +++ b/icons/build_game_icons.sh @@ -0,0 +1,98 @@ +#! /bin/bash + +# Check dependencies +command -v inkscape >/dev/null 2>&1 || { echo >&2 "I require inkscape but it's not installed. Aborting."; exit 1; } +command -v scour >/dev/null 2>&1 || { echo >&2 "I require scour but it's not installed. Aborting."; exit 1; } +command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not installed. Aborting."; exit 1; } + +CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +BASE_DIR="$(dirname "${CURRENT_DIR}")" +ASSETS_DIR="${BASE_DIR}/assets" + +OPTIPNG_OPTIONS="-preserve -quiet -o7" +ICON_SIZE=192 + +####################################################### + +# Game images +AVAILABLE_GAME_IMAGES=" +" + +# Settings images +AVAILABLES_GAME_SETTINGS=" +" + +####################################################### + +# optimize svg +function optimize_svg() { + SOURCE="$1" + + cp ${SOURCE} ${SOURCE}.tmp + scour \ + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SOURCE}.tmp \ + -o ${SOURCE} + rm ${SOURCE}.tmp +} + +# build icons +function build_icon() { + SOURCE="$1" + TARGET="$2" + + echo "Building ${TARGET}" + + if [ ! -f "${SOURCE}" ]; then + echo "Missing file: ${SOURCE}" + exit 1 + fi + + optimize_svg "${SOURCE}" + + inkscape \ + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET} \ + ${SOURCE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET} +} + +function build_settings_icons() { + INPUT_STRING="$1" + + SETTING_NAME="$(echo "${INPUT_STRING}" | cut -d":" -f1)" + SETTING_VALUES="$(echo "${INPUT_STRING}" | cut -d":" -f2 | tr "," " ")" + + for SETTING_VALUE in ${SETTING_VALUES} + do + SETTING_CODE="${SETTING_NAME}_${SETTING_VALUE}" + build_icon ${CURRENT_DIR}/${SETTING_CODE}.svg ${ASSETS_DIR}/icons/${SETTING_CODE}.png + done +} + +####################################################### + +# Create output folders +mkdir -p ${ASSETS_DIR}/icons + +# Delete existing generated images +find ${ASSETS_DIR}/icons -type f -name "*.png" -delete + +# build game images +for GAME_IMAGE in ${AVAILABLE_GAME_IMAGES} +do + build_icon ${CURRENT_DIR}/${GAME_IMAGE}.svg ${ASSETS_DIR}/icons/${GAME_IMAGE}.png +done + +# build settings images +for GAME_SETTING in ${AVAILABLES_GAME_SETTINGS} +do + build_settings_icons "${GAME_SETTING}" +done 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>