build-finish: Support exporting more than hicolor icons

We really want apps to be able to export e.g. HighContrast icons too.
This commit is contained in:
Alexander Larsson
2016-10-18 10:14:10 +02:00
parent 3c2b8a92b1
commit 6345f0bae7
4 changed files with 7 additions and 1 deletions

View File

@@ -186,7 +186,7 @@ collect_exports (GFile *base, const char *app_id, gboolean is_runtime, GCancella
g_autoptr(GFile) export = NULL;
const char *app_paths[] = {
"share/applications", /* Copy desktop files */
"share/icons/hicolor", /* Icons */
"share/icons", /* Icons */
"share/dbus-1/services", /* D-Bus service files */
"share/gnome-shell/search-providers", /* Search providers */
NULL,

View File

@@ -29,6 +29,9 @@ EOF
mkdir -p ${DIR}/files/share/icons/hicolor/64x64/apps
cp $(dirname $0)/org.test.Hello.png ${DIR}/files/share/icons/hicolor/64x64/apps/
cp $(dirname $0)/org.test.Hello.png ${DIR}/files/share/icons/hicolor/64x64/apps/dont-export.png
mkdir -p ${DIR}/files/share/icons/HighContrast/64x64/apps
cp $(dirname $0)/org.test.Hello.png ${DIR}/files/share/icons/HighContrast/64x64/apps/
mkdir -p ${DIR}/files/share/app-info/xmls

View File

@@ -52,6 +52,7 @@ assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
# Ensure Exec key is rewritten
assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
# Ensure triggers ran
assert_has_file $FL_DIR/exports/share/applications/mimeinfo.cache

View File

@@ -45,6 +45,8 @@ assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
# Ensure Exec key is rewritten
assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=master --arch=$ARCH --command=hello.sh org.test.Hello$"
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
assert_not_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/dont-export.png
assert_has_file $FL_DIR/exports/share/icons/HighContrast/64x64/apps/org.test.Hello.png
# Ensure triggers ran
assert_has_file $FL_DIR/exports/share/applications/mimeinfo.cache