Skip to content
Snippets Groups Projects
Commit 32f168fa authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Merge branch '28-improve-app-metadata-include-fdroid-metadata-in-repository' into 'master'

Resolve "Improve app metadata, include fdroid metadata in repository"

Closes #28

See merge request !25
parents b26e0c21 3402acb2
No related branches found
No related tags found
1 merge request!25Resolve "Improve app metadata, include fdroid metadata in repository"
Pipeline #3147 canceled
Showing
with 176 additions and 14 deletions
android/app/src/main/res/mipmap-hdpi/ic_launcher.png

1.62 KiB | W: | H:

android/app/src/main/res/mipmap-hdpi/ic_launcher.png

1.62 KiB | W: | H:

android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-mdpi/ic_launcher.png

1.03 KiB | W: | H:

android/app/src/main/res/mipmap-mdpi/ic_launcher.png

1.03 KiB | W: | H:

android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

5.37 KiB | W: | H:

android/app/src/main/res/mipmap-xhdpi/ic_launcher.png

1.9 KiB | W: | H:

android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

3.37 KiB | W: | H:

android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png

3.43 KiB | W: | H:

android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

4.51 KiB | W: | H:

android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

4.57 KiB | W: | H:

android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -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
<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
fastlane/metadata/android/en-US/images/featureGraphic.png

214 B

fastlane/metadata/android/en-US/images/icon.png

4.51 KiB | W: | H:

fastlane/metadata/android/en-US/images/icon.png

14.3 KiB | W: | H:

fastlane/metadata/android/en-US/images/icon.png
fastlane/metadata/android/en-US/images/icon.png
fastlane/metadata/android/en-US/images/icon.png
fastlane/metadata/android/en-US/images/icon.png
  • 2-up
  • Swipe
  • Onion skin
Hangman game, simple and classic.
Hangman, simple and classic
\ No newline at end of file
Hangman, simple and classic
\ No newline at end of file
Jeu du pendu, simple et classique
\ No newline at end of file
Jeu du pendu, simple et classique
\ No newline at end of file
Jeu du pendu
\ No newline at end of file
<p>Jeu du pendu, simple et classique.</p>
Jeu du pendu, simple et classique.
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'
......@@ -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
#! /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
<?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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment