MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / bundlePaths

Function bundlePaths

e2e/setup/desktop-packaged.globalsetup.ts:22–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21// (launch exe, bundled executor binary) inside the packaged bundle, per platform.
22const bundlePaths = (): { exe: string; executor: string } => {
23 const arch = process.arch; // arm64 | x64
24 if (process.platform === "darwin") {
25 const app = join(appDir, "dist", `mac${arch === "arm64" ? "-arm64" : ""}`, "Executor.app");
26 return {
27 exe: join(app, "Contents/MacOS/Executor"),
28 executor: join(app, "Contents/Resources/executor/executor"),
29 };
30 }
31 if (process.platform === "win32") {
32 const dir = join(appDir, "dist", "win-unpacked");
33 return {
34 exe: join(dir, "Executor.exe"),
35 executor: join(dir, "resources/executor/executor.exe"),
36 };
37 }
38 // electron-builder names the dir `linux-unpacked` for x64 and
39 // `linux-<arch>-unpacked` otherwise; executableName is pinned in the e2e config.
40 const dir = join(appDir, "dist", arch === "x64" ? "linux-unpacked" : `linux-${arch}-unpacked`);
41 return {
42 exe: join(dir, "executor-desktop"),
43 executor: join(dir, "resources/executor/executor"),
44 };
45};
46
47const builderFlag =
48 process.platform === "darwin" ? "--mac" : process.platform === "win32" ? "--win" : "--linux";

Callers 1

setupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected