mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge branch 'main' into ls-arq
This commit is contained in:
commit
b2a068dbfe
|
@ -10,9 +10,20 @@
|
||||||
"directories": {
|
"directories": {
|
||||||
"output": "release"
|
"output": "release"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"asarUnpack": [
|
||||||
|
"**/*.wav"
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"dist-electron",
|
"dist-electron",
|
||||||
|
"../modem/dist/modem/",
|
||||||
|
],
|
||||||
|
|
||||||
|
"extraResources": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"from": "../modem/dist/modem/",
|
"from": "../modem/dist/modem/",
|
||||||
"to": "modem",
|
"to": "modem",
|
||||||
|
@ -20,17 +31,18 @@
|
||||||
"**/*",
|
"**/*",
|
||||||
"!**/.git"
|
"!**/.git"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"mac": {
|
"mac": {
|
||||||
"target": [
|
"target": [
|
||||||
{
|
{
|
||||||
"target": "default",
|
"target": "default",
|
||||||
"arch": ["universal"]
|
//"arch": ["universal"],
|
||||||
|
"arch": ["arm64", "x64"],
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"notarize": "false",
|
"notarize": "false",
|
||||||
|
@ -39,7 +51,7 @@
|
||||||
"entitlements": "build/entitlements.plist",
|
"entitlements": "build/entitlements.plist",
|
||||||
"entitlementsInherit": "build/entitlements.plist",
|
"entitlementsInherit": "build/entitlements.plist",
|
||||||
"gatekeeperAssess": false,
|
"gatekeeperAssess": false,
|
||||||
"mergeASARs": false,
|
"mergeASARs": true,
|
||||||
"x64ArchFiles": "**/*",
|
"x64ArchFiles": "**/*",
|
||||||
"artifactName": "${productName}-Mac-${version}.${ext}"
|
"artifactName": "${productName}-Mac-${version}.${ext}"
|
||||||
},
|
},
|
||||||
|
|
|
@ -100,17 +100,20 @@ async function createWindow() {
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
createWindow();
|
createWindow();
|
||||||
|
|
||||||
|
console.log(platform())
|
||||||
//Generate daemon binary path
|
//Generate daemon binary path
|
||||||
var daemonPath = "";
|
var daemonPath = "";
|
||||||
switch (platform().toLowerCase()) {
|
switch (platform().toLowerCase()) {
|
||||||
case "darwin":
|
case "darwin":
|
||||||
|
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon");
|
||||||
case "linux":
|
case "linux":
|
||||||
daemonPath = join(__dirname, "modem", "freedata-daemon");
|
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "win32":
|
case "win32":
|
||||||
|
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon.exe");
|
||||||
|
break;
|
||||||
case "win64":
|
case "win64":
|
||||||
daemonPath = join(__dirname, "modem", "freedata-daemon.exe");
|
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon.exe");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("Unhandled OS Platform: ", platform());
|
console.log("Unhandled OS Platform: ", platform());
|
||||||
|
@ -120,12 +123,27 @@ app.whenReady().then(() => {
|
||||||
//Start daemon binary if it exists
|
//Start daemon binary if it exists
|
||||||
if (existsSync(daemonPath)) {
|
if (existsSync(daemonPath)) {
|
||||||
console.log("Starting freedata-daemon binary");
|
console.log("Starting freedata-daemon binary");
|
||||||
daemonProcess = spawn(daemonPath, [], {
|
console.log("daemonPath:", daemonPath);
|
||||||
cwd: join(daemonPath, ".."),
|
console.log("CWD:", join(daemonPath, ".."));
|
||||||
|
/*
|
||||||
|
var daemonProcess = spawn("freedata-daemon", [], {
|
||||||
|
cwd: join(process.env.DIST, "modem"),
|
||||||
|
shell: true
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
daemonProcess = spawn(daemonPath, [], {
|
||||||
|
shell: true
|
||||||
|
});
|
||||||
|
console.log(daemonProcess)
|
||||||
|
*/
|
||||||
|
daemonProcess = spawn(daemonPath, [], {
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// return process messages
|
// return process messages
|
||||||
daemonProcess.on("error", (err) => {
|
daemonProcess.on("error", (err) => {
|
||||||
// daemonProcessLog.error(`error when starting daemon: ${err}`);
|
//daemonProcessLog.error(`error when starting daemon: ${err}`);
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
daemonProcess.on("message", () => {
|
daemonProcess.on("message", () => {
|
||||||
|
@ -134,8 +152,9 @@ app.whenReady().then(() => {
|
||||||
daemonProcess.stdout.on("data", () => {
|
daemonProcess.stdout.on("data", () => {
|
||||||
// daemonProcessLog.info(`${data}`);
|
// daemonProcessLog.info(`${data}`);
|
||||||
});
|
});
|
||||||
daemonProcess.stderr.on("data", () => {
|
daemonProcess.stderr.on("data", (data) => {
|
||||||
// daemonProcessLog.info(`${data}`);
|
// daemonProcessLog.info(`${data}`);
|
||||||
|
console.log(data)
|
||||||
});
|
});
|
||||||
daemonProcess.on("close", (code) => {
|
daemonProcess.on("close", (code) => {
|
||||||
// daemonProcessLog.warn(`daemonProcess exited with code ${code}`);
|
// daemonProcessLog.warn(`daemonProcess exited with code ${code}`);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "FreeDATA",
|
"name": "FreeDATA",
|
||||||
"description": "FreeDATA",
|
"description": "FreeDATA",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.11.1-alpha.1",
|
"version": "0.11.1-alpha.3",
|
||||||
"main": "dist-electron/main/index.js",
|
"main": "dist-electron/main/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://freedata.app",
|
"homepage": "https://freedata.app",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@electron/asar": "^3.2.7",
|
||||||
"@electron/notarize": "^2.1.0",
|
"@electron/notarize": "^2.1.0",
|
||||||
"@electron/universal": "^1.4.2",
|
"@electron/universal": "^1.4.2",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
|
|
Loading…
Reference in a new issue