Make apostrophe.in runable without installation

outline
Marko Semet 2020-03-24 14:14:40 +01:00
parent 9bc8dcc19d
commit 2099dda109
4 changed files with 12 additions and 3 deletions

View File

@ -41,8 +41,7 @@ You can run Apostrophe with `./apostrophe.in` without installing it in the syste
but you'll need to install and compile the schemas before:
```bash
# sudo cp data/de.wolfvollprecht.UberWriter.gschema.xml /usr/share/glib-2.0/schemas/de.wolfvollprecht.UberWriter.gschema.xml
# sudo glib-compile-schemas /usr/share/glib-2.0/schemas
$ ./data/gen.sh
```
### Building a flatpak package

View File

@ -56,7 +56,10 @@ locale.bindtextdomain('apostrophe', localedir)
gettext.textdomain('apostrophe')
gettext.bindtextdomain('apostrophe', localedir)
resource = Gio.resource_load(os.path.join(pkgdatadir, 'apostrophe/apostrophe.gresource'))
if pkgdatadir != '@DATA_DIR@':
resource = Gio.resource_load(os.path.join(pkgdatadir, 'apostrophe/apostrophe.gresource'))
else:
resource = Gio.resource_load(os.path.join(os.path.dirname(__file__), 'data', 'apostrophe.gresource'))
Gio.Resource._register(resource)

2
data/.gitignore vendored 100644
View File

@ -0,0 +1,2 @@
/About.ui
/apostrophe.gresource

5
data/gen.sh 100755
View File

@ -0,0 +1,5 @@
#! /usr/bin/env bash
cd "$(dirname "$0")" &&
cp -fv "ui/About.ui.in" "About.ui" &&
glib-compile-resources "apostrophe.gresource.xml"