Merge branch 'main' into ls-arq

This commit is contained in:
DJ2LS 2023-10-29 20:16:48 +01:00 committed by GitHub
commit b2a068dbfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 46 additions and 14 deletions

View file

@ -10,9 +10,20 @@
"directories": {
"output": "release"
},
"asarUnpack": [
"**/*.wav"
],
"files": [
"dist",
"dist-electron",
"../modem/dist/modem/",
],
"extraResources": [
{
"from": "../modem/dist/modem/",
"to": "modem",
@ -20,17 +31,18 @@
"**/*",
"!**/.git"
]
}
],
"mac": {
"target": [
{
"target": "default",
"arch": ["universal"]
//"arch": ["universal"],
"arch": ["arm64", "x64"],
}
],
"notarize": "false",
@ -39,7 +51,7 @@
"entitlements": "build/entitlements.plist",
"entitlementsInherit": "build/entitlements.plist",
"gatekeeperAssess": false,
"mergeASARs": false,
"mergeASARs": true,
"x64ArchFiles": "**/*",
"artifactName": "${productName}-Mac-${version}.${ext}"
},

View file

@ -100,17 +100,20 @@ async function createWindow() {
app.whenReady().then(() => {
createWindow();
console.log(platform())
//Generate daemon binary path
var daemonPath = "";
switch (platform().toLowerCase()) {
case "darwin":
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon");
case "linux":
daemonPath = join(__dirname, "modem", "freedata-daemon");
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon");
break;
case "win32":
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon.exe");
break;
case "win64":
daemonPath = join(__dirname, "modem", "freedata-daemon.exe");
daemonPath = join(process.resourcesPath, "modem", "freedata-daemon.exe");
break;
default:
console.log("Unhandled OS Platform: ", platform());
@ -120,9 +123,24 @@ app.whenReady().then(() => {
//Start daemon binary if it exists
if (existsSync(daemonPath)) {
console.log("Starting freedata-daemon binary");
daemonProcess = spawn(daemonPath, [], {
cwd: join(daemonPath, ".."),
console.log("daemonPath:", 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
daemonProcess.on("error", (err) => {
//daemonProcessLog.error(`error when starting daemon: ${err}`);
@ -134,8 +152,9 @@ app.whenReady().then(() => {
daemonProcess.stdout.on("data", () => {
// daemonProcessLog.info(`${data}`);
});
daemonProcess.stderr.on("data", () => {
daemonProcess.stderr.on("data", (data) => {
// daemonProcessLog.info(`${data}`);
console.log(data)
});
daemonProcess.on("close", (code) => {
// daemonProcessLog.warn(`daemonProcess exited with code ${code}`);

View file

@ -2,7 +2,7 @@
"name": "FreeDATA",
"description": "FreeDATA",
"private": true,
"version": "0.11.1-alpha.1",
"version": "0.11.1-alpha.3",
"main": "dist-electron/main/index.js",
"scripts": {
"start": "vite",
@ -31,6 +31,7 @@
},
"homepage": "https://freedata.app",
"dependencies": {
"@electron/asar": "^3.2.7",
"@electron/notarize": "^2.1.0",
"@electron/universal": "^1.4.2",
"@popperjs/core": "^2.11.8",