Compare commits

..

40 Commits

Author SHA1 Message Date
Baptiste Augrain
7a2a3a7ab0 ci: disable insider and reh on windows arm64 2022-08-17 07:46:48 +02:00
Baptiste Augrain
637ec23444 ci: disable appimage for non-x64 (#1208) 2022-08-17 07:01:37 +02:00
Baptiste Augrain
bbddc94a72 ci: use directly boolean input (#1207) 2022-08-17 06:23:19 +02:00
Baptiste Augrain
a4e5b2a101 fix: update issue reporter (#1206) 2022-08-16 23:37:20 +02:00
Baptiste Augrain
bfdaf23c6d build(linux): use vscode's ripgrep (#1205) 2022-08-16 23:10:04 +02:00
Baptiste Augrain
98bac0c1eb doc: update build doc and add script for docker (#1204) 2022-08-16 22:39:08 +02:00
Baptiste Augrain
81d304fa37 fix: split version for vscode (#1202) 2022-08-16 19:00:11 +02:00
Baptiste Augrain
fcbf70d7ca fix: use correct url to check tags (#1201) 2022-08-16 17:03:45 +02:00
Baptiste Augrain
bffbd569a5 fix: patch all versions (for macos and reh) (#1198) 2022-08-16 16:11:08 +02:00
Baptiste Augrain
79cdcd61bf ci: add input to force new release (#1197) 2022-08-16 15:33:34 +02:00
Baptiste Augrain
7327f9910d ci: get MS_TAG from update api (#1196) 2022-08-16 14:33:30 +02:00
Baptiste Augrain
118ea7993d feat: add release number (#1192) 2022-08-16 13:51:45 +02:00
Baptiste Augrain
ed5a695d2c ci(windows): disable winget until further testing (#1193) 2022-08-14 11:22:00 +02:00
Vedant
86456d833f ci(windows): prevent winget step from running multiple times (#1186) 2022-08-14 10:04:59 +02:00
Baptiste Augrain
f05272f2d0 fix: update api proposals (#1187) 2022-08-09 15:21:59 +02:00
Vedant
383b7ef4f8 feat: publish to winget (#1174) 2022-08-09 12:06:38 +02:00
Baptiste Augrain
2874277aa4 fix: replace grep with ripgrep due to excruciating timing (#1170) 2022-08-05 13:09:02 +02:00
Baptiste Augrain
8883466ef5 fix(1.70): disable dependencies checking for .deb (#1180) 2022-08-05 12:08:36 +02:00
Pavlo Rudy
fdc6b32d8b close #1160 2022-07-15 21:29:11 +03:00
Todd Williams
81836873af docs: update legality of vscode marketplace's usage (#1092) 2022-07-09 08:13:26 +02:00
Baptiste Augrain
3fa8eee9fe feat: add script to update patches (#1138) 2022-06-20 10:34:50 +02:00
Baptiste Augrain
55d502d659 doc: add patch update process (#1136) 2022-06-19 12:08:28 +02:00
Pavel Sterin
f6a99949c5 feat: use github versions of included extensions (#1133) 2022-06-19 11:49:56 +02:00
Baptiste Augrain
85126f1a7c fix: set the built files at the built time (#1132) 2022-06-17 14:47:08 +02:00
Baptiste Augrain
bca4eea470 fix(snap): remove double env variable (#1131) 2022-06-16 23:09:25 +02:00
Baptiste Augrain
2b190dfe51 fix(snap): use master branch to publish (#1130) 2022-06-16 23:06:07 +02:00
Baptiste Augrain
c4583ad3f0 fix: use env variable instead of login option (#1128) 2022-06-16 12:20:10 +02:00
laksith19
79a9f4a292 Remove repeated dependency (#1125) 2022-06-15 18:36:20 +03:00
Baptiste Augrain
112f730493 fix: generate mssing out directory (#1117) 2022-06-11 13:46:15 +02:00
Baptiste Augrain
7313f3ad25 ci(linux): correctly detect reh binaries (#1116) 2022-06-10 07:31:34 +02:00
Baptiste Augrain
bbaaed2ec1 fix: update patches & install optional dependencies (#1115) 2022-06-09 22:19:30 +02:00
Frazer Smith
3737c9f4e2 build: Use cd ... || exit in case cd fails (#1107) 2022-06-08 22:03:44 +02:00
Baptiste Augrain
90bc38c840 vcs: fix lock workflow config (#1113) 2022-06-08 18:00:26 +02:00
Baptiste Augrain
84b4396476 feat: add support for reh (#1111) 2022-06-08 16:59:06 +02:00
Frazer Smith
add78d6829 build(stores/snapcraft): quote grep pattern so shell won't interpret it (#1108) 2022-06-07 23:20:09 +02:00
Frazer Smith
98d30bdc2c build: double quote args and wrap in brace expansions (#1105) 2022-06-05 21:30:23 +02:00
Baptiste Augrain
31355417a8 vcs: add workflow to lock old closed issues (#1106) 2022-06-05 16:52:38 +02:00
Baptiste Augrain
c3debb387d feat(macos): build script is detecting arch (#1085) 2022-05-16 01:35:17 +02:00
Baptiste Augrain
c53a88ee51 docs: improve macOS troubleshooting and add thanks table (#1083)
* docs: update supported macOS and link to troubleshooting wiki
* docs: add thanks table
2022-05-14 20:16:15 +02:00
Baptiste Augrain
c2469ff520 fix: re-enable 32bits builds with npm_config_force_process_config env variable (#1082) 2022-05-14 18:44:59 +02:00
39 changed files with 965 additions and 280 deletions

View File

@@ -2,9 +2,14 @@ name: linux_build
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
@@ -27,9 +32,9 @@ jobs:
- vscode_arch: arm64
npm_arch: arm64
image: vscodium/vscodium-linux-build-agent:stretch-arm64
# - vscode_arch: armhf
# npm_arch: armv7l
# image: vscodium/vscodium-linux-build-agent:stretch-armhf
- vscode_arch: armhf
npm_arch: armv7l
image: vscodium/vscodium-linux-build-agent:stretch-armhf
steps:
- uses: actions/checkout@v3
@@ -54,6 +59,7 @@ jobs:
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
run: ./check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'
@@ -116,7 +122,7 @@ jobs:
run: ./stores/snapcraft/check_version.sh
env:
ARCHITECTURE: ${{ matrix.platform }}
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
# - uses: docker/setup-qemu-action@v1
# if: env.SHOULD_DEPLOY == 'yes'
@@ -140,9 +146,10 @@ jobs:
if: env.SHOULD_DEPLOY == 'yes'
- uses: snapcore/action-publish@v1
- uses: snapcore/action-publish@master
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: stable
if: env.SHOULD_DEPLOY == 'yes'

15
.github/workflows/lock.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Lock Threads
on:
schedule:
- cron: '0 0 * * Mon'
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
with:
github-token: ${{ github.token }}
issue-inactive-days: '90'
pr-inactive-days: '90'

View File

@@ -2,9 +2,14 @@ name: macos_build
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
@@ -42,6 +47,7 @@ jobs:
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
run: . check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'

View File

@@ -2,9 +2,14 @@ name: windows_build
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
@@ -22,7 +27,7 @@ jobs:
matrix:
vscode_arch:
- x64
# - ia32
- ia32
- arm64
steps:
@@ -50,6 +55,7 @@ jobs:
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
run: ./check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'
@@ -96,3 +102,20 @@ jobs:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
# - name: Set MS_TAG as job output for release-winget job
# if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
# run: echo "::set-output name=tagname::${{ env.MS_TAG }}"
# release-winget:
# name: Release to WinGet
# needs: windows
# if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
# runs-on: windows-latest # action can only be run on windows
# steps:
# - name: Release to WinGet
# uses: vedantmgoyal2009/winget-releaser@latest
# with:
# identifier: VSCodium.VSCodium
# release-tag: ${{ needs.windows.outputs.tagname }}
# installers-regex: '\.exe$' # only .exe files
# token: ${{ secrets.STRONGER_GITHUB_TOKEN }}

6
.gitignore vendored
View File

@@ -1,5 +1,7 @@
vscode
VS*/*
VSCode*
VSCodium*
.DS_Store
build/linux/appimage/out
build/linux/appimage/pkg2appimage.AppDir
@@ -7,5 +9,5 @@ build/linux/appimage/pkg2appimage-*.AppImage
build/linux/appimage/squashfs-root
build/linux/appimage/VSCodium
build/windows/msi/releasedir
build/windows/rtf/Readme (Abridged).txt
build/windows/rtf/TXT to RTF Converter.exe
build/windows/msi/Files*.wxs
build/windows/msi/Files*.wixobj

View File

@@ -53,7 +53,7 @@ See [this article](https://www.gitpod.io/blog/open-vsx/) for more information on
### <a id="howto-vscode-marketplace"></a>How to use the VS Code Marketplace
You can switch and use the VS Code marketplace by using the following solutions. However, note that [it is not clear whether this is legal](https://github.com/microsoft/vscode/issues/31168).
You can switch and use the VS Code marketplace by using the following solutions. However, note that [ this is not legal](https://github.com/microsoft/vscode/issues/31168).
With the following environment variables:
- `VSCODE_GALLERY_SERVICE_URL='https://marketplace.visualstudio.com/_apis/public/gallery'`

View File

@@ -22,6 +22,7 @@
**This is not a fork. This is a repository of scripts to automatically build Microsoft's `vscode` repository into freely-licensed binaries with a community-driven default configuration.**
## Table of Contents
- [Download/Install](#download-install)
- [Install with Brew](#install-with-brew)
- [Install with Windows Package Manager (WinGet)](#install-with-winget)
@@ -37,31 +38,36 @@
- [Supported Platforms](#supported-platforms)
## <a id="download-install"></a>Download/Install
:tada: :tada: [Download latest release here](https://github.com/VSCodium/vscodium/releases) :tada: :tada:
[More info / helpful tips are here.](https://github.com/VSCodium/vscodium/blob/master/DOCS.md)
#### <a id="install-with-brew"></a>Install with Brew (Mac)
If you are on a Mac and have [Homebrew](https://brew.sh/) installed:
```bash
brew install --cask vscodium
```
_Note for Mac macOS Mojave users: if you see "App can't be opened because Apple cannot check it for malicious software" 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 Mojave._
*Note for macOS users: if you can't open the App, please read [the following troubleshooting](https://github.com/VSCodium/vscodium/wiki/Troubleshooting#macos).*
#### <a id="install-with-winget"></a>Install with Windows Package Manager (WinGet)
If you use Windows and have [Windows Package Manager](https://github.com/microsoft/winget-cli) installed:
```bash
winget install vscodium
```
#### <a id="install-with-choco"></a>Install with Chocolatey (Windows)
If you use Windows and have [Chocolatey](https://chocolatey.org) installed (thanks to [@Thilas](https://github.com/Thilas)):
```bash
choco install vscodium
```
#### <a id="install-with-scoop"></a>Install with Scoop (Windows)
If you use Windows and have [Scoop](https://scoop.sh) installed:
```bash
scoop bucket add extras
@@ -69,6 +75,7 @@ scoop install vscodium
```
#### <a id="install-with-snap"></a>Install with snap (GNU/Linux)
VSCodium is available in the [Snap Store](https://snapcraft.io/) as [Codium](https://snapcraft.io/codium), thanks to the help of the [Snapcrafters](https://github.com/snapcrafters/codium) community.
If your GNU/Linux distribution has support for [snaps](https://snapcraft.io/docs/installing-snapd):
```bash
@@ -76,12 +83,15 @@ snap install codium --classic
```
#### <a id="install-with-package-manager"></a>Install with Package Manager (GNU/Linux)
You can always install using the downloads (deb, rpm, tar) on the [releases page](https://github.com/VSCodium/vscodium/releases), but you can also install using your favorite package manager and get automatic updates. [@paulcarroty](https://github.com/paulcarroty) has set up a repository with instructions [here](https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo). Any issues installing VSCodium using your package manager should be directed to that repository's issue tracker.
#### <a id="install-on-arch-linux"></a>Install on Arch Linux
VSCodium is available in [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository) as package [vscodium-bin](https://aur.archlinux.org/packages/vscodium-bin/), maintained by [@binex-dsk](https://github.com/binex-dsk). An alternative package [vscodium-git](https://aur.archlinux.org/packages/vscodium-git/), maintained by [@cedricroijakkers](https://github.com/cedricroijakkers), is also available should you wish to compile from source yourself.
#### <a id="flatpak"></a>Flatpak Option (GNU/Linux)
VSCodium is (unofficially) available as a Flatpak app [here](https://flathub.org/apps/details/com.vscodium.codium) and the build repo is [here](https://github.com/flathub/com.vscodium.codium). If your distribution has support for [flatpak](https://flathub.org), and you have enabled the [flathub repo](https://flatpak.org/setup/):
```bash
flatpak install flathub com.vscodium.codium
@@ -90,9 +100,11 @@ flatpak run com.vscodium.codium
```
## <a id="build"></a>Build
Build instructions can be found [here](https://github.com/VSCodium/vscodium/blob/master/docs/build.md)
## <a id="why"></a>Why Does This Exist
This repository contains build files to generate free release binaries of Microsoft's VS Code. When we speak of "free software", we're talking about freedom, not price.
Microsoft's releases 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:
@@ -119,22 +131,26 @@ Microsoft's build process (which we are running to build the binaries) does down
## <a id="more-info"></a>More Info
### Documentation
For more information on getting all the telemetry disabled and tips for migrating from Visual Studio Code to VSCodium, have a look at this [Docs](https://github.com/VSCodium/vscodium/blob/master/DOCS.md) page.
### Extensions and the Marketplace
According to the VS Code Marketplace [Terms of Use](https://aka.ms/vsmarketplace-ToU), _you may only install and use Marketplace Offerings with Visual Studio Products and Services._ For this reason, VSCodium uses [open-vsx.org](https://open-vsx.org/), an open source registry for VS Code extensions. See the [Extensions + Marketplace](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions-marketplace) section on the Docs page for more details.
Please note that some Visual Studio Code extensions have licenses that restrict their use to the official Visual Studio Code builds and therefore do not work with VSCodium. See [this note](https://github.com/VSCodium/vscodium/blob/master/DOCS.md#proprietary-debugging-tools) on the Docs page for what's been found so far and possible workarounds.
### How are the VSCodium binaries built?
If you would like to see the commands we run to build `vscode` into VSCodium binaries, have a look at the workflow files in `.github/workflows` for Windows, GNU/Linux and macOS. These build files call all the other scripts in the repo. If you find something that doesn't make sense, feel free to ask about it [on Gitter](https://gitter.im/VSCodium/Lobby).
The builds are run every day, but exit early if there isn't a new release from Microsoft.
## <a id="supported-platforms"></a>Supported Platforms
The minimal version is limited by the core component Electron, you may want to check its [supported platform list](https://www.electronjs.org/docs/tutorial/support#supported-platforms).
The minimal version is limited by the core component Electron, you may want to check its [platform prerequisites](https://www.electronjs.org/docs/latest/development/build-instructions-gn#platform-prerequisites).
- [x] macOS (`zip`, `dmg`) OS X 10.10 or newer x64
- [x] macOS (`zip`, `dmg`) macOS 11.0 or newer arm64 via x64 emulation, see [status issue](https://github.com/VSCodium/vscodium/issues/597)
- [x] macOS (`zip`, `dmg`) macOS 11.0 or newer arm64
- [x] GNU/Linux x64 (`deb`, `rpm`, `AppImage`, `tar.gz`)
- [x] GNU/Linux x86 (`deb`, `rpm`, `tar.gz`) ([up to v1.35.1](https://code.visualstudio.com/updates/v1_36#_linux-32bit-support-ends))
- [x] GNU/Linux arm64 (`deb`, `tar.gz`)
@@ -144,11 +160,30 @@ The minimal version is limited by the core component Electron, you may want to c
- [x] Windows 10 arm64
## <a id="donate"></a>Donate
If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`.
Special thanks to:
- @estatra for the latest logo
- @jaredreich for the previous logo
<table>
<tr>
<td>@estatra</td>
<td>for the latest logo</td>
</tr>
<tr>
<td><a href="https://github.com/jaredreich" target="_blank">@jaredreich</a></td>
<td>for the previous logo</td>
</tr>
<tr>
<td><a href="https://github.com/PalinuroSec" target="_blank">@PalinuroSec</a></td>
<td>for CDN and domain name</td>
</tr>
<tr>
<td><a href="https://www.macstadium.com" target="_blank"><img src="https://images.prismic.io/macstadium/66fbce64-707e-41f3-b547-241908884716_MacStadium_Logo.png?w=128&q=75" width="128" height="49" alt="MacStadium logo" /></a></td>
<td>for providing a Mac mini M1</td>
</tr>
</table>
## <a id="license"></a>License
[MIT](https://github.com/VSCodium/vscodium/blob/master/LICENSE)

View File

@@ -10,7 +10,7 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
. prepare_vscode.sh
cd vscode || exit
cd vscode || { echo "'vscode' dir not found"; exit 1; }
yarn monaco-compile-check
yarn valid-layers-check
@@ -22,6 +22,10 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
if [[ "${OS_NAME}" == "osx" ]]; then
yarn gulp "vscode-darwin-${VSCODE_ARCH}-min-ci"
find "../VSCode-darwin-${VSCODE_ARCH}" -exec touch {} \;
VSCODE_PLATFORM="darwin"
elif [[ "${OS_NAME}" == "windows" ]]; then
. ../build/windows/rtf/make.sh
@@ -48,10 +52,16 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
. ../build/windows/msi/build-updates-disabled.sh
fi
else
SHOULD_BUILD_REH="no"
fi
VSCODE_PLATFORM="win32"
else # linux
yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"
find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
if [[ "${SKIP_LINUX_PACKAGES}" != "True" ]]; then
if [[ "${SHOULD_BUILD_DEB}" != "no" || "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
@@ -65,6 +75,13 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
. ../build/linux/appimage/build.sh
fi
fi
VSCODE_PLATFORM="linux"
fi
if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
yarn gulp minify-vscode-reh
yarn gulp "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-min-ci"
fi
cd ..

29
build/build_docker.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
exists() { type -t "$1" > /dev/null 2>&1; }
rm -rf VSCode*
rm -rf vscode*
if ! exists yarn; then
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs desktop-file-utils
npm install -g yarn
fi
UNAME_ARCH=$( uname -m )
if [[ "${UNAME_ARCH}" == "x86_64" ]]; then
export VSCODE_ARCH="x64"
else
export npm_config_arch=armv7l
export npm_config_force_process_config="true"
export VSCODE_ARCH="armhf"
fi
echo "-- VSCODE_ARCH: ${VSCODE_ARCH}"
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=linux . build.sh

View File

@@ -1,7 +1,7 @@
#!/bin/bash
rm -rf VSCode*
rm -rf vscode
rm -rf vscode*
./get_repo.sh

View File

@@ -1,8 +1,18 @@
#!/bin/bash
rm -rf VSCode*
rm -rf vscode
rm -rf vscode*
UNAME_ARCH=$( uname -m )
if [[ "${UNAME_ARCH}" == "arm64" ]]; then
export VSCODE_ARCH="arm64"
else
export VSCODE_ARCH="x64"
fi
echo "-- VSCODE_ARCH: ${VSCODE_ARCH}"
. get_repo.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=x64 . build.sh
SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx . build.sh

View File

@@ -3,7 +3,7 @@
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build_windows.sh
rm -rf VSCode*
rm -rf vscode
rm -rf vscode*
rm -rf build/windows/msi/releasedir
. get_repo.sh

View File

@@ -6,7 +6,7 @@ CALLER_DIR=$( pwd )
cd "$( dirname "${BASH_SOURCE[0]}" )"
if [[ "$VSCODE_ARCH" == "x64" ]]; then
if [[ "${VSCODE_ARCH}" == "x64" ]]; then
wget -c https://github.com/$(wget -q https://github.com/AppImage/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x ./pkg2appimage-*.AppImage

20
build/update_api.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
URL=`curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/stable/VERSION" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/'`
# echo "url: ${URL}"
FILE=`echo "${URL}" | sed -E 's|.*/([^/]+\.zip)$|\1|'`
# echo "file: ${FILE}"
DIRECTORY=`echo "${URL}" | sed -E 's|.*/([^/]+)\.zip$|\1|'`
# echo "directory: ${DIRECTORY}"
if [[ ! -f "${FILE}" ]]; then
wget "${URL}"
fi
if [[ ! -d "${DIRECTORY}" ]]; then
unzip "${FILE}" -d "${DIRECTORY}"
fi
APIS=`cat ${DIRECTORY}/resources/app/product.json | jq -r '.extensionEnabledApiProposals'`
cat <<< $(jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json) > product.json

21
build/update_patches.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git add .
git reset -q --hard HEAD
for file in ../patches/*.patch; do
if [ -f "${file}" ]; then
echo applying patch: "${file}"
git apply --ignore-whitespace "${file}"
if [ $? -ne 0 ]; then
echo failed to apply patch "${file}"
git apply --reject "${file}"
read -p "Press any key when the conflict have been resolved..." -n1 -s
git diff > "${file}"
fi
git add .
git reset -q --hard HEAD
fi
done

View File

@@ -8,7 +8,7 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"
SCRIPT_DIR=$( pwd )
cd ../../../VSCode-win32-${VSCODE_ARCH}/resources/app
cd "../../../VSCode-win32-${VSCODE_ARCH}/resources/app"
cp product.json product.json.bak
cat product.json.bak | jq "del(.updateUrl)" > product.json
@@ -16,6 +16,6 @@ rm -f product.json.bak
cd "${SCRIPT_DIR}"
. build.sh "updates-disabled"
./build.sh "updates-disabled"
cd "${CALLER_DIR}"

View File

@@ -24,10 +24,10 @@ ICON_DIR="..\\..\\..\\src\\resources\\win32"
LICENSE_DIR="..\\..\\..\\vscode"
PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' )
if [[ -z "$1" ]]; then
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${MS_TAG}"
if [[ -z "${1}" ]]; then
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${RELEASE_VERSION}"
else
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-$1-${MS_TAG}"
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${1}-${RELEASE_VERSION}"
fi
if [[ "${VSCODE_ARCH}" == "ia32" ]]; then
@@ -38,29 +38,29 @@ fi
BuildSetupTranslationTransform() {
local CULTURE=$1
local LANGID=$2
local CULTURE=${1}
local LANGID=${2}
LANGIDS="${LANGIDS},${LANGID}"
echo "Building setup translation for culture \"${CULTURE}\" with LangID \"${LANGID}\"..."
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -reusecab -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\WiLangId.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi Product "${LANGID}"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\WiLangId.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" Product "${LANGID}"
"${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\x86\\msitran" -g "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst "${LANGID}"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst" "${LANGID}"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"
}
"${WIX}bin\\heat.exe" dir "${BINARY_DIR}" -out "Files-${OUTPUT_BASE_FILENAME}.wxs" -t vscodium.xsl -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.AppName -var var.ProductVersion -var var.IconDir -var var.LicenseDir -var var.BinaryDir -dr APPLICATIONFOLDER -platform "${PLATFORM}"
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dAppName=${PRODUCT_NAME} -dProductVersion="${MS_TAG}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dAppName=${PRODUCT_NAME} -dProductVersion="${RELEASE_VERSION}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
BuildSetupTranslationTransform de-de 1031

View File

@@ -1,6 +1,6 @@
#!/bin/bash
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode || { echo "'vscode' dir not found"; exit 1; }
input=LICENSE.txt
target=LICENSE.rtf

View File

@@ -2,23 +2,27 @@
set -e
if [[ $GITHUB_EVENT_NAME == "pull_request" ]]; then
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
echo "It's a PR"
export SHOULD_BUILD="yes"
export SHOULD_DEPLOY="no"
elif [[ $GITHUB_EVENT_NAME == "push" ]]; then
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
echo "It's a Push"
export SHOULD_BUILD="yes"
export SHOULD_DEPLOY="no"
elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
echo "It's a Dispatch"
export SHOULD_DEPLOY="yes"
else
echo "It's a cron"
echo "It's a Cron"
export SHOULD_DEPLOY="yes"
fi
if [[ $GITHUB_ENV ]]; then
echo "SHOULD_BUILD=$SHOULD_BUILD" >> $GITHUB_ENV
echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV
fi
if [[ "${GITHUB_ENV}" ]]; then
echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
fi

View File

@@ -7,142 +7,188 @@ if [[ -z "${GITHUB_TOKEN}" ]]; then
exit
fi
VERSIONS_REPO="${GITHUB_USERNAME:-"VSCodium"}/versions"
REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}"
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/${REPOSITORY}/releases/tags/${MS_TAG})
VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/${REPOSITORY}/releases/latest" )
LATEST_VERSION=$( echo "${GITHUB_RESPONSE}" | jq -c -r '.tag_name' )
if [[ "${LATEST_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+) ]]; then
if [ "${MS_TAG}" != "${BASH_REMATCH[1]}" ]; then
echo "New VSCode version, new build"
export SHOULD_BUILD="yes"
VSCODIUM_ASSETS="null"
elif [[ "${NEW_RELEASE}" == "true" ]]; then
echo "New release build"
export SHOULD_BUILD="yes"
VSCODIUM_ASSETS="null"
else
export RELEASE_VERSION="${LATEST_VERSION}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
echo "Switch to release version: ${RELEASE_VERSION}"
VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
fi
fi
contains() {
# add " to match the end of a string so any hashs won't be matched by mistake
echo "${VSCODIUM_ASSETS}" | grep "$1\""
echo "${VSCODIUM_ASSETS}" | grep "${1}\""
}
if [ "${VSCODIUM_ASSETS}" != "null" ]; then
# macos
if [[ "${OS_NAME}" == "osx" ]]; then
if [[ -z $( contains "darwin-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
if [[ -z $( contains "VSCodium-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
echo "Building on MacOS because we have no ZIP"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_ZIP="no"
fi
if [[ -z $( contains ".${VSCODE_ARCH}.${MS_TAG}.dmg" ) ]]; then
if [[ -z $( contains ".${VSCODE_ARCH}.${RELEASE_VERSION}.dmg" ) ]]; then
echo "Building on MacOS because we have no DMG"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_DMG="no"
fi
if [[ -z $( contains "vscodium-reh-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on MacOS because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the MacOS builds"
fi
elif [[ "${OS_NAME}" == "windows" ]]; then
# windows-arm64
if [[ ${VSCODE_ARCH} == "arm64" ]]; then
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows arm64 because we have no system setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_SYS="no"
fi
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows arm64 because we have no user setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_USR="no"
fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
echo "Building on Windows arm64 because we have no zip"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_ZIP="no"
fi
export SHOULD_BUILD_REH="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows arm64 builds"
fi
# windows-ia32
elif [[ ${VSCODE_ARCH} == "ia32" ]]; then
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
elif [[ "${VSCODE_ARCH}" == "ia32" ]]; then
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows ia32 because we have no system setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_SYS="no"
fi
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows ia32 because we have no user setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_USR="no"
fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
echo "Building on Windows ia32 because we have no zip"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_ZIP="no"
fi
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi" ) ]]; then
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" ) ]]; then
echo "Building on Windows ia32 because we have no msi"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_MSI="no"
fi
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi" ) ]]; then
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" ) ]]; then
echo "Building on Windows ia32 because we have no updates-disabled msi"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_MSI_NOUP="no"
fi
if [[ -z $( contains "vscodium-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Windows ia32 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows ia32 builds"
fi
# windows-x64
else
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
if [[ -z $( contains "VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows x64 because we have no system setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_SYS="no"
fi
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${MS_TAG}.exe" ) ]]; then
if [[ -z $( contains "UserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe" ) ]]; then
echo "Building on Windows x64 because we have no user setup"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_EXE_USR="no"
fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ) ]]; then
echo "Building on Windows x64 because we have no zip"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_ZIP="no"
fi
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi" ) ]]; then
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" ) ]]; then
echo "Building on Windows x64 because we have no msi"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_MSI="no"
fi
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi" ) ]]; then
if [[ -z $( contains "VSCodium-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" ) ]]; then
echo "Building on Windows x64 because we have no updates-disabled msi"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_MSI_NOUP="no"
fi
if [[ -z $( contains "vscodium-reh-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Windows x64 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows x64 builds"
fi
@@ -150,7 +196,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
elif [[ "${OS_NAME}" == "linux" ]]; then
# linux-arm64
if [[ ${VSCODE_ARCH} == "arm64" ]]; then
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
if [[ -z $( contains "arm64.deb" ) ]]; then
echo "Building on Linux arm64 because we have no DEB"
export SHOULD_BUILD="yes"
@@ -165,13 +211,20 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no"
fi
if [[ -z $( contains "arm64-${MS_TAG}.tar.gz" ) ]]; then
if [[ -z $( contains "VSCodium-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux arm64 because we have no TAR"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_TAR="no"
fi
if [[ -z $( contains "vscodium-reh-linux-arm64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux arm64 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
export SHOULD_BUILD_APPIMAGE="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
@@ -179,7 +232,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
fi
# linux-armhf
elif [[ ${VSCODE_ARCH} == "armhf" ]]; then
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
if [[ -z $( contains "armhf.deb" ) ]]; then
echo "Building on Linux arm because we have no DEB"
export SHOULD_BUILD="yes"
@@ -194,13 +247,20 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no"
fi
if [[ -z $( contains "armhf-${MS_TAG}.tar.gz" ) ]]; then
if [[ -z $( contains "VSCodium-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux arm because we have no TAR"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_TAR="no"
fi
if [[ -z $( contains "vscodium-reh-linux-armhf-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux arm because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
export SHOULD_BUILD_APPIMAGE="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
@@ -223,7 +283,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no"
fi
if [[ -z $( contains "x64-${MS_TAG}.tar.gz" ) ]]; then
if [[ -z $( contains "VSCodium-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux x64 because we have no TAR"
export SHOULD_BUILD="yes"
else
@@ -237,12 +297,29 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_APPIMAGE="no"
fi
if [[ -z $( contains "vscodium-reh-linux-x64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux x64 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi
if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Linux x64 builds"
fi
fi
fi
else
if [[ "${OS_NAME}" == "windows" ]]; then
if [[ "${VSCODE_ARCH}" == "arm64" ]]; then
export SHOULD_BUILD_REH="no"
fi
elif [[ "${OS_NAME}" == "linux" ]]; then
if [[ "${VSCODE_ARCH}" != "x64" ]]; then
export SHOULD_BUILD_APPIMAGE="no"
fi
fi
echo "Release assets do not exist at all, continuing build"
export SHOULD_BUILD="yes"
fi
@@ -255,6 +332,7 @@ echo "SHOULD_BUILD_EXE_SYS=${SHOULD_BUILD_EXE_SYS}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_EXE_USR=${SHOULD_BUILD_EXE_USR}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_MSI=${SHOULD_BUILD_MSI}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_MSI_NOUP=${SHOULD_BUILD_MSI_NOUP}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_REH=${SHOULD_BUILD_REH}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_RPM=${SHOULD_BUILD_RPM}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_TAR=${SHOULD_BUILD_TAR}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_ZIP=${SHOULD_BUILD_ZIP}" >> "${GITHUB_ENV}"

View File

@@ -8,6 +8,11 @@
- [Windows](#dependencies-windows)
- [Build Scripts](#build-scripts)
- [Build in Docker](#build-docker)
- [X64](#build-docker-x64)
- [ARM 32bits](#build-docker-arm32)
- [Patch Update Process](#patch-update-process)
- [Semi-Automated](#patch-update-process-semiauto)
- [Manual](#patch-update-process-manual)
## <a id="dependencies"></a>Dependencies
@@ -29,7 +34,6 @@
- rpmbuild
- dpkg
- python3
- libsecret-1-dev
- imagemagick (for AppImage)
### <a id="dependencies-macos"></a>MacOS
@@ -55,10 +59,16 @@ Each platform has its build helper script in the directory `build`.
To build for Linux, you can alternatively build VSCodium in docker
### <a id="build-docker-x64"></a>X64
Firstly, create the container with:
```
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
```
like
```
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
```
When inside the container, you can use the following commands to build:
```
@@ -67,15 +77,65 @@ sudo apt-get install -y nodejs desktop-file-utils
npm install -g yarn
git clone https://github.com/VSCodium/vscodium.git
cd /root/vscodium
cd vscodium
./get_repo.sh
. get_repo.sh
export SHOULD_BUILD=yes
export OS_NAME=linux
export VSCODE_ARCH=x64
./build.sh
. build.sh
```
### <a id="build-docker-arm32"></a>ARM 32bits
Firstly, create the container with:
```
docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
```
like
```
docker run -ti --volume=$(pwd):/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:stretch-armhf bash
```
When inside the container, you can use the following commands to build:
```
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs desktop-file-utils
cd /root/vscodium
. get_repo.sh
export SHOULD_BUILD=yes
export OS_NAME=linux
export VSCODE_ARCH=armhf
export npm_config_arch=armv7l
export npm_config_force_process_config="true"
. build.sh
```
## <a id="patch-update-process"></a>Patch Update Process
## <a id="patch-update-process-semiauto"></a>Semi-Automated
- run `./build/build_<os>.sh`, if a patch is failing then,
- run `./build/update_patches.sh`
- when the script pause at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
- fix all the `*.rej` files
- run `yarn watch`
- run `./script/code.sh` until everything ok
- press any key to continue the script `update_patches.sh`
## <a id="patch-update-process-manual"></a>Manual
- run `./build/build_<os>.sh`, if a patch is failing then,
- open `vscode` directory in **VSCodium**
- revert all changes
- run `git apply --reject ../patches/<name>.patch`
- fix all the `*.rej` files
- run `yarn watch`
- run `./script/code.sh` until everything ok
- run `git diff > ../patches/<name>.patch`

View File

@@ -1,20 +1,44 @@
#!/bin/bash
set -e
# git workaround
if [[ "${CI_BUILD}" != "no" ]]; then
git config --global --add safe.directory /__w/vscodium/vscodium
fi
if [[ -z "${RELEASE_VERSION}" ]]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
date=$( date +%Y%j )
export RELEASE_VERSION="${MS_TAG}.${date: -5}"
else
if [[ "${RELEASE_VERSION}" =~ ^([0-9]+\.[0-9]+\.[0-9]+)\.[0-9]+$ ]];
then
MS_TAG="${BASH_REMATCH[1]}"
else
echo "Bad RELEASE_VERSION: ${RELEASE_VERSION}"
exit 1
fi
fi
echo "Release version: ${RELEASE_VERSION}"
mkdir -p vscode
cd vscode
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git init -q
git remote add origin https://github.com/Microsoft/vscode.git
# figure out latest tag by calling MS update API
if [ "$INSIDER" == "1" ]; then
if [ "${INSIDER}" == "1" ]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
elif [[ -z "${MS_TAG}" ]]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name')
export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
else
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
@@ -32,13 +56,16 @@ fi
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
git fetch --depth 1 origin $MS_COMMIT
git fetch --depth 1 origin "${MS_COMMIT}"
git checkout FETCH_HEAD
cd ..
# for GH actions
if [[ $GITHUB_ENV ]]; then
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV
if [[ ${GITHUB_ENV} ]]; then
echo "MS_TAG=${MS_TAG}" >> "${GITHUB_ENV}"
echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> "${GITHUB_ENV}"
fi
. version.sh

View File

@@ -8,9 +8,9 @@ set -e
check_programs() {
for arg in "$@"
do
if ! command -v $arg >/dev/null 2>&1
if ! command -v "${arg}" >/dev/null 2>&1
then
echo "$arg could not be found"
echo "${arg} could not be found"
exit
fi
done
@@ -22,22 +22,22 @@ SRC_PREFIX=""
VSCODE_PREFIX=""
build_darwin_types() {
for file in ${VSCODE_PREFIX}vscode/resources/darwin/*
for file in "${VSCODE_PREFIX}"vscode/resources/darwin/*
do
if [ -f "$file" ]; then
name=$(basename $file '.icns')
if [ -f "${file}" ]; then
name=$(basename "${file}" '.icns')
if [[ $name != 'code' ]] && [ ! -f "${SRC_PREFIX}src/resources/darwin/$name.icns" ]; then
icns2png -x -s 512x512 $file -o .
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/resources/darwin/${name}.icns" ]; then
icns2png -x -s 512x512 "${file}" -o .
composite -blend 100% -geometry +323+365 icons/corner_512.png "${name}_512x512x32.png" "$name.png"
composite icons/code_darwin.png "$name.png" "$name.png"
composite -blend 100% -geometry +323+365 icons/corner_512.png "${name}_512x512x32.png" "${name}.png"
composite icons/code_darwin.png "${name}.png" "${name}.png"
convert "$name.png" -resize 256x256 "${name}_256.png"
convert "${name}.png" -resize 256x256 "${name}_256.png"
png2icns "${SRC_PREFIX}src/resources/darwin/$name.icns" "$name.png" "${name}_256.png"
png2icns "${SRC_PREFIX}src/resources/darwin/${name}.icns" "${name}.png" "${name}_256.png"
rm "${name}_512x512x32.png" "$name.png" "${name}_256.png"
rm "${name}_512x512x32.png" "${name}.png" "${name}_256.png"
fi
fi
done
@@ -56,17 +56,17 @@ build_darwin_main() {
}
build_win32() {
for file in ${VSCODE_PREFIX}vscode/resources/win32/*.ico
for file in "${VSCODE_PREFIX}"vscode/resources/win32/*.ico
do
if [ -f "$file" ]; then
name=$(basename $file '.ico')
if [ -f "${file}" ]; then
name=$(basename "${file}" '.ico')
if [[ $name != 'code' ]] && [ ! -f "${SRC_PREFIX}src/resources/win32/$name.ico" ]; then
icotool -x -w 256 $file
if [[ ${name} != 'code' ]] && [ ! -f "${SRC_PREFIX}src/resources/win32/${name}.ico" ]; then
icotool -x -w 256 "${file}"
composite -geometry +150+185 icons/code_64.png "${name}_9_256x256x32.png" "${name}.png"
convert "${name}.png" -define icon:auto-resize=256,128,96,64,48,32,24,20,16 "${SRC_PREFIX}src/resources/win32/$name.ico"
convert "${name}.png" -define icon:auto-resize=256,128,96,64,48,32,24,20,16 "${SRC_PREFIX}src/resources/win32/${name}.ico"
rm "${name}_9_256x256x32.png" "${name}.png"
fi
@@ -144,7 +144,7 @@ build_win32() {
fi
}
if [ "$0" == "$BASH_SOURCE" ];
if [ "${0}" == "${BASH_SOURCE}" ];
then
build_darwin_types
build_win32

15
patch.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
FILE="../patches/${1}.patch"
cd vscode || { echo "'vscode' dir not found"; exit 1; }
git apply --reject "${FILE}"
read -p "Press any key when the conflict have been resolved..." -n1 -s
git diff -U1 > "${FILE}"
cd ..
echo "The patch has been generated."

View File

@@ -1,21 +1,21 @@
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 2f5a931..ac3d7e6 100644
index 2686509..4fedec2 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
@@ -289,7 +289,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
} else if (platform === 'darwin') {
const shortcut = gulp.src('resources/darwin/bin/code.sh')
.pipe(replace('@@APPNAME@@', product.applicationName))
- .pipe(rename('bin/code'));
+ .pipe(rename('bin/' + product.applicationName));
all = es.merge(all, shortcut);
}
diff --git a/src/vs/platform/native/electron-main/nativeHostMainService.ts b/src/vs/platform/native/electron-main/nativeHostMainService.ts
index 3bd0c57..d921c60 100644
index f7bd477..a489ae4 100644
--- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
+++ b/src/vs/platform/native/electron-main/nativeHostMainService.ts
@@ -353,7 +353,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
@@ -351,7 +351,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
}
private async getShellCommandLink(): Promise<{ readonly source: string; readonly target: string }> {
@@ -24,7 +24,7 @@ index 3bd0c57..d921c60 100644
const source = `/usr/local/bin/${this.productService.applicationName}`;
// Ensure source exists
@@ -563,7 +563,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
@@ -545,7 +545,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
// macOS
if (this.environmentMainService.isBuilt) {

212
patches/build-version.patch Normal file
View File

@@ -0,0 +1,212 @@
diff --git a/build/gulpfile.reh.js b/build/gulpfile.reh.js
index 2abc3f3..a3cbf2d 100644
--- a/build/gulpfile.reh.js
+++ b/build/gulpfile.reh.js
@@ -246,8 +246,9 @@ function packageTask(type, platform, arch, sourceFolderName, destinationFolderNa
}
const name = product.nameShort;
+ const release = packageJson.release;
const packageJsonStream = gulp.src(['remote/package.json'], { base: 'remote' })
- .pipe(json({ name, version, dependencies: undefined, optionalDependencies: undefined }));
+ .pipe(json({ name, version, release, dependencies: undefined, optionalDependencies: undefined }));
const date = new Date().toISOString();
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js
index 28f8e52..f17962d 100644
--- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js
@@ -187,7 +187,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const sources = es.merge(src, extensions)
.pipe(filter(['**', '!**/*.js.map'], { dot: true }));
- let version = packageJson.version;
+ let version = packageJson.version
const quality = product.quality;
if (quality && quality !== 'stable') {
@@ -195,7 +195,8 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
}
const name = product.nameShort;
- const packageJsonUpdates = { name, version };
+ const release = packageJson.release;
+ const packageJsonUpdates = { name, version, release };
// for linux url handling
if (platform === 'linux') {
diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js
index 489d9cc..e9f00f3 100644
--- a/build/gulpfile.vscode.linux.js
+++ b/build/gulpfile.vscode.linux.js
@@ -83,7 +83,7 @@ function prepareDebPackage(arch) {
const dependencies = debianDependenciesGenerator.getDependencies(binaryDir, product.applicationName, debArch, sysroot);
gulp.src('resources/linux/debian/control.template', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', packageJson.version + '-' + linuxPackageRevision))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', debArch))
.pipe(replace('@@DEPENDS@@', dependencies.join(', ')))
.pipe(replace('@@RECOMMENDS@@', debianRecommendedDependencies.join(', ')))
@@ -188,8 +188,7 @@ function prepareRpmPackage(arch) {
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@NAME_LONG@@', product.nameLong))
.pipe(replace('@@ICON@@', product.linuxIconName))
- .pipe(replace('@@VERSION@@', packageJson.version))
- .pipe(replace('@@RELEASE@@', linuxPackageRevision))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
.pipe(replace('@@LICENSE@@', product.licenseName))
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
@@ -262,7 +261,7 @@ function prepareSnapPackage(arch) {
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
- .pipe(replace('@@VERSION@@', commit.substr(0, 8)))
+ .pipe(replace('@@VERSION@@', `${packageJson.version}.${packageJson.release}`))
// Possible run-on values https://snapcraft.io/docs/architectures
.pipe(replace('@@ARCHITECTURE@@', arch === 'x64' ? 'amd64' : arch))
.pipe(rename('snap/snapcraft.yaml'));
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
index 81ba509..43f5377 100644
--- a/build/gulpfile.vscode.win32.js
+++ b/build/gulpfile.vscode.win32.js
@@ -91,8 +91,8 @@ function buildWin32Setup(arch, target) {
NameLong: product.nameLong,
NameShort: product.nameShort,
DirName: product.win32DirName,
- Version: pkg.version,
- RawVersion: pkg.version.replace(/-\w+$/, ''),
+ Version: `${pkg.version}.${pkg.release}`,
+ RawVersion: `${pkg.version.replace(/-\w+$/, '')}.${pkg.release}`,
NameVersion: product.win32NameVersion + (target === 'user' ? ' (User)' : ''),
ExeBasename: product.nameShort,
RegValueName: product.win32RegValueName,
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index 00ddb6f..814c964 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -1,6 +1,6 @@
Name: @@NAME@@
Version: @@VERSION@@
-Release: @@RELEASE@@.el7
+Release: el7
Summary: Code editing. Redefined.
Group: Development/Tools
Vendor: Microsoft Corporation
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1ae8079..0dad6ac 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -32,6 +32,7 @@ export type ExtensionVirtualWorkspaceSupport = {
export interface IProductConfiguration {
readonly version: string;
+ readonly release: string;
readonly date?: string;
readonly quality?: string;
readonly commit?: string;
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
index 046cb39..3271b6c 100644
--- a/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
+++ b/src/vs/code/electron-sandbox/issue/issueReporterMain.ts
@@ -75,7 +75,7 @@ export class IssueReporter extends Disposable {
this.issueReporterModel = new IssueReporterModel({
issueType: configuration.data.issueType || IssueType.Bug,
versionInfo: {
- vscodeVersion: `${configuration.product.nameShort} ${!!configuration.product.darwinUniversalAssetId ? `${configuration.product.version} (Universal)` : configuration.product.version} (${configuration.product.commit || 'Commit unknown'}, ${configuration.product.date || 'Date unknown'})`,
+ vscodeVersion: `${configuration.product.nameShort} ${!!configuration.product.darwinUniversalAssetId ? `${configuration.product.version} (Universal)` : configuration.product.version} ${configuration.product.release || 'Release unknown'} (${configuration.product.commit || 'Commit unknown'}, ${configuration.product.date || 'Date unknown'})`,
os: `${this.configuration.os.type} ${this.configuration.os.arch} ${this.configuration.os.release}${isLinuxSnap ? ' snap' : ''}`
},
extensionsDisabled: !!configuration.disableExtensions,
diff --git a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
index b0cc736..035c5cb 100644
--- a/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
+++ b/src/vs/code/electron-sandbox/issue/issueReporterModel.ts
@@ -74,7 +74,7 @@ Type: <b>${this.getIssueTypeTitle()}</b>
${this._data.issueDescription}
${this.getExtensionVersion()}
-VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
+VSCodium version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os}
Modes:${modes.length ? ' ' + modes.join(', ') : ''}
${this.getRemoteOSes()}
diff --git a/src/vs/platform/diagnostics/node/diagnosticsService.ts b/src/vs/platform/diagnostics/node/diagnosticsService.ts
index e1c60a3..a12d52c 100644
--- a/src/vs/platform/diagnostics/node/diagnosticsService.ts
+++ b/src/vs/platform/diagnostics/node/diagnosticsService.ts
@@ -237,7 +237,7 @@ export class DiagnosticsService implements IDiagnosticsService {
private formatEnvironment(info: IMainProcessInfo): string {
const output: string[] = [];
- output.push(`Version: ${this.productService.nameShort} ${this.productService.version} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
+ output.push(`Version: ${this.productService.nameShort} ${this.productService.version} ${this.productService.release || 'Release unknown'} (${this.productService.commit || 'Commit unknown'}, ${this.productService.date || 'Date unknown'})`);
output.push(`OS Version: ${osLib.type()} ${osLib.arch()} ${osLib.release()}`);
const cpus = osLib.cpus();
if (cpus && cpus.length > 0) {
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index 7e63a16..74d1f26 100644
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
@@ -32,7 +32,7 @@ else if (typeof require?.__$__nodeRequire === 'function') {
const rootPath = dirname(FileAccess.asFileUri('', require));
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
- const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
+ const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string, release: string };
// Running out of sources
if (env['VSCODE_DEV']) {
@@ -45,7 +45,8 @@ else if (typeof require?.__$__nodeRequire === 'function') {
}
Object.assign(product, {
- version: pkg.version
+ version: pkg.version,
+ release: pkg.release
});
}
diff --git a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
index ec4ff95..f721052 100644
--- a/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
@@ -144,7 +144,8 @@ export class BrowserDialogHandler implements IDialogHandler {
async about(): Promise<void> {
const detailString = (useAgo: boolean): string => {
return localize('aboutDetail',
- "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nBrowser: {4}",
+ this.productService.release || 'Unknown',
this.productService.version || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
diff --git a/src/vs/workbench/contrib/issue/browser/issueService.ts b/src/vs/workbench/contrib/issue/browser/issueService.ts
index dc7430b..23def01 100644
--- a/src/vs/workbench/contrib/issue/browser/issueService.ts
+++ b/src/vs/workbench/contrib/issue/browser/issueService.ts
@@ -65,6 +65,7 @@ export class WebIssueService implements IWorkbenchIssueService {
return `ADD ISSUE DESCRIPTION HERE
Version: ${this.productService.version}
+Release: ${this.productService.release ?? 'unknown'}
Commit: ${this.productService.commit ?? 'unknown'}
User Agent: ${userAgent ?? 'unknown'}
Embedder: ${this.productService.embedderIdentifier ?? 'unknown'}
diff --git a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
index a4728e7..d1a8b94 100644
--- a/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
+++ b/src/vs/workbench/electron-sandbox/parts/dialogs/dialogHandler.ts
@@ -167,8 +167,9 @@ export class NativeDialogHandler implements IDialogHandler {
const detailString = (useAgo: boolean): string => {
return localize({ key: 'aboutDetail', comment: ['Electron, Chromium, Node.js and V8 are product names that need no translation'] },
- "Version: {0}\nCommit: {1}\nDate: {2}\nElectron: {3}\nChromium: {4}\nNode.js: {5}\nV8: {6}\nOS: {7}",
+ "Version: {0}\nRelease: {1}\nCommit: {2}\nDate: {3}\nElectron: {4}\nChromium: {5}\nNode.js: {6}\nV8: {7}\nOS: {8}",
version,
+ this.productService.release || 'Unknown',
this.productService.commit || 'Unknown',
this.productService.date ? `${this.productService.date}${useAgo ? ' (' + fromNow(new Date(this.productService.date), true) + ')' : ''}` : 'Unknown',
process.versions['electron'],

View File

@@ -1,36 +1,25 @@
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1edc76f..4c0bf98 100644
index 1ae8079..eb56045 100644
--- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts
@@ -69,6 +69,7 @@ export interface IProductConfiguration {
readonly extensionsGallery?: {
@@ -72,2 +72,3 @@ export interface IProductConfiguration {
readonly serviceUrl: string;
+ readonly cacheUrl?: string;
readonly itemUrl: string;
readonly resourceUrlTemplate: string;
readonly controlUrl: string;
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index e22b33e..98cec93 100644
index 7e63a16..3bfeab8 100644
--- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts
@@ -4,11 +4,12 @@
*--------------------------------------------------------------------------------------------*/
@@ -6,3 +6,3 @@
import { FileAccess } from 'vs/base/common/network';
-import { globals } from 'vs/base/common/platform';
+import { globals, isWindows } from 'vs/base/common/platform';
import { env } from 'vs/base/common/process';
import { IProductConfiguration } from 'vs/base/common/product';
import { dirname, joinPath } from 'vs/base/common/resources';
@@ -11,2 +11,3 @@ import { dirname, joinPath } from 'vs/base/common/resources';
import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
+import { getUserDataPath } from 'vs/platform/environment/node/userDataPath';
/**
* @deprecated You MUST use `IProductService` if possible.
@@ -34,6 +35,32 @@ else if (typeof require?.__$__nodeRequire === 'function') {
product = require.__$__nodeRequire(joinPath(rootPath, 'product.json').fsPath);
const pkg = require.__$__nodeRequire(joinPath(rootPath, 'package.json').fsPath) as { version: string };
@@ -36,2 +37,28 @@ else if (typeof require?.__$__nodeRequire === 'function') {
+ // Merge user-customized product.json
+ try {
@@ -59,11 +48,7 @@ index e22b33e..98cec93 100644
+ }
+
// Running out of sources
if (env['VSCODE_DEV']) {
Object.assign(product, {
@@ -44,6 +71,19 @@ else if (typeof require?.__$__nodeRequire === 'function') {
});
}
@@ -46,2 +73,15 @@ else if (typeof require?.__$__nodeRequire === 'function') {
+ // Set user-defined extension gallery
+ const { serviceUrl, cacheUrl, itemUrl, controlUrl, recommendationsUrl } = product.extensionsGallery || {}
@@ -79,5 +64,3 @@ index e22b33e..98cec93 100644
+ })
+
Object.assign(product, {
version: pkg.version
});

View File

@@ -1,5 +1,31 @@
diff --git a/build/linux/debian/dependencies-generator.js b/build/linux/debian/dependencies-generator.js
index 235ca26..4f0f06e 100644
--- a/build/linux/debian/dependencies-generator.js
+++ b/build/linux/debian/dependencies-generator.js
@@ -17,7 +17,7 @@ const dep_lists_1 = require("./dep-lists");
// If true, we fail the build if there are new dependencies found during that task.
// The reference dependencies, which one has to update when the new dependencies
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES = false;
function getDependencies(buildDir, applicationName, arch, sysroot) {
// Get the files for which we want to find dependencies.
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
diff --git a/build/linux/debian/dependencies-generator.ts b/build/linux/debian/dependencies-generator.ts
index 9e3d466..776a4c2 100644
--- a/build/linux/debian/dependencies-generator.ts
+++ b/build/linux/debian/dependencies-generator.ts
@@ -19,7 +19,7 @@ import { ArchString } from './types';
// If true, we fail the build if there are new dependencies found during that task.
// The reference dependencies, which one has to update when the new dependencies
// are valid, are in dep-lists.ts
-const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = true;
+const FAIL_BUILD_FOR_NEW_DEPENDENCIES: boolean = false;
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString, sysroot: string): string[] {
// Get the files for which we want to find dependencies.
diff --git a/build/linux/rpm/dependencies-generator.js b/build/linux/rpm/dependencies-generator.js
index 1d91eb8..ed6b775 100644
index 90cfca9..c92579e 100644
--- a/build/linux/rpm/dependencies-generator.js
+++ b/build/linux/rpm/dependencies-generator.js
@@ -16,7 +16,7 @@ const dep_lists_1 = require("./dep-lists");
@@ -12,10 +38,10 @@ index 1d91eb8..ed6b775 100644
// Get the files for which we want to find dependencies.
const nativeModulesPath = path.join(buildDir, 'resources', 'app', 'node_modules.asar.unpacked');
diff --git a/build/linux/rpm/dependencies-generator.ts b/build/linux/rpm/dependencies-generator.ts
index 95953ec..f5ffc2e 100644
index 4b84640..55429fb 100644
--- a/build/linux/rpm/dependencies-generator.ts
+++ b/build/linux/rpm/dependencies-generator.ts
@@ -18,7 +18,7 @@ import { ArchString } from './types';
@@ -16,7 +16,7 @@ import { ArchString } from './types';
// If true, we fail the build if there are new dependencies found during that task.
// The reference dependencies, which one has to update when the new dependencies
// are valid, are in dep-lists.ts
@@ -25,10 +51,10 @@ index 95953ec..f5ffc2e 100644
export function getDependencies(buildDir: string, applicationName: string, arch: ArchString): string[] {
// Get the files for which we want to find dependencies.
diff --git a/resources/linux/rpm/code.spec.template b/resources/linux/rpm/code.spec.template
index 5b7eadb..87c914d 100644
index 00ddb6f..cea0e97 100644
--- a/resources/linux/rpm/code.spec.template
+++ b/resources/linux/rpm/code.spec.template
@@ -74,3 +74,5 @@ update-mime-database /usr/share/mime &> /dev/null || :
@@ -72,3 +72,5 @@ update-mime-database /usr/share/mime &> /dev/null || :
/usr/share/pixmaps/@@ICON@@.png
/usr/share/bash-completion/completions/@@NAME@@
/usr/share/zsh/site-functions/_@@NAME@@

View File

@@ -0,0 +1,12 @@
diff --git a/build/gulpfile.extensions.js b/build/gulpfile.extensions.js
--- a/build/gulpfile.extensions.js
+++ b/build/gulpfile.extensions.js
@@ -223,7 +223,7 @@ const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimr
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
cleanExtensionsBuildTask,
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream(false).pipe(gulp.dest('.build'))),
- task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false, product.extensionsGallery?.serviceUrl).pipe(gulp.dest('.build'))),
+ task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream(false).pipe(gulp.dest('.build'))),
));
gulp.task(compileExtensionsBuildTask);

View File

@@ -5,10 +5,10 @@ set -e
npm install -g checksum
sum_file() {
if [[ -f "$1" ]]; then
echo "Calcuating checksum for $1"
checksum -a sha256 "$1" > "$1".sha256
checksum "$1" > "$1".sha1
if [[ -f "${1}" ]]; then
echo "Calcuating checksum for ${1}"
checksum -a sha256 "${1}" > "${1}".sha256
checksum "${1}" > "${1}".sha1
fi
}
@@ -18,7 +18,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
echo "Building and moving ZIP"
cd "VSCode-darwin-${VSCODE_ARCH}"
zip -r -X -y ../artifacts/VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip ./*.app
zip -r -X -y "../artifacts/VSCodium-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" ./*.app
cd ..
fi
@@ -26,41 +26,45 @@ if [[ "${OS_NAME}" == "osx" ]]; then
echo "Building and moving DMG"
pushd "VSCode-darwin-${VSCODE_ARCH}"
npx create-dmg VSCodium.app ..
mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${MS_TAG}.dmg"
mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${RELEASE_VERSION}.dmg"
popd
fi
VSCODE_PLATFORM="darwin"
elif [[ "${OS_NAME}" == "windows" ]]; then
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
echo "Moving ZIP"
mv vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip artifacts\\VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip" "artifacts\\VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"
fi
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
echo "Moving System EXE"
mv vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe artifacts\\VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe" "artifacts\\VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"
fi
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
echo "Moving User EXE"
mv vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe artifacts\\VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe" "artifacts\\VSCodiumUserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe"
fi
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
echo "Moving MSI"
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi artifacts/
mv "build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}.msi" artifacts/
fi
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
echo "Moving MSI with disabled updates"
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi artifacts/
mv "build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi" artifacts/
fi
fi
VSCODE_PLATFORM="win32"
else
if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then
echo "Building and moving TAR"
cd VSCode-linux-${VSCODE_ARCH}
tar czf ../artifacts/VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz .
cd "VSCode-linux-${VSCODE_ARCH}"
tar czf "../artifacts/VSCodium-linux-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
cd ..
fi
@@ -78,6 +82,15 @@ else
echo "Moving AppImage"
mv build/linux/appimage/out/*.AppImage* artifacts/
fi
VSCODE_PLATFORM="linux"
fi
if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
echo "Building and moving REH"
cd "vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}"
tar czf "../artifacts/vscodium-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz" .
cd ..
fi
cd artifacts

View File

@@ -2,10 +2,13 @@
set -e
# include common functions
. ./utils.sh
cp -rp src/* vscode/
cp -f LICENSE vscode/LICENSE.txt
cd vscode || exit
cd vscode || { echo "'vscode' dir not found"; exit 1; }
../update_settings.sh
@@ -13,30 +16,40 @@ cd vscode || exit
{ set +x; } 2>/dev/null
for file in ../patches/*.patch; do
if [ -f "$file" ]; then
echo applying patch: $file;
git apply --ignore-whitespace "$file"
if [ -f "${file}" ]; then
echo applying patch: "${file}";
git apply --ignore-whitespace "${file}"
if [ $? -ne 0 ]; then
echo failed to apply patch $file 1>&2
echo failed to apply patch "${file}" 1>&2
fi
fi
done
for file in ../patches/user/*.patch; do
if [ -f "$file" ]; then
echo applying user patch: $file;
git apply --ignore-whitespace "$file"
if [ -f "${file}" ]; then
echo applying user patch: "${file}";
git apply --ignore-whitespace "${file}"
if [ $? -ne 0 ]; then
echo failed to apply patch $file 1>&2
echo failed to apply patch "${file}" 1>&2
fi
fi
done
set -x
if [[ "$OS_NAME" == "osx" ]]; then
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional
npm_config_argv='{"original":["--ignore-optional"]}' yarn postinstall
if [[ "${OS_NAME}" == "osx" ]]; then
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
yarn postinstall
elif [[ "${npm_config_arch}" == "armv7l" || "${npm_config_arch}" == "ia32" ]]; then
# node-gyp@9.0.0 shipped with node@16.15.0 starts using config.gypi
# from the custom headers path if dist-url option was set instead of
# using the config value from the process. Electron builds with pointer compression
# enabled for x64 and arm64, but incorrectly ships a single copy of config.gypi
# with v8_enable_pointer_compression option always set for all target architectures.
# We use the force_process_config option to use the config.gypi from the
# nodejs process executing npm for 32-bit architectures.
export npm_config_force_process_config="true"
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
else
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
fi
@@ -70,11 +83,12 @@ win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
urlProtocol='setpath(["urlProtocol"]; "vscodium")'
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscode-server-oss")'
serverApplicationName='setpath(["serverApplicationName"]; "codium-server")'
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscodium-server")'
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")'
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")'
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverApplicationName} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
@@ -82,9 +96,15 @@ rm -f product.json.tmp
cat product.json
mv package.json package.json.bak
package_json_changes="setpath(["\""version"\""]; "\""${RELEASE_VERSION}"\"") | setpath(["\""release"\""]; "\""${RELEASE_VERSION}"\"")"
cat package.json.bak | jq "${package_json_changes}" > package.json
gsed -i -E 's/"version": "(.*)\.([0-9]+)"/"version": "\1"/' package.json
gsed -i -E 's/"release": "(.*)\.([0-9]+)"/"release": "\2"/' package.json
../undo_telemetry.sh
if [[ "$OS_NAME" == "linux" ]]; then
if [[ "${OS_NAME}" == "linux" ]]; then
# microsoft adds their apt repo to sources
# unless the app name is code-oss
# as we are renaming the application to vscodium

View File

@@ -51,7 +51,8 @@
"testObserver"
],
"VisualStudioExptTeam.vscodeintellicode-completions": [
"inlineCompletions"
"inlineCompletionsNew",
"inlineCompletionsAdditions"
],
"ms-vsliveshare.vsliveshare": [
"contribMenuBarHome",
@@ -61,13 +62,12 @@
"findTextInFiles",
"notebookCellExecutionState",
"notebookContentProvider",
"notebookDocumentEvents",
"notebookEditor",
"notebookEditorEdit",
"notebookLiveShare",
"notebookWorkspaceEdit",
"terminalDimensions",
"terminalDataWriteEvent",
"textDocumentNotebook",
"textSearchProvider"
],
"ms-vscode.js-debug": [
@@ -82,25 +82,20 @@
],
"ms-python.python": [
"quickPickSortByLabel",
"testObserver",
"notebookEditor"
"testObserver"
],
"ms-dotnettools.dotnet-interactive-vscode": [
"notebookConcatTextDocument",
"notebookContentProvider",
"notebookCellExecutionState",
"notebookControllerKind",
"notebookDebugOptions",
"notebookDeprecated",
"notebookEditor",
"notebookEditorDecorationType",
"notebookEditorEdit",
"notebookLiveShare",
"notebookMessaging",
"notebookMime",
"textDocumentNotebook"
"notebookWorkspaceEdit"
],
"GitHub.codespaces": [
"contribEditSessions",
"contribMenuBarHome",
"contribRemoteHelp",
"contribViewsRemote",
@@ -112,10 +107,10 @@
"ms-vscode.azure-repos": [
"extensionRuntime",
"fileSearchProvider",
"resolvers",
"textSearchProvider"
],
"ms-vscode.remote-repositories": [
"contribEditSessions",
"contribRemoteHelp",
"contribMenuBarHome",
"contribViewsRemote",
@@ -128,14 +123,7 @@
"scmSelectedProvider",
"scmValidation",
"textSearchProvider",
"timeline",
"notebookEditor"
],
"ms-vscode.vscode-github-issue-notebooks": [
"notebookEditor"
],
"tanhakabir.rest-book": [
"notebookEditor"
"timeline"
],
"ms-vscode-remote.remote-wsl": [
"resolvers",
@@ -148,6 +136,10 @@
"contribViewsRemote",
"telemetry"
],
"ms-vscode.remote-server": [
"resolvers",
"contribViewsRemote"
],
"ms-vscode-remote.remote-containers": [
"resolvers",
"workspaceTrust",
@@ -164,15 +156,18 @@
"documentFiltersExclusive"
],
"GitHub.vscode-pull-request-github": [
"tokenInformation"
"tokenInformation",
"commentsResolvedState",
"badges",
"contribViewSize"
],
"GitHub.copilot": [
"inlineCompletions",
"textDocumentNotebook"
"inlineCompletionsNew",
"inlineCompletionsAdditions"
],
"GitHub.copilot-nightly": [
"inlineCompletions",
"textDocumentNotebook"
"inlineCompletionsNew",
"inlineCompletionsAdditions"
],
"GitHub.remotehub": [
"contribRemoteHelp",
@@ -184,12 +179,10 @@
"fileSearchProvider",
"quickPickSortByLabel",
"workspaceTrust",
"resolvers",
"scmSelectedProvider",
"scmValidation",
"textSearchProvider",
"timeline",
"notebookEditor"
"timeline"
],
"GitHub.remotehub-insiders": [
"contribRemoteHelp",
@@ -201,42 +194,35 @@
"fileSearchProvider",
"quickPickSortByLabel",
"workspaceTrust",
"resolvers",
"scmSelectedProvider",
"scmValidation",
"textSearchProvider",
"timeline",
"notebookEditor"
"timeline"
],
"ms-python.gather": [
"notebookEditor",
"notebookCellExecutionState"
],
"ms-python.vscode-pylance": [
"notebookDocumentEvents",
"notebookEditor",
"notebookCellExecutionState"
],
"ms-toolsai.jupyter": [
"notebookConcatTextDocument",
"notebookControllerKind",
"notebookDebugOptions",
"notebookDeprecated",
"notebookEditor",
"notebookDocumentEvents",
"notebookEditorDecorationType",
"notebookEditorEdit",
"notebookWorkspaceEdit",
"notebookMessaging",
"notebookMime",
"notebookCellExecutionState",
"portsAttributes",
"textDocumentNotebook",
"quickPickSortByLabel"
"quickPickSortByLabel",
"notebookKernelSource",
"interactiveWindow"
],
"ms-toolsai.vscode-jupyter-powertoys": [
"notebookWorkspaceEdit"
],
"dbaeumer.vscode-eslint": [
"tabs",
"notebookDocumentEvents",
"notebookEditor",
"notebookCellExecutionState"
],
"ms-vscode.azure-sphere-tools-ui": [
@@ -244,6 +230,12 @@
],
"ms-azuretools.vscode-azureappservice": [
"terminalDataWriteEvent"
],
"ms-vscode.anycode": [
"extensionsAny"
],
"ms-vscode.cpptools": [
"terminalDataWriteEvent"
]
},
"extensionKind": {

View File

@@ -9,9 +9,9 @@ fi
npm install -g github-release-cli
if [[ $( gh release view "${MS_TAG}" 2>&1 ) =~ "release not found" ]]; then
echo "Creating release '${MS_TAG}'"
gh release create "${MS_TAG}"
if [[ $( gh release view "${RELEASE_VERSION}" 2>&1 ) =~ "release not found" ]]; then
echo "Creating release '${RELEASE_VERSION}'"
gh release create "${RELEASE_VERSION}"
fi
cd artifacts
@@ -22,42 +22,38 @@ OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
REPOSITORY="${REPO_NAME:-"vscodium"}"
# git workaround
git config --global --add safe.directory /__w/vscodium/vscodium
for FILE in *
do
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
echo "::group::Uploading '${FILE}' at $( date "+%T" )"
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
gh release upload "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: $EXIT_STATUS"
echo "exit: ${EXIT_STATUS}"
if (( $EXIT_STATUS )); then
if (( "${EXIT_STATUS}" )); then
for (( i=0; i<10; i++ ))
do
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
sleep $(( 15 * (i + 1)))
echo "RE-Uploading '${FILE}' at $( date "+%T" )"
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
gh release upload "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$?
echo "exit: $EXIT_STATUS"
echo "exit: ${EXIT_STATUS}"
if ! (( $EXIT_STATUS )); then
if ! (( "${EXIT_STATUS}" )); then
break
fi
done
echo "exit: $EXIT_STATUS"
echo "exit: ${EXIT_STATUS}"
if (( $EXIT_STATUS )); then
if (( "${EXIT_STATUS}" )); then
echo "'${FILE}' hasn't been uploaded!"
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${RELEASE_VERSION}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
exit 1
fi

View File

@@ -15,11 +15,9 @@ else
sudo snap install --channel stable --classic snapcraft
echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
echo "Architecture: ${ARCHITECTURE}"
SNAP_VERSION=$(snapcraft list-revisions codium | grep -F stable* | grep ${ARCHITECTURE} | tr -s ' ' | cut -d ' ' -f 4)
SNAP_VERSION=$(snapcraft list-revisions codium | grep -F "stable*" | grep "${ARCHITECTURE}" | tr -s ' ' | cut -d ' ' -f 4)
echo "Snap version: ${SNAP_VERSION}"
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json
@@ -38,6 +36,6 @@ else
fi
fi
if [[ $GITHUB_ENV ]]; then
echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV
if [[ "${GITHUB_ENV}" ]]; then
echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
fi

View File

@@ -1,17 +1,44 @@
# mobile.events.data.microsoft.com
# vortex.data.microsoft.com
TELEMETRY_URLS="[^/]+\.data\.microsoft\.com"
REPLACEMENT="s/$TELEMETRY_URLS/0\.0\.0\.0/g"
#!/bin/bash
#include common functions
set -ex
# list of urls to match:
# - mobile.events.data.microsoft.com
# - vortex.data.microsoft.com
SEARCH="\.data\.microsoft\.com"
REPLACEMENT="s|//[^/]+\.data\.microsoft\.com|//0\.0\.0\.0|g"
# include common functions
. ../utils.sh
if [[ "$OS_NAME" == "osx" ]]; then
if is_gnu_sed; 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
if is_gnu_sed; then
replace_with_debug () {
echo "found: ${2} (`date`)"
sed -i -E "${1}" "${2}"
}
else
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT
replace_with_debug () {
echo "found: ${2} (`date`)"
sed -i '' -E "${1}" "${2}"
}
fi
export -f replace_with_debug
d1=`date +%s`
if [[ "${OS_NAME}" == "linux" ]]; then
if [[ ${VSCODE_ARCH} == "x64" ]]; then
./node_modules/@vscode/ripgrep/bin/rg --no-ignore -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
else
grep -rl --exclude-dir=.git -E "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
fi
elif [[ "${OS_NAME}" == "osx" ]]; then
./node_modules/@vscode/ripgrep/bin/rg --no-ignore -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
else
./node_modules/@vscode/ripgrep/bin/rg --no-ignore --path-separator=// -l "${SEARCH}" . | xargs -I {} bash -c 'replace_with_debug "${1}" "{}"' _ "${REPLACEMENT}"
fi
d2=`date +%s`
echo "undo_telemetry: $( echo $((${d2} - ${d1})) )s"

View File

@@ -5,45 +5,45 @@ DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
#include common functions
# include common functions
. ../utils.sh
update_setting () {
local FILENAME="$2"
local FILENAME="${2}"
# check that the file exists
if [ ! -f $FILENAME ]; then
if [ ! -f "${FILENAME}" ]; then
echo "File to update setting in does not exist ${FILENAME}"
return
fi
# go through lines of file, looking for block that contains setting
local SETTING="$1"
local SETTING="${1}"
local LINE_NUM=0
while read -r line; do
local LINE_NUM=$(( $LINE_NUM + 1 ))
if [[ $line == *"$SETTING"* ]]; then
if [[ "${line}" == *"${SETTING}"* ]]; then
local IN_SETTING=1
fi
if [[ ($line == *"$DEFAULT_TRUE"* || $line == *"$DEFAULT_ON"*) && "$IN_SETTING" == "1" ]]; then
if [[ ("${line}" == *"${DEFAULT_TRUE}"* || "${line}" == *"${DEFAULT_ON}"*) && "${IN_SETTING}" == "1" ]]; then
local FOUND=1
break
fi
done < $FILENAME
done < "${FILENAME}"
if [[ "$FOUND" != "1" ]]; then
echo "$DEFAULT_TRUE not found for setting $SETTING in file $FILENAME"
if [[ "${FOUND}" != "1" ]]; then
echo "${DEFAULT_TRUE} not found for setting ${SETTING} in file ${FILENAME}"
return
fi
# construct line-aware replacement string
if [[ $line == *"$DEFAULT_TRUE"* ]]; then
if [[ "${line}" == *"${DEFAULT_TRUE}"* ]]; then
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_TRUE}/${DEFAULT_FALSE}/"
else
local DEFAULT_TRUE_TO_FALSE="${LINE_NUM}s/${DEFAULT_ON}/${DEFAULT_OFF}/"
fi
replace "$DEFAULT_TRUE_TO_FALSE" $FILENAME
replace "${DEFAULT_TRUE_TO_FALSE}" "${FILENAME}"
}
update_setting "$TELEMETRY_CRASH_REPORTER" src/vs/workbench/electron-sandbox/desktop.contribution.ts
update_setting "$TELEMETRY_CONFIGURATION" src/vs/platform/telemetry/common/telemetryService.ts
update_setting "${TELEMETRY_CRASH_REPORTER}" src/vs/workbench/electron-sandbox/desktop.contribution.ts
update_setting "${TELEMETRY_CONFIGURATION}" src/vs/platform/telemetry/common/telemetryService.ts

View File

@@ -23,15 +23,15 @@ fi
# }
# `url` is URL_BASE + filename of asset e.g.
# darwin: https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}/VSCodium-darwin-${MS_TAG}.zip
# `name` is $MS_TAG
# `version` is $MS_COMMIT
# `productVersion` is $MS_TAG
# darwin: https://github.com/VSCodium/vscodium/releases/download/${RELEASE_VERSION}/VSCodium-darwin-${RELEASE_VERSION}.zip
# `name` is $RELEASE_VERSION
# `version` is $BUILD_SOURCEVERSION
# `productVersion` is $RELEASE_VERSION
# `hash` in <filename>.sha1
# `timestamp` is $(node -e 'console.log(Date.now())')
# `sha256hash` in <filename>.sha256
URL_BASE="https://github.com/VSCodium/vscodium/releases/download/${MS_TAG}"
URL_BASE="https://github.com/VSCodium/vscodium/releases/download/${RELEASE_VERSION}"
# to make testing on forks easier
VERSIONS_REPO="${GITHUB_USERNAME}/versions"
@@ -42,14 +42,14 @@ generateJson() {
# generate parts
local url="${URL_BASE}/${ASSET_NAME}"
local name="${MS_TAG}"
local version="${MS_COMMIT}"
local productVersion="${MS_TAG}"
local name="${RELEASE_VERSION}"
local version="${BUILD_SOURCEVERSION}"
local productVersion="${RELEASE_VERSION}"
local timestamp=$(node -e 'console.log(Date.now())')
if [[ ! -f "artifacts/${ASSET_NAME}" ]]; then
echo "Downloading artifact '${ASSET_NAME}'"
gh release download "${MS_TAG}" --dir "artifacts" --pattern "${ASSET_NAME}*"
gh release download "${RELEASE_VERSION}" --dir "artifacts" --pattern "${ASSET_NAME}*"
fi
local sha1hash=$(cat "artifacts/${ASSET_NAME}.sha1" | awk '{ print $1 }')
@@ -101,33 +101,33 @@ git remote add origin "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com/${V
cd ..
if [[ "${OS_NAME}" == "osx" ]]; then
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip
ASSET_NAME=VSCodium-darwin-${VSCODE_ARCH}-${RELEASE_VERSION}.zip
VERSION_PATH="darwin/${VSCODE_ARCH}"
updateLatestVersion
elif [[ "${OS_NAME}" == "windows" ]]; then
# system installer
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
ASSET_NAME=VSCodiumSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe
VERSION_PATH="win32/${VSCODE_ARCH}/system"
updateLatestVersion
# user installer
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
ASSET_NAME=VSCodiumUserSetup-${VSCODE_ARCH}-${RELEASE_VERSION}.exe
VERSION_PATH="win32/${VSCODE_ARCH}/user"
updateLatestVersion
# windows archive
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
ASSET_NAME=VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip
VERSION_PATH="win32/${VSCODE_ARCH}/archive"
updateLatestVersion
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
# msi
ASSET_NAME=VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi
ASSET_NAME=VSCodium-${VSCODE_ARCH}-${RELEASE_VERSION}.msi
VERSION_PATH="win32/${VSCODE_ARCH}/msi"
updateLatestVersion
# updates-disabled msi
ASSET_NAME=VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi
ASSET_NAME=VSCodium-${VSCODE_ARCH}-updates-disabled-${RELEASE_VERSION}.msi
VERSION_PATH="win32/${VSCODE_ARCH}/msi-updates-disabled"
updateLatestVersion
fi
@@ -135,7 +135,7 @@ else # linux
# update service links to tar.gz file
# see https://update.code.visualstudio.com/api/update/linux-x64/stable/VERSION
# as examples
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz
ASSET_NAME=VSCodium-linux-${VSCODE_ARCH}-${RELEASE_VERSION}.tar.gz
VERSION_PATH="linux/${VSCODE_ARCH}"
updateLatestVersion
fi

View File

@@ -2,15 +2,29 @@
#All common functions can be added to this file
exists() { type -t "$1" > /dev/null 2>&1; }
is_gnu_sed () {
sed --version >/dev/null 2>&1
}
replace () {
echo $1
echo "${1}"
if is_gnu_sed; then
sed -i -E "$1" $2
sed -i -E "${1}" "${2}"
else
sed -i '' -E "$1" $2
sed -i '' -E "${1}" "${2}"
fi
}
if ! exists gsed; then
if is_gnu_sed; then
function gsed() {
sed -i -E "$@"
}
else
function gsed() {
sed -i '' -E "$@"
}
fi
fi

23
version.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
if [[ -z "${BUILD_SOURCEVERSION}" ]]; then
npm install -g checksum
vscodium_hash=$( git rev-parse HEAD )
cd vscode
vscode_hash=$( git rev-parse HEAD )
cd ..
export BUILD_SOURCEVERSION=$( echo "${vscodium_hash}:${vscode_hash}" | checksum )
echo "Build version: ${BUILD_SOURCEVERSION}"
# for GH actions
if [[ $GITHUB_ENV ]]; then
echo "BUILD_SOURCEVERSION=$BUILD_SOURCEVERSION" >> $GITHUB_ENV
fi
fi