Skip to content

Commit

Permalink
Bump to 1.9.17 (cncjs#427)
Browse files Browse the repository at this point in the history
* Change "Home" to "View In Browser"

* Update dependencies
- [email protected]
- [email protected]

* Electron 4: Replace deprecated `app.makeSingleInstance` with `app.requestSingleInstanceLock`

* Bump to 1.9.17

* Change AppImage filename
  • Loading branch information
cheton authored Mar 15, 2019
1 parent 0301126 commit cbc29b1
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ after_success:
if [[ "$TRAVIS_NODE_VERSION" == "10" && "$TRAVIS_OS_NAME" == "linux" ]]; then
npm run build:linux-ia32;
ls -al output output/*;
cp -af "output/${PACKAGE_NAME}-${PACKAGE_VERSION}-i386.AppImage" "releases/${RELEASE}-linux-i386.AppImage";
cp -af "output/${PRODUCT_NAME} ${PACKAGE_VERSION} i386.AppImage" "releases/${RELEASE}-linux-i386.AppImage";
cp -af "output/${PACKAGE_NAME}_${PACKAGE_VERSION}_i386.deb" "releases/${RELEASE}-linux-i386.deb";
pushd releases;
ln -sf ../output/linux-ia32-unpacked "${RELEASE}-linux-ia32";
Expand Down Expand Up @@ -157,7 +157,7 @@ after_success:
if [[ "$TRAVIS_NODE_VERSION" == "10" && "$TRAVIS_OS_NAME" == "linux" ]]; then
npm run build:linux-x64;
ls -al output output/*;
cp -af "output/${PACKAGE_NAME}-${PACKAGE_VERSION}-x86_64.AppImage" "releases/${RELEASE}-linux-x86_64.AppImage";
cp -af "output/${PRODUCT_NAME} ${PACKAGE_VERSION}.AppImage" "releases/${RELEASE}-linux-x86_64.AppImage";
cp -af "output/${PACKAGE_NAME}_${PACKAGE_VERSION}_amd64.deb" "releases/${RELEASE}-linux-amd64.deb";
pushd releases;
ln -sf ../output/linux-unpacked "${RELEASE}-linux-x64";
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cncjs",
"version": "1.9.16",
"version": "1.9.17",
"description": "A web-based interface for CNC milling controller running Grbl, Marlin, Smoothieware, or TinyG",
"homepage": "https://github.com/cncjs/cncjs",
"author": "Cheton Wu <[email protected]>",
Expand Down Expand Up @@ -256,8 +256,8 @@
"session-file-store": "~1.2.0",
"sha1": "~1.1.1",
"shortid": "~2.2.12",
"socket.io": "~2.1.1",
"socket.io-client": "~2.1.1",
"socket.io": "~2.2.0",
"socket.io-client": "~2.2.0",
"socketio-jwt": "~4.5.0",
"sortablejs": "~1.7.0",
"spawn-default-shell": "~2.0.0",
Expand Down Expand Up @@ -294,9 +294,9 @@
"css-loader": "~1.0.0",
"css-split-webpack-plugin": "~0.2.5",
"dotenv": "~6.0.0",
"electron": "~2.0.5",
"electron-builder": "~20.26.0",
"electron-rebuild": "~1.8.1",
"electron": "~4.1.0",
"electron-builder": "~20.39.0",
"electron-rebuild": "~1.8.4",
"eslint": "~5.6.0",
"eslint-config-trendmicro": "~1.4.1",
"eslint-import-resolver-webpack": "~0.10.1",
Expand Down
2 changes: 1 addition & 1 deletion src/electron-app/menu-template.darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default (options) => {
{ role: 'togglefullscreen' },
{ type: 'separator' },
{
label: 'Home',
label: 'View In Browser',
click: () => {
const url = `http://${address}:${port}`;
shell.openExternal(url);
Expand Down
2 changes: 1 addition & 1 deletion src/electron-app/menu-template.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default (options) => {
{ role: 'togglefullscreen' },
{ type: 'separator' },
{
label: 'Home',
label: 'View In Browser',
click: () => {
const url = `http://${address}:${port}`;
shell.openExternal(url);
Expand Down
17 changes: 10 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ const inputMenu = Menu.buildFromTemplate([
let windowManager = null;

const main = () => {
// https://github.com/electron/electron/blob/master/docs/api/app.md#appmakesingleinstancecallback
const shouldQuit = app.makeSingleInstance((commandLine, workingDirectory) => {
// https://github.com/electron/electron/blob/master/docs/api/app.md#apprequestsingleinstancelock
const gotSingleInstanceLock = app.requestSingleInstanceLock();
const shouldQuitImmediately = !gotSingleInstanceLock;

if (shouldQuitImmediately) {
app.quit();
return;
}

app.on('second-instance', (event, commandLine, workingDirectory) => {
// Someone tried to run a second instance, we should focus our window.
if (!windowManager) {
return;
Expand All @@ -46,11 +54,6 @@ const main = () => {
}
});

if (shouldQuit) {
app.quit();
return;
}

const config = new ElectronConfig();

// Create the user data directory if it does not exist
Expand Down
4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cncjs-app",
"version": "1.9.16",
"version": "1.9.17",
"productName": "CNCjs",
"description": "CNC Milling Controller",
"homepage": "https://github.com/cncjs/cncjs",
Expand Down Expand Up @@ -55,7 +55,7 @@
"serve-static": "~1.13.2",
"session-file-store": "~1.2.0",
"shortid": "~2.2.12",
"socket.io": "~2.1.1",
"socket.io": "~2.2.0",
"socketio-jwt": "~4.5.0",
"spawn-default-shell": "~2.0.0",
"static-eval": "~2.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/cs/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "",
"Perspective Projection": "",
"Orthographic Projection": "",
"Scene Objects": "",
"Display G-code Filename": "",
"Hide Coordinate System": "",
"Show Coordinate System": "",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/de/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Darstellung",
"Perspective Projection": "Perspektivische Darstellung",
"Orthographic Projection": "Orthografische Darstellung",
"Scene Objects": "Szenenobjekte",
"Display G-code Filename": "G-Code Dateinamen anzeigen",
"Hide Coordinate System": "Koordinatensystem ausblenden",
"Show Coordinate System": "Koordinatensystem einblenden",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/en/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Projection",
"Perspective Projection": "Perspective Projection",
"Orthographic Projection": "Orthographic Projection",
"Scene Objects": "Scene Objects",
"Display G-code Filename": "Display G-code Filename",
"Hide Coordinate System": "Hide Coordinate System",
"Show Coordinate System": "Show Coordinate System",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/es/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Proyección",
"Perspective Projection": "Proyección perpectiva",
"Orthographic Projection": "Proyección Ortografica",
"Scene Objects": "",
"Display G-code Filename": "Mostrar nombre del G-code",
"Hide Coordinate System": "Esconder coordenadas del sistema",
"Show Coordinate System": "Mostrar coordenadas del sistema",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/fr/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "",
"Perspective Projection": "",
"Orthographic Projection": "",
"Scene Objects": "",
"Display G-code Filename": "",
"Hide Coordinate System": "",
"Show Coordinate System": "",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/hu/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Vetítés",
"Perspective Projection": "Perspektív vetítés",
"Orthographic Projection": "Ortografikus vetítzés",
"Scene Objects": "Rész objektumok",
"Display G-code Filename": "Gcode Fájl név",
"Hide Coordinate System": "Koordináta-rendszer Eltüntetése ",
"Show Coordinate System": "Koordináta-rendszer Megjelenítés ",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/it/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "",
"Perspective Projection": "",
"Orthographic Projection": "",
"Scene Objects": "",
"Display G-code Filename": "",
"Hide Coordinate System": "",
"Show Coordinate System": "",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/ja/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "投影方法",
"Perspective Projection": "透視投影",
"Orthographic Projection": "直交射影",
"Scene Objects": "表示項目",
"Display G-code Filename": "Gコードのファイル名を表示",
"Hide Coordinate System": "座標系を非表示にする",
"Show Coordinate System": "座標系を表示する",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/nl/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Projectie",
"Perspective Projection": "Perspectief Projectie ",
"Orthographic Projection": "Orthografische Projectie",
"Scene Objects": "Scene Objecten",
"Display G-code Filename": "Toon G-code Bestandsnaam",
"Hide Coordinate System": "Verberg Coördinatie Systeem",
"Show Coordinate System": "Toon Coördinatie Systeem",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/pt-br/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Projeção",
"Perspective Projection": "Projeção de Perspectiva",
"Orthographic Projection": "Projeção ortográfica",
"Scene Objects": "Objetos de cena",
"Display G-code Filename": "Exibir o nome do arquivo G-code",
"Hide Coordinate System": "Ocultar sistema de coordenadas",
"Show Coordinate System": "Mostrar sistema de coordenadas",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/ru/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "",
"Perspective Projection": "",
"Orthographic Projection": "",
"Scene Objects": "",
"Display G-code Filename": "",
"Hide Coordinate System": "",
"Show Coordinate System": "",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/tr/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "Görünüm",
"Perspective Projection": "Perspektif Görünüm",
"Orthographic Projection": "Ortografik Görünüm",
"Scene Objects": "Sahne Nesneleri",
"Display G-code Filename": "G-kodu dosya adını görüntüle",
"Hide Coordinate System": "Koordinat Sistemini Gizle",
"Show Coordinate System": "Koordinat Sistemini Göster",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/zh-cn/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "透视效果",
"Perspective Projection": "透视图",
"Orthographic Projection": "正视图",
"Scene Objects": "场景元素",
"Display G-code Filename": "显示G-code文件名",
"Hide Coordinate System": "隐藏坐标系",
"Show Coordinate System": "显示坐标系",
Expand Down
1 change: 0 additions & 1 deletion src/web/i18n/zh-tw/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@
"Projection": "投影",
"Perspective Projection": "透視投影",
"Orthographic Projection": "正投影",
"Scene Objects": "場景物件",
"Display G-code Filename": "顯示 G-code 檔名",
"Hide Coordinate System": "隱藏座標系統",
"Show Coordinate System": "顯示座標系統",
Expand Down

0 comments on commit cbc29b1

Please sign in to comment.