Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b02dc078a |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mrterm",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mrterm",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@xterm/addon-fit": "^0.11.0",
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "mrterm",
|
||||
"productName": "MrTerm",
|
||||
"version": "0.18.0",
|
||||
"version": "0.18.1",
|
||||
"description": "Moderner SSH-, SFTP- und RDP-Client",
|
||||
"main": "src/main/main.js",
|
||||
"author": "MrBlake",
|
||||
@@ -53,6 +53,7 @@
|
||||
"directories": {
|
||||
"buildResources": "build"
|
||||
},
|
||||
"beforePack": "scripts/ensure-koffi.js",
|
||||
"asarUnpack": [
|
||||
"node_modules/koffi/**",
|
||||
"node_modules/@koromix/**"
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// electron-builder beforePack: stellt sicher, dass die native koffi-Binary der Zielplattform in node_modules liegt.
|
||||
// npm installiert nur die Binary der Build-Plattform – beim Cross-Build (z. B. Windows-Paket auf Linux) fehlt sie sonst,
|
||||
// und RDP im Tab fällt mit "koffi nicht verfügbar" auf ein externes Fenster zurück.
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { execSync } = require('child_process');
|
||||
const { Arch } = require('electron-builder');
|
||||
|
||||
module.exports = async (context) => {
|
||||
const platform = context.electronPlatformName;
|
||||
const arch = Arch[context.arch];
|
||||
const pkg = `@koromix/koffi-${platform}-${arch}`;
|
||||
const root = path.join(__dirname, '..');
|
||||
if (fs.existsSync(path.join(root, 'node_modules', pkg))) return;
|
||||
const { version } = require(path.join(root, 'node_modules', 'koffi', 'package.json'));
|
||||
console.log(` • koffi-Binary für ${platform}-${arch} fehlt – installiere ${pkg}@${version}`);
|
||||
execSync(`npm install --no-save --force ${pkg}@${version}`, { cwd: root, stdio: 'inherit' });
|
||||
if (!fs.existsSync(path.join(root, 'node_modules', pkg))) throw new Error(`${pkg} konnte nicht installiert werden`);
|
||||
};
|
||||
Reference in New Issue
Block a user