Compare commits

...

26 Commits

Author SHA1 Message Date
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
Baptiste Augrain
70082e0f0f fix(macos): correctly clean up keychain (#1075) 2022-05-07 17:29:18 +02:00
Baptiste Augrain
e9ea41fcfa fix(macos): clean up keychain (#1074) 2022-05-07 17:18:14 +02:00
Baptiste Augrain
014d9a339d fix(macos): delete keychain to avoid conflict on next release (#1071) 2022-05-07 14:02:20 +02:00
Pavlo Rudy
4855694fd6 fix: add git workaround for release upload (#1069) 2022-05-07 13:51:07 +02:00
29 changed files with 387 additions and 144 deletions

View File

@@ -27,9 +27,9 @@ jobs:
- vscode_arch: arm64 - vscode_arch: arm64
npm_arch: arm64 npm_arch: arm64
image: vscodium/vscodium-linux-build-agent:stretch-arm64 image: vscodium/vscodium-linux-build-agent:stretch-arm64
# - vscode_arch: armhf - vscode_arch: armhf
# npm_arch: armv7l npm_arch: armv7l
# image: vscodium/vscodium-linux-build-agent:stretch-armhf image: vscodium/vscodium-linux-build-agent:stretch-armhf
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -116,7 +116,7 @@ jobs:
run: ./stores/snapcraft/check_version.sh run: ./stores/snapcraft/check_version.sh
env: env:
ARCHITECTURE: ${{ matrix.platform }} ARCHITECTURE: ${{ matrix.platform }}
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
# - uses: docker/setup-qemu-action@v1 # - uses: docker/setup-qemu-action@v1
# if: env.SHOULD_DEPLOY == 'yes' # if: env.SHOULD_DEPLOY == 'yes'
@@ -140,9 +140,10 @@ jobs:
if: env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_DEPLOY == 'yes'
- uses: snapcore/action-publish@v1 - uses: snapcore/action-publish@master
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with: with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
release: stable release: stable
if: env.SHOULD_DEPLOY == 'yes' 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

@@ -80,7 +80,7 @@ jobs:
cd "VSCode-darwin-${VSCODE_ARCH}" cd "VSCode-darwin-${VSCODE_ARCH}"
export CERTIFICATE_P12=VSCodium.p12 export CERTIFICATE_P12=VSCodium.p12
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12 echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
export KEYCHAIN=build.keychain export KEYCHAIN=$RUNNER_TEMP/build.keychain
security create-keychain -p mysecretpassword $KEYCHAIN security create-keychain -p mysecretpassword $KEYCHAIN
security default-keychain -s $KEYCHAIN security default-keychain -s $KEYCHAIN
security unlock-keychain -p mysecretpassword $KEYCHAIN security unlock-keychain -p mysecretpassword $KEYCHAIN
@@ -106,3 +106,12 @@ jobs:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }} GITHUB_USERNAME: ${{ github.repository_owner }}
- name: Clean up keychain
if: always()
run: |
KEYCHAIN=$RUNNER_TEMP/build.keychain
if [ -f "$KEYCHAIN" ];
then
security delete-keychain $KEYCHAIN
fi

View File

@@ -22,7 +22,7 @@ jobs:
matrix: matrix:
vscode_arch: vscode_arch:
- x64 - x64
# - ia32 - ia32
- arm64 - arm64
steps: steps:

4
.gitignore vendored
View File

@@ -7,5 +7,5 @@ build/linux/appimage/pkg2appimage-*.AppImage
build/linux/appimage/squashfs-root build/linux/appimage/squashfs-root
build/linux/appimage/VSCodium build/linux/appimage/VSCodium
build/windows/msi/releasedir build/windows/msi/releasedir
build/windows/rtf/Readme (Abridged).txt build/windows/msi/Files*.wxs
build/windows/rtf/TXT to RTF Converter.exe 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 ### <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: With the following environment variables:
- `VSCODE_GALLERY_SERVICE_URL='https://marketplace.visualstudio.com/_apis/public/gallery'` - `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.** **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 ## Table of Contents
- [Download/Install](#download-install) - [Download/Install](#download-install)
- [Install with Brew](#install-with-brew) - [Install with Brew](#install-with-brew)
- [Install with Windows Package Manager (WinGet)](#install-with-winget) - [Install with Windows Package Manager (WinGet)](#install-with-winget)
@@ -37,31 +38,36 @@
- [Supported Platforms](#supported-platforms) - [Supported Platforms](#supported-platforms)
## <a id="download-install"></a>Download/Install ## <a id="download-install"></a>Download/Install
:tada: :tada: [Download latest release here](https://github.com/VSCodium/vscodium/releases) :tada: :tada: :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) [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) #### <a id="install-with-brew"></a>Install with Brew (Mac)
If you are on a Mac and have [Homebrew](https://brew.sh/) installed: If you are on a Mac and have [Homebrew](https://brew.sh/) installed:
```bash ```bash
brew install --cask vscodium 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) #### <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: If you use Windows and have [Windows Package Manager](https://github.com/microsoft/winget-cli) installed:
```bash ```bash
winget install vscodium winget install vscodium
``` ```
#### <a id="install-with-choco"></a>Install with Chocolatey (Windows) #### <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)): If you use Windows and have [Chocolatey](https://chocolatey.org) installed (thanks to [@Thilas](https://github.com/Thilas)):
```bash ```bash
choco install vscodium choco install vscodium
``` ```
#### <a id="install-with-scoop"></a>Install with Scoop (Windows) #### <a id="install-with-scoop"></a>Install with Scoop (Windows)
If you use Windows and have [Scoop](https://scoop.sh) installed: If you use Windows and have [Scoop](https://scoop.sh) installed:
```bash ```bash
scoop bucket add extras scoop bucket add extras
@@ -69,6 +75,7 @@ scoop install vscodium
``` ```
#### <a id="install-with-snap"></a>Install with snap (GNU/Linux) #### <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. 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): If your GNU/Linux distribution has support for [snaps](https://snapcraft.io/docs/installing-snapd):
```bash ```bash
@@ -76,12 +83,15 @@ snap install codium --classic
``` ```
#### <a id="install-with-package-manager"></a>Install with Package Manager (GNU/Linux) #### <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. 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 #### <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. 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) #### <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/): 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 ```bash
flatpak install flathub com.vscodium.codium flatpak install flathub com.vscodium.codium
@@ -90,9 +100,11 @@ flatpak run com.vscodium.codium
``` ```
## <a id="build"></a>Build ## <a id="build"></a>Build
Build instructions can be found [here](https://github.com/VSCodium/vscodium/blob/master/docs/build.md) Build instructions can be found [here](https://github.com/VSCodium/vscodium/blob/master/docs/build.md)
## <a id="why"></a>Why Does This Exist ## <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. 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: 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 ## <a id="more-info"></a>More Info
### Documentation ### 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. 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 ### 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. 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. 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? ### 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). 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. 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 ## <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`) 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 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 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`) - [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 - [x] Windows 10 arm64
## <a id="donate"></a>Donate ## <a id="donate"></a>Donate
If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`. If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`.
Special thanks to: 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 ## <a id="license"></a>License
[MIT](https://github.com/VSCodium/vscodium/blob/master/LICENSE) [MIT](https://github.com/VSCodium/vscodium/blob/master/LICENSE)

View File

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

View File

@@ -3,6 +3,16 @@
rm -rf VSCode* 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 . 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

@@ -6,7 +6,7 @@ CALLER_DIR=$( pwd )
cd "$( dirname "${BASH_SOURCE[0]}" )" 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) 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 chmod +x ./pkg2appimage-*.AppImage

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

View File

@@ -24,10 +24,10 @@ ICON_DIR="..\\..\\..\\src\\resources\\win32"
LICENSE_DIR="..\\..\\..\\vscode" LICENSE_DIR="..\\..\\..\\vscode"
PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' ) PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' )
if [[ -z "$1" ]]; then if [[ -z "${1}" ]]; then
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${MS_TAG}" OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${MS_TAG}"
else else
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-$1-${MS_TAG}" OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${1}-${MS_TAG}"
fi fi
if [[ "${VSCODE_ARCH}" == "ia32" ]]; then if [[ "${VSCODE_ARCH}" == "ia32" ]]; then
@@ -38,8 +38,8 @@ fi
BuildSetupTranslationTransform() { BuildSetupTranslationTransform() {
local CULTURE=$1 local CULTURE=${1}
local LANGID=$2 local LANGID=${2}
LANGIDS="${LANGIDS},${LANGID}" LANGIDS="${LANGIDS},${LANGID}"
@@ -47,13 +47,13 @@ BuildSetupTranslationTransform() {
"${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 "${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" "${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" "${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"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst" rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"

View File

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

View File

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

View File

@@ -8,18 +8,18 @@ if [[ -z "${GITHUB_TOKEN}" ]]; then
fi fi
REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}" REPOSITORY="${GITHUB_REPOSITORY:-"VSCodium/vscodium"}"
GITHUB_RESPONSE=$( curl -s -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/repos/${REPOSITORY}/releases/tags/${MS_TAG}) 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)?' ) VSCODIUM_ASSETS=$( echo "${GITHUB_RESPONSE}" | jq -c '.assets | map(.name)?' )
contains() { contains() {
# add " to match the end of a string so any hashs won't be matched by mistake # 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 if [ "${VSCODIUM_ASSETS}" != "null" ]; then
# macos # macos
if [[ "${OS_NAME}" == "osx" ]]; then if [[ "${OS_NAME}" == "osx" ]]; then
if [[ -z $( contains "darwin-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then if [[ -z $( contains "VSCodium-darwin-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
echo "Building on MacOS because we have no ZIP" echo "Building on MacOS because we have no ZIP"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
@@ -33,6 +33,13 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_DMG="no" export SHOULD_BUILD_DMG="no"
fi fi
if [[ -z $( contains "vscodium-reh-darwin-${VSCODE_ARCH}-${MS_TAG}.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 if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the MacOS builds" echo "Already have all the MacOS builds"
fi fi
@@ -54,13 +61,15 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_EXE_USR="no" export SHOULD_BUILD_EXE_USR="no"
fi fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
echo "Building on Windows arm64 because we have no zip" echo "Building on Windows arm64 because we have no zip"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
export SHOULD_BUILD_ZIP="no" export SHOULD_BUILD_ZIP="no"
fi fi
export SHOULD_BUILD_REH="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows arm64 builds" echo "Already have all the Windows arm64 builds"
fi fi
@@ -81,7 +90,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_EXE_USR="no" export SHOULD_BUILD_EXE_USR="no"
fi fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
echo "Building on Windows ia32 because we have no zip" echo "Building on Windows ia32 because we have no zip"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
@@ -102,6 +111,13 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_MSI_NOUP="no" export SHOULD_BUILD_MSI_NOUP="no"
fi fi
if [[ -z $( contains "vscodium-reh-win32-${VSCODE_ARCH}-${MS_TAG}.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 if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows ia32 builds" echo "Already have all the Windows ia32 builds"
fi fi
@@ -122,7 +138,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_EXE_USR="no" export SHOULD_BUILD_EXE_USR="no"
fi fi
if [[ -z $( contains "win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then if [[ -z $( contains "VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip" ) ]]; then
echo "Building on Windows x64 because we have no zip" echo "Building on Windows x64 because we have no zip"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
@@ -143,6 +159,13 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_MSI_NOUP="no" export SHOULD_BUILD_MSI_NOUP="no"
fi fi
if [[ -z $( contains "vscodium-reh-win32-${VSCODE_ARCH}-${MS_TAG}.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 if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Windows x64 builds" echo "Already have all the Windows x64 builds"
fi fi
@@ -165,13 +188,20 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no" export SHOULD_BUILD_RPM="no"
fi fi
if [[ -z $( contains "arm64-${MS_TAG}.tar.gz" ) ]]; then if [[ -z $( contains "VSCodium-linux-arm64-${MS_TAG}.tar.gz" ) ]]; then
echo "Building on Linux arm64 because we have no TAR" echo "Building on Linux arm64 because we have no TAR"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
export SHOULD_BUILD_TAR="no" export SHOULD_BUILD_TAR="no"
fi fi
if [[ -z $( contains "vscodium-reh-linux-arm64-${MS_TAG}.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" export SHOULD_BUILD_APPIMAGE="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then if [[ "${SHOULD_BUILD}" != "yes" ]]; then
@@ -194,13 +224,20 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no" export SHOULD_BUILD_RPM="no"
fi fi
if [[ -z $( contains "armhf-${MS_TAG}.tar.gz" ) ]]; then if [[ -z $( contains "VSCodium-linux-armhf-${MS_TAG}.tar.gz" ) ]]; then
echo "Building on Linux arm because we have no TAR" echo "Building on Linux arm because we have no TAR"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
export SHOULD_BUILD_TAR="no" export SHOULD_BUILD_TAR="no"
fi fi
if [[ -z $( contains "vscodium-reh-linux-armhf-${MS_TAG}.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" export SHOULD_BUILD_APPIMAGE="no"
if [[ "${SHOULD_BUILD}" != "yes" ]]; then if [[ "${SHOULD_BUILD}" != "yes" ]]; then
@@ -223,7 +260,7 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_RPM="no" export SHOULD_BUILD_RPM="no"
fi fi
if [[ -z $( contains "x64-${MS_TAG}.tar.gz" ) ]]; then if [[ -z $( contains "VSCodium-linux-x64-${MS_TAG}.tar.gz" ) ]]; then
echo "Building on Linux x64 because we have no TAR" echo "Building on Linux x64 because we have no TAR"
export SHOULD_BUILD="yes" export SHOULD_BUILD="yes"
else else
@@ -237,6 +274,13 @@ if [ "${VSCODIUM_ASSETS}" != "null" ]; then
export SHOULD_BUILD_APPIMAGE="no" export SHOULD_BUILD_APPIMAGE="no"
fi fi
if [[ -z $( contains "vscodium-reh-linux-x64-${MS_TAG}.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 if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Linux x64 builds" echo "Already have all the Linux x64 builds"
fi fi
@@ -255,6 +299,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_EXE_USR=${SHOULD_BUILD_EXE_USR}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_MSI=${SHOULD_BUILD_MSI}" >> "${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_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_RPM=${SHOULD_BUILD_RPM}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_TAR=${SHOULD_BUILD_TAR}" >> "${GITHUB_ENV}" echo "SHOULD_BUILD_TAR=${SHOULD_BUILD_TAR}" >> "${GITHUB_ENV}"
echo "SHOULD_BUILD_ZIP=${SHOULD_BUILD_ZIP}" >> "${GITHUB_ENV}" echo "SHOULD_BUILD_ZIP=${SHOULD_BUILD_ZIP}" >> "${GITHUB_ENV}"

View File

@@ -8,6 +8,11 @@
- [Windows](#dependencies-windows) - [Windows](#dependencies-windows)
- [Build Scripts](#build-scripts) - [Build Scripts](#build-scripts)
- [Build in Docker](#build-docker) - [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 ## <a id="dependencies"></a>Dependencies
@@ -29,7 +34,6 @@
- rpmbuild - rpmbuild
- dpkg - dpkg
- python3 - python3
- libsecret-1-dev
- imagemagick (for AppImage) - imagemagick (for AppImage)
### <a id="dependencies-macos"></a>MacOS ### <a id="dependencies-macos"></a>MacOS
@@ -55,6 +59,8 @@ Each platform has its build helper script in the directory `build`.
To build for Linux, you can alternatively build VSCodium in docker To build for Linux, you can alternatively build VSCodium in docker
### <a id="build-docker-x64"></a>X64
Firstly, create the container with: 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 docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-build-agent vscodium/vscodium-linux-build-agent:bionic-x64 bash
@@ -67,9 +73,7 @@ sudo apt-get install -y nodejs desktop-file-utils
npm install -g yarn npm install -g yarn
git clone https://github.com/VSCodium/vscodium.git cd /root/vscodium
cd vscodium
./get_repo.sh ./get_repo.sh
@@ -79,3 +83,51 @@ 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
```
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,20 @@
#!/bin/bash #!/bin/bash
mkdir -p vscode mkdir -p vscode
cd vscode cd vscode || { echo "'vscode' dir not found"; exit 1; }
git init -q git init -q
git remote add origin https://github.com/Microsoft/vscode.git git remote add origin https://github.com/Microsoft/vscode.git
# figure out latest tag by calling MS update API # 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) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
elif [[ -z "${MS_TAG}" ]]; then elif [[ -z "${MS_TAG}" ]]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
else else
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 ) reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
@@ -32,13 +32,13 @@ fi
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}" 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 git checkout FETCH_HEAD
cd .. cd ..
# for GH actions # for GH actions
if [[ $GITHUB_ENV ]]; then if [[ ${GITHUB_ENV} ]]; then
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV echo "MS_TAG=${MS_TAG}" >> "${GITHUB_ENV}"
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
fi fi

View File

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

View File

@@ -1,21 +1,21 @@
diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js 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 --- a/build/gulpfile.vscode.js
+++ b/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js
@@ -290,7 +290,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op @@ -289,7 +289,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
all = es.merge(all, gulp.src('resources/linux/code.png', { base: '.' }));
} else if (platform === 'darwin') { } else if (platform === 'darwin') {
const shortcut = gulp.src('resources/darwin/bin/code.sh') const shortcut = gulp.src('resources/darwin/bin/code.sh')
.pipe(replace('@@APPNAME@@', product.applicationName))
- .pipe(rename('bin/code')); - .pipe(rename('bin/code'));
+ .pipe(rename('bin/' + product.applicationName)); + .pipe(rename('bin/' + product.applicationName));
all = es.merge(all, shortcut); 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 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 --- a/src/vs/platform/native/electron-main/nativeHostMainService.ts
+++ b/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 }> { 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}`; const source = `/usr/local/bin/${this.productService.applicationName}`;
// Ensure source exists // 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 // macOS
if (this.environmentMainService.isBuilt) { if (this.environmentMainService.isBuilt) {

View File

@@ -1,17 +1,17 @@
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1edc76f..4c0bf98 100644 index f822373..30a0a66 100644
--- a/src/vs/base/common/product.ts --- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts
@@ -69,6 +69,7 @@ export interface IProductConfiguration { @@ -70,6 +70,7 @@ export interface IProductConfiguration {
readonly extensionsGallery?: { readonly extensionsGallery?: {
readonly serviceUrl: string; readonly serviceUrl: string;
+ readonly cacheUrl?: string; + readonly cacheUrl?: string;
readonly itemUrl: string; readonly itemUrl: string;
readonly publisherUrl: string;
readonly resourceUrlTemplate: 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 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 --- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts
@@ -4,11 +4,12 @@ @@ -4,11 +4,12 @@

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 npm install -g checksum
sum_file() { sum_file() {
if [[ -f "$1" ]]; then if [[ -f "${1}" ]]; then
echo "Calcuating checksum for $1" echo "Calcuating checksum for ${1}"
checksum -a sha256 "$1" > "$1".sha256 checksum -a sha256 "${1}" > "${1}".sha256
checksum "$1" > "$1".sha1 checksum "${1}" > "${1}".sha1
fi fi
} }
@@ -18,7 +18,7 @@ if [[ "${OS_NAME}" == "osx" ]]; then
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
echo "Building and moving ZIP" echo "Building and moving ZIP"
cd "VSCode-darwin-${VSCODE_ARCH}" 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}-${MS_TAG}.zip" ./*.app
cd .. cd ..
fi fi
@@ -29,38 +29,42 @@ if [[ "${OS_NAME}" == "osx" ]]; then
mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${MS_TAG}.dmg" mv "../VSCodium ${MS_TAG}.dmg" "../artifacts/VSCodium.${VSCODE_ARCH}.${MS_TAG}.dmg"
popd popd
fi fi
VSCODE_PLATFORM="darwin"
elif [[ "${OS_NAME}" == "windows" ]]; then elif [[ "${OS_NAME}" == "windows" ]]; then
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
echo "Moving ZIP" 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}-${MS_TAG}.zip"
fi fi
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
echo "Moving System EXE" 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}-${MS_TAG}.exe"
fi fi
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
echo "Moving User EXE" 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}-${MS_TAG}.exe"
fi fi
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
echo "Moving MSI" echo "Moving MSI"
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi artifacts/ mv "build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi" artifacts/
fi fi
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
echo "Moving MSI with disabled updates" 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-${MS_TAG}.msi" artifacts/
fi fi
fi fi
VSCODE_PLATFORM="win32"
else else
if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then
echo "Building and moving TAR" echo "Building and moving TAR"
cd VSCode-linux-${VSCODE_ARCH} cd "VSCode-linux-${VSCODE_ARCH}"
tar czf ../artifacts/VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz . tar czf "../artifacts/VSCodium-linux-${VSCODE_ARCH}-${MS_TAG}.tar.gz" .
cd .. cd ..
fi fi
@@ -78,6 +82,15 @@ else
echo "Moving AppImage" echo "Moving AppImage"
mv build/linux/appimage/out/*.AppImage* artifacts/ mv build/linux/appimage/out/*.AppImage* artifacts/
fi 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}-${MS_TAG}.tar.gz" .
cd ..
fi fi
cd artifacts cd artifacts

View File

@@ -5,7 +5,7 @@ set -e
cp -rp src/* vscode/ cp -rp src/* vscode/
cp -f LICENSE vscode/LICENSE.txt cp -f LICENSE vscode/LICENSE.txt
cd vscode || exit cd vscode || { echo "'vscode' dir not found"; exit 1; }
../update_settings.sh ../update_settings.sh
@@ -13,30 +13,40 @@ cd vscode || exit
{ set +x; } 2>/dev/null { set +x; } 2>/dev/null
for file in ../patches/*.patch; do for file in ../patches/*.patch; do
if [ -f "$file" ]; then if [ -f "${file}" ]; then
echo applying patch: $file; echo applying patch: "${file}";
git apply --ignore-whitespace "$file" git apply --ignore-whitespace "${file}"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo failed to apply patch $file 1>&2 echo failed to apply patch "${file}" 1>&2
fi fi
fi fi
done done
for file in ../patches/user/*.patch; do for file in ../patches/user/*.patch; do
if [ -f "$file" ]; then if [ -f "${file}" ]; then
echo applying user patch: $file; echo applying user patch: "${file}";
git apply --ignore-whitespace "$file" git apply --ignore-whitespace "${file}"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo failed to apply patch $file 1>&2 echo failed to apply patch "${file}" 1>&2
fi fi
fi fi
done done
set -x set -x
if [[ "$OS_NAME" == "osx" ]]; then if [[ "${OS_NAME}" == "osx" ]]; then
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --ignore-optional CHILD_CONCURRENCY=1 yarn --frozen-lockfile
npm_config_argv='{"original":["--ignore-optional"]}' yarn postinstall 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 else
CHILD_CONCURRENCY=1 yarn --frozen-lockfile CHILD_CONCURRENCY=1 yarn --frozen-lockfile
fi fi
@@ -70,11 +80,12 @@ win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")' win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")' win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
urlProtocol='setpath(["urlProtocol"]; "vscodium")' 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")' reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")'
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")' 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 cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
@@ -84,7 +95,7 @@ cat product.json
../undo_telemetry.sh ../undo_telemetry.sh
if [[ "$OS_NAME" == "linux" ]]; then if [[ "${OS_NAME}" == "linux" ]]; then
# microsoft adds their apt repo to sources # microsoft adds their apt repo to sources
# unless the app name is code-oss # unless the app name is code-oss
# as we are renaming the application to vscodium # as we are renaming the application to vscodium

View File

@@ -22,6 +22,10 @@ OWNER="${GITHUB_REPOSITORY_OWNER:-"VSCodium"}"
REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}" REPO_NAME="${GITHUB_REPOSITORY:(${#OWNER}+1)}"
REPOSITORY="${REPO_NAME:-"vscodium"}" REPOSITORY="${REPO_NAME:-"vscodium"}"
# git workaround
git config --global --add safe.directory /__w/vscodium/vscodium
for FILE in * for FILE in *
do do
if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then if [[ -f "${FILE}" ]] && [[ "${FILE}" != *.sha1 ]] && [[ "${FILE}" != *.sha256 ]]; then
@@ -29,9 +33,9 @@ do
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$? EXIT_STATUS=$?
echo "exit: $EXIT_STATUS" echo "exit: ${EXIT_STATUS}"
if (( $EXIT_STATUS )); then if (( "${EXIT_STATUS}" )); then
for (( i=0; i<10; i++ )) for (( i=0; i<10; i++ ))
do do
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
@@ -42,15 +46,15 @@ do
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$? EXIT_STATUS=$?
echo "exit: $EXIT_STATUS" echo "exit: ${EXIT_STATUS}"
if ! (( $EXIT_STATUS )); then if ! (( "${EXIT_STATUS}" )); then
break break
fi fi
done done
echo "exit: $EXIT_STATUS" echo "exit: ${EXIT_STATUS}"
if (( $EXIT_STATUS )); then if (( "${EXIT_STATUS}" )); then
echo "'${FILE}' hasn't been uploaded!" 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 "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"

View File

@@ -15,11 +15,9 @@ else
sudo snap install --channel stable --classic snapcraft sudo snap install --channel stable --classic snapcraft
echo "$SNAP_STORE_LOGIN" | snapcraft login --with -
echo "Architecture: ${ARCHITECTURE}" 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}" echo "Snap version: ${SNAP_VERSION}"
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O gh_latest.json
@@ -38,6 +36,6 @@ else
fi fi
fi fi
if [[ $GITHUB_ENV ]]; then if [[ "${GITHUB_ENV}" ]]; then
echo "SHOULD_DEPLOY=$SHOULD_DEPLOY" >> $GITHUB_ENV echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"
fi fi

View File

@@ -1,17 +1,17 @@
# mobile.events.data.microsoft.com # mobile.events.data.microsoft.com
# vortex.data.microsoft.com # vortex.data.microsoft.com
TELEMETRY_URLS="[^/]+\.data\.microsoft\.com" TELEMETRY_URLS="[^/]+\.data\.microsoft\.com"
REPLACEMENT="s/$TELEMETRY_URLS/0\.0\.0\.0/g" REPLACEMENT="s/${TELEMETRY_URLS}/0\.0\.0\.0/g"
#include common functions #include common functions
. ../utils.sh . ../utils.sh
if [[ "$OS_NAME" == "osx" ]]; then if [[ "${OS_NAME}" == "osx" ]]; then
if is_gnu_sed; then if is_gnu_sed; then
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i -E "${REPLACEMENT}"
else else
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i '' -E $REPLACEMENT grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i '' -E "${REPLACEMENT}"
fi fi
else else
grep -rl --exclude-dir=.git -E $TELEMETRY_URLS . | xargs sed -i -E $REPLACEMENT grep -rl --exclude-dir=.git -E "${TELEMETRY_URLS}" . | xargs sed -i -E "${REPLACEMENT}"
fi fi

View File

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

View File

@@ -7,10 +7,10 @@ is_gnu_sed () {
} }
replace () { replace () {
echo $1 echo "${1}"
if is_gnu_sed; then if is_gnu_sed; then
sed -i -E "$1" $2 sed -i -E "${1}" "${2}"
else else
sed -i '' -E "$1" $2 sed -i '' -E "${1}" "${2}"
fi fi
} }