Browse Source

Fixed Use.

pull/9/head
pb 2 years ago
parent
commit
493bbc0149
2 changed files with 73 additions and 4 deletions
  1. 67
    0
      i.win.js
  2. 6
    4
      index.js

+ 67
- 0
i.win.js View File

, postinstallsteps : function() { return sysAddPathVar('%USERPROFILE%\\AppData/Local\\Microsoft\\WindowsApps') } , postinstallsteps : function() { return sysAddPathVar('%USERPROFILE%\\AppData/Local\\Microsoft\\WindowsApps') }
, exists : exists , exists : exists
} }
, {
shellcmd: 'sqlexpress',
url: 'https://go.microsoft.com/fwlink/?linkid=866658'
, installer: 'SQL2019-SSEI-Expr.exe'
, installcmd: ['cmd', ['/c', 'start',
'/WAIT', downloadsdir + '/' + 'SQL2019-SSEI-Expr.exe'
, '/Quiet'
//, 'SSMSInstallRoot=%systemdrive%\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio'
]]
, install : install
, exists : exists
, preinstallsteps: function() {
var self = this;
console.log('Node preinstall steps')

var steps = [];
steps.push(
function(){
if (!existsSync(downloadsdir + '/' + self.installer)) {
return nodeShellExec(selectedinstance.root + '/.elxr/run-' + runtimestamp + '/download.bat', ['"' + self.url + '"', downloadsdir + '/' + self.installer]
, { waitmsg : 'downloading '+ self.shellcmd +' please wait' })
}
else {
console.log(self.installer + ' Already exits Download skipped.')
return Promise.resolve(true)
}
}
)
return any(steps)
// return any([any(steps), any(prompts)])
}
}
, {
shellcmd: 'Ssms2019.exe',
url: 'https://aka.ms/ssmsfullsetup'
, installer: 'SSMS-Setup-ENU.exe'
, installcmd: ['cmd', ['/c', 'start',
'/WAIT', downloadsdir + '/' + 'SSMS-Setup-ENU.exe'
, '/Quiet'
//, 'SSMSInstallRoot=%systemdrive%\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio'
]]
, install : install
, exists : exists
, preinstallsteps: function() {
var self = this;
console.log('smss preinstall steps')

var steps = [];
steps.push(
function(){
if (!existsSync(downloadsdir + '/' + self.installer)) {
console.log(self.url)
return nodeShellExec(selectedinstance.root + '/.elxr/run-' + runtimestamp + '/download.bat', ['"' + self.url + '"', downloadsdir + '/' + self.installer]
, { waitmsg : 'downloading '+ self.shellcmd +' please wait' })
}
else {
console.log(self.installer + ' Already exits Download skipped.')
return Promise.resolve(true)
}
}
)
return any(steps)
// return any([any(steps), any(prompts)])
}
}
, { , {
shellcmd: 'Ssms.exe', shellcmd: 'Ssms.exe',
url: 'https://go.microsoft.com/fwlink/?linkid=2043154&clcid=0x409' url: 'https://go.microsoft.com/fwlink/?linkid=2043154&clcid=0x409'

+ 6
- 4
index.js View File

eltask.statuslog = statuslog eltask.statuslog = statuslog
eltask.selectedinstance = selectedinstance eltask.selectedinstance = selectedinstance
eltask.processedArgs = processedArgs eltask.processedArgs = processedArgs
var etask = shell_verse.getElevatedTask(eltask)
eltask.runtimestamp = runtimestamp
var eltask = shell_verse.getElevatedTask(eltask)


return etask().then( ()=>{ return netask() })
return eltask().then( ()=>{ return netask() })


}).catch((e) => { }).catch((e) => {
fs.writeFileSync('run.done', 'error : ' + e) fs.writeFileSync('run.done', 'error : ' + e)
, node_env : selectedinstance.node_env, reposerver : 'https://git.bbh.org.in' } // options , node_env : selectedinstance.node_env, reposerver : 'https://git.bbh.org.in' } // options
) )


__default = Object.assign(__default, __repo_manifest, {
__default = utils.assign_core( { arraymergetype : utils.assign_core.DISTINCT_UNION }
, __default, __repo_manifest, {
// Common baseline repos for all chess instances. // Common baseline repos for all chess instances.
repos : (()=> { repos : (()=> {
var __repos = [ var __repos = [
// Requires elevation only in windows // Requires elevation only in windows
, elevated : [ { repo : 'chess-server-lib', requiresElevation : true } ] , elevated : [ { repo : 'chess-server-lib', requiresElevation : true } ]
, exludeMergeRepos : { } , exludeMergeRepos : { }
})
}, )
initinstances(selectedinstance) initinstances(selectedinstance)
return selectedinstance return selectedinstance

Loading…
Cancel
Save