Skip to content

Commit

Permalink
electron versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
hmcclew committed Feb 19, 2024
1 parent 27842c4 commit 415d6a9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Cmake Build
working-directory: backend/build
run: cmake -DOpenCASCADE_DIR=/usr/local/Cellar/opencascade/7.7.2_2/lib/cmake/opencascade ..
run: cmake ..

- name: Build Backend Project
working-directory: backend/build
Expand Down
13 changes: 11 additions & 2 deletions frontend/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ const { app, BrowserWindow } = require('electron');
const path = require('path');
const isDev = require('electron-is-dev');

if (app.setNSApplicationDelegate) {
app.setNSApplicationDelegate({
applicationSupportsSecureRestorableState: () => true,
});
} else {
console.warn("NSApplicationDelegate is not supported on this platform.");
}

let mainWindow;

function createWindow() {
Expand All @@ -15,10 +23,11 @@ function createWindow() {
},
});

// Use 127.0.0.1 instead of localhost
const startURL = isDev
? 'http://localhost:3000'
? 'http://127.0.0.1:3000'
: `file://${path.join(__dirname, '../build/index.html')}`;

mainWindow.loadURL(startURL);

mainWindow.on('closed', () => (mainWindow = null));
Expand Down
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@types/electron": "^1.6.10",
"@types/react": "^18.2.53",
"@types/react-dom": "^18.2.18",
"electron": "^28.1.1",
"electron": "^28.2.3",
"electron-builder": "^24.9.1",
"electron-is-dev": "^2.0.0",
"tailwindcss": "^3.4.1",
Expand Down

0 comments on commit 415d6a9

Please sign in to comment.