Browse Source

linux specific changes

production
Blesson 2 years ago
parent
commit
ac27278ec0
4 changed files with 7884 additions and 0 deletions
  1. 3863
    0
      elxr_linux.js
  2. 3968
    0
      index_linux.js
  3. 19
    0
      linux.js
  4. 34
    0
      win32.js

+ 3863
- 0
elxr_linux.js
File diff suppressed because it is too large
View File


+ 3968
- 0
index_linux.js
File diff suppressed because it is too large
View File


+ 19
- 0
linux.js View File

@@ -0,0 +1,19 @@
module.exports = {
verifyAndInstall() {
return Promise.resolve(true);
}

, acquireElevationState(__isElevated) {
//__isElevated = false;
if (__isElevated === null) { return Promise.resolve(__isElevated) }
else
return Promise.resolve(__isElevated);
}

, verifyAndInstallPrerequisites() {
return Promise.resolve(true);
}
, whichOS() {
console.log("OS - Linux");
}
};

+ 34
- 0
win32.js View File

@@ -0,0 +1,34 @@
module.exports = {
verifyAndInstall(){
return getTaskCheckExists(this.shellcmd, { ignorefailures: true })().then((exists) => {
if(exists) {
// return any(['git', ['config', '--global', '-l']].map(getshelltask))
return this.postinstallsteps.bind(this)()
}
return this.install();
});
},

acquireElevationState(__isElevated) {
if (__isElevated === null) {
return nodeShellExec("fsutil", ["dirty", "query", "C:"], {
inherit: true
// , shell: true
, stdio: 'ignore'
, env: process.env
, title: `check privileged execution mode using "fsutil dirty query C:"`
}).then((exitcode) => {
console.log('Elevated')
__isElevated = true;
return true;
}).catch(() => {
__isElevated = false;
console.log('Not Elevated');
return false;
});
}
else return Promise.resolve(__isElevated);
},

}


Loading…
Cancel
Save