versions() gcc fix macOS
This commit is contained in:
parent
7a306cc4f9
commit
176c4e9afd
@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 4.13.1 | 2019-07-01 | `versions()` gcc fix macos |
|
||||||
| 4.13.0 | 2019-07-01 | `networkConnections()` added PID and process |
|
| 4.13.0 | 2019-07-01 | `networkConnections()` added PID and process |
|
||||||
| 4.12.2 | 2019-06-24 | `system()` added Raspberry PI 4 detection |
|
| 4.12.2 | 2019-06-24 | `system()` added Raspberry PI 4 detection |
|
||||||
| 4.12.1 | 2019-06-24 | `networkInterface()` virtual interfaces macos, `networkInterfaceDefault()` |
|
| 4.12.1 | 2019-06-24 | `networkInterface()` virtual interfaces macos, `networkInterfaceDefault()` |
|
||||||
|
|||||||
@ -83,6 +83,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">4.13.1</th>
|
||||||
|
<td>2019-07-01</td>
|
||||||
|
<td><span class="code">versions()</span> gcc fix macos</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">4.13.0</th>
|
<th scope="row">4.13.0</th>
|
||||||
<td>2019-07-01</td>
|
<td>2019-07-01</td>
|
||||||
|
|||||||
@ -168,7 +168,7 @@
|
|||||||
<img class="logo" src="assets/logo.png">
|
<img class="logo" src="assets/logo.png">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span></div>
|
<div class="subtitle"><span id="typed"></span></div>
|
||||||
<div class="version">Current Version: <span id="version">4.13.0</span></div>
|
<div class="version">Current Version: <span id="version">4.13.1</span></div>
|
||||||
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
@ -191,7 +191,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row number-section">
|
<div class="row number-section">
|
||||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||||
<div class="numbers">9,082</div>
|
<div class="numbers">9,183</div>
|
||||||
<div class="title">Lines of code</div>
|
<div class="title">Lines of code</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
|
||||||
|
|||||||
@ -410,11 +410,8 @@ function versions(callback) {
|
|||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
if (_darwin) {
|
if (_darwin) {
|
||||||
const cmdLineToolsExists = fs.existsSync('/Library/Developer/CommandLineTools/usr/bin/');
|
|
||||||
const xcodeAppExists = fs.existsSync('/Applications/Xcode.app/Contents/Developer/Tools');
|
|
||||||
const xcodeExists = fs.existsSync('/Library/Developer/Xcode/');
|
|
||||||
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/git');
|
const gitHomebrewExists = fs.existsSync('/usr/local/Cellar/git');
|
||||||
if (cmdLineToolsExists || xcodeExists || gitHomebrewExists || xcodeAppExists) {
|
if (util.darwinXcodeExists() || gitHomebrewExists) {
|
||||||
exec('git --version', function (error, stdout) {
|
exec('git --version', function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
let git = stdout.toString().split('\n')[0] || '';
|
let git = stdout.toString().split('\n')[0] || '';
|
||||||
@ -616,25 +613,29 @@ function versions(callback) {
|
|||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exec('gcc -dumpversion', function (error, stdout) {
|
if ((_darwin && util.darwinXcodeExists()) || !_darwin) {
|
||||||
if (!error) {
|
exec('gcc -dumpversion', function (error, stdout) {
|
||||||
result.gcc = stdout.toString().split('\n')[0].trim() || '';
|
if (!error) {
|
||||||
}
|
result.gcc = stdout.toString().split('\n')[0].trim() || '';
|
||||||
if (result.gcc.indexOf('.') > -1) {
|
}
|
||||||
functionProcessed();
|
if (result.gcc.indexOf('.') > -1) {
|
||||||
} else {
|
|
||||||
exec('gcc --version', function (error, stdout) {
|
|
||||||
if (!error) {
|
|
||||||
const gcc = stdout.toString().split('\n')[0].trim();
|
|
||||||
if (gcc.indexOf('gcc') > -1 && gcc.indexOf(')') > -1) {
|
|
||||||
const parts = gcc.split(')');
|
|
||||||
result.gcc = parts[1].trim() || result.gcc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
} else {
|
||||||
}
|
exec('gcc --version', function (error, stdout) {
|
||||||
});
|
if (!error) {
|
||||||
|
const gcc = stdout.toString().split('\n')[0].trim();
|
||||||
|
if (gcc.indexOf('gcc') > -1 && gcc.indexOf(')') > -1) {
|
||||||
|
const parts = gcc.split(')');
|
||||||
|
result.gcc = parts[1].trim() || result.gcc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
functionProcessed();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
functionProcessed();
|
||||||
|
}
|
||||||
exec(util.getVboxmanage() + ' -v 2>&1', function (error, stdout) {
|
exec(util.getVboxmanage() + ' -v 2>&1', function (error, stdout) {
|
||||||
if (!error) {
|
if (!error) {
|
||||||
const vbox = stdout.toString().split('\n')[0] || '';
|
const vbox = stdout.toString().split('\n')[0] || '';
|
||||||
|
|||||||
@ -386,6 +386,13 @@ function execWin(cmd, opts, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function darwinXcodeExists() {
|
||||||
|
const cmdLineToolsExists = fs.existsSync('/Library/Developer/CommandLineTools/usr/bin/');
|
||||||
|
const xcodeAppExists = fs.existsSync('/Applications/Xcode.app/Contents/Developer/Tools');
|
||||||
|
const xcodeExists = fs.existsSync('/Library/Developer/Xcode/');
|
||||||
|
return (cmdLineToolsExists || xcodeExists || xcodeAppExists);
|
||||||
|
}
|
||||||
|
|
||||||
function nanoSeconds() {
|
function nanoSeconds() {
|
||||||
const time = process.hrtime();
|
const time = process.hrtime();
|
||||||
if (!Array.isArray(time) || time.length !== 2) {
|
if (!Array.isArray(time) || time.length !== 2) {
|
||||||
@ -423,6 +430,7 @@ exports.parseHead = parseHead;
|
|||||||
exports.findObjectByKey = findObjectByKey;
|
exports.findObjectByKey = findObjectByKey;
|
||||||
exports.getWmic = getWmic;
|
exports.getWmic = getWmic;
|
||||||
exports.wmic = wmic;
|
exports.wmic = wmic;
|
||||||
|
exports.darwinXcodeExists = darwinXcodeExists;
|
||||||
exports.getVboxmanage = getVboxmanage;
|
exports.getVboxmanage = getVboxmanage;
|
||||||
exports.powerShell = powerShell;
|
exports.powerShell = powerShell;
|
||||||
exports.nanoSeconds = nanoSeconds;
|
exports.nanoSeconds = nanoSeconds;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user