diff --git a/.gitignore b/.gitignore index 95b6d2f..bae9d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ build/lib.linux-x86_64-2.7 *.pyc __pycache__/ build/ +_build/ debian/uberwriter/DEBIAN debian/uberwriter/opt debian/uberwriter/usr diff --git a/Makefile b/Makefile deleted file mode 100644 index 4e6ad1e..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: - python3 ./setup.py build - -install: - python3 ./setup.py install --prefix=/app --skip-build --optimize=1 - diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 8b13789..0000000 --- a/autogen.sh +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bin/uberwriter b/bin/uberwriter deleted file mode 100755 index 69fcd8b..0000000 --- a/bin/uberwriter +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/python3 -# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- -### BEGIN LICENSE -# Copyright (C) 2012, Wolf Vollprecht -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 3, as published -# by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranties of -# MERCHANTABILITY, SATISFACTORY QUALITY, 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 . -### END LICENSE - -### DO NOT EDIT THIS FILE ### - -import sys -import os - -import pkg_resources - -import gettext -import locale - -# Add project root directory (enable symlink and trunk execution) -PROJECT_ROOT_DIRECTORY = os.path.abspath( - os.path.dirname(os.path.dirname(os.path.realpath(sys.argv[0])))) - -# Set the path if needed. This allows uberwriter to run without installing it :) -python_path = [] -if os.path.abspath(__file__).startswith('/opt'): - gettext.bindtextdomain('uberwriter', '/opt/extras.ubuntu.com/uberwriter/share/locale') - syspath = sys.path[:] # copy to avoid infinite loop in pending objects - for path in syspath: - opt_path = path.replace('/usr', '/opt/extras.ubuntu.com/uberwriter') - python_path.insert(0, opt_path) - sys.path.insert(0, opt_path) - os.putenv("XDG_DATA_DIRS", "%s:%s" % ("/opt/extras.ubuntu.com/uberwriter/share/", os.getenv("XDG_DATA_DIRS", "/usr/local/share/:/usr/share/"))) -if (os.path.exists(os.path.join(PROJECT_ROOT_DIRECTORY, 'uberwriter')) - and PROJECT_ROOT_DIRECTORY not in sys.path): - python_path.insert(0, PROJECT_ROOT_DIRECTORY) - sys.path.insert(0, PROJECT_ROOT_DIRECTORY) -if python_path: - os.putenv('PYTHONPATH', "%s:%s" % (os.getenv('PYTHONPATH', ''), ':'.join(python_path))) # for subprocesses - -import uberwriter - -locale_dir = os.path.abspath(os.path.join(os.path.dirname(uberwriter.__file__),'../po/')) - -# L10n -locale.textdomain('uberwriter') -locale.bindtextdomain('uberwriter', locale_dir) -gettext.textdomain('uberwriter') -gettext.bindtextdomain('uberwriter', locale_dir) - -uberwriter.main() diff --git a/flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml b/build-aux/flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml similarity index 86% rename from flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml rename to build-aux/flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml index d789ef2..ad5ad4b 100644 --- a/flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml +++ b/build-aux/flatpak/de.wolfvollprecht.UberWriter.Plugin.TexLive.appdata.xml @@ -1,11 +1,11 @@ de.wolfvollprecht.UberWriter.Plugin.TexLive - de.wolfvollprecht.UberWriter.desktop + de.wolfvollprecht.UberWriter TexLive Plugin Allows to export to pdf and to show formulas in the inline preview https://www.tug.org/texlive// LPPL CC0-1.0 w.vollprecht_AT_gmail.com - \ No newline at end of file + diff --git a/build-aux/flatpak/de.wolfvollprecht.UberWriter.json b/build-aux/flatpak/de.wolfvollprecht.UberWriter.json new file mode 100644 index 0000000..f622a1e --- /dev/null +++ b/build-aux/flatpak/de.wolfvollprecht.UberWriter.json @@ -0,0 +1,102 @@ +{ + "app-id": "de.wolfvollprecht.UberWriter", + "runtime": "org.gnome.Platform", + "runtime-version": "3.32", + "sdk": "org.gnome.Sdk", + "command": "uberwriter", + "finish-args": [ + "--socket=x11", + "--share=ipc", + "--filesystem=host", + "--env=IN_FLATPAK=1", + "--filesystem=xdg-run/dconf", + "--filesystem=~/.config/dconf:ro", + "--talk-name=ca.desrt.dconf", + "--env=DCONF_USER_CONFIG_DIR=.config/dconf", + "--env=XDG_DATA_DIRS=/app/usr/share", + "--env=PATH=/app/extensions/TexLive/bin:/app/extensions/TexLive/2018/bin/x86_64-linux:/app/usr/bin:/app/bin" + ], + "add-extensions": { + "de.wolfvollprecht.UberWriter.Plugin": { + "directory": "extensions", + "version": "stable", + "subdirectories": true, + "no-autodownload": true, + "autodelete": true + } + }, + "modules": [{ + "name": "uberwriter", + "buildsystem": "meson", + "sources": [{ + "type" : "git", + "url" : "../", + "branch" : "refactoring" + }], + "post-install": [ + "install -d /app/extensions" + ] + }, + { + "name": "pandoc", + "only-arches": [ + "x86_64" + ], + "buildsystem": "simple", + "build-commands": [ + "cp bin/pandoc /app/usr/bin/pandoc", + "cp bin/pandoc-citeproc /app/usr/bin/pandoc-citeproc" + ], + "sources": [{ + "type": "archive", + "url": "https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-linux.tar.gz", + "sha256": "06ecd882e42ef9b7390b1c82e1e71b3ea48679181289b9b810a8797825bed8ed" + }] + }, + { + "name": "pipdeps", + "buildsystem": "simple", + "build-commands": [ + "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} pyenchant regex pypandoc" + ], + "sources": [{ + "type": "file", + "url": "https://files.pythonhosted.org/packages/5d/c1/45947333669b31bc6b4933308dd07c2aa2fedcec0a95b14eedae993bd449/wheel-0.31.0.tar.gz", + "sha256": "1ae8153bed701cb062913b72429bcf854ba824f973735427681882a688cb55ce" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz", + "sha256": "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz", + "sha256": "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/a2/51/c39562cfed3272592c60cfd229e5464d715b78537e332eac2b695422dc49/regex-2018.02.21.tar.gz", + "sha256": "b44624a38d07d3c954c84ad302c29f7930f4bf01443beef5589e9157b14e2a29" + }, + { + "type": "file", + "url": "https://files.pythonhosted.org/packages/9e/54/04d88a59efa33fefb88133ceb638cdf754319030c28aadc5a379d82140ed/pyenchant-2.0.0.tar.gz", + "sha256": "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0" + }] + }, + { + "name": "fonts", + "buildsystem": "simple", + "build-commands": [ + "mkdir -p /app/share/fonts/", + "cp ttf/* /app/share/fonts/" + ], + "sources": [{ + "type": "git", + "url": "https://github.com/mozilla/Fira", + "tag": "4.202" + }] + } + ] +} diff --git a/flatpak/flatpak_gnome_web_photo.json b/build-aux/flatpak/flatpak_gnome_web_photo.json similarity index 99% rename from flatpak/flatpak_gnome_web_photo.json rename to build-aux/flatpak/flatpak_gnome_web_photo.json index c711f39..1990d45 100644 --- a/flatpak/flatpak_gnome_web_photo.json +++ b/build-aux/flatpak/flatpak_gnome_web_photo.json @@ -2,7 +2,7 @@ "id": "de.wolfvollprecht.UberWriter.Plugin.WebPhoto", "runtime": "de.wolfvollprecht.UberWriter", "branch": "stable", - "sdk": "org.gnome.Sdk//3.26", + "sdk": "org.gnome.Sdk//3.32", "build-extension": true, "separate-locales": false, "appstream-compose": false, diff --git a/flatpak/flatpak_texlive.json b/build-aux/flatpak/flatpak_texlive.json similarity index 98% rename from flatpak/flatpak_texlive.json rename to build-aux/flatpak/flatpak_texlive.json index 526690e..a403cb8 100644 --- a/flatpak/flatpak_texlive.json +++ b/build-aux/flatpak/flatpak_texlive.json @@ -2,7 +2,7 @@ "id": "de.wolfvollprecht.UberWriter.Plugin.TexLive", "runtime": "de.wolfvollprecht.UberWriter", "branch": "stable", - "sdk": "org.gnome.Sdk//3.26", + "sdk": "org.gnome.Sdk//3.32", "build-extension": true, "separate-locales": false, "appstream-compose": false, diff --git a/flatpak/flatpak_texlive_flathub.json b/build-aux/flatpak/flatpak_texlive_flathub.json similarity index 98% rename from flatpak/flatpak_texlive_flathub.json rename to build-aux/flatpak/flatpak_texlive_flathub.json index e129688..a0a6823 100644 --- a/flatpak/flatpak_texlive_flathub.json +++ b/build-aux/flatpak/flatpak_texlive_flathub.json @@ -2,7 +2,7 @@ "id": "de.wolfvollprecht.UberWriter.Plugin.TexLive", "runtime": "de.wolfvollprecht.UberWriter", "branch": "stable", - "sdk": "org.gnome.Sdk//3.26", + "sdk": "org.gnome.Sdk//3.32", "build-extension": true, "separate-locales": false, "appstream-compose": false, diff --git a/flatpak/texlive.profile b/build-aux/flatpak/texlive.profile similarity index 100% rename from flatpak/texlive.profile rename to build-aux/flatpak/texlive.profile diff --git a/flatpak/texlive_install.sh b/build-aux/flatpak/texlive_install.sh similarity index 100% rename from flatpak/texlive_install.sh rename to build-aux/flatpak/texlive_install.sh diff --git a/build-aux/meson_post_install.py b/build-aux/meson_post_install.py new file mode 100755 index 0000000..c9cc893 --- /dev/null +++ b/build-aux/meson_post_install.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +from os import environ, path +from subprocess import call + +if not environ.get('DESTDIR', ''): + PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local') + DATA_DIR = path.join(PREFIX, 'share') + print('Updating icon cache...') + call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons/hicolor')]) + print("compiling new schemas") + call(["glib-compile-schemas", path.join(DATA_DIR, 'glib-2.0/schemas')]) + diff --git a/configure b/configure deleted file mode 100755 index 8b13789..0000000 --- a/configure +++ /dev/null @@ -1 +0,0 @@ - diff --git a/flatpak/de.wolfvollprecht.UberWriter.appdata.xml b/data/de.wolfvollprecht.UberWriter.appdata.xml.in.in similarity index 96% rename from flatpak/de.wolfvollprecht.UberWriter.appdata.xml rename to data/de.wolfvollprecht.UberWriter.appdata.xml.in.in index ac95924..3f87404 100644 --- a/flatpak/de.wolfvollprecht.UberWriter.appdata.xml +++ b/data/de.wolfvollprecht.UberWriter.appdata.xml.in.in @@ -1,7 +1,7 @@ - de.wolfvollprecht.UberWriter - de.wolfvollprecht.UberWriter.desktop + @app-id@ + @app-id@.desktop UberWriter An elegant, free distraction GTK+ markdown editor @@ -116,5 +116,5 @@ http://uberwriter.github.io/uberwriter https://poeditor.com/join/project/gxVzFyXb2x manuel.genoves_at_gmail.com - uberwriter - \ No newline at end of file + @gettext-package@ + diff --git a/de.wolfvollprecht.UberWriter.desktop b/data/de.wolfvollprecht.UberWriter.desktop.in.in similarity index 86% rename from de.wolfvollprecht.UberWriter.desktop rename to data/de.wolfvollprecht.UberWriter.desktop.in.in index 22f4051..306c123 100644 --- a/de.wolfvollprecht.UberWriter.desktop +++ b/data/de.wolfvollprecht.UberWriter.desktop.in.in @@ -3,7 +3,7 @@ Name=UberWriter Comment=UberWriter, a simple and distraction free Markdown Editor Categories=GNOME;GTK;Office; Exec=uberwriter %U -Icon=de.wolfvollprecht.UberWriter +Icon=@icon@ Terminal=false Type=Application MimeType=text/x-markdown;text/plain; diff --git a/data/media/de.wolfvollprecht.UberWriter-symbolic.svg b/data/icons/de.wolfvollprecht.UberWriter-symbolic.svg similarity index 100% rename from data/media/de.wolfvollprecht.UberWriter-symbolic.svg rename to data/icons/de.wolfvollprecht.UberWriter-symbolic.svg diff --git a/data/media/de.wolfvollprecht.UberWriter.svg b/data/icons/de.wolfvollprecht.UberWriter.svg similarity index 100% rename from data/media/de.wolfvollprecht.UberWriter.svg rename to data/icons/de.wolfvollprecht.UberWriter.svg diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 0000000..a0e51c5 --- /dev/null +++ b/data/icons/meson.build @@ -0,0 +1,11 @@ +install_data( + 'de.wolfvollprecht.UberWriter.svg', + install_dir: datadir / 'icons' / 'hicolor' / 'scalable', + rename: '@0@.svg'.format(application_id) +) + +install_data( + 'de.wolfvollprecht.UberWriter-symbolic.svg', + install_dir: datadir / 'icons' / 'hicolor' / 'symbolic', + rename: '@0@-symbolic.svg'.format(application_id) +) diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..d414111 --- /dev/null +++ b/data/meson.build @@ -0,0 +1,73 @@ +# FreeDesktop Desktop File +desktop_conf = configuration_data() +desktop_conf.set('icon', application_id) +desktop_file = i18n.merge_file( + 'desktop', + input: configure_file( + input: 'de.wolfvollprecht.UberWriter.desktop.in.in', + output: '@BASENAME@', + configuration: desktop_conf + ), + output: '@0@.desktop'.format(application_id), + po_dir: podir, + type: 'desktop', + install: true, + install_dir: get_option('datadir') / 'applications' +) +# Validate Desktop File +desktop_file_validate = find_program('desktop-file-validate', required: false) +if desktop_file_validate.found() + test ( + 'Validate desktop file', + desktop_file_validate, + args: desktop_file.full_path() + ) +endif + +# Freedesktop AppData File +appdata_conf = configuration_data() +appdata_conf.set('app-id', application_id) +appdata_conf.set('gettext-package', gettext_package) +appdata_file = i18n.merge_file( + 'appdata', + input: configure_file( + input: 'de.wolfvollprecht.UberWriter.appdata.xml.in.in', + output: '@BASENAME@', + configuration: appdata_conf + ), + output: '@0@.appdata.xml'.format(application_id), + po_dir: podir, + install: true, + install_dir: get_option('datadir') / 'metainfo' +) +# Validate AppData File +appstream_util = find_program('appstream-util', required: false) +if appstream_util.found() + test ( + 'Validate appdata file', + appstream_util, + args: ['validate-relax', '--nonet', appdata_file.full_path()] + ) +endif + +# Gschema +install_data( + 'de.wolfvollprecht.UberWriter.gschema.xml', + install_dir: get_option('datadir') / 'glib-2.0' / 'schemas', + rename: '@0@.gschema.xml'.format(application_id) +) + +subdir('icons') + +install_subdir( + 'lua', + install_dir: pkgdatadir +) +install_subdir( + 'media', + install_dir: pkgdatadir +) +install_subdir( + 'ui', + install_dir: pkgdatadir +) diff --git a/flatpak/uberwriter.json b/flatpak/uberwriter.json deleted file mode 100644 index 620c285..0000000 --- a/flatpak/uberwriter.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "app-id": "de.wolfvollprecht.UberWriter", - "runtime": "org.gnome.Platform", - "runtime-version": "3.28", - "sdk": "org.gnome.Sdk", - "command": "/app/usr/bin/uberwriter", - "finish-args": [ - "--socket=x11", - "--share=ipc", - "--filesystem=host", - "--env=IN_FLATPAK=1", - "--filesystem=xdg-run/dconf", - "--filesystem=~/.config/dconf:ro", - "--talk-name=ca.desrt.dconf", - "--env=DCONF_USER_CONFIG_DIR=.config/dconf", - "--env=XDG_DATA_DIRS=/app/usr/share", - "--env=PATH=/app/extensions/TexLive/bin:/app/extensions/TexLive/2018/bin/x86_64-linux:/app/usr/bin:/app/bin" - ], - "build-options" : { - "env": { - "PYTHON": "python3", - "IN_FLATPAK": "1" - } - }, - "add-extensions": { - "de.wolfvollprecht.UberWriter.Plugin": { - "directory": "extensions", - "version": "stable", - "subdirectories": true, - "no-autodownload": true, - "autodelete": true - } - }, - "modules": [ - { - "name": "uberwriter", - "sources": [ - { - "type" : "git", - "url" : "../", - "branch" : "refactoring" - } - ], - "build-commands": [ - "install -Dm644 flatpak/de.wolfvollprecht.UberWriter.appdata.xml /app/share/appdata/de.wolfvollprecht.UberWriter.appdata.xml " - ], - "post-install": [ - "glib-compile-schemas /app/usr/share/glib-2.0/schemas", - "install -d /app/extensions" - ] - }, - { - "name": "pandoc", - "only-arches": [ - "x86_64" - ], - "buildsystem": "simple", - "build-commands": [ - "cp bin/pandoc /app/usr/bin/pandoc", - "cp bin/pandoc-citeproc /app/usr/bin/pandoc-citeproc" - ], - "sources": [ - { - "type": "archive", - "url": "https://github.com/jgm/pandoc/releases/download/2.2/pandoc-2.2-linux.tar.gz", - "sha256": "06ecd882e42ef9b7390b1c82e1e71b3ea48679181289b9b810a8797825bed8ed" - } - ] - }, - { - "name": "pipdeps", - "buildsystem": "simple", - "build-commands": [ - "pip3 install --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} pyenchant regex pypandoc" - ], - "sources": [ - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/5d/c1/45947333669b31bc6b4933308dd07c2aa2fedcec0a95b14eedae993bd449/wheel-0.31.0.tar.gz", - "sha256": "1ae8153bed701cb062913b72429bcf854ba824f973735427681882a688cb55ce" - }, - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz", - "sha256": "f2bd08e0cd1b06e10218feaf6fef299f473ba706582eb3bd9d52203fdbd7ee68" - }, - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/71/81/00184643e5a10a456b4118fc12c96780823adb8ed974eb2289f29703b29b/pypandoc-1.4.tar.gz", - "sha256": "e914e6d5f84a76764887e4d909b09d63308725f0cbb5293872c2c92f07c11a5b" - }, - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/a2/51/c39562cfed3272592c60cfd229e5464d715b78537e332eac2b695422dc49/regex-2018.02.21.tar.gz", - "sha256": "b44624a38d07d3c954c84ad302c29f7930f4bf01443beef5589e9157b14e2a29" - }, - { - "type": "file", - "url": "https://files.pythonhosted.org/packages/9e/54/04d88a59efa33fefb88133ceb638cdf754319030c28aadc5a379d82140ed/pyenchant-2.0.0.tar.gz", - "sha256": "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0" - } - ] - }, - { - "name": "fonts", - "buildsystem": "simple", - "build-commands": [ - "mkdir -p /app/share/fonts/", - "cp ttf/* /app/share/fonts/" - ], - "sources": [ - { - "type": "git", - "url": "https://github.com/mozilla/Fira", - "tag": "4.202" - } - ] - }, - { - "name": "appdata", - "buildsystem": "simple", - "build-commands": [ - "mkdir -p /app/share/appdata", - "install -Dm644 de.wolfvollprecht.UberWriter.appdata.xml /app/share/appdata/de.wolfvollprecht.UberWriter.appdata.xml" - ], - "sources": [ - { - "type": "file", - "path": "de.wolfvollprecht.UberWriter.appdata.xml" - } - ] - } - ] - } diff --git a/po/__init__.py b/help/LINGUAS similarity index 100% rename from po/__init__.py rename to help/LINGUAS diff --git a/help/meson.build b/help/meson.build new file mode 100644 index 0000000..1b0c65f --- /dev/null +++ b/help/meson.build @@ -0,0 +1,16 @@ +help_pages = files( + 'index.page', + 'pandocs-markdown.page', + 'preview.page' +) + +help_media = files( + 'figures/icon.png', + 'figures/icon_down.png' +) + +gnome.yelp(meson.project_name(), + sources: help_pages, + media: help_media, + symlink_media: true +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..866cb50 --- /dev/null +++ b/meson.build @@ -0,0 +1,61 @@ +project( + 'uberwriter', + version: '2.2.0', + license: 'GPL2+', + meson_version: '>= 0.50.0' +) + +if get_option('profile') == 'development' + profile = 'Devel' + name_suffix = ' (Development)' + vcs_tag = run_command('git', 'rev-parse', '--short', 'HEAD').stdout().strip() + if vcs_tag == '' + version_suffix = '-devel' + else + version_suffix = '-@0@'.format (vcs_tag) + endif +else + profile = '' + name_suffix = '' + version_suffix = '' +endif +application_id = 'de.wolfvollprecht.UberWriter@0@'.format(profile) + + +# This doesn't work yet. It's doesn't find the python3 from the sandboxed env first +# python = import('python') +# python3 = python.find_installation('python3') +python = import('python3') +python3 = python.find_python() +if not python3.found() + error('No valid python3 binary found') +else + message('Found python3 binary') +endif +gnome = import('gnome') +i18n = import('i18n') + + +dependency('glib-2.0') +dependency('gobject-2.0') +dependency('gobject-introspection-1.0') +dependency('gtk+-3.0') + +find_program('glib-compile-schemas', required: true) +find_program('gtk-update-icon-cache', required: false) +find_program('update-desktop-database', required: false) + +gettext_package = meson.project_name() +localedir = get_option('prefix') / get_option('localedir') +pythondir = get_option('prefix') / python.sysconfig_path('purelib') +datadir = get_option('prefix') / get_option('datadir') +pkgdatadir = datadir / meson.project_name() +podir = meson.source_root() / 'po' + +subdir('bin') +subdir('data') +subdir('help') +subdir('po') + +meson.add_install_script('build-aux/meson_post_install.py') + diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000..e48ea92 --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,9 @@ +option( + 'profile', + type: 'combo', + choices: [ + 'default', + 'development' + ], + value: 'default' +) diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..e0cc5c1 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1,21 @@ +ca +ca_ES +cs +de +en_GB +es +eu +fr +hu +it +pl +pt +pt_BR +ru +si +sv +th +tr +vi +zh_CN +zh_TW diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..e69de29 diff --git a/po/ca/LC_MESSAGES/uberwriter-ca.po b/po/ca.po similarity index 100% rename from po/ca/LC_MESSAGES/uberwriter-ca.po rename to po/ca.po diff --git a/po/ca/LC_MESSAGES/uberwriter.mo b/po/ca/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index cde1c5d..0000000 Binary files a/po/ca/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/ca_ES/LC_MESSAGES/uberwriter-ca_ES.po b/po/ca_ES.po similarity index 100% rename from po/ca_ES/LC_MESSAGES/uberwriter-ca_ES.po rename to po/ca_ES.po diff --git a/po/ca_ES/LC_MESSAGES/uberwriter.mo b/po/ca_ES/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index c9a5e1e..0000000 Binary files a/po/ca_ES/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/compile_translations.sh b/po/compile_translations.sh deleted file mode 100755 index 8ad5524..0000000 --- a/po/compile_translations.sh +++ /dev/null @@ -1,2 +0,0 @@ -find . -name \*.po -execdir sh -c 'msgfmt "$0" -o uberwriter.mo' '{}' \; - diff --git a/po/cs/LC_MESSAGES/uberwriter-cs.po b/po/cs.po similarity index 100% rename from po/cs/LC_MESSAGES/uberwriter-cs.po rename to po/cs.po diff --git a/po/cs/LC_MESSAGES/uberwriter.mo b/po/cs/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index c63c29f..0000000 Binary files a/po/cs/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/de/LC_MESSAGES/uberwriter-de.po b/po/de.po similarity index 100% rename from po/de/LC_MESSAGES/uberwriter-de.po rename to po/de.po diff --git a/po/de/LC_MESSAGES/uberwriter.mo b/po/de/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 879ce1e..0000000 Binary files a/po/de/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/en_GB/LC_MESSAGES/uberwriter-en_GB.po b/po/en_GB.po similarity index 100% rename from po/en_GB/LC_MESSAGES/uberwriter-en_GB.po rename to po/en_GB.po diff --git a/po/en_GB/LC_MESSAGES/uberwriter.mo b/po/en_GB/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index a981e71..0000000 Binary files a/po/en_GB/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/es/LC_MESSAGES/uberwriter-es.po b/po/es.po similarity index 100% rename from po/es/LC_MESSAGES/uberwriter-es.po rename to po/es.po diff --git a/po/es/LC_MESSAGES/uberwriter.mo b/po/es/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index be6d2fd..0000000 Binary files a/po/es/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/eu/LC_MESSAGES/uberwriter-eu.po b/po/eu.po similarity index 100% rename from po/eu/LC_MESSAGES/uberwriter-eu.po rename to po/eu.po diff --git a/po/eu/LC_MESSAGES/uberwriter.mo b/po/eu/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index eb93e3b..0000000 Binary files a/po/eu/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/fr/LC_MESSAGES/uberwriter-fr.po b/po/fr.po similarity index 100% rename from po/fr/LC_MESSAGES/uberwriter-fr.po rename to po/fr.po diff --git a/po/fr/LC_MESSAGES/uberwriter.mo b/po/fr/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index be52b3d..0000000 Binary files a/po/fr/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/hu/LC_MESSAGES/uberwriter-hu.po b/po/hu.po similarity index 100% rename from po/hu/LC_MESSAGES/uberwriter-hu.po rename to po/hu.po diff --git a/po/hu/LC_MESSAGES/uberwriter.mo b/po/hu/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 5c9bd78..0000000 Binary files a/po/hu/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/it/LC_MESSAGES/uberwriter-it.po b/po/it.po similarity index 100% rename from po/it/LC_MESSAGES/uberwriter-it.po rename to po/it.po diff --git a/po/it/LC_MESSAGES/uberwriter.mo b/po/it/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index e592e55..0000000 Binary files a/po/it/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..368265d --- /dev/null +++ b/po/meson.build @@ -0,0 +1,2 @@ +i18n.gettext(gettext_package, preset: 'glib') + diff --git a/po/pl/LC_MESSAGES/uberwriter-pl.po b/po/pl.po similarity index 100% rename from po/pl/LC_MESSAGES/uberwriter-pl.po rename to po/pl.po diff --git a/po/pl/LC_MESSAGES/uberwriter.mo b/po/pl/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index e7493c7..0000000 Binary files a/po/pl/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/pt/LC_MESSAGES/uberwriter-pt.po b/po/pt.po similarity index 100% rename from po/pt/LC_MESSAGES/uberwriter-pt.po rename to po/pt.po diff --git a/po/pt/LC_MESSAGES/uberwriter.mo b/po/pt/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 6034db1..0000000 Binary files a/po/pt/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/pt_BR/LC_MESSAGES/uberwriter-pt_BR.po b/po/pt_BR.po similarity index 100% rename from po/pt_BR/LC_MESSAGES/uberwriter-pt_BR.po rename to po/pt_BR.po diff --git a/po/pt_BR/LC_MESSAGES/uberwriter.mo b/po/pt_BR/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index a5b5670..0000000 Binary files a/po/pt_BR/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/ru/LC_MESSAGES/uberwriter-ru.po b/po/ru.po similarity index 100% rename from po/ru/LC_MESSAGES/uberwriter-ru.po rename to po/ru.po diff --git a/po/ru/LC_MESSAGES/uberwriter.mo b/po/ru/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index eb1c338..0000000 Binary files a/po/ru/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/si/LC_MESSAGES/uberwriter-si.po b/po/si.po similarity index 100% rename from po/si/LC_MESSAGES/uberwriter-si.po rename to po/si.po diff --git a/po/si/LC_MESSAGES/uberwriter.mo b/po/si/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 0ad6d57..0000000 Binary files a/po/si/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/sv/LC_MESSAGES/uberwriter-sv.po b/po/sv.po similarity index 100% rename from po/sv/LC_MESSAGES/uberwriter-sv.po rename to po/sv.po diff --git a/po/sv/LC_MESSAGES/uberwriter.mo b/po/sv/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 5f3a8aa..0000000 Binary files a/po/sv/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/tr/LC_MESSAGES/uberwriter-th.po b/po/th.po similarity index 100% rename from po/tr/LC_MESSAGES/uberwriter-th.po rename to po/th.po diff --git a/po/tr/LC_MESSAGES/uberwriter-tr.po b/po/tr.po similarity index 100% rename from po/tr/LC_MESSAGES/uberwriter-tr.po rename to po/tr.po diff --git a/po/tr/LC_MESSAGES/uberwriter.mo b/po/tr/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index a3f1ef7..0000000 Binary files a/po/tr/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/vi/LC_MESSAGES/uberwriter-vi.po b/po/vi.po similarity index 100% rename from po/vi/LC_MESSAGES/uberwriter-vi.po rename to po/vi.po diff --git a/po/vi/LC_MESSAGES/uberwriter.mo b/po/vi/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 3de221c..0000000 Binary files a/po/vi/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/zh_CN/LC_MESSAGES/uberwriter-zh_CN.po b/po/zh_CN.po similarity index 100% rename from po/zh_CN/LC_MESSAGES/uberwriter-zh_CN.po rename to po/zh_CN.po diff --git a/po/zh_CN/LC_MESSAGES/uberwriter.mo b/po/zh_CN/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index 539a529..0000000 Binary files a/po/zh_CN/LC_MESSAGES/uberwriter.mo and /dev/null differ diff --git a/po/zh_TW/LC_MESSAGES/uberwriter-zh_TW.po b/po/zh_TW.po similarity index 100% rename from po/zh_TW/LC_MESSAGES/uberwriter-zh_TW.po rename to po/zh_TW.po diff --git a/po/zh_TW/LC_MESSAGES/uberwriter.mo b/po/zh_TW/LC_MESSAGES/uberwriter.mo deleted file mode 100644 index a57168a..0000000 Binary files a/po/zh_TW/LC_MESSAGES/uberwriter.mo and /dev/null differ