Skip to content

Commit

Permalink
Merge pull request #217 from entrylabs/develop
Browse files Browse the repository at this point in the history
version up : 2.1.24
  • Loading branch information
Tnks2U authored Feb 25, 2025
2 parents e2542dc + e99f81b commit 96775f2
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 31 deletions.
2 changes: 1 addition & 1 deletion build/entryx64.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
!define MUI_UNICON "icon.ico"
!define PRODUCT_NAME "Entry"
!define APP_NAME "Entry.exe"
!define PRODUCT_VERSION "2.1.23"
!define PRODUCT_VERSION "2.1.24"
!define PRODUCT_PUBLISHER "EntryLabs"
!define PRODUCT_WEB_SITE "http://www.playentry.org/"

Expand Down
2 changes: 1 addition & 1 deletion build/entryx86.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
!define MUI_UNICON "icon.ico"
!define PRODUCT_NAME "Entry"
!define APP_NAME "Entry.exe"
!define PRODUCT_VERSION "2.1.23"
!define PRODUCT_VERSION "2.1.24"
!define PRODUCT_PUBLISHER "EntryLabs"
!define PRODUCT_WEB_SITE "http://www.playentry.org/"

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"private": true,
"productName": "Entry",
"name": "entry",
"version": "2.1.23",
"version": "2.1.24",
"description": "Entry for offline",
"main": "src/main_build/main.bundle.js",
"scripts": {
"start": "cross-env NODE_ENV=development electron . --debug",
"start": "cross-env NODE_ENV=development SERVER_DOMAIN_DEV='http://local2.playentry.org' HW_LOG_ENDPOINT='/api/hwActionLog' electron . --debug",
"debug": "cross-env NODE_ENV=development electron --inspect .",
"prod:debug": "cross-env NODE_ENV=production electron --inspect . --debug",
"prod:debug:brk": "cross-env NODE_ENV=production electron --inspect-brk=5858 .",
Expand All @@ -19,7 +19,7 @@
"dist:win64": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack && electron-builder -c --win --x64",
"dist:win": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack && electron-builder -c --win --x64 && electron-builder -c --win --ia32",
"dist:mac:notarize": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack && cross-env NOTARIZE=true electron-builder -c --mac",
"dist:mac": "cross-env NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack && cross-env NOTARIZE=false electron-builder -c --mac",
"dist:mac": "cross-env SERVER_DOMAIN_DEV='http://local2.playentry.org' HW_LOG_ENDPOINT='/api/hwActionLog' NODE_ENV=production NODE_OPTIONS=--openssl-legacy-provider webpack && cross-env NOTARIZE=false electron-builder -c --mac",
"rebuild": "electron-rebuild -f",
"postinstall": "yarn run rebuild && yarn run webpack:dev"
},
Expand All @@ -39,8 +39,8 @@
"async-csv": "^2.1.3",
"axios": "^0.19.2",
"cross-spawn": "^7.0.3",
"entry-hw": "git+https://github.com/entrylabs/entry-hw.git#dist/v1.9.61_2",
"entry-js": "git+https://github.com/entrylabs/entryjs.git#dist/offline_v2.1.23",
"entry-hw": "git+https://github.com/entrylabs/entry-hw.git#dist/v1.9.62",
"entry-js": "git+https://github.com/entrylabs/entryjs.git#dist/offline_v2.1.24",
"entry-tool": "git+https://github.com/entrylabs/entry-tool.git#dist/20231026",
"@entrylabs/legacy-video": "^1.0.0",
"excel4node": "^1.7.0",
Expand All @@ -54,6 +54,7 @@
"music-metadata": "^6.3.0",
"node-abi": "^3.28.0",
"node-xlsx": "^0.15.0",
"systeminformation": "^5.22.11",
"puid": "^1.0.7",
"rimraf": "^2.6.3",
"sass": "^1.57.1",
Expand Down
29 changes: 16 additions & 13 deletions src/main/commonUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,20 @@ class CommonUtils {
const filename = entryObject.filename;
const extension = CommonUtils.sanitizeExtension(
entryObject.ext || entryObject.extension,
defaultExtension,
defaultExtension
);

return `${filename}${extension}`;
}

static getEntryDomain() {
if (process.env.NODE_ENV === 'production') {
return 'https://playentry.org';
} else {
return process.env.SERVER_DOMAIN_DEV ? process.env.SERVER_DOMAIN_DEV : undefined;
}
}

static lpad(str: string, len: number) {
const strLen = str.length;
let paddedString = str;
Expand All @@ -79,20 +87,15 @@ class CommonUtils {
return String(paddedString);
}

static getPaddedVersion(version: string | number) {
static getPaddedVersion = (version: string | undefined) => {
if (!version) {
return '';
return;
}
const versionString = String(version);

const padded: string[] = [];
const splitVersion = versionString.split('.');
splitVersion.forEach((item) => {
padded.push(this.lpad(item, 4));
});

return padded.join('.');
}
return version
.split('.')
.map((number) => number.padStart(4, '0'))
.join('.');
};
}

export default CommonUtils;
17 changes: 13 additions & 4 deletions src/main/utils/serverProcessManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import EntryServer from 'entry-hw-server';
import { app } from 'electron';
import CommonUtils from '../commonUtils';
import HardwareModuleManager from './hardwareModuleManager';
import path from 'path';

Expand Down Expand Up @@ -33,7 +34,9 @@ class ServerProcessManager {

open() {
this._receiveFromChildEventRegister();
this.childProcess.open();
const offlineVersion = CommonUtils.getPaddedVersion(global.sharedObject.version);
const getEntryDomain = CommonUtils.getEntryDomain();
this.childProcess.open(offlineVersion, getEntryDomain);
}

close() {
Expand All @@ -52,6 +55,14 @@ class ServerProcessManager {
this.childProcess.sendToClient(data);
}

connectHardwareSuccess(hardwareId: string) {
this.childProcess.connectHardwareSuccess(hardwareId);
}

connectHardwareFailed() {
this.childProcess.connectHardwareFailed();
}

_receiveFromChildEventRegister() {
this.childProcess.on('cloudModeChanged', (mode: string) => {
this.router.notifyCloudModeChanged(mode);
Expand All @@ -62,9 +73,7 @@ class ServerProcessManager {
this.childProcess.on('data', (message: any) => {
this.router.handleServerData(message);
});
this.childProcess.on('close', () => {

});
this.childProcess.on('close', () => {});
}
}

Expand Down
28 changes: 21 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5208,13 +5208,15 @@ entities@^2.0.0:

"entry-hw-server@git+https://github.com/entrylabs/entry-hw-server.git#master":
version "2.0.0"
resolved "git+https://github.com/entrylabs/entry-hw-server.git#d8cf9abafdd2beee9f480fc1dfa7953233273cba"
resolved "git+https://github.com/entrylabs/entry-hw-server.git#c4718d51ac06b3f7e767561b335e946410378cf2"
dependencies:
crypto-js "^4.0.0"
node-fetch "^2.7.0"
systeminformation "^5.22.11"

"entry-hw@git+https://github.com/entrylabs/entry-hw.git#dist/v1.9.61_2":
version "1.9.61"
resolved "git+https://github.com/entrylabs/entry-hw.git#882fcea120ed448d3200d6058c4e5a94b75d18a7"
"entry-hw@git+https://github.com/entrylabs/entry-hw.git#dist/v1.9.62":
version "1.9.62"
resolved "git+https://github.com/entrylabs/entry-hw.git#4dd433374df09e5fcb839581fcd712402b503105"
dependencies:
cross-spawn "^7.0.0"
fs-extra "^8.1.0"
Expand All @@ -5229,9 +5231,9 @@ entities@^2.0.0:
winston "^3.2.1"
winston-daily-rotate-file "^4.4.2"

"entry-js@git+https://github.com/entrylabs/entryjs.git#dist/offline_v2.1.23":
version "4.0.14"
resolved "git+https://github.com/entrylabs/entryjs.git#0920d5d4049c314536ec4596c28d969c281b6c06"
"entry-js@git+https://github.com/entrylabs/entryjs.git#dist/offline_v2.1.24":
version "4.0.17"
resolved "git+https://github.com/entrylabs/entryjs.git#517f7e3615639af46728cf4e5dfaa250d552c119"
dependencies:
uid "^0.0.2"
"@entrylabs/event" "^1.0.3"
Expand Down Expand Up @@ -9251,6 +9253,13 @@ node-fetch@^1.0.1:
encoding "^0.1.11"
is-stream "^1.0.1"

node-fetch@^2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
dependencies:
whatwg-url "^5.0.0"

node-fetch@~2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
Expand Down Expand Up @@ -12008,6 +12017,11 @@ symbol-tree@^3.2.2:
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==

systeminformation@^5.22.11:
version "5.25.11"
resolved "https://registry.yarnpkg.com/systeminformation/-/systeminformation-5.25.11.tgz#7d47a14dafbc9cf6c21bc02d19a2121a8c770d88"
integrity sha512-jI01fn/t47rrLTQB0FTlMCC+5dYx8o0RRF+R4BPiUNsvg5OdY0s9DKMFmJGrx5SwMZQ4cag0Gl6v8oycso9b/g==

table@^6.0.9:
version "6.8.1"
resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf"
Expand Down

0 comments on commit 96775f2

Please sign in to comment.