diff options
author | Aylur <[email protected]> | 2025-03-01 20:59:09 +0100 |
---|---|---|
committer | Aylur <[email protected]> | 2025-03-01 21:02:29 +0100 |
commit | 23cdbc8088b5c308a068b432a6b03213ede68f07 (patch) | |
tree | 1e8bd6ffde5273fcd80aca0d30cbb38dbe5f9461 /examples/gtk4/simple-bar/js/src/main.in.js | |
parent | dfd1f23c7562694e571d44c45aa74fcea9b1ba01 (diff) |
add gtk4 examples
Diffstat (limited to 'examples/gtk4/simple-bar/js/src/main.in.js')
-rwxr-xr-x | examples/gtk4/simple-bar/js/src/main.in.js | 12 |
1 files changed, 12 insertions, 0 deletions
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)) |