Compare commits

...

14 Commits

Author SHA1 Message Date
Peter Squicciarini
dc75d7df46 Remove badge from README 2018-10-06 22:05:32 -04:00
Peter Squicciarini
f805d740bb Undo telemetry before build (#27)
Closes #26 

* Undo telemetry before build

* Update README to clarify telemetry disabling process
2018-10-05 09:43:05 -04:00
Peter Squicciarini
ae47b31091 32 bit builds (#32)
* Support 32-bit Linux builds

* Update README and correct scripts

* Use npm run instead of npx
2018-10-04 18:05:05 -04:00
Peter Squicciarini
1a85464271 Merge pull request #30 from VSCodium/32-bit-readme
Typo regarding 32-bit
2018-10-03 14:38:58 -04:00
Peter Squicciarini
6346d7f6bb Typo regarding 32-bit 2018-10-03 14:14:54 -04:00
Peter Squicciarini
cc9e2c6dec Update README.md
Add badges for build/version/downloads/license
2018-09-21 20:49:52 -04:00
Peter Squicciarini
8a561e165d Don't let MS add their apt repo to the system (#24)
Fixes #23
2018-09-21 20:26:52 -04:00
Peter Squicciarini
fec74ec8ce Update README.md to make downloaded files more clear 2018-09-20 12:32:28 -04:00
Ruslan Gainutdinov
606d3f8ff2 If vscode exists, fetch updates (#19) 2018-09-20 09:32:49 -04:00
Peter Squicciarini
2bf10dde0c Update README
Moved things around, added ToC, clarified instructions for migration, fleshed out Why section.
Include maintainer comment and explicitly state that we do not pass the telemetry flag
Fixes #15
2018-09-18 16:05:31 -04:00
Peter Squicciarini
a9b42f5af4 Update README.md to include brew cask instructions
Close #9
2018-09-13 09:42:41 -04:00
Peter Squicciarini
56bce30b73 Update README.md 2018-09-12 20:55:04 -04:00
Peter Squicciarini
ee1cf86ff7 Rename app to VSCodium (#12) 2018-09-10 16:18:00 -04:00
Peter Squicciarini
058f0db4f3 Fix race condition (#10)
* Fix race condition

* Add check for GITHUB_TOKEN env var
2018-08-31 10:53:36 -04:00
9 changed files with 215 additions and 24 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vscode

View File

@@ -1,9 +1,10 @@
if: tag IS blank
matrix:
include:
- os: linux
sudo: required
- os: linux
sudo: required
env: BUILDARCH=ia32
- os: osx
language: node_js
@@ -23,11 +24,15 @@ before_deploy:
deploy:
provider: releases
skip_cleanup: true
overwrite: true
name: $LATEST_MS_TAG
api_key: $GITHUB_TOKEN
file_glob: true
file:
- ./*.zip
- ./*.tar.gz
- vscode/.build/linux/deb/i386/deb/*.deb
- vscode/.build/linux/rpm/i386/*.rpm
- vscode/.build/linux/deb/amd64/deb/*.deb
- vscode/.build/linux/rpm/x86_64/*.rpm
on:

View File

@@ -1,15 +1,97 @@
## VSCodium
# VSCodium
### Free/Libre Open Source Software Binaries of VSCode
[![build status](https://travis-ci.com/VSCodium/vscodium.svg?branch=master)](https://travis-ci.com/VSCodium/vscodium)
[![current release](https://img.shields.io/github/release/vscodium/vscodium.svg)](https://github.com/vscodium/vscodium/releases)
[![license](https://img.shields.io/github/license/VSCodium/vscodium.svg)](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
## Table of Contents
- [Download/Install](#download-install)
- [Install with Brew](#install-with-brew)
- [Why Does This Exist](#why)
- [Getting all the Telemetry Out](#disable-telemetry)
- [Supported OS](#supported-os)
- [Extensions + Marketplace](#extensions-marketplace)
- [Migrating from Visual Studio Code to VSCodium](#migrating)
## <a id="download-install"></a>Download/Install
:tada: :tada: [Download latest release here](https://github.com/VSCodium/vscodium/releases) :tada: :tada:
#### <a id="install-with-brew"></a>Install with Brew
If you are on a Mac and have [Homebrew](https://brew.sh/) installed:
```bash
brew cask install vscodium
```
_Note: if you see "App cant be opened because it is from an unidentified developer" when opening VSCodium the first time, you can right-click the application and choose Open. This should only be required the first time opening on a Mac._
## <a id="why"></a>Why Does This Exist
This repository contains a build file to generate FLOSS release binaries of Microsoft's VSCode.
[Download binaries here](https://github.com/VSCodium/vscodium/releases)
Microsoft's downloads of Visual Studio Code are licensed under [this not-FLOSS license](https://code.visualstudio.com/license) and contain telemetry/tracking. According to [this comment](https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005) from a Visual Studio Code maintainer:
Microsoft's downloads of VSCode are licensed under [this not-FLOSS license](https://code.visualstudio.com/license). That's why this repo exists. So you don't have to download+build from source.
> When we [Microsoft] build Visual Studio Code, we do exactly this. We clone the vscode repository, we lay down a customized product.json that has Microsoft specific functionality (telemetry, gallery, logo, etc.), and then produce a build that we release under our license.
>
> When you clone and build from the vscode repo, none of these endpoints are configured in the default product.json. Therefore, you generate a "clean" build, without the Microsoft customizations, which is by default licensed under the MIT license
This repo exists so that you don't have to download+build from source. The build scripts in this repo clone Microsoft's vscode repo, run the build commands, and upload the resulting binaries to [GitHub releases](https://github.com/VSCodium/vscodium/releases). __These binaries are licensed under the MIT license. Telemetry is enabled by a build flag which we do not pass.__
If you want to build from source yourself, head over to [Microsoft's vscode repo](https://github.com/Microsoft/vscode) and follow their [instructions](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run). This repo exists to make it easier to get the latest version of MIT-licensed VSCode.
Microsoft's build process does download additional files. This was brought up in [Microsoft/vscode#49159](https://github.com/Microsoft/vscode/issues/49159) and [Microsoft/vscode#45978](https://github.com/Microsoft/vscode/issues/45978). These are the packages downloaded during build:
- Extensions from the Microsoft Marketplace:
- ms-vscode.node-debug2
- ms-vscode.node-debug
- From [Electron releases](https://github.com/electron/electron/releases) (using [gulp-atom-electron](https://github.com/joaomoreno/gulp-atom-electron))
- electron
- ffmpeg
## <a id="disable-telemetry"></a>Getting all the Telemetry Out
Even though we do not pass the telemetry build flags (and go out of our way to cripple the baked-in telemetry), Microsoft will still track usage by default. After installing VSCodium, you must manually disable telemetry in your settings file to stop it from sending tracking data to Microsoft.
The instructions [here](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting) and [here](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-crash-reporting) help with disabling telemetry.
It is also highly recommended that you review all the settings that "use online services" by following [these instructions](https://code.visualstudio.com/docs/supporting/faq#_managing-online-services). The `@tag:usesOnlineServices` filter on the settings page will show that by default:
- Extensions auto check for updates and auto install updates
- Searches within the app are sent to an online service for "natural language processing"
- Updates to the app are fetched in the background
These can all be disabled.
__Please note that some extensions send telemetry data to Microsoft as well. We have no control over this and can only recommend removing the extension.__
_(For example the C# extension `ms-vscode.csharp` sends tracking data to Microsoft.)_
## <a id="supported-os"></a>Supported OS
- [x] OSX x64 (zipped app file)
- [x] Linux x64 (`.deb`, `.rpm`, and `.tar.gz` files)
- [x] Linux x86 (`.deb`, `.rpm`, and `.tar.gz` files)
- [ ] Windows
- The plan is to build the Windows executable with [AppVeyor](https://appveyor.com). PRs are welcome :blue_heart:
The ARM architecture is not currently supported. If you know of a way to do this with Travis or any other free CI/CD platform please put in an issue or a PR.
## <a id="extensions-marketplace"></a>Extensions + Marketplace
Until something more open comes around, we use the Microsoft Marketplace/Extensions in the `product.json` file. Those links are licensed under MIT as per [the comments on this issue.](https://github.com/Microsoft/vscode/issues/31168#issuecomment-317319063)
### Supported OS/arch
Currently we are only building OSX (zip) and Linux x64 (deb, rpm, and tar). If you are familiar with building Windows binaries on Travis CI + Wine please put in a PR! :blue_heart:
## <a id="migrating"></a>Migrating from Visual Studio Code to VSCodium
VSCodium (and a freshly cloned copy of vscode built from source) stores its extension files in `~/.vscode-oss`. So if you currently have Visual Studio Code installed, your extensions won't automatically populate. You can reinstall your extensions from the Marketplace in VSCodium, or copy the `extensions` from `~/.vscode/extensions` to `~/.vscode-oss/extensions`.
## License
MIT
Visual Studio Code stores its `keybindings.json` and `settings.json` file in the these locations:
- __Windows__: `%APPDATA%\Code\User`
- __macOS__: `$HOME/Library/Application Support/Code/User`
- __Linux__: `$HOME/.config/Code/User`
You can copy these files to the VSCodium user settings folder:
- __Windows__: `%APPDATA%\VSCodium\User`
- __macOS__: `$HOME/Library/Application Support/VSCodium/User`
- __Linux__: `$HOME/.config/VSCodium/User`
To copy your settings manually:
- In Visual Studio Code, go to Settings (Command+, if on a Mac)
- Click the three dots `...` and choose 'Open settings.json'
- Copy the contents of settings.json into the same place in VSCodium
## <a id="license"></a>License
MIT

View File

@@ -2,18 +2,38 @@
if [[ "$SHOULD_BUILD" == "yes" ]]; then
cd vscode
if [[ "$BUILDARCH" == "ia32" ]]; then
export npm_config_arch=ia32
fi
yarn
mv product.json product.json.bak
cat product.json.bak | jq 'setpath(["extensionsGallery"]; {"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", "itemUrl": "https://marketplace.visualstudio.com/items"})' > product.json
cat product.json.bak | jq 'setpath(["extensionsGallery"]; {"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", "itemUrl": "https://marketplace.visualstudio.com/items"}) | setpath(["nameShort"]; "VSCodium") | setpath(["nameLong"]; "VSCodium") | setpath(["applicationName"]; "vscodium") | setpath(["win32MutexName"]; "vscodium") | setpath(["win32DirName"]; "VSCodium") | setpath(["win32NameVersion"]; "VSCodium") | setpath(["win32RegValueName"]; "VSCodium") | setpath(["win32AppUserModelId"]; "Microsoft.VSCodium") | setpath(["win32ShellNameShort"]; "V&SCodium") | setpath(["urlProtocol"]; "vscodium")' > product.json
cat product.json
../undo_telemetry.sh
export NODE_ENV=production
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
# microsoft adds their apt repo to sources
# unless the app name is code-oss
# as we are renaming the application to vscodium
# we need to edit a line in the post install template
sed -i "s/code-oss/vscodium/" resources/linux/debian/postinst.template
fi
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
npx gulp vscode-darwin-min
npm run gulp vscode-darwin-min
elif [[ "$BUILDARCH" == "ia32" ]]; then
npm run gulp vscode-linux-ia32-min
npm run gulp vscode-linux-ia32-build-deb
npm run gulp vscode-linux-ia32-build-rpm
unset npm_config_arch
else
npx gulp vscode-linux-x64-min
npx gulp vscode-linux-x64-build-deb
npx gulp vscode-linux-x64-build-rpm
npm run gulp vscode-linux-x64-min
npm run gulp vscode-linux-x64-build-deb
npm run gulp vscode-linux-x64-build-rpm
fi
cd ..

View File

@@ -1,12 +1,69 @@
#!/bin/bash
if git rev-parse $LATEST_MS_TAG >/dev/null 2>&1
then
echo "Latest MS tag ${LATEST_MS_TAG} already exists in VSCodium. Bail"
else
echo "New MS tag found, continuing build"
GITHUB_RESPONSE=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/vscodium/vscodium/releases/tags/$LATEST_MS_TAG)
echo "Github response: ${GITHUB_RESPONSE}"
VSCODIUM_ASSETS=$(echo $GITHUB_RESPONSE | jq '.assets')
echo "VSCodium assets: ${VSCODIUM_ASSETS}"
# if we just don't have the github token, get out fast
if [ "$GITHUB_TOKEN" != "" ]; then
if [ "$VSCODIUM_ASSETS" != "null" ]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
HAVE_MAC=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["zip"])')
if [[ "$HAVE_MAC" != "true" ]]; then
echo "Building on Mac because we have no ZIP"
export SHOULD_BUILD="yes"
fi
elif [[ $BUILDARCH == "ia32" ]]; then
HAVE_IA32_RPM=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["i386.rpm"])')
HAVE_IA32_DEB=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["i386.deb"])')
HAVE_IA32_TAR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "ia32-$LATEST_MS_TAG.tar.gz" 'map(.name) | contains([$suffix])')
if [[ "$HAVE_IA32_RPM" != "true" ]]; then
echo "Building on Linux ia32 because we have no RPM"
export SHOULD_BUILD="yes"
fi
if [[ "$HAVE_IA32_DEB" != "true" ]]; then
echo "Building on Linux ia32 because we have no DEB"
export SHOULD_BUILD="yes"
fi
if [[ "$HAVE_IA32_TAR" != "true" ]]; then
echo "Building on Linux ia32 because we have no TAR"
export SHOULD_BUILD="yes"
fi
if [[ "$SHOULD_BUILD" != "yes" ]]; then
echo "Already have all the Linux ia32 builds"
fi
else
HAVE_64_RPM=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["x86_64.rpm"])')
HAVE_64_DEB=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["amd64.deb"])')
HAVE_64_TAR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "x64-$LATEST_MS_TAG.tar.gz" 'map(.name) | contains([$suffix])')
if [[ "$HAVE_64_RPM" != "true" ]]; then
echo "Building on Linux x64 because we have no RPM"
export SHOULD_BUILD="yes"
fi
if [[ "$HAVE_64_DEB" != "true" ]]; then
echo "Building on Linux x64 because we have no DEB"
export SHOULD_BUILD="yes"
fi
if [[ "$HAVE_64_TAR" != "true" ]]; then
echo "Building on Linux x64 because we have no TAR"
export SHOULD_BUILD="yes"
fi
if [[ "$SHOULD_BUILD" != "yes" ]]; then
echo "Already have all the Linux x64 builds"
fi
fi
else
echo "Release assets do not exist at all, continuing build"
export SHOULD_BUILD="yes"
fi
if git rev-parse $LATEST_MS_TAG >/dev/null 2>&1
then
export TRAVIS_TAG=$LATEST_MS_TAG
else
git config --local user.name "Travis CI"
git config --local user.email "builds@travis-ci.com"
git tag $LATEST_MS_TAG
export SHOULD_BUILD="yes"
fi
fi
fi

View File

@@ -4,6 +4,9 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd VSCode-darwin
zip -r ../VSCode-darwin-${LATEST_MS_TAG}.zip ./*
elif [[ "$BUILDARCH" == "ia32" ]]; then
cd VSCode-linux-ia32
tar czf ../VSCode-linux-ia32-${LATEST_MS_TAG}.tar.gz .
else
cd VSCode-linux-x64
tar czf ../VSCode-linux-x64-${LATEST_MS_TAG}.tar.gz .

View File

@@ -1,8 +1,14 @@
#!/bin/bash
git clone https://github.com/Microsoft/vscode.git
cd vscode
if [ -d vscode ]; then
cd vscode
git fetch --all
else
git clone https://github.com/Microsoft/vscode.git
cd vscode
fi
export LATEST_MS_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
echo "Got the latest MS tag: ${LATEST_MS_TAG}"
git checkout $LATEST_MS_TAG
cd ..
cd ..

View File

@@ -5,5 +5,12 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install yarn --without-node
brew install jq zip
else
sudo apt-get update
sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev fakeroot rpm
if [[ "$BUILDARCH" == "ia32" ]]; then
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-dev-i386 gcc-multilib g++-multilib
sudo apt-get install libx11-dev:i386 libxkbfile-dev:i386
fi
fi

10
undo_telemetry.sh Executable file
View File

@@ -0,0 +1,10 @@
# dc.services.visualstudio.com
# vortex.data.microsoft.com
TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.data\.microsoft\.com)"
REPLACEMENT="s/$TELEMETRY_URLS/0\.0\.0\.0/g"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i '' -E $REPLACEMENT
else
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT
fi