Parcourir la source

Windows entry point updates

production
pb il y a 1 an
Parent
révision
80e0f82be6
3 fichiers modifiés avec 78 ajouts et 57 suppressions
  1. 1
    0
      cliverse.js
  2. 13
    57
      i.win.js
  3. 64
    0
      tooling.sh

+ 1
- 0
cliverse.js Voir le fichier

@@ -150,6 +150,7 @@ var cli = {
const clii = readline.createInterface({ input: process.stdin, output: process.stdout });
return new Promise((resolve, reject)=>{
clii.question(q, (answer)=>{
console.log(answer)
try {
clii.close();
console.log("readline.createInterface closed");

+ 13
- 57
i.win.js Voir le fichier

@@ -888,8 +888,7 @@ catch(e) {
}

function __main( selectedinstance ){
var downloadsdir = selectedinstance.root + '\\..\\Downloads';

var downloadsdir = path.dirname(selectedinstance.root) + '\\Downloads';
var callsheltask = function(args) {
// console.log('callsheltask : ' + args)
return function() { return nodeShellExec.apply(null, args) } }
@@ -1005,12 +1004,15 @@ function __main( selectedinstance ){
// console.log('-------------exists=======================')
// console.dir(exists)
// console.log(self.shellcmd)
// console.log(exists.messages.join(' ').indexOf(self.shellcmd))
// console.log(exists + ' ' + self.shellcmd + ' exists')
if(exists && (exists.messages.join(' ').indexOf(self.shellcmd) > -1) ) {
// console.log(exists.messages.join(' ').toLowerCase().indexOf(self.shellcmd.toLowerCase()))
if(exists && (exists.messages.join(' ').toLowerCase().indexOf(self.shellcmd.toLowerCase()) > -1) ) {
console.log(' ' + self.shellcmd + ' exists')
return true;
}
else return false
else {
console.log(' ' + self.shellcmd + ' doesnt exist')
return false
}
})['catch'](function(e){
// console.log('-------------exists catch=======================')
console.dir(e)
@@ -1354,10 +1356,11 @@ function __main( selectedinstance ){
, preinstallsteps: function() {
var self = this;
console.log('Node preinstall steps')

// console.log(this.installcmd)
// console.log(path.normalize(downloadsdir + '/' + 'node-v14.17.3-x64.msi'))
var steps = [];
steps.push(
function(){
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' })
@@ -1443,7 +1446,7 @@ function __main( selectedinstance ){
, {
// C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe
// SQL Management studio 2018
shellcmd: 'Ssms.exe',
shellcmd: 'sqlcmd.exe', // 'Ssms.exe',
url: 'https://aka.ms/ssmsfullsetup'
, installer: 'SSMS-Setup-ENU.exe'
, installcmd: ['cmd', ['/c', 'start',
@@ -1452,12 +1455,7 @@ function __main( selectedinstance ){
//, 'SSMSInstallRoot=%systemdrive%\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio'
]]
, install : install
, exists : function(){
var self = this;
var installedpath = 'C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 18\\Common7\\IDE\\Ssms.exe'
console.log('checking existence of ' + installedpath)
return Promise.resolve(existsSync(installedpath))
}
, exists : exists
, preinstallsteps: function() {
var self = this;
console.log('smss 2018 preinstall steps')
@@ -1481,48 +1479,6 @@ function __main( selectedinstance ){
// return any([any(steps), any(prompts)])
}
}
, {
// C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\Ssms.exe
shellcmd: 'Ssms.exe', // SQL Mgmt Studo 2017
url: 'https://go.microsoft.com/fwlink/?linkid=2043154&clcid=0x409'
, installer: 'SSMS-Setup-ENU-2017.exe'
, installcmd: ['cmd', ['/c', 'start',
'/WAIT', downloadsdir + '/' + 'SSMS-Setup-ENU-2017.exe'
, '/IAcceptSQLServerLicenseTerms'
//, 'SSMSInstallRoot=%systemdrive%\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio'
]]
, install : install
, exists : function(){
return Promise.resolve(false)
var self = this;
// var installedpath = 'C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 18\\Common7\\IDE\\Ssms.exe'
var installedpath = 'C:\\Program Files (x86)\\Microsoft SQL Server\\140\\Tools\\Binn\\ManagementStudio\\Ssms.exe'
console.log('checking existence of ' + installedpath)
return Promise.resolve(existsSync(installedpath))
}
, 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: 'sqlservr.exe',
url: 'https://go.microsoft.com/fwlink/?linkid=866658'

+ 64
- 0
tooling.sh Voir le fichier

@@ -0,0 +1,64 @@



https://support.nesi.org.nz/hc/en-gb/articles/4407442866703-X-Forwarding-using-the-Ubuntu-Terminal-Windows-10-

https://cat.pdx.edu/platforms/windows/remote-access/xming/

10.10.5.127 - xming


# RESET MYSQL PASSWORD

sudo service mysqld stop -- sudo /etc/init.d/mysql stop # Stop the MySQL Server:

sudo mkdir -v /var/run/mysqld && sudo chown mysql /var/run/mysqld #(In some cases, if /var/run/mysqld doesn't exist, you have to create it at first:
sudo mysqld --skip-grant-tables & #Start the mysqld configuration
mysql -u root mysql #Login to MySQL as root:
#Replace YOURNEWPASSWORD with your new password:

UPDATE mysql.user SET authentication_string=null WHERE User='root';
FLUSH PRIVILEGES;
exit;

ps -fd | grep mysqld
sudo kill (mydsqld PID)
service start mysql...

mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd';

#-----------------------
#xrdp
#-----------------------
sudo apt install xrdp
nano /etc/xrdp/startwm.sh
Add in the very top:

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
then:

sudo systemctl restart xrdp
https://askubuntu.com/questions/1245020/xrdp-on-ubuntu-20-04



#-----------------------
#tightvncserver
#-----------------------
sudo apt install tightvncserver
sudo tightvncserver


#-----------------------
#INSTALL GOOGLE CHROME
#-----------------------
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

#-----------------------
#appending-a-line-to-a-file-only-if-it-does-not-already-exist
#-----------------------
https://stackoverflow.com/questions/3557037/appending-a-line-to-a-file-only-if-it-does-not-already-exist
grep -qxF 'include "/configs/projectname.conf"' foo.bar || echo 'include "/configs/projectname.conf"' >> foo.bar

Chargement…
Annuler
Enregistrer