Fix installation issues
This commit is contained in:
parent
cf2ac77391
commit
d29b0ebcfd
3 changed files with 35 additions and 17 deletions
|
|
@ -42,8 +42,9 @@ stages:
|
||||||
go get -u github.com/go-delve/delve/cmd/dlv
|
go get -u github.com/go-delve/delve/cmd/dlv
|
||||||
displayName: 'Install Delve for Go'
|
displayName: 'Install Delve for Go'
|
||||||
|
|
||||||
- bash: python3 install_gadget.py --all
|
# TODO: Use cache to store the download directory
|
||||||
displayName: 'Install gadgets'
|
- bash: python3 install_gadget.py --all --force-all
|
||||||
|
displayName: 'Install gadgets - python3'
|
||||||
|
|
||||||
- bash: vim --version
|
- bash: vim --version
|
||||||
displayName: 'Print vim version information'
|
displayName: 'Print vim version information'
|
||||||
|
|
@ -68,14 +69,17 @@ stages:
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'macOS-10.13'
|
vmImage: 'macOS-10.13'
|
||||||
steps:
|
steps:
|
||||||
- bash: brew unlink node@6 && brew install macvim node
|
- bash: |
|
||||||
|
brew unlink node@6
|
||||||
|
brew install macvim node@10
|
||||||
|
brew link --force --overwrite node@10
|
||||||
displayName: 'Install vim and node'
|
displayName: 'Install vim and node'
|
||||||
|
|
||||||
- bash: go get -u github.com/go-delve/delve/cmd/dlv
|
- bash: go get -u github.com/go-delve/delve/cmd/dlv
|
||||||
displayName: 'Install Delve for Go'
|
displayName: 'Install Delve for Go'
|
||||||
|
|
||||||
- bash: python3 install_gadget.py --all
|
- bash: python3 install_gadget.py --all --force-all
|
||||||
displayName: 'Install gadgets'
|
displayName: 'Install gadgets - python3'
|
||||||
|
|
||||||
- bash: vim --version
|
- bash: vim --version
|
||||||
displayName: 'Print vim version information'
|
displayName: 'Print vim version information'
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import contextlib
|
||||||
import os
|
import os
|
||||||
import string
|
import string
|
||||||
import zipfile
|
import zipfile
|
||||||
|
import gzip
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import traceback
|
import traceback
|
||||||
|
|
@ -33,6 +34,11 @@ import hashlib
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
try:
|
||||||
|
from io import BytesIO ## for Python 3
|
||||||
|
except ImportError:
|
||||||
|
from BytesIO import BytesIO
|
||||||
|
|
||||||
# Include vimspector source, for utils
|
# Include vimspector source, for utils
|
||||||
sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ),
|
sys.path.insert( 1, os.path.join( os.path.dirname( __file__ ),
|
||||||
'python3' ) )
|
'python3' ) )
|
||||||
|
|
@ -150,8 +156,8 @@ GADGETS = {
|
||||||
'url': 'https://marketplace.visualstudio.com/_apis/public/gallery/'
|
'url': 'https://marketplace.visualstudio.com/_apis/public/gallery/'
|
||||||
'publishers/ms-vscode/vsextensions/mono-debug/${version}/'
|
'publishers/ms-vscode/vsextensions/mono-debug/${version}/'
|
||||||
'vspackage',
|
'vspackage',
|
||||||
'target': 'vscode-mono-debug.tar.gz',
|
'target': 'vscode-mono-debug.vsix.gz',
|
||||||
'format': 'tar',
|
'format': 'zip.gz',
|
||||||
},
|
},
|
||||||
'all': {
|
'all': {
|
||||||
'file_name': 'vscode-mono-debug.vsix',
|
'file_name': 'vscode-mono-debug.vsix',
|
||||||
|
|
@ -226,19 +232,20 @@ GADGETS = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'debugger-for-chrome': {
|
'debugger-for-chrome': {
|
||||||
'language': 'typescript',
|
'language': 'chrome',
|
||||||
'enabled': False,
|
'enabled': False,
|
||||||
'download': {
|
'download': {
|
||||||
'url': 'https://marketplace.visualstudio.com/_apis/public/gallery/'
|
'url': 'https://marketplace.visualstudio.com/_apis/public/gallery/'
|
||||||
'publishers/msjsdiag/vsextensions/'
|
'publishers/msjsdiag/vsextensions/'
|
||||||
'debugger-for-chrome/${version}/vspackage',
|
'debugger-for-chrome/${version}/vspackage',
|
||||||
'target': 'msjsdiag.debugger-for-chrome-4.12.0.tar.gz',
|
'target': 'msjsdiag.debugger-for-chrome-4.12.0.vsix.gz',
|
||||||
'format': 'tar',
|
'format': 'zip.gz',
|
||||||
},
|
},
|
||||||
'all': {
|
'all': {
|
||||||
'version': '4.12.0',
|
'version': '4.12.0',
|
||||||
'file_name': 'msjsdiag.debugger-for-chrome-4.12.0.vsix',
|
'file_name': 'msjsdiag.debugger-for-chrome-4.12.0.vsix',
|
||||||
'checksum': ''
|
'checksum':
|
||||||
|
'0df2fe96d059a002ebb0936b0003e6569e5a5c35260dc3791e1657d27d82ccf5'
|
||||||
},
|
},
|
||||||
'adapters': {
|
'adapters': {
|
||||||
'chrome': {
|
'chrome': {
|
||||||
|
|
@ -275,7 +282,7 @@ def InstallCppTools( name, root ):
|
||||||
|
|
||||||
# It's hilarious, but the execute bits aren't set in the vsix. So they
|
# It's hilarious, but the execute bits aren't set in the vsix. So they
|
||||||
# actually have javascript code which does this. It's just a horrible horrible
|
# actually have javascript code which does this. It's just a horrible horrible
|
||||||
# hoke that really is not funny.
|
# hack that really is not funny.
|
||||||
MakeExecutable( os.path.join( extension, 'debugAdapters', 'OpenDebugAD7' ) )
|
MakeExecutable( os.path.join( extension, 'debugAdapters', 'OpenDebugAD7' ) )
|
||||||
with open( os.path.join( extension, 'package.json' ) ) as f:
|
with open( os.path.join( extension, 'package.json' ) ) as f:
|
||||||
package = json.load( f )
|
package = json.load( f )
|
||||||
|
|
@ -325,9 +332,10 @@ def InstallTclProDebug( name, root ):
|
||||||
|
|
||||||
|
|
||||||
def InstallNodeDebug( name, root ):
|
def InstallNodeDebug( name, root ):
|
||||||
node_version = subprocess.check_output( [ 'node', '--version' ] ).strip()
|
node_version = subprocess.check_output( [ 'node', '--version' ],
|
||||||
|
universal_newlines=True ).strip()
|
||||||
print( "Node.js version: {}".format( node_version ) )
|
print( "Node.js version: {}".format( node_version ) )
|
||||||
if map( int, node_version[ 1: ].split( '.' ) ) >= [ 12, 0, 0 ]:
|
if list( map( int, node_version[ 1: ].split( '.' ) ) ) >= [ 12, 0, 0 ]:
|
||||||
print( "Can't install vscode-debug-node2:" )
|
print( "Can't install vscode-debug-node2:" )
|
||||||
print( "Sorry, you appear to be running node 12 or later. That's not "
|
print( "Sorry, you appear to be running node 12 or later. That's not "
|
||||||
"compatible with the build system for this extension, and as far as "
|
"compatible with the build system for this extension, and as far as "
|
||||||
|
|
@ -365,7 +373,6 @@ def DownloadFileTo( url, destination, file_name = None, checksum = None ):
|
||||||
print( "Removing existing {}".format( file_path ) )
|
print( "Removing existing {}".format( file_path ) )
|
||||||
os.remove( file_path )
|
os.remove( file_path )
|
||||||
|
|
||||||
|
|
||||||
r = urllib2.Request( url, headers = { 'User-Agent': 'Vimspector' } )
|
r = urllib2.Request( url, headers = { 'User-Agent': 'Vimspector' } )
|
||||||
|
|
||||||
print( "Downloading {} to {}/{}".format( url, destination, file_name ) )
|
print( "Downloading {} to {}/{}".format( url, destination, file_name ) )
|
||||||
|
|
@ -431,7 +438,13 @@ def ExtractZipTo( file_path, destination, format ):
|
||||||
if format == 'zip':
|
if format == 'zip':
|
||||||
with ModePreservingZipFile( file_path ) as f:
|
with ModePreservingZipFile( file_path ) as f:
|
||||||
f.extractall( path = destination )
|
f.extractall( path = destination )
|
||||||
return
|
elif format == 'zip.gz':
|
||||||
|
with gzip.open( file_path, 'rb' ) as f:
|
||||||
|
file_contents = f.read()
|
||||||
|
|
||||||
|
with ModePreservingZipFile( BytesIO( file_contents ) ) as f:
|
||||||
|
f.extractall( path = destination )
|
||||||
|
|
||||||
elif format == 'tar':
|
elif format == 'tar':
|
||||||
try:
|
try:
|
||||||
with tarfile.open( file_path ) as f:
|
with tarfile.open( file_path ) as f:
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ RUN apt-get update && \
|
||||||
gdb \
|
gdb \
|
||||||
lldb \
|
lldb \
|
||||||
curl \
|
curl \
|
||||||
nodejs && \
|
nodejs \
|
||||||
|
npm && \
|
||||||
apt-get -y autoremove
|
apt-get -y autoremove
|
||||||
|
|
||||||
RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
|
RUN ln -fs /usr/share/zoneinfo/Europe/London /etc/localtime && \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue