mirror of
https://github.com/ocogeclub/ocoge.git
synced 2024-11-21 15:19:48 +00:00
[update] electron 14 にアップデート・ビルトイン remote 廃止に対応
This commit is contained in:
parent
1be8d97e28
commit
28bdb59693
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ bin/
|
||||
build/
|
||||
*.zip
|
||||
push.sh
|
||||
n
|
1
index.js
1
index.js
@ -1,4 +1,5 @@
|
||||
const { app, BrowserWindow, Menu, session } = require('electron');
|
||||
require('@electron/remote/main').initialize();
|
||||
|
||||
/** Force disable security warning */
|
||||
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
# install node.js (=electron node version) via n (https://github.com/tj/n)
|
||||
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n
|
||||
sudo bash n 14.16.0
|
||||
sudo bash n 14.17.0
|
||||
# install python code formatter
|
||||
python3 -m pip install black
|
||||
# install desktop entry
|
||||
|
1330
package-lock.json
generated
1330
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -19,10 +19,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/ocogeclub/ocoge#readme",
|
||||
"devDependencies": {
|
||||
"electron": "^13.2.2",
|
||||
"electron-rebuild": "^2.3.5"
|
||||
"electron": "^14.0.0",
|
||||
"electron-rebuild": "^3.2.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron/remote": "^1.2.1",
|
||||
"axios": "^0.21.1",
|
||||
"nodemailer": "^6.6.0",
|
||||
"ocoge_lgpio": "file:local_modules/ocoge_lgpio"
|
||||
|
@ -10,12 +10,12 @@ const mascotDefPath = '/home/pi/Applications/ocoge/img/';
|
||||
// Require
|
||||
const fs = require('fs');
|
||||
const path = require("path");
|
||||
const mainWin = require('electron').remote.getCurrentWindow();
|
||||
const dialog = require('electron').remote.dialog;
|
||||
|
||||
const mainWin = require('@electron/remote').getCurrentWindow();
|
||||
const dialog = require('@electron/remote').dialog;
|
||||
const shell = require('electron').shell;
|
||||
const clipboard = require('electron').clipboard;
|
||||
|
||||
|
||||
var saveFilepath = null;
|
||||
var wsChanged = false;
|
||||
var mascotFilePath = mascotDefPath + 'cogechee.png';
|
||||
|
@ -619,7 +619,7 @@ Blockly.Blocks['ugj_serial_read'] = {
|
||||
};
|
||||
Blockly.JavaScript['ugj_serial_read'] = function (block) {
|
||||
var value_count = Blockly.JavaScript.valueToCode(block, 'count', Blockly.JavaScript.ORDER_ATOMIC);
|
||||
var code = `pi.serial_read(ser_hand, ${value_count});\n`;
|
||||
var code = `pi.serial_read(ser_hand, ${value_count})\n`;
|
||||
return [code, Blockly.JavaScript.ORDER_NONE];
|
||||
};
|
||||
Blockly.Python['ugj_serial_read'] = function (block) {
|
||||
|
Loading…
Reference in New Issue
Block a user