From 23cdbc8088b5c308a068b432a6b03213ede68f07 Mon Sep 17 00:00:00 2001 From: Aylur Date: Sat, 1 Mar 2025 20:59:09 +0100 Subject: add gtk4 examples --- examples/gtk4/simple-bar/js/src/main.in.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 examples/gtk4/simple-bar/js/src/main.in.js (limited to 'examples/gtk4/simple-bar/js/src/main.in.js') diff --git a/examples/gtk4/simple-bar/js/src/main.in.js b/examples/gtk4/simple-bar/js/src/main.in.js new file mode 100755 index 0000000..90e8f99 --- /dev/null +++ b/examples/gtk4/simple-bar/js/src/main.in.js @@ -0,0 +1,12 @@ +#!@GJS@ -m + +import { exit, programArgs } from "system" +import Gio from "gi://Gio" +import GLib from "gi://GLib" + +// makes sure `LD_PRELOAD` does not leak into subprocesses +GLib.setenv("LD_PRELOAD", "", true) +Gio.Resource.load("@PKGDATADIR@/data.gresource")._register() + +const module = await import("resource:///index.js") +exit(await module.default.main(programArgs)) -- cgit v1.2.3