diff --git a/data/writeas-gtk.appdata.xml.in b/data/com.abunchtell.WriteAsDesktop.appdata.xml.in similarity index 100% rename from data/writeas-gtk.appdata.xml.in rename to data/com.abunchtell.WriteAsDesktop.appdata.xml.in diff --git a/data/writeas-gtk.desktop.in b/data/com.abunchtell.WriteAsDesktop.desktop.in similarity index 100% rename from data/writeas-gtk.desktop.in rename to data/com.abunchtell.WriteAsDesktop.desktop.in diff --git a/data/icons/128/writeas-gtk.png b/data/icons/128/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/128/writeas-gtk.png rename to data/icons/128/com.abunchtell.WriteAsDesktop.png diff --git a/data/icons/16/writeas-gtk.png b/data/icons/16/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/16/writeas-gtk.png rename to data/icons/16/com.abunchtell.WriteAsDesktop.png diff --git a/data/icons/24/writeas-gtk.png b/data/icons/24/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/24/writeas-gtk.png rename to data/icons/24/com.abunchtell.WriteAsDesktop.png diff --git a/data/icons/32/writeas-gtk.png b/data/icons/32/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/32/writeas-gtk.png rename to data/icons/32/com.abunchtell.WriteAsDesktop.png diff --git a/data/icons/48/writeas-gtk.png b/data/icons/48/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/48/writeas-gtk.png rename to data/icons/48/com.abunchtell.WriteAsDesktop.png diff --git a/data/icons/64/writeas-gtk.png b/data/icons/64/com.abunchtell.WriteAsDesktop.png similarity index 100% rename from data/icons/64/writeas-gtk.png rename to data/icons/64/com.abunchtell.WriteAsDesktop.png diff --git a/data/meson.build b/data/meson.build index 73b7444..be9fec1 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,24 +1,24 @@ icon_sizes = ['16', '24', '32', '48', '64', '128'] foreach i : icon_sizes install_data( - join_paths('icons', i, meson.project_name() + '.png'), + join_paths('icons', i, 'com.abunchtell.WriteAsDesktop.png'), install_dir: join_paths(get_option('datadir'), 'icons', 'hicolor', i + 'x' + i, 'apps'), rename: '@0@.png'.format(app_id) ) endforeach data_conf = configuration_data() data_conf.set('app_id', app_id) configure_file( - input: 'writeas-gtk.desktop.in', + input: 'com.abunchtell.WriteAsDesktop.desktop.in', output: '@0@.desktop'.format(app_id), configuration: data_conf, install_dir: join_paths(get_option('datadir'), 'applications') ) configure_file( - input: 'writeas-gtk.appdata.xml.in', + input: 'com.abunchtell.WriteAsDesktop.appdata.xml.in', output: '@0@.appdata.xml'.format(app_id), configuration: data_conf, install_dir: join_paths(get_option('datadir'), 'metainfo') ) diff --git a/meson.build b/meson.build index 00b1074..23a648f 100644 --- a/meson.build +++ b/meson.build @@ -1,29 +1,29 @@ project('writeas-gtk', ['vala', 'c'], version: '1.0.2', license: 'GPL', meson_version: '>=0.46.0') i18n = import('i18n') build_platform = get_option('platform') if build_platform == 'elementary' app_id = 'com.github.writeas.writeas-gtk' else - app_id = 'writeas-gtk' + app_id = 'com.abunchtell.WriteAsDesktop' endif conf = configuration_data() conf.set_quoted('GETTEXT_PACKAGE', app_id) conf.set_quoted('APP_ID', app_id) conf.set_quoted('BUILD_PLATFORM', build_platform) config_h = configure_file(output: 'config.h', configuration: conf) config_h_dir = include_directories('.') run_target('build', command: 'meson/build-cli.sh') subdir('data') subdir('src') subdir('fonts/lora') meson.add_install_script('meson/post_install.py') diff --git a/src/application.vala b/src/application.vala index 848daa9..c77e3c9 100644 --- a/src/application.vala +++ b/src/application.vala @@ -1,44 +1,44 @@ /* Copyright © 2018 Write.as This file is part of the Write.as GTK desktop app. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ extern const string APP_ID; extern const string BUILD_PLATFORM; public class WriteAs.Application : Gtk.Application { construct { this.flags |= ApplicationFlags.HANDLES_OPEN; Intl.setlocale(LocaleCategory.ALL, ""); Intl.textdomain("write.as"); - application_id = APP_ID + ".desktop"; + application_id = APP_ID; } public override void activate() { if (get_windows().length() == 0) new WriteAs.MainWindow(this).show_all(); } public override void open(File[] files, string hint) { activate(); // ensure we have a window open. } public static int main(string[] args) { return new WriteAs.Application().run(args); } } diff --git a/src/meson.build b/src/meson.build index 75de727..6e68eae 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,11 +1,17 @@ -executable(app_id, +if build_platform == 'elementary' + executable = 'com.github.writeas.writeas-gtk' +else + executable = 'writeas-gtk' +endif + +executable(executable, 'application.vala', 'window.vala', 'Granite/Accels.vala', 'Granite/ModeSwitch.vala', c_args: ['-include', 'config.h'], link_args: '-lm', dependencies: [dependency('gtk+-3.0'), dependency('gtksourceview-3.0')], install: true )