kopia lustrzana https://github.com/dceejay/electron-node-red
rodzic
81996a2691
commit
3ae47f9bbc
|
@ -0,0 +1 @@
|
||||||
|
rm -f /usr/bin/Node-RED
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"$":"7b15c36b8209a9e08997cdea6bd0c71cpNQ="}
|
{"$":"8dbcfcd6d9f25932aa00994065774d5ctxk="}
|
|
@ -0,0 +1,19 @@
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
height:100%;
|
||||||
|
width:100%;
|
||||||
|
display: flex;
|
||||||
|
position: fixed;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-family: Arial,sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="container">
|
||||||
|
<div>
|
||||||
|
<img src="nodered.png"/><br/>
|
||||||
|
<h1>Loading Node-RED</h1>
|
||||||
|
Press Alt to see Menu bar.
|
||||||
|
</div>
|
||||||
|
</div>
|
22
main.js
22
main.js
|
@ -117,8 +117,9 @@ red_app.use(settings.httpNodeRoot,RED.httpNode);
|
||||||
var template = [
|
var template = [
|
||||||
// {label: "Application",
|
// {label: "Application",
|
||||||
// submenu: [
|
// submenu: [
|
||||||
// { role: 'about' },
|
// //{ role: 'about' },
|
||||||
// { type: "separator" },
|
// //{ type: "separator" },
|
||||||
|
// { role: 'togglefullscreen' },
|
||||||
// { role: 'quit' }
|
// { role: 'quit' }
|
||||||
// ]},
|
// ]},
|
||||||
{ label: 'Node-RED',
|
{ label: 'Node-RED',
|
||||||
|
@ -254,7 +255,8 @@ function createConsole() {
|
||||||
title: "Node-RED Console",
|
title: "Node-RED Console",
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
icon: path.join(__dirname, 'nodered.png')
|
icon: path.join(__dirname, 'nodered.png'),
|
||||||
|
autoHideMenuBar: true
|
||||||
});
|
});
|
||||||
conWindow.loadURL(url.format({
|
conWindow.loadURL(url.format({
|
||||||
pathname: path.join(__dirname, 'console.htm'),
|
pathname: path.join(__dirname, 'console.htm'),
|
||||||
|
@ -273,17 +275,19 @@ function createConsole() {
|
||||||
// Create the main browser window
|
// Create the main browser window
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
autoHideMenuBar: true,
|
|
||||||
webPreferences: {
|
|
||||||
nodeIntegration: false
|
|
||||||
},
|
|
||||||
title: "Node-RED",
|
title: "Node-RED",
|
||||||
fullscreenable: true,
|
|
||||||
//titleBarStyle: "hidden",
|
//titleBarStyle: "hidden",
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 768,
|
height: 768,
|
||||||
icon: path.join(__dirname, 'nodered.png')
|
icon: path.join(__dirname, 'nodered.png'),
|
||||||
|
fullscreenable: true,
|
||||||
|
autoHideMenuBar: true,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: false
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
mainWindow.loadURL(`file://${__dirname}/load.html`);
|
||||||
|
//if (process.platform !== 'darwin') { mainWindow.setAutoHideMenuBar(true); }
|
||||||
|
|
||||||
mainWindow.webContents.on('did-get-response-details', function(event, status, newURL, originalURL, httpResponseCode) {
|
mainWindow.webContents.on('did-get-response-details', function(event, status, newURL, originalURL, httpResponseCode) {
|
||||||
if ((httpResponseCode == 404) && (newURL == ("http://localhost:"+listenPort+urldash))) {
|
if ((httpResponseCode == 404) && (newURL == ("http://localhost:"+listenPort+urldash))) {
|
||||||
|
|
|
@ -10,15 +10,15 @@
|
||||||
"clean": "rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin",
|
"clean": "rm -rf ./build ../electron-bin && mkdir -p ./build ../electron-bin",
|
||||||
"pack": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --all --out=build --overwrite",
|
"pack": "npm run clean && electron-packager . Node-RED --icon=nodered.icns --all --out=build --overwrite",
|
||||||
"pack:osx": "electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build --overwrite",
|
"pack:osx": "electron-packager . Node-RED --icon=nodered.icns --platform=darwin --arch=x64 --out=build --overwrite",
|
||||||
"pack:linux32": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=ia32 --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-ia32/",
|
"pack:linux32": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=ia32 --out=build --overwrite && cp after*.sh build/Node-RED-linux-ia32/",
|
||||||
"pack:linux64": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-x64",
|
"pack:linux64": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=x64 --out=build --overwrite && cp after*.sh build/Node-RED-linux-x64",
|
||||||
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=build --asar --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
"pack:win32": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=ia32 --out=build --asar --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
||||||
"pack:win64": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=build --asar --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
"pack:win64": "electron-packager . Node-RED --icon=nodered.icns --platform=win32 --arch=x64 --out=build --asar --overwrite --win32metadata.CompanyName='IBM Corp.' --win32metadata.ProductName='Node-RED Electron'",
|
||||||
"pack:armv7l": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=armv7l --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-armv7l",
|
"pack:armv7l": "electron-packager . Node-RED --icon=nodered.icns --platform=linux --arch=armv7l --out=build --overwrite && cp afterinst.sh build/Node-RED-linux-armv7l",
|
||||||
"build": "npm run clean && npm run build:osx && npm run build:linux64 && npm run build:linux32",
|
"build": "npm run clean && npm run build:osx && npm run build:linux64 && npm run build:linux32",
|
||||||
"build:osx": "npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg",
|
"build:osx": "npm run pack:osx && appdmg appdmg.json ../electron-bin/Node-RED-Electron_$npm_package_version.dmg",
|
||||||
"build:linux32": "npm run pack:linux32 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a i386 -p ../electron-bin -C build/Node-RED-linux-ia32 --prefix=/opt/node-red --after-install=afterinst.sh ./",
|
"build:linux32": "npm run pack:linux32 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a i386 -p ../electron-bin -C build/Node-RED-linux-ia32 --prefix=/opt/node-red --after-install=afterinst.sh --after-remove=afterremove.sh ./",
|
||||||
"build:linux64": "npm run pack:linux64 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a x86_64 -p ../electron-bin -C build/Node-RED-linux-x64 --prefix=/opt/node-red --after-install=afterinst.sh ./",
|
"build:linux64": "npm run pack:linux64 && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a x86_64 -p ../electron-bin -C build/Node-RED-linux-x64 --prefix=/opt/node-red --after-install=afterinst.sh --after-remove=afterremove.sh ./",
|
||||||
"build:win32": "npm run pack:win32 && node makewin32.js",
|
"build:win32": "npm run pack:win32 && node makewin32.js",
|
||||||
"build:win64": "npm run pack:win64 && node makewin64.js",
|
"build:win64": "npm run pack:win64 && node makewin64.js",
|
||||||
"build:armv7l": "npm run pack:armv7l && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a armv7l -p ../electron-bin -C build/Node-RED-linux-armv7l --prefix=/opt/node-red --after-install=afterinst.sh ./"
|
"build:armv7l": "npm run pack:armv7l && fpm -s dir -t deb -f -n node-red-electron -v $npm_package_version -m conway@uk.ibm.com -a armv7l -p ../electron-bin -C build/Node-RED-linux-armv7l --prefix=/opt/node-red --after-install=afterinst.sh ./"
|
||||||
|
|
Ładowanie…
Reference in New Issue