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

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

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

Closes #43

See merge request !41
parents 705f1397 d9882ed1
No related branches found
No related tags found
1 merge request!41Resolve "Improve app metadata, include fdroid metadata in repository"
Pipeline #3003 passed
Showing
with 126 additions and 10 deletions
android/app/src/main/res/mipmap-hdpi/ic_launcher.png

1.57 KiB | W: | H:

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

1.57 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

988 B | W: | H:

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

988 B | 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

1.86 KiB | W: | H:

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

1.86 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.53 KiB | W: | H:

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

3.58 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.78 KiB | W: | H:

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

4.86 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
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
app.versionName=0.0.41 app.versionName=0.0.42
app.versionCode=41 app.versionCode=42
assets/icons/button_back.png

3.66 KiB | W: | H:

assets/icons/button_back.png

3.68 KiB | W: | H:

assets/icons/button_back.png
assets/icons/button_back.png
assets/icons/button_back.png
assets/icons/button_back.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/button_shuffle.png

3.23 KiB | W: | H:

assets/icons/button_shuffle.png

3.23 KiB | W: | H:

assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
assets/icons/button_shuffle.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/difficulty_3x3.png

6.24 KiB | W: | H:

assets/icons/difficulty_3x3.png

6.24 KiB | W: | H:

assets/icons/difficulty_3x3.png
assets/icons/difficulty_3x3.png
assets/icons/difficulty_3x3.png
assets/icons/difficulty_3x3.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/difficulty_4x4.png

4.07 KiB | W: | H:

assets/icons/difficulty_4x4.png

4.07 KiB | W: | H:

assets/icons/difficulty_4x4.png
assets/icons/difficulty_4x4.png
assets/icons/difficulty_4x4.png
assets/icons/difficulty_4x4.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/difficulty_5x5.png

5.93 KiB | W: | H:

assets/icons/difficulty_5x5.png

5.94 KiB | W: | H:

assets/icons/difficulty_5x5.png
assets/icons/difficulty_5x5.png
assets/icons/difficulty_5x5.png
assets/icons/difficulty_5x5.png
  • 2-up
  • Swipe
  • Onion skin
assets/icons/game_win.png

7.72 KiB | W: | H:

assets/icons/game_win.png

7.75 KiB | W: | H:

assets/icons/game_win.png
assets/icons/game_win.png
assets/icons/game_win.png
assets/icons/game_win.png
  • 2-up
  • Swipe
  • Onion skin
Improve app metadata, include fdroid metadata in repository
fastlane/metadata/android/en-US/images/featureGraphic.png

214 B

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

16.6 KiB | W: | H:

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

16.8 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
Ajout des métadata fdroid dans le dépôt
AuthorName: 'Benoît Harrault'
Categories:
- Games
Name: Puzzle Game
AutoName: puzzlegame
License: GPL-3.0-only
WebSite: 'https://git.harrault.fr/android/org.benoitharrault.puzzlegame'
SourceCode: https://git.harrault.fr/android/org.benoitharrault.puzzlegame
IssueTracker: https://git.harrault.fr/android/org.benoitharrault.puzzlegame/issues
Changelog: https://git.harrault.fr/android/org.benoitharrault.puzzlegame/-/tags
Summary: ''
Description: |-
Puzzle game, simple and classic.
RepoType: git
Repo: 'https://git.harrault.fr/android/org.benoitharrault.puzzlegame.git'
...@@ -9,8 +9,18 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" ...@@ -9,8 +9,18 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")" BASE_DIR="$(dirname "${CURRENT_DIR}")"
SOURCE="${CURRENT_DIR}/icon.svg" SOURCE="${CURRENT_DIR}/icon.svg"
SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg"
OPTIPNG_OPTIONS="-preserve -quiet -o7" 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 # optimize svg
cp ${SOURCE} ${SOURCE}.tmp cp ${SOURCE} ${SOURCE}.tmp
scour \ scour \
...@@ -19,6 +29,7 @@ scour \ ...@@ -19,6 +29,7 @@ scour \
--enable-viewboxing \ --enable-viewboxing \
--enable-comment-stripping \ --enable-comment-stripping \
--nindent=4 \ --nindent=4 \
--quiet \
-i ${SOURCE}.tmp \ -i ${SOURCE}.tmp \
-o ${SOURCE} -o ${SOURCE}
rm ${SOURCE}.tmp rm ${SOURCE}.tmp
...@@ -28,6 +39,8 @@ function build_icon() { ...@@ -28,6 +39,8 @@ function build_icon() {
ICON_SIZE="$1" ICON_SIZE="$1"
TARGET="$2" TARGET="$2"
echo "Building ${TARGET}"
TARGET_PNG="${TARGET}.png" TARGET_PNG="${TARGET}.png"
inkscape \ inkscape \
...@@ -39,6 +52,36 @@ function build_icon() { ...@@ -39,6 +52,36 @@ function build_icon() {
optipng ${OPTIPNG_OPTIONS} ${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 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher build_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher
build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher build_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher
...@@ -46,3 +89,5 @@ build_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher ...@@ -46,3 +89,5 @@ 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 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 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_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
...@@ -7,8 +7,26 @@ command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not ...@@ -7,8 +7,26 @@ 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)" CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")" BASE_DIR="$(dirname "${CURRENT_DIR}")"
ASSETS_DIR="${BASE_DIR}/assets"
OPTIPNG_OPTIONS="-preserve -quiet -o7" OPTIPNG_OPTIONS="-preserve -quiet -o7"
ICON_SIZE=192
#######################################################
# Game images
AVAILABLE_GAME_IMAGES="
button_back
button_shuffle
game_win
"
# Settings images
AVAILABLES_GAME_SETTINGS="
difficulty:3x3,4x4,5x5
"
#######################################################
# optimize svg # optimize svg
function optimize_svg() { function optimize_svg() {
...@@ -21,6 +39,7 @@ function optimize_svg() { ...@@ -21,6 +39,7 @@ function optimize_svg() {
--enable-viewboxing \ --enable-viewboxing \
--enable-comment-stripping \ --enable-comment-stripping \
--nindent=4 \ --nindent=4 \
--quiet \
-i ${SOURCE}.tmp \ -i ${SOURCE}.tmp \
-o ${SOURCE} -o ${SOURCE}
rm ${SOURCE}.tmp rm ${SOURCE}.tmp
...@@ -28,10 +47,16 @@ function optimize_svg() { ...@@ -28,10 +47,16 @@ function optimize_svg() {
# build icons # build icons
function build_icon() { function build_icon() {
ICON_SIZE=192
SOURCE="$1" SOURCE="$1"
TARGET="$2" TARGET="$2"
echo "Building ${TARGET}"
if [ ! -f "${SOURCE}" ]; then
echo "Missing file: ${SOURCE}"
exit 1
fi
optimize_svg "${SOURCE}" optimize_svg "${SOURCE}"
inkscape \ inkscape \
...@@ -43,10 +68,35 @@ function build_icon() { ...@@ -43,10 +68,35 @@ function build_icon() {
optipng ${OPTIPNG_OPTIONS} ${TARGET} optipng ${OPTIPNG_OPTIONS} ${TARGET}
} }
# Game icons function build_settings_icons() {
build_icon ${CURRENT_DIR}/button_back.svg ${BASE_DIR}/assets/icons/button_back.png INPUT_STRING="$1"
build_icon ${CURRENT_DIR}/button_shuffle.svg ${BASE_DIR}/assets/icons/button_shuffle.png
build_icon ${CURRENT_DIR}/game_win.svg ${BASE_DIR}/assets/icons/game_win.png SETTING_NAME="$(echo "${INPUT_STRING}" | cut -d":" -f1)"
build_icon ${CURRENT_DIR}/difficulty_3x3.svg ${BASE_DIR}/assets/icons/difficulty_3x3.png SETTING_VALUES="$(echo "${INPUT_STRING}" | cut -d":" -f2 | tr "," " ")"
build_icon ${CURRENT_DIR}/difficulty_4x4.svg ${BASE_DIR}/assets/icons/difficulty_4x4.png
build_icon ${CURRENT_DIR}/difficulty_5x5.svg ${BASE_DIR}/assets/icons/difficulty_5x5.png 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.
Finish editing this message first!
Please register or to comment