LoginSignup
1
0

More than 5 years have passed since last update.

Install Visual Studio Code OSS to Debian Wheezy

Last updated at Posted at 2017-04-17
Playing with Debian Wheezy URL
Atom http://qiita.com/cielavenir/items/7835e3d110d7ad79c407
VSCode OSS http://qiita.com/cielavenir/items/8eb3f57373bac0f10d6f
Skype http://qiita.com/cielavenir/items/1b1d733e4ede8593040f
Meshlab 2016 http://qiita.com/cielavenir/items/5e02ce18d162e17c8859

Visual Studio Code provides debian package, but it requires libc6 >=2.15, which is not the case of Debian Wheezy. So we have to compile it from the source code.

Shorter way

170724

  • Uploaded 1.14.2 binary
  • Since migrating to Stretch is planned, this will be my final binary upload.

170718

  • Uploaded 1.14.1 binary
  • This build enables MarketPlace (see below).
  • To fix build: I have done:
    1. To fix ECONNRESET 191.238.172.191:443 issue, I removed ms-vscode.node-debug(2) from build/gulpfile.vscode.js. Please install from MarketPlace.
    2. In extensions/vscode-api-tests/src/workspace.test.ts, I disabled findFiles test to deal with Property 'timeout' does not exist on type 'ITest' issue.

170627

  • Uploaded 1.13.1 binary

170605

  • I saw NODE_MODULE_VERSION issue.
  • electron-rebuild might be required.
sudo npm install electron-rebuild -g
electron-rebuild

./scripts/npm.sh install --arch=x64
node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-x64
node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-x64-build-deb

Prerequisites

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -/
sudo apt-get update
sudo apt-get install nodejs
sudo npm install gulp -g # for packaging

Building

git clone https://github.com/Microsoft/vscode
cd vscode
git tag
git checkout 1.14.1 # use the latest "release" from git tag
./scripts/npm.sh install --arch=x64
node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-x64
node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-x64-build-deb
sudo dpkg -i .build/linux/deb/amd64/deb/code-oss*.deb

Extensions

Newer way

  • In building, add this snippet to product.json.
"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
}

Older (primitive) way

  • Since this is the OSS version, Extension Marketplace is disabled.
  • You have to install extentions manually.
  1. Search for the extension in marketplace ( https://marketplace.visualstudio.com/ )
  2. Convert the URI ( https://marketplace.visualstudio.com/items?itemName=... ) and version to file URI (use a small Ruby (1.9 compatible) script below)
  3. Download the file
  4. Install it via code-oss --install-extension file.vsix
show_vsix_uri.rb
#!/usr/bin/ruby
#acknowledgement: http://www.usagi1975.com/26jan171624/
#after downloading the specified URI, use: code --install-extension
require 'uri'
require 'net/http'
require 'json'
uri=URI.parse(ARGV[0])
http=Net::HTTP.new(uri.host,uri.port)
http.use_ssl=true
json=http.start{
  resp=http.get(uri.path+'?'+uri.query)
  JSON.parse(resp.body.split('<script class="vss-extension"')[1].split('</script>')[0].split('>')[1])
}
puts "wget -O #{json['extensionName']}_#{json['versions'][0]['version']}.vsix https://#{json['publisher']['publisherName']}.gallery.vsassets.io/_apis/public/gallery/publisher/#{json['publisher']['publisherName']}/extension/#{json['extensionName']}/#{json['versions'][0]['version']}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0