@gjsify/gtk-runtime-win32-arm64 0.0.0-stage → 0.64.6
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/LICENSE +27 -0
- package/README.md +58 -2
- package/index.d.ts +11 -0
- package/index.js +26 -0
- package/package.json +120 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 gjsify contributors
|
|
4
|
+
|
|
5
|
+
This license covers the SOURCE of this package (index.js, index.d.ts) and the
|
|
6
|
+
build script in the gjsify repository that assembles the bundle. It does NOT
|
|
7
|
+
cover the third-party GTK / GObject-Introspection binaries under `gtk/`: those
|
|
8
|
+
keep the terms of their own projects, reproduced in
|
|
9
|
+
`gtk/THIRD-PARTY-NOTICES.md` and `gtk/licenses/` inside the published tarball.
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @gjsify/gtk-runtime-win32-arm64
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Batteries-included GTK / GObject-Introspection runtime bundle for **Windows arm64**.
|
|
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 arm64 sibling of [`@gjsify/gtk-runtime-win32-x64`](../gtk-runtime-win32-x64).
|
|
7
|
+
|
|
8
|
+
Platform-gated (`os: ["win32"]`, `cpu: ["arm64"]`), 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
|
|
11
|
+
`windows-11-arm` CI runner and shipped via the package tarball / staged into
|
|
12
|
+
node-gi's `prebuilds/win32-arm64/gtk/`.
|
|
13
|
+
|
|
14
|
+
## Where the arm64 prefix comes from — there is no upstream ZIP
|
|
15
|
+
|
|
16
|
+
`wingtk/gvsbuild` hardcodes `self.platform = "x64"` and publishes only an x64
|
|
17
|
+
release ZIP, so unlike the x64 sibling there is nothing to download here. The
|
|
18
|
+
prefix is **built from source** in CI by our MSVC fork, `gjsify/gvsbuild`
|
|
19
|
+
(`.github/actions/gvsbuild-arm64-prefix`, pinned by commit SHA and cached), the
|
|
20
|
+
whole route recorded in
|
|
21
|
+
[ADR 0089](../../../docs/adr/0089-win32-arm64-gtk-is-built-from-source-by-our-msvc-gvsbuild-fork.md).
|
|
22
|
+
MSVC end to end, never MSYS2/`CLANGARM64`, so the x64 addon recipe
|
|
23
|
+
(`binding.gyp`, `win-gi-gyp-flags.mjs`) and this package's builder transfer
|
|
24
|
+
unchanged — only the `--prefix` path and the toolset (`vcvarsarm64`) differ.
|
|
25
|
+
Exit: when upstream gvsbuild ships an arm64 target, this switches to the
|
|
26
|
+
version pin and the fork is retired.
|
|
27
|
+
|
|
28
|
+
**Still out of scope on arm64 today** (ADR 0089, `status/open-todos/windows.md`
|
|
29
|
+
§ win32-arm64): the two-pass gst-plugins-good build for `gstsoup.dll` /
|
|
30
|
+
`souphttpsrc` (an arm64 bundle therefore has no http(s) media source yet), plus
|
|
31
|
+
webgl (`gwebgl.dll`), gamepad and WebView2 — none of those are built against
|
|
32
|
+
the arm64 prefix yet.
|
|
33
|
+
|
|
34
|
+
## The builder is shared with the x64 sibling
|
|
35
|
+
|
|
36
|
+
`packages/node-gi/scripts/build-gtk-runtime-win32.mjs` serves both win32
|
|
37
|
+
targets — the DLL closure walk (`dumpbin`), the typelib set, the `--windowing`
|
|
38
|
+
superset and the license corpus are arch-agnostic; the only arch-dependent
|
|
39
|
+
inputs are `--prefix` (the gvsbuild zip extraction on x64, the fork-built
|
|
40
|
+
prefix at `C:\gtk-build\gtk\ARM64\release` on arm64) and the MSVC toolset
|
|
41
|
+
(`vcvarsarm64.bat`). See that script and
|
|
42
|
+
[`@gjsify/gtk-runtime-win32-x64`'s README](../gtk-runtime-win32-x64/README.md)
|
|
43
|
+
for the full build/layout/loader documentation — it applies here unchanged,
|
|
44
|
+
down to the DLL layout (`gtk/bin`, not `gtk/lib`), the `--windowing` superset,
|
|
45
|
+
the typelib-API floor and the license-coverage gate. Built on the Windows-on-ARM
|
|
46
|
+
runner:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
node ..\scripts\build-gtk-runtime-win32.mjs --windowing --prefix C:\gtk-build\gtk\ARM64\release --out gtk ^
|
|
50
|
+
--addon <node_gi.node built for arm64>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## How node-gi finds + activates it
|
|
54
|
+
|
|
55
|
+
Identical to the x64 sibling: node-gi's loader (`gtk-runtime.js`) resolves
|
|
56
|
+
`@gjsify/gtk-runtime-win32-arm64` by name (and the usual override/dev-sibling
|
|
57
|
+
candidates), prepends `gtk/bin` to `PATH` before the addon loads, and prepends
|
|
58
|
+
`gtk/girepository-1.0` to the GIRepository search path — no relocation, no
|
|
59
|
+
re-exec, the same mechanism the x64 README documents in full.
|
package/index.d.ts
ADDED
|
@@ -0,0 +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;
|
package/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// @gjsify/gtk-runtime-win32-arm64 — path helpers for the bundled GTK runtime. @gjsify/node-gi
|
|
3
|
+
// resolves this package (optional, os/cpu-gated) to find the bundled typelib + DLL dirs when no
|
|
4
|
+
// gvsbuild/system GTK is present. Unlike macOS, Windows needs NO relocation: DLLs resolve by
|
|
5
|
+
// SEARCH PATH at LoadLibrary time, so node-gi just prepends `gtk/bin` to PATH before the addon
|
|
6
|
+
// loads. The heavy `gtk/` payload is produced by ../scripts/build-gtk-runtime-win32.mjs on a
|
|
7
|
+
// Windows-on-ARM runner, against the arm64 prefix our `gjsify/gvsbuild` fork builds (ADR 0089).
|
|
8
|
+
import { existsSync } from 'node:fs';
|
|
9
|
+
import { dirname, join } from 'node:path';
|
|
10
|
+
import { fileURLToPath } from 'node:url';
|
|
11
|
+
|
|
12
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
|
|
14
|
+
/** Absolute path to the bundle root (contains `bin/` + `girepository-1.0/`). */
|
|
15
|
+
export const bundleDir = join(here, 'gtk');
|
|
16
|
+
|
|
17
|
+
/** Absolute path to the bundled DLL dir (prepend to PATH so LoadLibrary finds it). */
|
|
18
|
+
export const binDir = join(bundleDir, 'bin');
|
|
19
|
+
|
|
20
|
+
/** Absolute path to the typelib dir (feed to GIRepository.prepend_search_path). */
|
|
21
|
+
export const typelibDir = join(bundleDir, 'girepository-1.0');
|
|
22
|
+
|
|
23
|
+
/** Whether the bundle payload is actually present on disk (it is built on CI). */
|
|
24
|
+
export const isPresent = existsSync(typelibDir) && existsSync(binDir);
|
|
25
|
+
|
|
26
|
+
export default { bundleDir, binDir, typelibDir, isPresent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,122 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/gtk-runtime-win32-arm64",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.64.6",
|
|
4
|
+
"description": "Batteries-included GTK/GObject-Introspection runtime bundle for Windows arm64 — lets @gjsify/node-gi load gi:// namespaces (GLib/GObject/Gio/cairo/Pango/Graphene/Gdk) with NO gvsbuild/system GTK. Platform-gated (win32/arm64 only). GTK is built from source by our MSVC gjsify/gvsbuild fork (ADR 0089) — upstream gvsbuild publishes no arm64 ZIP.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "SEE LICENSE IN gtk/THIRD-PARTY-NOTICES.md",
|
|
7
|
+
"os": [
|
|
8
|
+
"win32"
|
|
9
|
+
],
|
|
10
|
+
"cpu": [
|
|
11
|
+
"arm64"
|
|
12
|
+
],
|
|
13
|
+
"main": "./index.js",
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./index.js"
|
|
19
|
+
},
|
|
20
|
+
"./gtk/girepository-1.0": "./gtk/girepository-1.0",
|
|
21
|
+
"./gtk/bin": "./gtk/bin"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"index.js",
|
|
25
|
+
"index.d.ts",
|
|
26
|
+
"gtk"
|
|
27
|
+
],
|
|
28
|
+
"gjsify": {
|
|
29
|
+
"runtimes": {
|
|
30
|
+
"gjs": "none",
|
|
31
|
+
"node": "polyfill",
|
|
32
|
+
"browser": "none",
|
|
33
|
+
"nativescript": "none"
|
|
34
|
+
},
|
|
35
|
+
"tier": 3,
|
|
36
|
+
"mediaCapabilities": {
|
|
37
|
+
"gstPluginDir": "gtk/lib/gstreamer-1.0",
|
|
38
|
+
"audioDecode": [
|
|
39
|
+
{
|
|
40
|
+
"format": "WAV / PCM",
|
|
41
|
+
"plugin": "wavparse",
|
|
42
|
+
"element": "wavparse"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"format": "MP3",
|
|
46
|
+
"plugin": "mediafoundation",
|
|
47
|
+
"element": "mfmp3dec"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"format": "AAC (M4A)",
|
|
51
|
+
"plugin": "mediafoundation",
|
|
52
|
+
"element": "mfaacdec"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"format": "Ogg / Vorbis",
|
|
56
|
+
"plugin": "vorbis",
|
|
57
|
+
"element": "vorbisdec",
|
|
58
|
+
"upstream": {
|
|
59
|
+
"catalogue": "gvsbuild",
|
|
60
|
+
"library": "libvorbis"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"format": "Opus",
|
|
65
|
+
"plugin": "opus",
|
|
66
|
+
"element": "opusdec",
|
|
67
|
+
"upstream": {
|
|
68
|
+
"catalogue": "gvsbuild",
|
|
69
|
+
"library": "opus"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"format": "A-law",
|
|
74
|
+
"plugin": "alaw",
|
|
75
|
+
"element": "alawdec"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"format": "µ-law",
|
|
79
|
+
"plugin": "mulaw",
|
|
80
|
+
"element": "mulawdec"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"gaps": [
|
|
84
|
+
{
|
|
85
|
+
"plugin": "mpg123",
|
|
86
|
+
"element": "mpg123audiodec",
|
|
87
|
+
"upstream": {
|
|
88
|
+
"catalogue": "gvsbuild",
|
|
89
|
+
"library": "mpg123"
|
|
90
|
+
},
|
|
91
|
+
"why": "MP3 is DECODED on this target, by `mfmp3dec` out of the `mediafoundation` plugin (gst-plugins-bad), which wraps the MP3 decoder Windows itself ships — see the `MP3` claim. This entry is the OTHER decoder, the one the darwin bundles use: gst-plugins-good's `mpg123` links libmpg123, and the gvsbuild version this bundle is built from defines no project for that library, so the element cannot be built here. It stays declared, with `upstream`, so the day gvsbuild gains the project this bundle can ship the same decoder as darwin and stop depending on the OS component. What the OS route costs, stated because it is not nothing: Media Foundation is absent from Windows N editions until the Media Feature Pack is installed, and is the optional Server-Media-Foundation feature on Windows Server — where mfplat.dll is missing the plugin does not load and MP3 is the gap it was before (ADR 0056 § 7)."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"format": "FLAC",
|
|
95
|
+
"plugin": "flac",
|
|
96
|
+
"element": "flacdec",
|
|
97
|
+
"upstream": {
|
|
98
|
+
"catalogue": "gvsbuild",
|
|
99
|
+
"library": "flac"
|
|
100
|
+
},
|
|
101
|
+
"why": "the gst-plugins-good element links libFLAC and gvsbuild defines no project for that library either — the same absence as MP3, read off the same project list, and neither is a licensing decision: libmpg123 is LGPL-2.1 and libFLAC is BSD-3-Clause. Unlike MP3 this one has a route out of the pinned catalogue and is therefore a COSTED decision rather than an absence: gvsbuild builds gst-plugins-rs under the project name `gst-plugin-gtk4`, and that tree's `claxon` feature is a pure-Rust FLAC decoder (`claxondec`, MPL-2.0). It is not taken — ADR 0056 § Alternatives rejected carries the price. A libFLAC project in gvsbuild closes it in one word instead."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"plugin": "wasapi2",
|
|
105
|
+
"why": "the modern Windows sink, and the one absence here that costs no format: `directsound` ships and `autoaudiosink` resolves to it. Declared because it is the same silent absence, not because anything breaks."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"format": "AAC (ADTS)",
|
|
109
|
+
"why": "the same `mfaacdec` that decodes the M4A shape (see the `AAC (M4A)` claim) does not decode a bare ADTS stream through `decodebin3` on the x64 bundle (measured on CI); the same gvsbuild-built GStreamer closure backs this arch, so the gap is assumed shared until measured separately on arm64."
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"scripts": {
|
|
115
|
+
"build:bundle": "node ../scripts/build-gtk-runtime-win32.mjs"
|
|
116
|
+
},
|
|
117
|
+
"repository": {
|
|
118
|
+
"type": "git",
|
|
119
|
+
"url": "git+https://github.com/gjsify/gjsify.git",
|
|
120
|
+
"directory": "packages/node-gi/gtk-runtime-win32-arm64"
|
|
121
|
+
}
|
|
122
|
+
}
|