Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: atlas.flatpak
manifest-path: build-aux/appcenter/com.github.ryonakano.atlas.Devel.yml
manifest-path: com.github.ryonakano.atlas.yml
run-tests: true
repository-name: appcenter
repository-url: https://flatpak.elementary.io/repo.flatpakrepo
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/flatpak-x-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Update development manifest
uses: docker://ghcr.io/flathub/flatpak-external-data-checker:latest
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_COMMITTER_NAME: github-actions[bot]
# email sets "github-actions[bot]" as commit author, see https://github.com/orgs/community/discussions/26560
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# use --edit-only instead of --update to create single PR that updates all manifests
args: --edit-only --never-fork build-aux/appcenter/com.github.ryonakano.atlas.Devel.yml

- name: Update stable manifest
uses: docker://ghcr.io/flathub/flatpak-external-data-checker:latest
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build dirs
.flatpak-builder
builddir*
build*

# vim
*.swp
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ flatpak remote-add --user --if-not-exists appcenter https://flatpak.elementary.i
To build and install, use `flatpak-builder`, then execute with `flatpak run`:

```
flatpak-builder builddir --user --install --force-clean --install-deps-from=appcenter build-aux/appcenter/com.github.ryonakano.atlas.Devel.yml
flatpak run com.github.ryonakano.atlas.Devel
flatpak-builder builddir --user --install --force-clean --install-deps-from=appcenter com.github.ryonakano.atlas.yml
flatpak run com.github.ryonakano.atlas
```

### From Source Code (Native)
Expand All @@ -42,7 +42,7 @@ You'll need the following dependencies:
* libgranite-7-dev (>= 7.2.0)
* libgtk-4-dev
* libshumate-dev
* meson (>= 0.58.0)
* meson (>= 0.57.0)
* valac

Run `meson setup` to configure the build environment and run `meson compile` to build:
Expand Down
6 changes: 3 additions & 3 deletions data/atlas.desktop.in.in → data/atlas.desktop.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[Desktop Entry]
Name=@APP_NAME@
Name=Atlas
GenericName=Map
Comment=View where to go
Categories=GTK;Utility;Science;Maps;
Exec=@APP_ID@
Icon=@APP_ID@
Exec=com.github.ryonakano.atlas
Icon=com.github.ryonakano.atlas
Type=Application
Terminal=false
Keywords=Trip;Explore;
2 changes: 1 addition & 1 deletion data/atlas.gschema.xml.in → data/atlas.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<value value="1" nick="transport"/>
</enum>

<schema path="/com/github/ryonakano/atlas/" id="@APP_ID@">
<schema path="/com/github/ryonakano/atlas/" id="com.github.ryonakano.atlas">
<key type="d" name="latitude">
<default>51.2840</default>
<summary>Latitude</summary>
Expand Down
10 changes: 5 additions & 5 deletions data/atlas.metainfo.xml.in.in → data/atlas.metainfo.xml.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014-2015 Atlas Developers, 2018-2025 Ryo Nakano -->
<component type="desktop-application">
<id>@APP_ID@</id>
<launchable type="desktop-id">@APP_ID@.desktop</launchable>
<translation type="gettext">@GETTEXT_PACKAGE@</translation>
<id>com.github.ryonakano.atlas</id>
<launchable type="desktop-id">com.github.ryonakano.atlas.desktop</launchable>
<translation type="gettext">com.github.ryonakano.atlas</translation>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>

Expand All @@ -26,11 +26,11 @@
<screenshots>
<screenshot type="default" environment="pantheon">
<caption>See locations on a map</caption>
<image>https://raw.githubusercontent.com/ryonakano/atlas/@VERSION@/data/screenshots/screenshot-light.png</image>
<image>https://raw.githubusercontent.com/ryonakano/atlas/3.1.0/data/screenshots/screenshot-light.png</image>
</screenshot>
<screenshot environment="pantheon:dark">
<caption>See locations on a map</caption>
<image>https://raw.githubusercontent.com/ryonakano/atlas/@VERSION@/data/screenshots/screenshot-dark.png</image>
<image>https://raw.githubusercontent.com/ryonakano/atlas/3.1.0/data/screenshots/screenshot-dark.png</image>
</screenshot>
</screenshots>

Expand Down
43 changes: 8 additions & 35 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,30 @@ icon_sizes = ['16', '24', '32', '48', '64', '128']
foreach i : icon_sizes
install_data(
'icons' / i / meson.project_name() + '.png',
rename: app_id + '.png',
rename: meson.project_name() + '.png',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps'
)
endforeach

desktop_conf = configuration_data()
desktop_conf.set('APP_NAME', app_name)
desktop_conf.set('APP_ID', app_id)
desktop_file_in = configure_file(
input: 'atlas.desktop.in.in',
output: '@0@.desktop.in'.format(app_id),
configuration: desktop_conf
)

desktop_file = i18n.merge_file(
input: desktop_file_in,
output: '@0@.desktop'.format(app_id),
i18n.merge_file(
input: 'atlas.desktop.in',
output: meson.project_name() + '.desktop',
po_dir: meson.project_source_root() / 'po',
type: 'desktop',
install: true,
install_dir: get_option('datadir') / 'applications'
)

appstream_conf = configuration_data()
appstream_conf.set('APP_ID', app_id)
appstream_conf.set('GETTEXT_PACKAGE', meson.project_name())
appstream_conf.set('VERSION', meson.project_version())
appstream_file_in = configure_file(
input: 'atlas.metainfo.xml.in.in',
output: '@0@.metainfo.xml.in'.format(app_id),
configuration: appstream_conf
)

appstream_file = i18n.merge_file(
input: appstream_file_in,
output: '@0@.metainfo.xml'.format(app_id),
i18n.merge_file(
input: 'atlas.metainfo.xml.in',
output: meson.project_name() + '.metainfo.xml',
po_dir: meson.project_source_root() / 'po',
install: true,
install_dir: get_option('datadir') / 'metainfo'
)

gschema_conf = configuration_data()
gschema_conf.set('APP_ID', app_id)
gschema_file = configure_file(
input: 'atlas.gschema.xml.in',
output: '@0@.gschema.xml'.format(app_id),
configuration: gschema_conf
)

install_data(
gschema_file,
'atlas.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas'
)

Expand Down
9 changes: 1 addition & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@ project(
'com.github.ryonakano.atlas',
'vala', 'c',
version: '3.1.0',
meson_version: '>=0.58.0'
meson_version: '>=0.57.0'
)

app_name = 'Atlas'
app_id = meson.project_name()
if get_option('development')
app_name += ' (Development)'
app_id += '.Devel'
endif

gnome = import('gnome')
i18n = import('i18n')

Expand Down
1 change: 0 additions & 1 deletion meson_options.txt

This file was deleted.

4 changes: 2 additions & 2 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data/atlas.desktop.in.in
data/atlas.metainfo.xml.in.in
data/atlas.desktop.in
data/atlas.metainfo.xml.in
src/Application.vala
src/MainWindow.vala
7 changes: 3 additions & 4 deletions src/Application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ public class Atlas.Application : Adw.Application {

public Application () {
Object (
application_id: Config.APP_ID,
flags: ApplicationFlags.DEFAULT_FLAGS,
resource_base_path: Config.RESOURCE_PREFIX
application_id: "com.github.ryonakano.atlas",
flags: ApplicationFlags.DEFAULT_FLAGS
);
}

static construct {
settings = new Settings (Config.APP_ID);
settings = new Settings ("com.github.ryonakano.atlas");
}

private void setup_style () {
Expand Down
2 changes: 0 additions & 2 deletions src/Config.vala.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
namespace Config {
public const string LOCALEDIR = @LOCALEDIR@;
public const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@;
public const string APP_ID = @APP_ID@;
public const string RESOURCE_PREFIX = @RESOURCE_PREFIX@;
}
5 changes: 0 additions & 5 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ public class Atlas.MainWindow : Adw.ApplicationWindow {
private MapWidget map_widget;

construct {
// Distinct development build visually
if (".Devel" in Config.APP_ID) {
add_css_class ("devel");
}

title = "Atlas";
add_action_entries (ACTION_ENTRIES, this);

Expand Down
2 changes: 1 addition & 1 deletion src/MapWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class Atlas.MapWidget : Gtk.Box {
GClue.Simple? simple = null;

try {
simple = yield new GClue.Simple (Config.APP_ID, GClue.AccuracyLevel.EXACT, null);
simple = yield new GClue.Simple ("com.github.ryonakano.atlas", GClue.AccuracyLevel.EXACT, null);
} catch (Error e) {
warning ("Failed to connect to GeoClue2 service: %s", e.message);
}
Expand Down
4 changes: 1 addition & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
config_data = configuration_data()
config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
config_data.set_quoted('APP_ID', app_id)
config_data.set_quoted('RESOURCE_PREFIX', '/' + meson.project_name().replace('.', '/'))
config_file = configure_file(
input: 'Config.vala.in',
output: '@BASENAME@',
Expand Down Expand Up @@ -30,7 +28,7 @@ sources = files(
)

executable(
app_id,
meson.project_name(),
asresources,
config_file,
sources,
Expand Down