From a4c970813ff527910a903e47abba77cfe1a1d517 Mon Sep 17 00:00:00 2001 From: iishiishii Date: Wed, 27 Sep 2023 10:04:29 +1000 Subject: [PATCH] get neurodeskapp version from package.json --- scripts/copyassets.js | 1 + src/main/app.ts | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/copyassets.js b/scripts/copyassets.js index 4070c6b6..f43eb28a 100644 --- a/scripts/copyassets.js +++ b/scripts/copyassets.js @@ -62,6 +62,7 @@ function copyAssests() { path.join(dest, '../app-assets', 'neurodesk.svg') ); fs.copySync('neurodesktop.toml', path.join(dest, 'neurodesktop.toml')); + fs.copySync('package.json', path.join(dest, 'package.json')); const toolkitPath = path.join( '../node_modules', diff --git a/src/main/app.ts b/src/main/app.ts index 42844b47..6cfa9620 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -50,11 +50,9 @@ import { EventTypeMain, EventTypeRenderer } from './eventtypes'; import { SettingsDialog } from './settingsdialog/settingsdialog'; import { AboutDialog } from './aboutdialog/aboutdialog'; import { AuthDialog } from './authdialog/authdialog'; -import { Config } from './utils'; import * as path from 'path'; -const config = Config.loadConfig(path.join(__dirname, '..')); -const release = config.ConfigToml.neurodesk_desktop_release; +const release = require(path.join(__dirname, '..', 'package.json')).version; export interface IApplication { createNewEmptySession(): void;