diff --git a/package.json b/package.json index 2539c75..8926fc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xan105/nodert", - "version": "2.0.2", + "version": "3.0.0", "description": "NodeRT but precompiled (use WinRT API directly from node)", "type": "module", "exports": { @@ -1320,10 +1320,6 @@ "node": ">=20.12.2", "npm": "^10.2.4" }, - "cpu": [ - "x64", - "arm64" - ], "scripts": { "install": "node \"./install.js\"", "lint": "eslint \"./lib/**/*.{js,mjs}\" \"./types/**/*.d.ts\"", @@ -1333,7 +1329,11 @@ "fetch:manual": "powershell -NoProfile -ExecutionPolicy Bypass -File ./fetch.ps1 && patch-package", "fetch:auto": "npm ci --ignore-scripts && patch-package", "diff": "powershell -NoProfile -ExecutionPolicy Bypass -File ./diff.ps1", + "build:abi93": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 16.0.0 -abi abi93 -skip", + "build:abi108": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 18.0.0 -abi abi108 -skip", "build:abi115": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 20.0.0 -abi abi115 -skip", + "build:abi127": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 22.0.0 -abi 127 -skip", + "build:electron:abi119": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 28.0.0 -abi abi119 -runtime electron -skip", "build:electron:abi121": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 29.0.0 -abi abi121 -runtime electron -skip", "build:electron:abi123": "powershell -NoProfile -ExecutionPolicy Bypass -File ./build.ps1 -target 30.0.0 -abi abi123 -runtime electron -skip" }, diff --git a/updateCompilerFlags.js b/updateCompilerFlags.js new file mode 100644 index 0000000..888e716 --- /dev/null +++ b/updateCompilerFlags.js @@ -0,0 +1,29 @@ +/* +Copyright (c) Anthony Beaumont +This source code is licensed under the Apache 2.0 License +found in the LICENSE file in the root directory of this source tree. +*/ + +//Mass edit compiler flags/args in binding.gyp +//NB: Make sure binding.gyp is valid JSON (eg: ' -> ") + +import { join } from "node:path"; +import { readJSON, writeJSON, ls } from "@xan105/fs"; + +const scopes = await ls("./node_modules", { pattern: /^@nodert-.*$/ }) +for (const scope of scopes) +{ + const namespaces = await ls(join("./node_modules", scope)); + for (const namespace of namespaces) + { + console.log(scope + "/" + namespace); + + const binding = join("./node_modules", scope, namespace, "binding.gyp"); + const gyp = await readJSON(binding); + + gyp.targets.at(0).msvs_settings.VCCLCompilerTool.AdditionalOptions = ["/std:c++17", "/ZW"]; + gyp.targets.at(0).msvs_settings.VCCLCompilerTool.DisableSpecificWarnings = [4609]; + + await writeJSON(binding, gyp); + } +} \ No newline at end of file