[desktop] Change ID from .desktop to .qt

required to publish on Flathub, and .desktop is a file extension anyway so it's a bad idea
also some improvements to metadata structure, and add branding colours
and fix the welcome message in qt

Signed-off-by: Harry Bond <me@hbond.xyz>
This commit is contained in:
Harry Bond
2025-08-09 20:21:57 +01:00
committed by x7z4w
parent 7ec05f16e5
commit 607191503c
9 changed files with 32 additions and 27 deletions

View File

@@ -3,8 +3,8 @@ on:
workflow_dispatch: # Manual trigger workflow_dispatch: # Manual trigger
pull_request: pull_request:
paths: paths:
- packaging/app.comaps.desktop.metainfo.xml - packaging/app.comaps.qt.metainfo.xml
- .forgejo/workflows/appstream-check.yaml # Run check on self change - .forgejo/workflows/appstream-check.yaml # Run check on self change
jobs: jobs:
validate-appstream: validate-appstream:
@@ -16,7 +16,7 @@ jobs:
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: | sparse-checkout: |
packaging/app.comaps.desktop.metainfo.xml packaging/app.comaps.qt.metainfo.xml
- name: Install appstream validator and flatpak Builder - name: Install appstream validator and flatpak Builder
shell: bash shell: bash
@@ -29,8 +29,8 @@ jobs:
- name: Lint appstream data with flatpak Builder - name: Lint appstream data with flatpak Builder
shell: bash shell: bash
run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.comaps.desktop.metainfo.xml run: flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream packaging/app.comaps.qt.metainfo.xml
- name: Run appstreamcli in pedantic mode - name: Run appstreamcli in pedantic mode
shell: bash shell: bash
run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.comaps.desktop.metainfo.xml run: flatpak run --command=appstreamcli org.flatpak.Builder validate --pedantic packaging/app.comaps.qt.metainfo.xml

View File

@@ -3,8 +3,8 @@ on:
workflow_dispatch: # Manual trigger workflow_dispatch: # Manual trigger
pull_request: pull_request:
paths: paths:
- qt/res/app.comaps.desktop.desktop - qt/res/app.comaps.qt.desktop
- .forgejo/workflows/desktop-file-check.yaml # Run check on self change - .forgejo/workflows/desktop-file-check.yaml # Run check on self change
jobs: jobs:
validate-desktop-file: validate-desktop-file:
@@ -16,7 +16,7 @@ jobs:
with: with:
fetch-depth: 1 fetch-depth: 1
sparse-checkout: | sparse-checkout: |
qt/res/app.comaps.desktop.desktop qt/res/app.comaps.qt.desktop
- name: Install desktop-file-validate tool - name: Install desktop-file-validate tool
shell: bash shell: bash
@@ -27,4 +27,4 @@ jobs:
- name: Validate desktop file - name: Validate desktop file
shell: bash shell: bash
run: desktop-file-validate qt/res/app.comaps.desktop.desktop && echo "Successfully validated .desktop file" run: desktop-file-validate qt/res/app.comaps.qt.desktop && echo "Successfully validated .desktop file"

View File

@@ -10,9 +10,10 @@
</head> </head>
<body> <body>
<center><h1>Offline World Map in your computer</h1></center> <center><h1>Offline World Map in your computer</h1></center>
<p>Congratulations! You're just one step away from seeing your favourite cities and countries!</p> <p>As CoMaps is an offline-first software, you'll need to download some regions.</p>
<p>Download them once and use everywhere - no internet access is needed.</p> <p>Once they are downloaded, no internet access is needed.</p>
<p>We'll try to keep you updated when new application versions and new map data become available.</p> <p>And of course, you always can check project updates on Codeberg: <a href="https://codeberg.org/comaps/comaps">https://codeberg.org/comaps/comaps</a></p>
<p>And of course, you always can check latest news on our website: <a href="https://organicmaps.app">https://organicmaps.app</a></p> <p>Or you can check our website: <a href="https://comaps.app">https://comaps.app</a></p>
</body> </body>
</html> </html>

View File

@@ -1,15 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2025 The CoMaps Community -->
<component type="desktop-application"> <component type="desktop-application">
<id>app.comaps.desktop</id> <id>app.comaps.qt</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>Apache-2.0</project_license>
<content_rating type="oars-1.1" />
<name>CoMaps</name> <name>CoMaps</name>
<summary>Free offline maps for everyone</summary>
<developer id="app.comaps"> <developer id="app.comaps">
<name>The CoMaps Community</name> <name>The CoMaps Community</name>
</developer> </developer>
<summary>Free offline maps for everyone</summary>
<metadata_license>CC0-1.0</metadata_license> <launchable type="desktop-id">app.comaps.qt.desktop</launchable>
<project_license>Apache-2.0</project_license>
<supports> <supports>
<control>pointing</control> <control>pointing</control>
@@ -17,15 +20,12 @@
<control>touch</control> <control>touch</control>
</supports> </supports>
<content_rating type="oars-1.1" />
<description> <description>
<p> <p>
CoMaps is a free Android &amp; iOS offline maps app for travellers, CoMaps is a free Android &amp; iOS offline maps app for travellers,
tourists, hikers, drivers and cyclists. tourists, hikers, drivers and cyclists.
It uses crowd-sourced OpenStreetMap data. It uses crowd-sourced OpenStreetMap data.
</p> </p>
<p>## Features</p>
<p> <p>
The Linux version of CoMaps does not have feature parity The Linux version of CoMaps does not have feature parity
with the Android and iPhone versions, and has not yet been with the Android and iPhone versions, and has not yet been
@@ -33,6 +33,11 @@
</p> </p>
</description> </description>
<branding>
<color type="primary" scheme_preference="light">#456644</color>
<color type="primary" scheme_preference="dark">#375237</color>
</branding>
<url type="homepage">https://comaps.app</url> <url type="homepage">https://comaps.app</url>
<url type="bugtracker">https://codeberg.org/comaps/comaps/issues</url> <url type="bugtracker">https://codeberg.org/comaps/comaps/issues</url>
<url type="faq">https://www.comaps.app/support/</url> <url type="faq">https://www.comaps.app/support/</url>
@@ -43,7 +48,6 @@
<url type="vcs-browser">https://codeberg.org/comaps/comaps</url> <url type="vcs-browser">https://codeberg.org/comaps/comaps</url>
<url type="contribute">https://codeberg.org/comaps/comaps/src/branch/main/docs/CONTRIBUTING.md</url> <url type="contribute">https://codeberg.org/comaps/comaps/src/branch/main/docs/CONTRIBUTING.md</url>
<launchable type="desktop-id">app.comaps.desktop.desktop</launchable>
<screenshots> <screenshots>
<screenshot type="default" environment="plasma"> <screenshot type="default" environment="plasma">
<image>https://www.comaps.app/images/screenshots/Desktop_light_routing.png</image> <image>https://www.comaps.app/images/screenshots/Desktop_light_routing.png</image>
@@ -64,7 +68,7 @@
</screenshots> </screenshots>
<releases> <releases>
<release version="2025.07.13-9" date="2025-08-07"> <release version="2025.07.13-9" date="2025-08-09">
<description> <description>
<p>CoMaps is now on Linux!</p> <p>CoMaps is now on Linux!</p>
</description> </description>

View File

@@ -61,7 +61,7 @@ static location::TLocationSource qStringToTLocationSource(QString const & source
QtLocationService::QtLocationService(location::LocationObserver & observer, std::string const & sourceName) : LocationService(observer) QtLocationService::QtLocationService(location::LocationObserver & observer, std::string const & sourceName) : LocationService(observer)
{ {
QVariantMap params; QVariantMap params;
params["desktopId"] = "app.organicmaps.desktop"; params["desktopId"] = "app.comaps.qt";
m_positionSource = QGeoPositionInfoSource::createSource(QString::fromStdString(sourceName), params, this); m_positionSource = QGeoPositionInfoSource::createSource(QString::fromStdString(sourceName), params, this);
if (!m_positionSource) if (!m_positionSource)

View File

@@ -137,8 +137,8 @@ install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/)
install(DIRECTORY ${OMIM_ROOT}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/share/comaps/) install(DIRECTORY ${OMIM_ROOT}/data DESTINATION ${CMAKE_INSTALL_PREFIX}/share/comaps/)
if (PLATFORM_LINUX) if (PLATFORM_LINUX)
install(FILES ${OMIM_ROOT}/packaging/app.comaps.desktop.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/) install(FILES ${OMIM_ROOT}/packaging/app.comaps.qt.metainfo.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/)
install(FILES ${OMIM_ROOT}/qt/res/app.comaps.desktop.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/) install(FILES ${OMIM_ROOT}/qt/res/app.comaps.qt.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/)
install(FILES ${OMIM_ROOT}/qt/res/logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps/ RENAME comaps.png) install(FILES ${OMIM_ROOT}/qt/res/logo.png DESTINATION ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/512x512/apps/ RENAME comaps.png)
endif() endif()

View File

@@ -133,7 +133,7 @@ int main(int argc, char * argv[])
UNUSED_VALUE(mainGuard); UNUSED_VALUE(mainGuard);
QApplication app(argc, argv); QApplication app(argc, argv);
app.setDesktopFileName("app.comaps.desktop"); app.setDesktopFileName("app.comaps.qt");
platform.SetupMeasurementSystem(); platform.SetupMeasurementSystem();

View File

@@ -24,7 +24,7 @@
<string>@BUNDLE_EXECUTABLE@</string> <string>@BUNDLE_EXECUTABLE@</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>app.organicmaps.desktop</string> <string>app.comaps.qt</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string>NSApplication</string> <string>NSApplication</string>