Skip to content

Commit 0f966e8

Browse files
committed
Removed the singleInstanceLock; electron bug
APP_TITLE = APP_DESC
1 parent 9cf2039 commit 0f966e8

File tree

5 files changed

+7
-25
lines changed

5 files changed

+7
-25
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- Contacts: ganeshrvel@outlook.com
77
- Requirements: Node.js v10 or higher, yarn
88

9-
##### Advanced and highly scalable boilerplate built using Electron v4, React v16, Redux v4, Webpack v4, Babel v7 {HMR, Helmet, Loadables, Dynamic Reducer Injection, Selectors, Code splitting}
9+
##### Advanced and Highly Scalable Boilerplate for building Electron app - Electron v4, React v16, Redux v4, Webpack v4, Babel v7 {HMR, Helmet, Loadables, Dynamic Reducer Injection, Selectors, Code splitting}
1010

1111
###### Electron.js is an excellent framework for creating cross-platform native applications using HTML/CSS/JS. But there are only a handful of frameworks available online to get going and I found most of them lack advanced features.
1212

app/constants/meta.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export const AUTHOR_NAME = undefinedOrNullChained(author, 'name')
3131
? author.name
3232
: null;
3333

34-
export const APP_TITLE = `${description}`;
34+
export const APP_DESC = `${description}`;
35+
36+
export const APP_TITLE = `${APP_NAME}`;
3537

3638
export const APP_IDENTIFIER = `${name}`;
3739

app/main.dev.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { nonBootableDeviceWindow } from './utils/createWindows';
1717
import { APP_TITLE } from './constants/meta';
1818
import { isPackaged } from './utils/isPackaged';
1919

20-
const isSingleInstance = app.requestSingleInstanceLock();
2120
const isDeviceBootable = bootTheDevice();
2221
const isMas = electronIs.mas();
2322
let mainWindow = null;
@@ -103,25 +102,6 @@ if (!isDeviceBootable) {
103102
}
104103
};
105104

106-
if (!isSingleInstance) {
107-
app.quit();
108-
} else {
109-
try {
110-
app.on('second-instance', () => {
111-
if (mainWindow) {
112-
if (mainWindow.isMinimized()) {
113-
mainWindow.restore();
114-
}
115-
mainWindow.focus();
116-
}
117-
});
118-
119-
app.on('ready', () => {});
120-
} catch (e) {
121-
log.error(e, `main.dev -> second-instance`);
122-
}
123-
}
124-
125105
const createWindow = async () => {
126106
try {
127107
if (IS_DEV || DEBUG_PROD) {

app/templates/menu.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
import { APP_GITHUB_URL, APP_NAME, APP_TITLE } from '../constants/meta';
3+
import { APP_GITHUB_URL, APP_NAME, APP_DESC } from '../constants/meta';
44

55
const inviteViaEmailSubject = APP_NAME;
66

7-
const inviteViaEmailBody = `Looking for an advanced Electron Boilerplate? %0D%0A Download "${APP_NAME}" - ${APP_TITLE} from ${APP_GITHUB_URL} for free. %0D%0A It's Safe, Transparent, Open-Source and FREE for a lifetime!`;
7+
const inviteViaEmailBody = `Looking for an advanced Electron Boilerplate? %0D%0A Download "${APP_NAME}" - ${APP_DESC} from ${APP_GITHUB_URL} for free. %0D%0A It's Safe, Transparent, Open-Source and FREE for a lifetime!`;
88

99
export const inviteViaEmail = `mailto:?Subject=${inviteViaEmailSubject}&Body=${inviteViaEmailBody}`;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "electron-react-redux-advanced-boilerplate",
33
"productName": "Electron-React-Redux-Advanced-Boilerplate",
44
"version": "2.0.2",
5-
"description": "Advanced and highly scalable boilerplate built using Electron v4, React v16, Redux v4, Webpack v4, Babel v7 {HMR, Loadables, Dynamic Reducer Injection, Selectors, Code splitting}",
5+
"description": "Advanced and Highly Scalable Boilerplate for building Electron app - Electron v4, React v16, Redux v4, Webpack v4, Babel v7 {HMR, Helmet, Loadables, Dynamic Reducer Injection, Selectors, Code splitting}",
66
"scripts": {
77
"build": "yarn lint && concurrently \"yarn build-main\" \"yarn build-renderer\"",
88
"build-dll": "cross-env NODE_ENV=development node --trace-warnings -r @babel/register ./node_modules/webpack/bin/webpack --config ./webpack/config.renderer.dev.dll.babel.js --colors",

0 commit comments

Comments
 (0)