forked from olcxjas-softworks/LarpixClient
update electron to v43
This commit is contained in:
parent
68ac0beedf
commit
fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions
26
electron/node_modules/app-builder-lib/out/vm/WineVm.js
generated
vendored
26
electron/node_modules/app-builder-lib/out/vm/WineVm.js
generated
vendored
|
|
@ -1,16 +1,17 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WineVmManager = void 0;
|
||||
const wine_1 = require("../wine");
|
||||
const vm_1 = require("./vm");
|
||||
const builder_util_1 = require("builder-util");
|
||||
const path = require("path");
|
||||
const wine_1 = require("../toolsets/wine");
|
||||
const vm_1 = require("./vm");
|
||||
class WineVmManager extends vm_1.VmManager {
|
||||
constructor() {
|
||||
constructor(wineToolset) {
|
||||
super();
|
||||
this.wineToolset = wineToolset;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
exec(file, args, options, isLogOutIfDebug = true) {
|
||||
return wine_1.execWine(file, null, args, options);
|
||||
exec(file, args, options, _isLogOutIfDebug = true) {
|
||||
return this.execWine({ file, appArgs: args, options, toolset: this.wineToolset });
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
spawn(file, args, options, extraOptions) {
|
||||
|
|
@ -19,6 +20,19 @@ class WineVmManager extends vm_1.VmManager {
|
|||
toVmFile(file) {
|
||||
return path.win32.join("Z:", file);
|
||||
}
|
||||
async execWine({ file: target, appArgs = [], options = {}, toolset }) {
|
||||
if (options.timeout == null) {
|
||||
// 2 minutes
|
||||
options.timeout = 120 * 1000;
|
||||
}
|
||||
if (process.platform === "win32") {
|
||||
return (0, builder_util_1.exec)(target, appArgs, options);
|
||||
}
|
||||
const { execPath: wineExe, env: wineEnv } = await (0, wine_1.getWineToolset)(toolset);
|
||||
// Preserve the base process environment (PATH, HOME, TMPDIR, etc.) so Wine and child
|
||||
// tools start correctly. Wine env vars override the base; caller options.env wins last.
|
||||
return (0, builder_util_1.exec)(wineExe, [target, ...appArgs], { ...options, env: { ...process.env, ...wineEnv, ...options.env } });
|
||||
}
|
||||
}
|
||||
exports.WineVmManager = WineVmManager;
|
||||
//# sourceMappingURL=WineVm.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue