Ejemplo n.º 1
0
def InstallTclProDebug(name, root, gadget):
    configure = ['./configure']

    if OS == 'macos':
        # Apple removed the headers from system frameworks because they are
        # determined to make life difficult. And the TCL configure scripts are super
        # old so don't know about this. So we do their job for them and try and find
        # a tclConfig.sh.
        #
        # NOTE however that in Apple's infinite wisdom, installing the "headers" in
        # the other location is actually broken because the paths in the
        # tclConfig.sh are pointing at the _old_ location. You actually do have to
        # run the package installation which puts the headers back in order to work.
        # This is why the below list is does not contain stuff from
        # /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
        #  '/Applications/Xcode.app/Contents/Developer/Platforms'
        #    '/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System'
        #    '/Library/Frameworks/Tcl.framework',
        #  '/Applications/Xcode.app/Contents/Developer/Platforms'
        #    '/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System'
        #    '/Library/Frameworks/Tcl.framework/Versions'
        #    '/Current',
        for p in ['/usr/local/opt/tcl-tk/lib']:
            if os.path.exists(os.path.join(p, 'tclConfig.sh')):
                configure.append('--with-tcl=' + p)
                break

    with installer.CurrentWorkingDir(os.path.join(root, 'lib', 'tclparser')):
        subprocess.check_call(configure)
        subprocess.check_call(['make'])

    installer.MakeSymlink(gadget_dir, name, root)
Ejemplo n.º 2
0
def InstallNodeDebug( name, root, gadget ):
  node_version = subprocess.check_output( [ 'node', '--version' ],
                                          universal_newlines=True ).strip()
  print( "Node.js version: {}".format( node_version ) )
  if list( map( int, node_version[ 1: ].split( '.' ) ) ) >= [ 12, 0, 0 ]:
    print( "Can't install vscode-debug-node2:" )
    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 "
           "we know, there isn't a pre-built independent package." )
    print( "My advice is to install nvm, then do:" )
    print( "  $ nvm install --lts 10" )
    print( "  $ nvm use --lts 10" )
    print( "  $ ./install_gadget.py --enable-node ..." )
    raise RuntimeError( 'Invalid node environent for node debugger' )

  with installer.CurrentWorkingDir( root ):
    subprocess.check_call( [ 'npm', 'install' ] )
    subprocess.check_call( [ 'npm', 'run', 'build' ] )
  installer.MakeSymlink( gadget_dir, name, root )