-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Check if Java is installed on user's pc * Fix bug causing kml module to hang
- Loading branch information
1 parent
e5de3e6
commit ee711d0
Showing
9 changed files
with
161 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"version": "1.0", | ||
"components": [ | ||
"Microsoft.VisualStudio.Workload.NativeDesktop", | ||
"microsoft.visualstudio.component.debugger.justintime", | ||
"microsoft.visualstudio.component.vc.diagnostictools", | ||
"microsoft.visualstudio.component.vc.cmake.project", | ||
"microsoft.visualstudio.component.vc.atl", | ||
"microsoft.visualstudio.component.vc.testadapterforboosttest", | ||
"microsoft.visualstudio.component.vc.testadapterforgoogletest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const log = window.require('electron-log'); | ||
|
||
export const DASHBOARD_ADD_NOTICE = 'DASHBOARD_ADD_NOTICE'; | ||
|
||
export const DASHBOARD_CLEAR_NOTICE = 'DASHBOARD_CLEAR_NOTICE'; | ||
|
||
|
||
export function clearNotice(){ | ||
return { | ||
type: DASHBOARD_CLEAR_NOTICE | ||
}; | ||
} | ||
|
||
export function addDashboardNotice(notice){ | ||
return { | ||
type: DASHBOARD_ADD_NOTICE, | ||
notice: notice | ||
}; | ||
} | ||
|
||
/* | ||
* Check if is installed | ||
*/ | ||
export function checkIfJavaIsInstalled(){ | ||
return (dispatch, getState) => { | ||
var spawn = window.require('child_process').spawn('java', ['-version']); | ||
spawn.on('error', function(err){ | ||
//return callback(err, null); | ||
log.error(err); | ||
}) | ||
|
||
spawn.stdout.on('data', function(data) { | ||
console.log("spawn.stdout.on:", data); | ||
}); | ||
|
||
spawn.stderr.on('data', function(data) { | ||
|
||
//Check if java is in string data | ||
var javaCheck = new RegExp('java', 'i').test(data); | ||
|
||
// | ||
data = data.toString().split('\n')[0]; | ||
var javaVersion = new RegExp('java version').test(data) ? data.split(' ')[2].replace(/"/g, '') : false; | ||
|
||
if (javaCheck != false) { | ||
// TODO: We have Java installed | ||
dispatch(clearNotice()); | ||
|
||
} else { | ||
log.error("Java cannot be detected on your system. It is required by the application. Download Java from https://www.java.com/en/download"); | ||
dispatch(addDashboardNotice({ | ||
message: "Java cannot be detected on your system. It is required by the application. Download Java from https://www.java.com/en/download", | ||
type: 'danger' | ||
})) | ||
//@TODO: No Java installed | ||
} | ||
}); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { | ||
DASHBOARD_ADD_NOTICE, | ||
DASHBOARD_CLEAR_NOTICE | ||
} from './dashboard-actions'; | ||
|
||
const INITIAL_DASHBOARD_STATE = { | ||
//{message, type} | ||
notice: null | ||
} | ||
|
||
export default function dashboard(state = INITIAL_DASHBOARD_STATE, action){ | ||
switch (action.type) { | ||
case DASHBOARD_ADD_NOTICE: | ||
return { | ||
...state, | ||
notice: action.notice | ||
}; | ||
case DASHBOARD_CLEAR_NOTICE: | ||
return { | ||
...state, | ||
notice: null | ||
} | ||
default: | ||
return state; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const VERSION = "0.4.3"; | ||
export const VERSION = "0.4.4"; | ||
|
||
export default VERSION; |