Fix auto update (win tested) and add stylus

This commit is contained in:
oxmc
2025-02-13 06:34:03 -08:00
parent ab6fe350d3
commit b32fcbd8f1
17 changed files with 1570 additions and 406 deletions

View File

@@ -61,6 +61,16 @@ class SystemInfo {
return !this.laterThan(compareVersion);
}
// Get edition of the os
getEdition() {
if (this.isWin()) {
const edition = childProcess.execSync('wmic os get Caption').toString().trim();
return edition.split('\n')[1].trim();
} else {
return 'N/A';
}
}
// Private: Parse version strings (e.g., "10.0.19045" -> [10, 0, 19045])
_parseVersion(version) {
return version.split('.').map((num) => parseInt(num, 10) || 0);