@gjsify/gtk-runtime-win32-x64 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +133 -133
- package/gtk/bin/cairo-2.dll +0 -0
- package/gtk/bin/cairo-gobject-2.dll +0 -0
- package/gtk/bin/cairo-script-interpreter-2.dll +0 -0
- package/gtk/bin/epoxy-0.dll +0 -0
- package/gtk/bin/ffi-8.dll +0 -0
- package/gtk/bin/fontconfig-1.dll +0 -0
- package/gtk/bin/freetype-6.dll +0 -0
- package/gtk/bin/fribidi-0.dll +0 -0
- package/gtk/bin/gdk_pixbuf-2.0-0.dll +0 -0
- package/gtk/bin/gio-2.0-0.dll +0 -0
- package/gtk/bin/girepository-1.0-1.dll +0 -0
- package/gtk/bin/girepository-2.0-0.dll +0 -0
- package/gtk/bin/glib-2.0-0.dll +0 -0
- package/gtk/bin/gmodule-2.0-0.dll +0 -0
- package/gtk/bin/gobject-2.0-0.dll +0 -0
- package/gtk/bin/graphene-1.0-0.dll +0 -0
- package/gtk/bin/gtk-4-1.dll +0 -0
- package/gtk/bin/harfbuzz-cairo.dll +0 -0
- package/gtk/bin/harfbuzz-gobject.dll +0 -0
- package/gtk/bin/harfbuzz-gpu.dll +0 -0
- package/gtk/bin/harfbuzz-raster.dll +0 -0
- package/gtk/bin/harfbuzz-subset.dll +0 -0
- package/gtk/bin/harfbuzz-vector.dll +0 -0
- package/gtk/bin/harfbuzz.dll +0 -0
- package/gtk/bin/iconv.dll +0 -0
- package/gtk/bin/intl.dll +0 -0
- package/gtk/bin/jpeg62.dll +0 -0
- package/gtk/bin/libexpat.dll +0 -0
- package/gtk/bin/libpng16.dll +0 -0
- package/gtk/bin/pango-1.0-0.dll +0 -0
- package/gtk/bin/pangocairo-1.0-0.dll +0 -0
- package/gtk/bin/pangoft2-1.0-0.dll +0 -0
- package/gtk/bin/pangowin32-1.0-0.dll +0 -0
- package/gtk/bin/pcre2-8-0.dll +0 -0
- package/gtk/bin/pixman-1-0.dll +0 -0
- package/gtk/bin/tiff.dll +0 -0
- package/gtk/bin/zlib1.dll +0 -0
- package/gtk/girepository-1.0/Adw-1.typelib +0 -0
- package/gtk/girepository-1.0/DBus-1.0.typelib +0 -0
- package/gtk/girepository-1.0/DBusGLib-1.0.typelib +0 -0
- package/gtk/girepository-1.0/GIRepository-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GIRepository-3.0.typelib +0 -0
- package/gtk/girepository-1.0/GL-1.0.typelib +0 -0
- package/gtk/girepository-1.0/GLib-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GLibWin32-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GModule-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GObject-2.0.typelib +0 -0
- package/gtk/girepository-1.0/Gdk-4.0.typelib +0 -0
- package/gtk/girepository-1.0/GdkPixbuf-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GdkPixdata-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GdkWin32-4.0.typelib +0 -0
- package/gtk/girepository-1.0/Gio-2.0.typelib +0 -0
- package/gtk/girepository-1.0/GioWin32-2.0.typelib +0 -0
- package/gtk/girepository-1.0/Graphene-1.0.typelib +0 -0
- package/gtk/girepository-1.0/Gsk-4.0.typelib +0 -0
- package/gtk/girepository-1.0/Gtk-4.0.typelib +0 -0
- package/gtk/girepository-1.0/GtkSource-5.typelib +0 -0
- package/gtk/girepository-1.0/HarfBuzz-0.0.typelib +0 -0
- package/gtk/girepository-1.0/Pango-1.0.typelib +0 -0
- package/gtk/girepository-1.0/PangoCairo-1.0.typelib +0 -0
- package/gtk/girepository-1.0/PangoFT2-1.0.typelib +0 -0
- package/gtk/girepository-1.0/PangoFc-1.0.typelib +0 -0
- package/gtk/girepository-1.0/PangoOT-1.0.typelib +0 -0
- package/gtk/girepository-1.0/Rsvg-2.0.typelib +0 -0
- package/gtk/girepository-1.0/Vulkan-1.0.typelib +0 -0
- package/gtk/girepository-1.0/cairo-1.0.typelib +0 -0
- package/gtk/girepository-1.0/fontconfig-2.0.typelib +0 -0
- package/gtk/girepository-1.0/freetype2-2.0.typelib +0 -0
- package/gtk/girepository-1.0/libxml2-2.0.typelib +0 -0
- package/gtk/girepository-1.0/win32-1.0.typelib +0 -0
- package/gtk/girepository-1.0/xfixes-4.0.typelib +0 -0
- package/gtk/girepository-1.0/xft-2.0.typelib +0 -0
- package/gtk/girepository-1.0/xlib-2.0.typelib +0 -0
- package/gtk/girepository-1.0/xrandr-1.3.typelib +0 -0
- package/gtk/manifest.json +51 -0
- package/index.d.ts +11 -11
- package/index.js +27 -27
- package/package.json +1 -1
- package/scripts/build-gtk-runtime.mjs +446 -446
package/README.md
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
# @gjsify/gtk-runtime-win32-x64
|
|
2
|
-
|
|
3
|
-
Batteries-included GTK / GObject-Introspection runtime bundle for **Windows x64**.
|
|
4
|
-
It lets [`@gjsify/node-gi`](../node-gi) load `gi://` namespaces (GLib · GObject ·
|
|
5
|
-
Gio · cairo · Pango · Graphene · Gdk) with **no gvsbuild / system GTK** installed on
|
|
6
|
-
the host — the Windows sibling of `@gjsify/gtk-runtime-darwin-arm64`.
|
|
7
|
-
|
|
8
|
-
Platform-gated (`os: ["win32"]`, `cpu: ["x64"]`), tier 3 (experimental). On any
|
|
9
|
-
other platform npm skips it and `@gjsify/node-gi` falls back to a system/gvsbuild
|
|
10
|
-
GTK. The heavy `gtk/` payload is **not committed** — it is built on a Windows CI
|
|
11
|
-
runner (`scripts/build-gtk-runtime.mjs`) and shipped via the package tarball /
|
|
12
|
-
staged into node-gi's `prebuilds/win32-x64/gtk/`.
|
|
13
|
-
|
|
14
|
-
## Layout
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
gtk/
|
|
18
|
-
bin/ GTK/GLib/cairo/pango/graphene/gdk-pixbuf DLLs (+ deps)
|
|
19
|
-
girepository-1.0/ typelibs (GLib/GObject/Gio/cairo/Pango/Graphene/Gdk/…)
|
|
20
|
-
manifest.json counts + sizes + DLL list
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Note the native code lives in **`gtk/bin`** (DLLs), not `gtk/lib` — on Windows the
|
|
24
|
-
loadable images and the import libraries (`.lib`, not shipped) live in different
|
|
25
|
-
dirs, and only the DLLs are needed at runtime.
|
|
26
|
-
|
|
27
|
-
## How it is built (no relocation — the crux)
|
|
28
|
-
|
|
29
|
-
`node scripts/build-gtk-runtime.mjs` runs on a Windows runner **with** a build-time
|
|
30
|
-
gvsbuild GTK4 stack extracted at `--prefix` (env `GTK_PREFIX`, the closure *source*,
|
|
31
|
-
not shipped):
|
|
32
|
-
|
|
33
|
-
1. **Collect** — enumerate `<prefix>/bin/*.dll` and, from the display-free seed DLLs
|
|
34
|
-
the conformance loads (glib/gobject/gio/gmodule + girepository + cairo + pango +
|
|
35
|
-
graphene + gdk-pixbuf + gtk4 + harfbuzz), walk the DLL import closure with
|
|
36
|
-
`dumpbin /dependents` (recursively), keeping every dependency that is itself a
|
|
37
|
-
gvsbuild DLL. System DLLs (`KERNEL32`, `msvcrt`, `api-ms-win-*`, …) never resolve
|
|
38
|
-
to a file under `<prefix>/bin`, so the "keep only gvsbuild-resident deps" filter
|
|
39
|
-
leaves them OS-provided. If dumpbin can't be located the script copies the whole
|
|
40
|
-
`bin/*.dll` set (a complete superset).
|
|
41
|
-
2. **Copy** — the closure DLLs are copied **flat** into `gtk/bin`. **That is the whole
|
|
42
|
-
job.** There is **no** `install_name_tool`/`@rpath`/`codesign` step: Windows
|
|
43
|
-
resolves a DLL's imports by **search path** at `LoadLibrary` time, so a directory
|
|
44
|
-
of DLLs is portable the moment it exists — no per-file rewriting, no re-signing.
|
|
45
|
-
3. **Typelibs** — copy the typelib set into `gtk/girepository-1.0`.
|
|
46
|
-
|
|
47
|
-
Contrast with macOS, where dyld bakes each dylib's dependency install-names, so the
|
|
48
|
-
darwin bundle must rewrite every reference to `@loader_path/<leaf>` and ad-hoc
|
|
49
|
-
re-sign. Windows needs none of that.
|
|
50
|
-
|
|
51
|
-
## How node-gi finds + activates it
|
|
52
|
-
|
|
53
|
-
`@gjsify/node-gi`'s loader (`gtk-runtime.js`) resolves the bundle from, in order:
|
|
54
|
-
|
|
55
|
-
1. `GJSIFY_GTK_RUNTIME` (explicit bundle dir),
|
|
56
|
-
2. node-gi's own `prebuilds/win32-x64/gtk/` (the CI/dev staging path),
|
|
57
|
-
3. the sibling monorepo dir `../gtk-runtime-win32-x64/gtk`,
|
|
58
|
-
4. `require.resolve('@gjsify/gtk-runtime-win32-x64')` (the published dep).
|
|
59
|
-
|
|
60
|
-
On a match (win32 only) node-gi makes the bundle genuinely **env-free**:
|
|
61
|
-
|
|
62
|
-
- **DLLs** — before the native addon is loaded, node-gi **prepends `gtk/bin` to
|
|
63
|
-
`process.env.PATH`** (`maybePrependGtkRuntimeDllPath`, from `index.js`, run BEFORE
|
|
64
|
-
the addon's `require`). Windows re-reads the DLL search path at **every**
|
|
65
|
-
`LoadLibrary` call — unlike dyld, which captures `DYLD_FALLBACK_LIBRARY_PATH` only
|
|
66
|
-
at process launch — so a plain in-process `process.env.PATH` mutation is enough:
|
|
67
|
-
when node-gi's own `require(node_gi.node)` triggers the addon's DLL imports
|
|
68
|
-
(`glib-2.0-0.dll`, `girepository-2.0-0.dll`, `cairo-2.dll`, …), the loader consults
|
|
69
|
-
the just-updated `PATH` and finds them in the bundle. The **same** `PATH` entry also
|
|
70
|
-
satisfies the runtime `g_module_open(<soname>)` lookups a typelib does for its
|
|
71
|
-
non-addon-linked backers (Pango / Gdk / Graphene) — one mechanism covers both, so
|
|
72
|
-
there is no DYLD-style dual path.
|
|
73
|
-
- **typelibs** — node-gi prepends `gtk/girepository-1.0` to the GIRepository search
|
|
74
|
-
path via the native `prependSearchPath` (a runtime API, no env needed).
|
|
75
|
-
|
|
76
|
-
### Why no re-exec (unlike macOS)
|
|
77
|
-
|
|
78
|
-
The macOS bundle re-execs the process once with `DYLD_FALLBACK_LIBRARY_PATH` set,
|
|
79
|
-
because dyld reads that variable **only at launch** — a JS-time `process.env`
|
|
80
|
-
mutation cannot reach the running dyld. Windows has no such capture: the DLL search
|
|
81
|
-
consults the live `PATH` at each `LoadLibrary`, and the node-gi addon is loaded
|
|
82
|
-
**exclusively** by node-gi's own `require()` (in `loadNative()`), which runs *after*
|
|
83
|
-
the `PATH` prepend. So the addon's static DLL imports resolve against the bundle with
|
|
84
|
-
no re-exec and no native `AddDllDirectory` call (which would be chicken-and-egg —
|
|
85
|
-
the addon must already be loaded to call it). PATH-prepend before the `require` is
|
|
86
|
-
both sufficient and the simplest mechanism.
|
|
87
|
-
|
|
88
|
-
## Two closures: display-free (default) + full windowing (`--windowing`)
|
|
89
|
-
|
|
90
|
-
`build-gtk-runtime.mjs` builds one of two supersets into the same `gtk/` dir:
|
|
91
|
-
|
|
92
|
-
- **Default (display-free)** — the DLL closure + typelibs the display-free
|
|
93
|
-
conformance needs. `manifest.windowing === false`. Unchanged.
|
|
94
|
-
- **`--windowing` (superset)** — everything above **plus** the runtime DATA a real
|
|
95
|
-
GTK window needs on Windows, so a `Adw.ApplicationWindow` realizes + renders with
|
|
96
|
-
no gvsbuild/system GTK:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
gtk/
|
|
100
|
-
bin/ DLLs (+ the SVG/PNG image-loader backers)
|
|
101
|
-
girepository-1.0/ typelibs
|
|
102
|
-
lib/gdk-pixbuf-2.0/2.10.0/loaders/ image decoder DLLs
|
|
103
|
-
lib/gdk-pixbuf-2.0/2.10.0/loaders.cache (rewritten bundle-relative)
|
|
104
|
-
share/glib-2.0/schemas/gschemas.compiled (glib-compile-schemas)
|
|
105
|
-
share/icons/{Adwaita,hicolor}/ icon themes + icon-theme.cache
|
|
106
|
-
etc/fonts/fonts.conf Fontconfig config (+ cache), when present
|
|
107
|
-
manifest.json windowing:true + windowingData counts
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Built on the Windows runner:
|
|
111
|
-
```
|
|
112
|
-
node scripts/build-gtk-runtime.mjs --windowing --prefix C:\gtk-build\gtk\x64\release --out gtk
|
|
113
|
-
```
|
|
114
|
-
The GdkWin32 backend is compiled **into** `libgtk-4-*.dll` (GTK4 builds every
|
|
115
|
-
backend in), so there is no separate backend DLL — the caches (`loaders.cache`,
|
|
116
|
-
`gschemas.compiled`, `icon-theme.cache`) + the ANGLE/librsvg backers are the
|
|
117
|
-
additions. gvsbuild ships the tools this step runs (`gdk-pixbuf-query-loaders`,
|
|
118
|
-
`glib-compile-schemas`, `gtk4-update-icon-cache`, `fc-cache`) in `<prefix>/bin`.
|
|
119
|
-
Each data step is defensive — a missing tree/tool WARNs and continues (the DLL +
|
|
120
|
-
typelib bundle is always produced).
|
|
121
|
-
|
|
122
|
-
### How node-gi wires the windowing data
|
|
123
|
-
|
|
124
|
-
`@gjsify/node-gi`'s loader (`gtk-runtime.js` `maybeWireGtkWindowingEnv`, run at
|
|
125
|
-
module load beside the PATH-prepend) detects the windowing data via the
|
|
126
|
-
`gschemas.compiled` marker and sets — only when currently unset — the env vars that
|
|
127
|
-
locate it: `GSETTINGS_SCHEMA_DIR`, `GDK_PIXBUF_MODULEDIR` + `GDK_PIXBUF_MODULE_FILE`,
|
|
128
|
-
`XDG_DATA_DIRS` (prepends `<bundle>/share`) and, when bundled, `FONTCONFIG_PATH` +
|
|
129
|
-
`FONTCONFIG_FILE`. Windows re-reads these at first use (schema / loader / icon-theme
|
|
130
|
-
init runs after the addon loads), so the in-process mutation is sufficient — no
|
|
131
|
-
re-exec, the DLL-search analog. A **display-free** bundle carries no windowing data,
|
|
132
|
-
so the marker is absent and the wiring is a strict no-op: the display-free load is
|
|
133
|
-
byte-unchanged.
|
|
1
|
+
# @gjsify/gtk-runtime-win32-x64
|
|
2
|
+
|
|
3
|
+
Batteries-included GTK / GObject-Introspection runtime bundle for **Windows x64**.
|
|
4
|
+
It lets [`@gjsify/node-gi`](../node-gi) load `gi://` namespaces (GLib · GObject ·
|
|
5
|
+
Gio · cairo · Pango · Graphene · Gdk) with **no gvsbuild / system GTK** installed on
|
|
6
|
+
the host — the Windows sibling of `@gjsify/gtk-runtime-darwin-arm64`.
|
|
7
|
+
|
|
8
|
+
Platform-gated (`os: ["win32"]`, `cpu: ["x64"]`), tier 3 (experimental). On any
|
|
9
|
+
other platform npm skips it and `@gjsify/node-gi` falls back to a system/gvsbuild
|
|
10
|
+
GTK. The heavy `gtk/` payload is **not committed** — it is built on a Windows CI
|
|
11
|
+
runner (`scripts/build-gtk-runtime.mjs`) and shipped via the package tarball /
|
|
12
|
+
staged into node-gi's `prebuilds/win32-x64/gtk/`.
|
|
13
|
+
|
|
14
|
+
## Layout
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
gtk/
|
|
18
|
+
bin/ GTK/GLib/cairo/pango/graphene/gdk-pixbuf DLLs (+ deps)
|
|
19
|
+
girepository-1.0/ typelibs (GLib/GObject/Gio/cairo/Pango/Graphene/Gdk/…)
|
|
20
|
+
manifest.json counts + sizes + DLL list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Note the native code lives in **`gtk/bin`** (DLLs), not `gtk/lib` — on Windows the
|
|
24
|
+
loadable images and the import libraries (`.lib`, not shipped) live in different
|
|
25
|
+
dirs, and only the DLLs are needed at runtime.
|
|
26
|
+
|
|
27
|
+
## How it is built (no relocation — the crux)
|
|
28
|
+
|
|
29
|
+
`node scripts/build-gtk-runtime.mjs` runs on a Windows runner **with** a build-time
|
|
30
|
+
gvsbuild GTK4 stack extracted at `--prefix` (env `GTK_PREFIX`, the closure *source*,
|
|
31
|
+
not shipped):
|
|
32
|
+
|
|
33
|
+
1. **Collect** — enumerate `<prefix>/bin/*.dll` and, from the display-free seed DLLs
|
|
34
|
+
the conformance loads (glib/gobject/gio/gmodule + girepository + cairo + pango +
|
|
35
|
+
graphene + gdk-pixbuf + gtk4 + harfbuzz), walk the DLL import closure with
|
|
36
|
+
`dumpbin /dependents` (recursively), keeping every dependency that is itself a
|
|
37
|
+
gvsbuild DLL. System DLLs (`KERNEL32`, `msvcrt`, `api-ms-win-*`, …) never resolve
|
|
38
|
+
to a file under `<prefix>/bin`, so the "keep only gvsbuild-resident deps" filter
|
|
39
|
+
leaves them OS-provided. If dumpbin can't be located the script copies the whole
|
|
40
|
+
`bin/*.dll` set (a complete superset).
|
|
41
|
+
2. **Copy** — the closure DLLs are copied **flat** into `gtk/bin`. **That is the whole
|
|
42
|
+
job.** There is **no** `install_name_tool`/`@rpath`/`codesign` step: Windows
|
|
43
|
+
resolves a DLL's imports by **search path** at `LoadLibrary` time, so a directory
|
|
44
|
+
of DLLs is portable the moment it exists — no per-file rewriting, no re-signing.
|
|
45
|
+
3. **Typelibs** — copy the typelib set into `gtk/girepository-1.0`.
|
|
46
|
+
|
|
47
|
+
Contrast with macOS, where dyld bakes each dylib's dependency install-names, so the
|
|
48
|
+
darwin bundle must rewrite every reference to `@loader_path/<leaf>` and ad-hoc
|
|
49
|
+
re-sign. Windows needs none of that.
|
|
50
|
+
|
|
51
|
+
## How node-gi finds + activates it
|
|
52
|
+
|
|
53
|
+
`@gjsify/node-gi`'s loader (`gtk-runtime.js`) resolves the bundle from, in order:
|
|
54
|
+
|
|
55
|
+
1. `GJSIFY_GTK_RUNTIME` (explicit bundle dir),
|
|
56
|
+
2. node-gi's own `prebuilds/win32-x64/gtk/` (the CI/dev staging path),
|
|
57
|
+
3. the sibling monorepo dir `../gtk-runtime-win32-x64/gtk`,
|
|
58
|
+
4. `require.resolve('@gjsify/gtk-runtime-win32-x64')` (the published dep).
|
|
59
|
+
|
|
60
|
+
On a match (win32 only) node-gi makes the bundle genuinely **env-free**:
|
|
61
|
+
|
|
62
|
+
- **DLLs** — before the native addon is loaded, node-gi **prepends `gtk/bin` to
|
|
63
|
+
`process.env.PATH`** (`maybePrependGtkRuntimeDllPath`, from `index.js`, run BEFORE
|
|
64
|
+
the addon's `require`). Windows re-reads the DLL search path at **every**
|
|
65
|
+
`LoadLibrary` call — unlike dyld, which captures `DYLD_FALLBACK_LIBRARY_PATH` only
|
|
66
|
+
at process launch — so a plain in-process `process.env.PATH` mutation is enough:
|
|
67
|
+
when node-gi's own `require(node_gi.node)` triggers the addon's DLL imports
|
|
68
|
+
(`glib-2.0-0.dll`, `girepository-2.0-0.dll`, `cairo-2.dll`, …), the loader consults
|
|
69
|
+
the just-updated `PATH` and finds them in the bundle. The **same** `PATH` entry also
|
|
70
|
+
satisfies the runtime `g_module_open(<soname>)` lookups a typelib does for its
|
|
71
|
+
non-addon-linked backers (Pango / Gdk / Graphene) — one mechanism covers both, so
|
|
72
|
+
there is no DYLD-style dual path.
|
|
73
|
+
- **typelibs** — node-gi prepends `gtk/girepository-1.0` to the GIRepository search
|
|
74
|
+
path via the native `prependSearchPath` (a runtime API, no env needed).
|
|
75
|
+
|
|
76
|
+
### Why no re-exec (unlike macOS)
|
|
77
|
+
|
|
78
|
+
The macOS bundle re-execs the process once with `DYLD_FALLBACK_LIBRARY_PATH` set,
|
|
79
|
+
because dyld reads that variable **only at launch** — a JS-time `process.env`
|
|
80
|
+
mutation cannot reach the running dyld. Windows has no such capture: the DLL search
|
|
81
|
+
consults the live `PATH` at each `LoadLibrary`, and the node-gi addon is loaded
|
|
82
|
+
**exclusively** by node-gi's own `require()` (in `loadNative()`), which runs *after*
|
|
83
|
+
the `PATH` prepend. So the addon's static DLL imports resolve against the bundle with
|
|
84
|
+
no re-exec and no native `AddDllDirectory` call (which would be chicken-and-egg —
|
|
85
|
+
the addon must already be loaded to call it). PATH-prepend before the `require` is
|
|
86
|
+
both sufficient and the simplest mechanism.
|
|
87
|
+
|
|
88
|
+
## Two closures: display-free (default) + full windowing (`--windowing`)
|
|
89
|
+
|
|
90
|
+
`build-gtk-runtime.mjs` builds one of two supersets into the same `gtk/` dir:
|
|
91
|
+
|
|
92
|
+
- **Default (display-free)** — the DLL closure + typelibs the display-free
|
|
93
|
+
conformance needs. `manifest.windowing === false`. Unchanged.
|
|
94
|
+
- **`--windowing` (superset)** — everything above **plus** the runtime DATA a real
|
|
95
|
+
GTK window needs on Windows, so a `Adw.ApplicationWindow` realizes + renders with
|
|
96
|
+
no gvsbuild/system GTK:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
gtk/
|
|
100
|
+
bin/ DLLs (+ the SVG/PNG image-loader backers)
|
|
101
|
+
girepository-1.0/ typelibs
|
|
102
|
+
lib/gdk-pixbuf-2.0/2.10.0/loaders/ image decoder DLLs
|
|
103
|
+
lib/gdk-pixbuf-2.0/2.10.0/loaders.cache (rewritten bundle-relative)
|
|
104
|
+
share/glib-2.0/schemas/gschemas.compiled (glib-compile-schemas)
|
|
105
|
+
share/icons/{Adwaita,hicolor}/ icon themes + icon-theme.cache
|
|
106
|
+
etc/fonts/fonts.conf Fontconfig config (+ cache), when present
|
|
107
|
+
manifest.json windowing:true + windowingData counts
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Built on the Windows runner:
|
|
111
|
+
```
|
|
112
|
+
node scripts/build-gtk-runtime.mjs --windowing --prefix C:\gtk-build\gtk\x64\release --out gtk
|
|
113
|
+
```
|
|
114
|
+
The GdkWin32 backend is compiled **into** `libgtk-4-*.dll` (GTK4 builds every
|
|
115
|
+
backend in), so there is no separate backend DLL — the caches (`loaders.cache`,
|
|
116
|
+
`gschemas.compiled`, `icon-theme.cache`) + the ANGLE/librsvg backers are the
|
|
117
|
+
additions. gvsbuild ships the tools this step runs (`gdk-pixbuf-query-loaders`,
|
|
118
|
+
`glib-compile-schemas`, `gtk4-update-icon-cache`, `fc-cache`) in `<prefix>/bin`.
|
|
119
|
+
Each data step is defensive — a missing tree/tool WARNs and continues (the DLL +
|
|
120
|
+
typelib bundle is always produced).
|
|
121
|
+
|
|
122
|
+
### How node-gi wires the windowing data
|
|
123
|
+
|
|
124
|
+
`@gjsify/node-gi`'s loader (`gtk-runtime.js` `maybeWireGtkWindowingEnv`, run at
|
|
125
|
+
module load beside the PATH-prepend) detects the windowing data via the
|
|
126
|
+
`gschemas.compiled` marker and sets — only when currently unset — the env vars that
|
|
127
|
+
locate it: `GSETTINGS_SCHEMA_DIR`, `GDK_PIXBUF_MODULEDIR` + `GDK_PIXBUF_MODULE_FILE`,
|
|
128
|
+
`XDG_DATA_DIRS` (prepends `<bundle>/share`) and, when bundled, `FONTCONFIG_PATH` +
|
|
129
|
+
`FONTCONFIG_FILE`. Windows re-reads these at first use (schema / loader / icon-theme
|
|
130
|
+
init runs after the addon loads), so the in-process mutation is sufficient — no
|
|
131
|
+
re-exec, the DLL-search analog. A **display-free** bundle carries no windowing data,
|
|
132
|
+
so the marker is absent and the wiring is a strict no-op: the display-free load is
|
|
133
|
+
byte-unchanged.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/gtk/bin/intl.dll
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/gtk/bin/tiff.dll
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"platform": "win32-x64",
|
|
3
|
+
"windowing": false,
|
|
4
|
+
"generatedFrom": "C:\\gtk-build\\gtk\\x64\\release",
|
|
5
|
+
"walkedWith": "dumpbin",
|
|
6
|
+
"dlls": 37,
|
|
7
|
+
"typelibs": 37,
|
|
8
|
+
"binBytes": 34034688,
|
|
9
|
+
"typelibBytes": 2279740,
|
|
10
|
+
"dataBytes": 0,
|
|
11
|
+
"totalBytes": 36314428,
|
|
12
|
+
"dllList": [
|
|
13
|
+
"cairo-2.dll",
|
|
14
|
+
"cairo-gobject-2.dll",
|
|
15
|
+
"cairo-script-interpreter-2.dll",
|
|
16
|
+
"epoxy-0.dll",
|
|
17
|
+
"ffi-8.dll",
|
|
18
|
+
"fontconfig-1.dll",
|
|
19
|
+
"freetype-6.dll",
|
|
20
|
+
"fribidi-0.dll",
|
|
21
|
+
"gdk_pixbuf-2.0-0.dll",
|
|
22
|
+
"gio-2.0-0.dll",
|
|
23
|
+
"girepository-1.0-1.dll",
|
|
24
|
+
"girepository-2.0-0.dll",
|
|
25
|
+
"glib-2.0-0.dll",
|
|
26
|
+
"gmodule-2.0-0.dll",
|
|
27
|
+
"gobject-2.0-0.dll",
|
|
28
|
+
"graphene-1.0-0.dll",
|
|
29
|
+
"gtk-4-1.dll",
|
|
30
|
+
"harfbuzz-cairo.dll",
|
|
31
|
+
"harfbuzz-gobject.dll",
|
|
32
|
+
"harfbuzz-gpu.dll",
|
|
33
|
+
"harfbuzz-raster.dll",
|
|
34
|
+
"harfbuzz-subset.dll",
|
|
35
|
+
"harfbuzz-vector.dll",
|
|
36
|
+
"harfbuzz.dll",
|
|
37
|
+
"iconv.dll",
|
|
38
|
+
"intl.dll",
|
|
39
|
+
"jpeg62.dll",
|
|
40
|
+
"libexpat.dll",
|
|
41
|
+
"libpng16.dll",
|
|
42
|
+
"pango-1.0-0.dll",
|
|
43
|
+
"pangocairo-1.0-0.dll",
|
|
44
|
+
"pangoft2-1.0-0.dll",
|
|
45
|
+
"pangowin32-1.0-0.dll",
|
|
46
|
+
"pcre2-8-0.dll",
|
|
47
|
+
"pixman-1-0.dll",
|
|
48
|
+
"tiff.dll",
|
|
49
|
+
"zlib1.dll"
|
|
50
|
+
]
|
|
51
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
/** Absolute path to the bundle root (contains `bin/` + `girepository-1.0/`). */
|
|
3
|
-
export const bundleDir: string;
|
|
4
|
-
/** Absolute path to the bundled DLL dir (prepend to PATH so LoadLibrary finds it). */
|
|
5
|
-
export const binDir: string;
|
|
6
|
-
/** Absolute path to the typelib dir (feed to GIRepository.prepend_search_path). */
|
|
7
|
-
export const typelibDir: string;
|
|
8
|
-
/** Whether the bundle payload is actually present on disk (it is built on CI). */
|
|
9
|
-
export const isPresent: boolean;
|
|
10
|
-
declare const _default: { bundleDir: string; binDir: string; typelibDir: string; isPresent: boolean };
|
|
11
|
-
export default _default;
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
/** Absolute path to the bundle root (contains `bin/` + `girepository-1.0/`). */
|
|
3
|
+
export const bundleDir: string;
|
|
4
|
+
/** Absolute path to the bundled DLL dir (prepend to PATH so LoadLibrary finds it). */
|
|
5
|
+
export const binDir: string;
|
|
6
|
+
/** Absolute path to the typelib dir (feed to GIRepository.prepend_search_path). */
|
|
7
|
+
export const typelibDir: string;
|
|
8
|
+
/** Whether the bundle payload is actually present on disk (it is built on CI). */
|
|
9
|
+
export const isPresent: boolean;
|
|
10
|
+
declare const _default: { bundleDir: string; binDir: string; typelibDir: string; isPresent: boolean };
|
|
11
|
+
export default _default;
|
package/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
// @gjsify/gtk-runtime-win32-x64 — path helpers for the bundled GTK runtime.
|
|
3
|
-
// @gjsify/node-gi resolves this package (optional, os/cpu-gated) to find the
|
|
4
|
-
// bundled typelib + DLL dirs when no gvsbuild/system GTK is present. Unlike
|
|
5
|
-
// macOS, Windows needs NO relocation: DLLs resolve by SEARCH PATH at LoadLibrary
|
|
6
|
-
// time, so node-gi just prepends `gtk/bin` to PATH before the addon loads. The
|
|
7
|
-
// heavy `gtk/` payload is produced by scripts/build-gtk-runtime.mjs on a Windows
|
|
8
|
-
// runner.
|
|
9
|
-
import { existsSync } from 'node:fs';
|
|
10
|
-
import { dirname, join } from 'node:path';
|
|
11
|
-
import { fileURLToPath } from 'node:url';
|
|
12
|
-
|
|
13
|
-
const here = dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
|
|
15
|
-
/** Absolute path to the bundle root (contains `bin/` + `girepository-1.0/`). */
|
|
16
|
-
export const bundleDir = join(here, 'gtk');
|
|
17
|
-
|
|
18
|
-
/** Absolute path to the bundled DLL dir (prepend to PATH so LoadLibrary finds it). */
|
|
19
|
-
export const binDir = join(bundleDir, 'bin');
|
|
20
|
-
|
|
21
|
-
/** Absolute path to the typelib dir (feed to GIRepository.prepend_search_path). */
|
|
22
|
-
export const typelibDir = join(bundleDir, 'girepository-1.0');
|
|
23
|
-
|
|
24
|
-
/** Whether the bundle payload is actually present on disk (it is built on CI). */
|
|
25
|
-
export const isPresent = existsSync(typelibDir) && existsSync(binDir);
|
|
26
|
-
|
|
27
|
-
export default { bundleDir, binDir, typelibDir, isPresent };
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// @gjsify/gtk-runtime-win32-x64 — path helpers for the bundled GTK runtime.
|
|
3
|
+
// @gjsify/node-gi resolves this package (optional, os/cpu-gated) to find the
|
|
4
|
+
// bundled typelib + DLL dirs when no gvsbuild/system GTK is present. Unlike
|
|
5
|
+
// macOS, Windows needs NO relocation: DLLs resolve by SEARCH PATH at LoadLibrary
|
|
6
|
+
// time, so node-gi just prepends `gtk/bin` to PATH before the addon loads. The
|
|
7
|
+
// heavy `gtk/` payload is produced by scripts/build-gtk-runtime.mjs on a Windows
|
|
8
|
+
// runner.
|
|
9
|
+
import { existsSync } from 'node:fs';
|
|
10
|
+
import { dirname, join } from 'node:path';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
|
|
13
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
|
|
15
|
+
/** Absolute path to the bundle root (contains `bin/` + `girepository-1.0/`). */
|
|
16
|
+
export const bundleDir = join(here, 'gtk');
|
|
17
|
+
|
|
18
|
+
/** Absolute path to the bundled DLL dir (prepend to PATH so LoadLibrary finds it). */
|
|
19
|
+
export const binDir = join(bundleDir, 'bin');
|
|
20
|
+
|
|
21
|
+
/** Absolute path to the typelib dir (feed to GIRepository.prepend_search_path). */
|
|
22
|
+
export const typelibDir = join(bundleDir, 'girepository-1.0');
|
|
23
|
+
|
|
24
|
+
/** Whether the bundle payload is actually present on disk (it is built on CI). */
|
|
25
|
+
export const isPresent = existsSync(typelibDir) && existsSync(binDir);
|
|
26
|
+
|
|
27
|
+
export default { bundleDir, binDir, typelibDir, isPresent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/gtk-runtime-win32-x64",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Batteries-included GTK/GObject-Introspection runtime bundle for Windows x64 — lets @gjsify/node-gi load gi:// namespaces (GLib/GObject/Gio/cairo/Pango/Graphene/Gdk) with NO gvsbuild/system GTK. Platform-gated (win32/x64 only).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|