2019-07-22 20:35:46 +01:00
|
|
|
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
|
2020-02-08 05:28:43 +00:00
|
|
|
index 52b222ea..9489441f 100644
|
2018-07-19 09:52:59 +01:00
|
|
|
--- a/common/flatpak-dir.c
|
|
|
|
+++ b/common/flatpak-dir.c
|
2020-02-08 05:28:43 +00:00
|
|
|
@@ -6956,7 +6956,7 @@ export_desktop_file (const char *app,
|
2018-07-19 09:52:59 +01:00
|
|
|
|
|
|
|
new_exec = g_string_new ("");
|
|
|
|
g_string_append_printf (new_exec,
|
|
|
|
- FLATPAK_BINDIR "/flatpak run --branch=%s --arch=%s",
|
|
|
|
+ "flatpak run --branch=%s --arch=%s",
|
|
|
|
escaped_branch,
|
|
|
|
escaped_arch);
|
|
|
|
|
2020-02-08 05:28:43 +00:00
|
|
|
@@ -8290,8 +8290,8 @@ flatpak_dir_deploy (FlatpakDir *self,
|
2018-07-19 09:52:59 +01:00
|
|
|
error))
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
- bin_data = g_strdup_printf ("#!/bin/sh\nexec %s/flatpak run --branch=%s --arch=%s %s \"$@\"\n",
|
|
|
|
- FLATPAK_BINDIR, escaped_branch, escaped_arch, escaped_app);
|
|
|
|
+ bin_data = g_strdup_printf ("#!/bin/sh\nexec flatpak run --branch=%s --arch=%s %s \"$@\"\n",
|
|
|
|
+ escaped_branch, escaped_arch, escaped_app);
|
|
|
|
if (!g_file_replace_contents (wrapper, bin_data, strlen (bin_data), NULL, FALSE,
|
|
|
|
G_FILE_CREATE_REPLACE_DESTINATION, NULL, cancellable, error))
|
|
|
|
return FALSE;
|
|
|
|
diff --git a/tests/test-bundle.sh b/tests/test-bundle.sh
|
2020-02-08 05:28:43 +00:00
|
|
|
index d1682344..5e2b9a97 100755
|
2018-07-19 09:52:59 +01:00
|
|
|
--- a/tests/test-bundle.sh
|
|
|
|
+++ b/tests/test-bundle.sh
|
2020-02-08 05:28:43 +00:00
|
|
|
@@ -67,7 +67,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/files
|
2018-07-19 09:52:59 +01:00
|
|
|
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/master/active/export
|
|
|
|
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
|
|
|
|
# Ensure Exec key is rewritten
|
2019-07-22 20:35:46 +01:00
|
|
|
-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_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$"
|
2018-07-19 09:52:59 +01:00
|
|
|
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
|
|
|
|
|
|
|
|
diff --git a/tests/test-run.sh b/tests/test-run.sh
|
2020-02-08 05:28:43 +00:00
|
|
|
index fecb756e..64043281 100644
|
2018-07-19 09:52:59 +01:00
|
|
|
--- a/tests/test-run.sh
|
|
|
|
+++ b/tests/test-run.sh
|
2019-07-22 20:35:46 +01:00
|
|
|
@@ -45,7 +45,7 @@ assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/files
|
|
|
|
assert_has_dir $FL_DIR/app/org.test.Hello/$ARCH/stable/active/export
|
2018-07-19 09:52:59 +01:00
|
|
|
assert_has_file $FL_DIR/exports/share/applications/org.test.Hello.desktop
|
|
|
|
# Ensure Exec key is rewritten
|
2019-07-22 20:35:46 +01:00
|
|
|
-assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=.*/flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
|
|
|
+assert_file_has_content $FL_DIR/exports/share/applications/org.test.Hello.desktop "^Exec=flatpak run --branch=stable --arch=$ARCH --command=hello\.sh org\.test\.Hello$"
|
2020-02-08 05:28:43 +00:00
|
|
|
assert_has_file $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini
|
|
|
|
assert_file_has_content $FL_DIR/exports/share/gnome-shell/search-providers/org.test.Hello.search-provider.ini "^DefaultDisabled=true$"
|
2018-07-19 09:52:59 +01:00
|
|
|
assert_has_file $FL_DIR/exports/share/icons/hicolor/64x64/apps/org.test.Hello.png
|