refactor: update dev orthanc directory
This commit is contained in:
parent
f436a65409
commit
a4a1198402
|
@ -14,10 +14,9 @@ import { getMachineId } from "./core/auth";
|
||||||
import registerIpcMainHandlers from "./ipcMainHandlers";
|
import registerIpcMainHandlers from "./ipcMainHandlers";
|
||||||
import { spawn } from "node:child_process";
|
import { spawn } from "node:child_process";
|
||||||
import { ChildProcessWithoutNullStreams } from "child_process";
|
import { ChildProcessWithoutNullStreams } from "child_process";
|
||||||
import log from 'electron-log';
|
import log from "electron-log";
|
||||||
import { existsSync } from "node:fs";
|
import { existsSync } from "node:fs";
|
||||||
|
|
||||||
|
|
||||||
// const require = createRequire(import.meta.url);
|
// const require = createRequire(import.meta.url);
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
|
@ -68,8 +67,6 @@ function createWindow() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (VITE_DEV_SERVER_URL) {
|
if (VITE_DEV_SERVER_URL) {
|
||||||
win.loadURL(VITE_DEV_SERVER_URL);
|
win.loadURL(VITE_DEV_SERVER_URL);
|
||||||
registerIpcMainHandlers(win);
|
registerIpcMainHandlers(win);
|
||||||
|
@ -77,16 +74,20 @@ function createWindow() {
|
||||||
const pacsPath =
|
const pacsPath =
|
||||||
platform !== "macos"
|
platform !== "macos"
|
||||||
? path.join(
|
? path.join(
|
||||||
process.env.VITE_PUBLIC!,
|
process.env.APP_ROOT!,
|
||||||
"../extraResources",
|
"extraResources",
|
||||||
"orthanc-win64-1.12.4",
|
"orthanc-win64-1.12.4",
|
||||||
"Orthanc.exe"
|
"Orthanc.exe"
|
||||||
)
|
)
|
||||||
: path.join(process.env.VITE_PUBLIC!, '../extraResources', "orthanc-mac-24.8.1", "Orthanc");
|
: path.join(
|
||||||
|
process.env.APP_ROOT!,
|
||||||
|
"extraResources",
|
||||||
|
"orthanc-mac-24.8.1",
|
||||||
|
"Orthanc"
|
||||||
|
);
|
||||||
|
|
||||||
spawn(pacsPath);
|
spawn(pacsPath);
|
||||||
|
|
||||||
|
|
||||||
if (platform !== "macos") {
|
if (platform !== "macos") {
|
||||||
python_process = spawn(path.join(process.env.VITE_PUBLIC!, "main.exe"));
|
python_process = spawn(path.join(process.env.VITE_PUBLIC!, "main.exe"));
|
||||||
}
|
}
|
||||||
|
@ -95,22 +96,24 @@ function createWindow() {
|
||||||
// python_process = spawn(path.join(process.env.VITE_PUBLIC!, "main.exe"));
|
// python_process = spawn(path.join(process.env.VITE_PUBLIC!, "main.exe"));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const pacsPath =
|
const pacsPath =
|
||||||
platform !== "macos"
|
platform !== "macos"
|
||||||
? path.join(
|
? path.join(
|
||||||
process.resourcesPath, 'lib',
|
process.resourcesPath,
|
||||||
|
"lib",
|
||||||
"orthanc-win64-1.12.4",
|
"orthanc-win64-1.12.4",
|
||||||
"Orthanc.exe"
|
"Orthanc.exe"
|
||||||
)
|
)
|
||||||
: path.join(process.resourcesPath, 'lib', "orthanc-mac-24.8.1", "Orthanc");
|
: path.join(
|
||||||
|
process.resourcesPath,
|
||||||
|
"lib",
|
||||||
|
"orthanc-mac-24.8.1",
|
||||||
|
"Orthanc"
|
||||||
|
);
|
||||||
|
|
||||||
console.log(pacsPath)
|
console.log(pacsPath);
|
||||||
log.info(pacsPath);
|
log.info(pacsPath);
|
||||||
if (existsSync(pacsPath))
|
if (existsSync(pacsPath)) spawn(pacsPath);
|
||||||
spawn(pacsPath);
|
|
||||||
|
|
||||||
win.loadFile(path.join(RENDERER_DIST, "index.html")).then(() => {
|
win.loadFile(path.join(RENDERER_DIST, "index.html")).then(() => {
|
||||||
if (process.argv.length >= 2) {
|
if (process.argv.length >= 2) {
|
||||||
|
|
0
apps/desktop/extraResources/orthanc-mac-24.8.1/Orthanc
Normal file → Executable file
0
apps/desktop/extraResources/orthanc-mac-24.8.1/Orthanc
Normal file → Executable file
Loading…
Reference in New Issue
Block a user