diff options
author | Stefan Wildemann <metalstrolch@users.noreply.github.com> | 2022-05-23 14:01:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 14:01:57 +0200 |
commit | 6c1762ab48aa2d7a32d63d538a15282daa5dd941 (patch) | |
tree | e2299eb46ce91646043c5636f18dc467cf99f08e /navit | |
parent | f93a8df9c0f7967a40b12293873da6d5b53c1133 (diff) | |
download | navit-6c1762ab48aa2d7a32d63d538a15282daa5dd941.tar.gz |
fix:sailfish:enable sandboxing for sailfish OS. (#1182)
* FIX:graphics:qt5 switch path of navit qml to org.navitproject
Android uses org/navitproject/navit so do we on qt5 now
* FEATURE:core: allow to configure linux home config dir
* FIX:sailfish: configure to enable sailjail
* CI: remove docker install step from sailfish
* SAILFISH: bump release version to .2
* fix:sailfish: add Audio perrmission for espeak
Diffstat (limited to 'navit')
-rw-r--r-- | navit/graphics/qt5/graphics_qt5.cpp | 4 | ||||
-rw-r--r-- | navit/graphics/qt5/graphics_qt5.qml | 2 | ||||
-rw-r--r-- | navit/graphics/qt5/loader.qml | 2 | ||||
-rw-r--r-- | navit/gui/qt5_qml/skins/modern/bookmark.qml | 2 | ||||
-rw-r--r-- | navit/gui/qt5_qml/skins/modern/main.qml | 2 | ||||
-rw-r--r-- | navit/gui/qt5_qml/skins/modern/poi.qml | 2 | ||||
-rw-r--r-- | navit/icons/desktop_icons/navit.desktop.in | 5 | ||||
-rw-r--r-- | navit/main.c | 2 | ||||
-rw-r--r-- | navit/navit.c | 2 | ||||
-rw-r--r-- | navit/xslt/sailfish_mapset.xslt | 4 |
10 files changed, 17 insertions, 10 deletions
diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp index 7d157935e..69edd65a0 100644 --- a/navit/graphics/qt5/graphics_qt5.cpp +++ b/navit/graphics/qt5/graphics_qt5.cpp @@ -1018,6 +1018,8 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics #else navit_app = new QGuiApplication(graphics_priv->argc, graphics_priv->argv); #endif + navit_app->setOrganizationName(QStringLiteral("org.navitproject")); + navit_app->setApplicationName(QStringLiteral("navit")); #if HAVE_FREETYPE graphics_priv->font_freetype_new = font_freetype_new; @@ -1044,7 +1046,7 @@ static struct graphics_priv* graphics_qt5_new(struct navit* nav, struct graphics graphics_priv->GPriv = NULL; if (use_qml) { /* register our QtQuick widget to allow it's usage within QML */ - qmlRegisterType<QNavitQuick>("com.navit.graphics_qt5", 1, 0, "QNavitQuick"); + qmlRegisterType<QNavitQuick>("org.navitproject.graphics_qt5", 1, 0, "QNavitQuick"); /* get our qml application from embedded resources. May be replaced by the * QtQuick gui component if enabled */ graphics_priv->engine = new QQmlApplicationEngine(); diff --git a/navit/graphics/qt5/graphics_qt5.qml b/navit/graphics/qt5/graphics_qt5.qml index 5f6056b26..1451407d0 100644 --- a/navit/graphics/qt5/graphics_qt5.qml +++ b/navit/graphics/qt5/graphics_qt5.qml @@ -1,4 +1,4 @@ -import com.navit.graphics_qt5 1.0 +import org.navitproject.graphics_qt5 1.0 import QtQuick 2.2 import QtQuick.Window 2.0 diff --git a/navit/graphics/qt5/loader.qml b/navit/graphics/qt5/loader.qml index 29dcb7832..abc3dd36f 100644 --- a/navit/graphics/qt5/loader.qml +++ b/navit/graphics/qt5/loader.qml @@ -1,4 +1,4 @@ -import com.navit.graphics_qt5 1.0 +import org.navitproject.graphics_qt5 1.0 import QtQuick 2.2 import QtQuick.Window 2.0 diff --git a/navit/gui/qt5_qml/skins/modern/bookmark.qml b/navit/gui/qt5_qml/skins/modern/bookmark.qml index 66261576c..3eb87c17b 100644 --- a/navit/gui/qt5_qml/skins/modern/bookmark.qml +++ b/navit/gui/qt5_qml/skins/modern/bookmark.qml @@ -1,6 +1,6 @@ import QtQuick 2.0 import QtQuick.Layouts 1.0 -import com.navit.graphics_qt5 1.0 +import org.navitproject.graphics_qt5 1.0 Item { diff --git a/navit/gui/qt5_qml/skins/modern/main.qml b/navit/gui/qt5_qml/skins/modern/main.qml index 5ffd1de3e..ce3574f7c 100644 --- a/navit/gui/qt5_qml/skins/modern/main.qml +++ b/navit/gui/qt5_qml/skins/modern/main.qml @@ -1,4 +1,4 @@ -import com.navit.graphics_qt5 1.0 +import org.navitproject.graphics_qt5 1.0 import QtQuick 2.2 Rectangle { diff --git a/navit/gui/qt5_qml/skins/modern/poi.qml b/navit/gui/qt5_qml/skins/modern/poi.qml index 36168ecfe..3afac68fd 100644 --- a/navit/gui/qt5_qml/skins/modern/poi.qml +++ b/navit/gui/qt5_qml/skins/modern/poi.qml @@ -1,6 +1,6 @@ import QtQuick 2.0 import QtQuick.Layouts 1.0 -import com.navit.graphics_qt5 1.0 +import org.navitproject.graphics_qt5 1.0 Item { diff --git a/navit/icons/desktop_icons/navit.desktop.in b/navit/icons/desktop_icons/navit.desktop.in index 5dc1bcfc8..29fe4d8d1 100644 --- a/navit/icons/desktop_icons/navit.desktop.in +++ b/navit/icons/desktop_icons/navit.desktop.in @@ -16,3 +16,8 @@ Categories=GTK;Utility;Geography; GenericName=Navit GenericName[de]=Navit X-Nemo-Application-Type=no-invoker +#sailfish jail. Doesn't hurt others hopefully +[X-Sailjail] +Permissions=Documents;Location;RemovableMedia;Audio +OrganizationName=org.navitproject +ApplicationName=navit diff --git a/navit/main.c b/navit/main.c index 0faf44485..550483a41 100644 --- a/navit/main.c +++ b/navit/main.c @@ -93,7 +93,7 @@ static char *environment_vars[][6]= { {"NAVIT_LIBDIR", ":", ":/"LIB_DIR, ":\\lib", ":/lib", ":\\lib"}, {"NAVIT_SHAREDIR", ":", ":/"SHARE_DIR, ":", ":/share", ":"}, {"NAVIT_LOCALEDIR", ":/../locale",":/"LOCALE_DIR, ":\\locale", ":/locale", ":\\locale"}, - {"NAVIT_USER_DATADIR",":", "~/.navit", ":\\data", ":/home", "~\\navit"}, + {"NAVIT_USER_DATADIR",":", "~/"HOMECONFIG_DIR, ":\\data", ":/home", "~\\navit"}, {"NAVIT_LOGFILE", NULL, NULL, ":\\navit.log",NULL, ":\\navit.log"}, {"NAVIT_LIBPREFIX", "*/.libs/", NULL, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL, NULL}, diff --git a/navit/navit.c b/navit/navit.c index fc1c973a0..d3ef113f5 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -377,7 +377,7 @@ char* navit_get_user_data_directory(int create) { dir = getenv("NAVIT_USER_DATADIR"); if (create && !file_exists(dir)) { dbg(lvl_debug,"creating dir %s", dir); - if (file_mkdir(dir,0)) { + if (file_mkdir(dir,1)) { dbg(lvl_error,"failed creating dir %s", dir); return NULL; } diff --git a/navit/xslt/sailfish_mapset.xslt b/navit/xslt/sailfish_mapset.xslt index 2febc81f4..61d85deec 100644 --- a/navit/xslt/sailfish_mapset.xslt +++ b/navit/xslt/sailfish_mapset.xslt @@ -17,9 +17,9 @@ <xsl:text>
 </xsl:text> <map type="binfile" enabled="yes" active="no" data="/usr/share/harbour-navit/maps/osm_bbox_11.3,47.9,11.7,48.2.bin"/> <xsl:text>
 </xsl:text> - <map type="binfile" enabled="yes" data="~/Maps/map.navit.bin"/> + <map type="binfile" enabled="yes" data="~/Documents/map.navit.bin"/> <xsl:text>
 </xsl:text> - <map type="binfile" enabled="yes" active="no" name="map.navit.heightlines.bin" data="~/Maps/map.navit.heightlines.bin"/> + <map type="binfile" enabled="yes" active="no" name="map.navit.heightlines.bin" data="~/Documents/map.navit.heightlines.bin"/> <xsl:text>
 </xsl:text> </mapset> <xsl:text>
 </xsl:text> |