Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix how to handle killing processes in Windows #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var execPath = "RScript"


if(process.platform == WINDOWS){
//killStr = "taskkill /im Rscript.exe /f"
killStr = "taskkill /im Rscript.exe /f"
appPath = appPath.replace(/\\/g, "\\\\");
execPath = path.join(app.getAppPath(), "R-Portable-Win", "bin", "RScript.exe" )
} else if(process.platform == MACOS){
Expand Down Expand Up @@ -143,11 +143,12 @@ app.on('ready', createWindow)

// Quit when all windows are closed.
app.on('window-all-closed', function () {
console.log('EVENT::window-all-closed')
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
cleanUpApplication()

if(process.platform==MACOS){
console.log('EVENT::window-all-closed')
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
cleanUpApplication()
}
})

app.on('activate', function () {
Expand Down