[gnome-notes] build: Add a way to run without installing
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-notes] build: Add a way to run without installing
- Date: Wed, 16 Mar 2022 11:33:43 +0000 (UTC)
commit ea1ab68eea3d3092d28bede74c602523496e2897
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Sat Jun 26 10:08:53 2021 +0530
build: Add a way to run without installing
This allows users to run the application with ./run (from build directory)
without installing the executable
data/meson.build | 2 ++
meson.build | 8 ++++++++
run.in | 6 ++++++
3 files changed, 16 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index 556d5642..fd1c877b 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -70,3 +70,5 @@ install_data(
'org.gnome.Notes.gschema.xml',
install_dir: join_paths(bijiben_datadir, 'glib-2.0', 'schemas')
)
+
+gnome.compile_schemas(build_by_default: true)
diff --git a/meson.build b/meson.build
index 409cffe5..0f3f8f76 100644
--- a/meson.build
+++ b/meson.build
@@ -148,6 +148,14 @@ configure_file(
configuration: config_h
)
+run_conf = configuration_data()
+run_conf.set('BUILD_DIR', meson.current_build_dir())
+configure_file(
+ input: 'run.in',
+ output: 'run',
+ configuration: run_conf,
+)
+
meson.add_install_script(
'build-aux/meson_post_install.py',
bijiben_datadir,
diff --git a/run.in b/run.in
new file mode 100755
index 00000000..8d380161
--- /dev/null
+++ b/run.in
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+set -e
+
+export GSETTINGS_SCHEMA_DIR="@BUILD_DIR@/data"
+set -x
+exec "@BUILD_DIR@/src/bijiben" "$@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]