mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-13 20:28:18 +10:00
Compare commits
41 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdc6b32d8b | ||
|
|
81836873af | ||
|
|
3fa8eee9fe | ||
|
|
55d502d659 | ||
|
|
f6a99949c5 | ||
|
|
85126f1a7c | ||
|
|
bca4eea470 | ||
|
|
2b190dfe51 | ||
|
|
c4583ad3f0 | ||
|
|
79a9f4a292 | ||
|
|
112f730493 | ||
|
|
7313f3ad25 | ||
|
|
bbaaed2ec1 | ||
|
|
3737c9f4e2 | ||
|
|
90bc38c840 | ||
|
|
84b4396476 | ||
|
|
add78d6829 | ||
|
|
98d30bdc2c | ||
|
|
31355417a8 | ||
|
|
c3debb387d | ||
|
|
c53a88ee51 | ||
|
|
c2469ff520 | ||
|
|
70082e0f0f | ||
|
|
e9ea41fcfa | ||
|
|
014d9a339d | ||
|
|
4855694fd6 | ||
|
|
e480df5b1f | ||
|
|
0932463dfb | ||
|
|
65e376786f | ||
|
|
afe72aba83 | ||
|
|
bff2e71e55 | ||
|
|
966ae12699 | ||
|
|
843ef66728 | ||
|
|
8336a4c7ad | ||
|
|
1eff01d6f0 | ||
|
|
db8d1e7a8d | ||
|
|
c741ae3347 | ||
|
|
becd52f518 | ||
|
|
7ee4f2f735 | ||
|
|
3208188249 | ||
|
|
be445bcba6 |
43
.github/workflows/linux.yml
vendored
43
.github/workflows/linux.yml
vendored
@@ -32,15 +32,15 @@ jobs:
|
|||||||
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
image: vscodium/vscodium-linux-build-agent:stretch-armhf
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install GH
|
- name: Install GH
|
||||||
run: ./install_gh.sh
|
run: ./install_gh.sh
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
|
|
||||||
- name: Install Yarn
|
- name: Install Yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
@@ -68,7 +68,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
key: linux-${{ matrix.npm_arch }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||||
@@ -107,36 +107,43 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
platform:
|
platform:
|
||||||
- amd64
|
- amd64
|
||||||
- arm64
|
# - arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Check version
|
- name: Check version
|
||||||
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'
|
||||||
|
|
||||||
- uses: diddlesnaps/snapcraft-multiarch-action@v1
|
# - uses: diddlesnaps/snapcraft-multiarch-action@v1
|
||||||
|
# with:
|
||||||
|
# path: stores/snapcraft
|
||||||
|
# architecture: ${{ matrix.platform }}
|
||||||
|
# id: build
|
||||||
|
# if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
|
# - uses: diddlesnaps/snapcraft-review-action@v1
|
||||||
|
# with:
|
||||||
|
# snap: ${{ steps.build.outputs.snap }}
|
||||||
|
# isClassic: 'true'
|
||||||
|
# if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
- uses: snapcore/action-build@v1
|
||||||
with:
|
with:
|
||||||
path: stores/snapcraft
|
path: stores/snapcraft
|
||||||
architecture: ${{ matrix.platform }}
|
|
||||||
id: build
|
id: build
|
||||||
if: env.SHOULD_DEPLOY == 'yes'
|
if: env.SHOULD_DEPLOY == 'yes'
|
||||||
|
|
||||||
- uses: diddlesnaps/snapcraft-review-action@v1
|
|
||||||
with:
|
|
||||||
snap: ${{ steps.build.outputs.snap }}
|
|
||||||
isClassic: 'true'
|
|
||||||
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
15
.github/workflows/lock.yml
vendored
Normal 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'
|
||||||
29
.github/workflows/macos.yml
vendored
29
.github/workflows/macos.yml
vendored
@@ -10,28 +10,28 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.runner }}
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- vscode_arch: x64
|
- runner: macOS-10.15
|
||||||
os: macOS-10.15
|
vscode_arch: x64
|
||||||
# - vscode_arch: arm64
|
- runner: [self-hosted, macOS, ARM64]
|
||||||
# os: macOS-11
|
vscode_arch: arm64
|
||||||
|
|
||||||
env:
|
env:
|
||||||
OS_NAME: "osx"
|
OS_NAME: "osx"
|
||||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
|
|
||||||
- name: Clone VSCode repo
|
- name: Clone VSCode repo
|
||||||
run: . get_repo.sh
|
run: . get_repo.sh
|
||||||
@@ -56,7 +56,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||||
@@ -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
|
||||||
|
|||||||
21
.github/workflows/windows.yml
vendored
21
.github/workflows/windows.yml
vendored
@@ -10,7 +10,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2016
|
runs-on: windows-2019
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -20,23 +20,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
vscode_arch: [x64, ia32, arm64]
|
vscode_arch:
|
||||||
|
- x64
|
||||||
|
- ia32
|
||||||
|
- arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 14
|
node-version: 16
|
||||||
|
|
||||||
- name: Install Yarn
|
- name: Install Yarn
|
||||||
run: npm install -g yarn
|
run: npm install -g yarn
|
||||||
|
|
||||||
- name: Setup Python 2
|
- name: Setup Python 3
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v3
|
||||||
with:
|
with:
|
||||||
python-version: '2.x'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Clone VSCode repo
|
- name: Clone VSCode repo
|
||||||
run: ./get_repo.sh
|
run: ./get_repo.sh
|
||||||
@@ -61,7 +64,7 @@ jobs:
|
|||||||
if: env.SHOULD_BUILD == 'yes'
|
if: env.SHOULD_BUILD == 'yes'
|
||||||
|
|
||||||
- name: Cache yarn directory
|
- name: Cache yarn directory
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
||||||
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
||||||
|
|||||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -4,7 +4,8 @@ VS*/*
|
|||||||
build/linux/appimage/out
|
build/linux/appimage/out
|
||||||
build/linux/appimage/pkg2appimage.AppDir
|
build/linux/appimage/pkg2appimage.AppDir
|
||||||
build/linux/appimage/pkg2appimage-*.AppImage
|
build/linux/appimage/pkg2appimage-*.AppImage
|
||||||
|
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
|
||||||
|
|||||||
@@ -2,45 +2,122 @@
|
|||||||
|
|
||||||
## Our Pledge
|
## Our Pledge
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||||
|
identity and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
## Our Standards
|
## Our Standards
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment include:
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
* Demonstrating empathy and kindness toward other people
|
||||||
* Being respectful of differing viewpoints and experiences
|
* Being respectful of differing opinions, viewpoints, and experiences
|
||||||
* Gracefully accepting constructive criticism
|
* Giving and gracefully accepting constructive feedback
|
||||||
* Focusing on what is best for the community
|
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
* Showing empathy towards other community members
|
and learning from the experience
|
||||||
|
* Focusing on what is best not just for us as individuals, but for the overall
|
||||||
|
community
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
any kind
|
||||||
|
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
* Public or private harassment
|
* Public or private harassment
|
||||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
* Publishing others' private information, such as a physical or email address,
|
||||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
without their explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
## Our Responsibilities
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at vscodium@protonmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
vscodium@protonmail.com.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series of
|
||||||
|
actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or permanent
|
||||||
|
ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||||
|
community.
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.1, available at
|
||||||
|
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||||
|
|
||||||
[homepage]: http://contributor-covenant.org
|
|
||||||
[version]: http://contributor-covenant.org/version/1/4/
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||||
|
|||||||
2
DOCS.md
2
DOCS.md
@@ -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'`
|
||||||
|
|||||||
50
README.md
50
README.md
@@ -8,17 +8,21 @@
|
|||||||
<div id="badges" align="center">
|
<div id="badges" align="center">
|
||||||
|
|
||||||
[](https://github.com/vscodium/vscodium/releases)
|
[](https://github.com/vscodium/vscodium/releases)
|
||||||
[](https://dev.azure.com/vscodium/VSCodium/_build?definitionId=1)
|
|
||||||
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
[](https://github.com/VSCodium/vscodium/blob/master/LICENSE)
|
||||||
[](https://gitter.im/VSCodium/Lobby)
|
[](https://gitter.im/VSCodium/Lobby)
|
||||||
[](https://snapcraft.io/codium)
|
[](https://snapcraft.io/codium)
|
||||||
[](https://snapcraft.io/codium)
|
[](https://snapcraft.io/codium)
|
||||||
|
|
||||||
|
[](https://github.com/VSCodium/vscodium/actions/workflows/linux.yml?query=branch%3Amaster)
|
||||||
|
[](https://github.com/VSCodium/vscodium/actions/workflows/macos.yml?query=branch%3Amaster)
|
||||||
|
[](https://github.com/VSCodium/vscodium/actions/workflows/windows.yml?query=branch%3Amaster)
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
**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)
|
||||||
@@ -34,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
|
||||||
@@ -66,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
|
||||||
@@ -73,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
|
||||||
@@ -87,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:
|
||||||
@@ -116,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`)
|
||||||
@@ -141,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)
|
||||||
|
|||||||
20
build.sh
20
build.sh
@@ -4,12 +4,13 @@ set -ex
|
|||||||
|
|
||||||
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||||
npm config set scripts-prepend-node-path true
|
npm config set scripts-prepend-node-path true
|
||||||
|
npm config set node_gyp
|
||||||
|
|
||||||
echo "MS_COMMIT: ${MS_COMMIT}"
|
echo "MS_COMMIT: ${MS_COMMIT}"
|
||||||
|
|
||||||
. 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
|
||||||
@@ -21,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
|
||||||
|
|
||||||
@@ -47,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"
|
||||||
@@ -64,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 ..
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
21
build/update_patches.sh
Executable 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
|
||||||
@@ -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}"
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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}"
|
||||||
|
|||||||
@@ -8,10 +8,15 @@
|
|||||||
- [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
|
||||||
|
|
||||||
- node 14
|
- node 16
|
||||||
- yarn
|
- yarn
|
||||||
- jq
|
- jq
|
||||||
- git
|
- git
|
||||||
@@ -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
|
||||||
@@ -40,7 +44,7 @@
|
|||||||
- sed
|
- sed
|
||||||
- 7z
|
- 7z
|
||||||
- [WiX Toolset](http://wixtoolset.org/releases/)
|
- [WiX Toolset](http://wixtoolset.org/releases/)
|
||||||
- python2
|
- python3
|
||||||
- 'Tools for Native Modules' from official Node.js installer
|
- 'Tools for Native Modules' from official Node.js installer
|
||||||
|
|
||||||
## <a id="build-scripts"></a>Build Scripts
|
## <a id="build-scripts"></a>Build Scripts
|
||||||
@@ -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
|
||||||
@@ -62,14 +68,12 @@ docker run -ti --volume=<local vscodium source>:/root/vscodium --name=vscodium-b
|
|||||||
|
|
||||||
When inside the container, you can use the following commands to build:
|
When inside the container, you can use the following commands to build:
|
||||||
```
|
```
|
||||||
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
|
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
|
||||||
sudo apt-get install -y nodejs desktop-file-utils
|
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`
|
||||||
|
|||||||
20
get_repo.sh
20
get_repo.sh
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js
|
||||||
index 1a73ae9..1b87189 100644
|
index 81ba509..59041e2 100644
|
||||||
--- a/build/gulpfile.vscode.win32.js
|
--- a/build/gulpfile.vscode.win32.js
|
||||||
+++ b/build/gulpfile.vscode.win32.js
|
+++ b/build/gulpfile.vscode.win32.js
|
||||||
@@ -126,7 +126,7 @@ defineWin32SetupTasks('arm64', 'user');
|
@@ -137,7 +137,7 @@ defineWin32SetupTasks('arm64', 'user');
|
||||||
|
*/
|
||||||
function archiveWin32Setup(arch) {
|
function archiveWin32Setup(arch) {
|
||||||
return cb => {
|
return cb => {
|
||||||
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
- const args = ['a', '-tzip', zipPath(arch), '-x!CodeSignSummary*.md', '.', '-r'];
|
||||||
|
|||||||
@@ -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 @@
|
||||||
|
|||||||
36
patches/fix-build-rpm.patch
Normal file
36
patches/fix-build-rpm.patch
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
diff --git a/build/linux/rpm/dependencies-generator.js b/build/linux/rpm/dependencies-generator.js
|
||||||
|
index 1d91eb8..ed6b775 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");
|
||||||
|
// 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) {
|
||||||
|
// 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
|
||||||
|
--- a/build/linux/rpm/dependencies-generator.ts
|
||||||
|
+++ b/build/linux/rpm/dependencies-generator.ts
|
||||||
|
@@ -18,7 +18,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): 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
|
||||||
|
--- 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 || :
|
||||||
|
/usr/share/pixmaps/@@ICON@@.png
|
||||||
|
/usr/share/bash-completion/completions/@@NAME@@
|
||||||
|
/usr/share/zsh/site-functions/_@@NAME@@
|
||||||
|
+
|
||||||
|
+%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
--- vscode/resources/linux/rpm/code.spec.template 2021-03-02 19:26:53.000000000 +0100
|
|
||||||
+++ vscode/resources/linux/rpm/code.spec.template.new 2021-03-02 19:28:12.000000000 +0100
|
|
||||||
@@ -69,3 +69,5 @@
|
|
||||||
/usr/share/pixmaps/@@ICON@@.png
|
|
||||||
/usr/share/bash-completion/completions/@@NAME@@
|
|
||||||
/usr/share/zsh/site-functions/_@@NAME@@
|
|
||||||
+
|
|
||||||
+%config(noreplace) /usr/share/@@NAME@@/resources/app/product.json
|
|
||||||
12
patches/use-github-extensions.patch
Normal file
12
patches/use-github-extensions.patch
Normal 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);
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
diff --git a/extensions/github-authentication/src/githubServer.ts b/extensions/github-authentication/src/githubServer.ts
|
||||||
index 92313d0..a69da37 100644
|
index c366ff3..75f32da 100644
|
||||||
--- a/extensions/github-authentication/src/githubServer.ts
|
--- a/extensions/github-authentication/src/githubServer.ts
|
||||||
+++ b/extensions/github-authentication/src/githubServer.ts
|
+++ b/extensions/github-authentication/src/githubServer.ts
|
||||||
@@ -3,41 +3,13 @@
|
@@ -3,27 +3,13 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@@ -15,39 +15,27 @@ index 92313d0..a69da37 100644
|
|||||||
import { AuthProviderType } from './github';
|
import { AuthProviderType } from './github';
|
||||||
import { Log } from './common/logger';
|
import { Log } from './common/logger';
|
||||||
-import { isSupportedEnvironment } from './common/env';
|
-import { isSupportedEnvironment } from './common/env';
|
||||||
|
-import { LoopbackAuthServer } from './authServer';
|
||||||
|
-import path = require('path');
|
||||||
-
|
-
|
||||||
-const localize = nls.loadMessageBundle();
|
-const localize = nls.loadMessageBundle();
|
||||||
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
-const CLIENT_ID = '01ab8ac9400c4e429b23';
|
||||||
|
-const GITHUB_AUTHORIZE_URL = 'https://github.com/login/oauth/authorize';
|
||||||
|
-// TODO: change to stable when that happens
|
||||||
|
-const GITHUB_TOKEN_URL = 'https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token';
|
||||||
|
-const NETWORK_ERROR = 'network error';
|
||||||
|
|
||||||
const NETWORK_ERROR = 'network error';
|
-const REDIRECT_URL_STABLE = 'https://vscode.dev/redirect';
|
||||||
-const AUTH_RELAY_SERVER = 'vscode-auth.github.com';
|
-const REDIRECT_URL_INSIDERS = 'https://insiders.vscode.dev/redirect';
|
||||||
-// const AUTH_RELAY_STAGING_SERVER = 'client-auth-staging-14a768b.herokuapp.com';
|
+const NETWORK_ERROR = 'network error';
|
||||||
-
|
|
||||||
-class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
|
||||||
- constructor(private readonly Logger: Log) {
|
|
||||||
- super();
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- public handleUri(uri: vscode.Uri) {
|
|
||||||
- this.Logger.trace('Handling Uri...');
|
|
||||||
- this.fire(uri);
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-function parseQuery(uri: vscode.Uri) {
|
|
||||||
- return uri.query.split('&').reduce((prev: any, current) => {
|
|
||||||
- const queryString = current.split('=');
|
|
||||||
- prev[queryString[0]] = queryString[1];
|
|
||||||
- return prev;
|
|
||||||
- }, {});
|
|
||||||
-}
|
|
||||||
|
|
||||||
export interface IGitHubServer extends vscode.Disposable {
|
class UriEventHandler extends vscode.EventEmitter<vscode.Uri> implements vscode.UriHandler {
|
||||||
login(scopes: string): Promise<string>;
|
constructor(private readonly Logger: Log) {
|
||||||
@@ -47,13 +19,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
@@ -43,14 +29,6 @@ export interface IGitHubServer extends vscode.Disposable {
|
||||||
|
friendlyName: string;
|
||||||
type: AuthProviderType;
|
type: AuthProviderType;
|
||||||
}
|
}
|
||||||
|
-
|
||||||
-interface IGitHubDeviceCodeResponse {
|
-interface IGitHubDeviceCodeResponse {
|
||||||
- device_code: string;
|
- device_code: string;
|
||||||
- user_code: string;
|
- user_code: string;
|
||||||
@@ -58,102 +46,182 @@ index 92313d0..a69da37 100644
|
|||||||
async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
|
async function getScopes(token: string, serverUri: vscode.Uri, logger: Log): Promise<string[]> {
|
||||||
try {
|
try {
|
||||||
logger.info('Getting token scopes...');
|
logger.info('Getting token scopes...');
|
||||||
@@ -115,315 +80,49 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
@@ -118,23 +96,11 @@ export class GitHubServer implements IGitHubServer {
|
||||||
export class GitHubServer implements IGitHubServer {
|
|
||||||
friendlyName = 'GitHub';
|
friendlyName = 'GitHub';
|
||||||
type = AuthProviderType.github;
|
type = AuthProviderType.github;
|
||||||
- private _statusBarItem: vscode.StatusBarItem | undefined;
|
|
||||||
- private _onDidManuallyProvideToken = new vscode.EventEmitter<string | undefined>();
|
|
||||||
-
|
|
||||||
- private _pendingStates = new Map<string, string[]>();
|
|
||||||
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
|
||||||
- private _statusBarCommandId = `${this.type}.provide-manually`;
|
|
||||||
- private _disposable: vscode.Disposable;
|
|
||||||
- private _uriHandler = new UriEventHandler(this._logger);
|
|
||||||
|
|
||||||
constructor(private readonly _supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
- private _pendingNonces = new Map<string, string[]>();
|
||||||
- this._disposable = vscode.Disposable.from(
|
- private _codeExchangePromises = new Map<string, { promise: Promise<string>; cancel: vscode.EventEmitter<void> }>();
|
||||||
- vscode.commands.registerCommand(this._statusBarCommandId, () => this.manuallyProvideUri()),
|
private _disposable: vscode.Disposable;
|
||||||
- vscode.window.registerUriHandler(this._uriHandler));
|
private _uriHandler = new UriEventHandler(this._logger);
|
||||||
+ this._supportDeviceCodeFlow;
|
- private readonly getRedirectEndpoint: Thenable<string>;
|
||||||
|
|
||||||
|
- constructor(private readonly _supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||||
|
+ constructor(_supportDeviceCodeFlow: boolean, private readonly _logger: Log, private readonly _telemetryReporter: ExperimentationTelemetry) {
|
||||||
|
this._disposable = vscode.window.registerUriHandler(this._uriHandler);
|
||||||
|
-
|
||||||
|
- this.getRedirectEndpoint = vscode.commands.executeCommand<{ [providerId: string]: string } | undefined>('workbench.getCodeExchangeProxyEndpoints').then((proxyEndpoints) => {
|
||||||
|
- // If we are running in insiders vscode.dev, then ensure we use the redirect route on that.
|
||||||
|
- let redirectUri = REDIRECT_URL_STABLE;
|
||||||
|
- if (proxyEndpoints?.github && new URL(proxyEndpoints.github).hostname === 'insiders.vscode.dev') {
|
||||||
|
- redirectUri = REDIRECT_URL_INSIDERS;
|
||||||
|
- }
|
||||||
|
- return redirectUri;
|
||||||
|
- });
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose() {
|
dispose() {
|
||||||
- this._disposable.dispose();
|
@@ -152,181 +118,17 @@ export class GitHubServer implements IGitHubServer {
|
||||||
- }
|
|
||||||
|
// Used for showing a friendlier message to the user when the explicitly cancel a flow.
|
||||||
|
let userCancelled: boolean | undefined;
|
||||||
|
- const yes = localize('yes', "Yes");
|
||||||
|
- const no = localize('no', "No");
|
||||||
|
- const promptToContinue = async () => {
|
||||||
|
- if (userCancelled === undefined) {
|
||||||
|
- // We haven't had a failure yet so wait to prompt
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- const message = userCancelled
|
||||||
|
- ? localize('userCancelledMessage', "Having trouble logging in? Would you like to try a different way?")
|
||||||
|
- : localize('otherReasonMessage', "You have not yet finished authorizing this extension to use GitHub. Would you like to keep trying?");
|
||||||
|
- const result = await vscode.window.showWarningMessage(message, yes, no);
|
||||||
|
- if (result !== yes) {
|
||||||
|
- throw new Error('Cancelled');
|
||||||
|
- }
|
||||||
|
- };
|
||||||
-
|
-
|
||||||
- // TODO@joaomoreno TODO@TylerLeonhardt
|
- const nonce = uuid();
|
||||||
- private async isNoCorsEnvironment(): Promise<boolean> {
|
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate?nonce=${encodeURIComponent(nonce)}`));
|
||||||
- const uri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/dummy`));
|
-
|
||||||
- return (uri.scheme === 'https' && /^((insiders\.)?vscode|github)\./.test(uri.authority)) || (uri.scheme === 'http' && /^localhost/.test(uri.authority));
|
- const supported = isSupportedEnvironment(callbackUri);
|
||||||
|
- if (supported) {
|
||||||
|
- try {
|
||||||
|
- return await this.doLoginWithoutLocalServer(scopes, nonce, callbackUri);
|
||||||
|
- } catch (e) {
|
||||||
|
- this._logger.error(e);
|
||||||
|
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- // Starting a local server isn't supported in web
|
||||||
|
- if (vscode.env.uiKind === vscode.UIKind.Desktop) {
|
||||||
|
- try {
|
||||||
|
- await promptToContinue();
|
||||||
|
- return await this.doLoginWithLocalServer(scopes);
|
||||||
|
- } catch (e) {
|
||||||
|
- this._logger.error(e);
|
||||||
|
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
|
||||||
|
- if (this._supportDeviceCodeFlow) {
|
||||||
|
- try {
|
||||||
|
- await promptToContinue();
|
||||||
|
- return await this.doLoginDeviceCodeFlow(scopes);
|
||||||
|
- } catch (e) {
|
||||||
|
- this._logger.error(e);
|
||||||
|
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||||
|
- }
|
||||||
|
- } else if (!supported) {
|
||||||
|
- try {
|
||||||
|
- await promptToContinue();
|
||||||
|
- return await this.doLoginWithPat(scopes);
|
||||||
|
- } catch (e) {
|
||||||
|
- this._logger.error(e);
|
||||||
|
- userCancelled = e.message ?? e === 'User Cancelled';
|
||||||
|
- }
|
||||||
|
+ try {
|
||||||
|
+ return await this.doLoginWithPat(scopes);
|
||||||
|
+ } catch (e) {
|
||||||
|
+ this._logger.error(e);
|
||||||
|
+ userCancelled = e.message ?? e === 'User Cancelled';
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Error(userCancelled ? 'Cancelled' : 'No auth flow succeeded.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public async login(scopes: string): Promise<string> {
|
- private async doLoginWithoutLocalServer(scopes: string, nonce: string, callbackUri: vscode.Uri): Promise<string> {
|
||||||
this._logger.info(`Logging in for the following scopes: ${scopes}`);
|
- this._logger.info(`Trying without local server... (${scopes})`);
|
||||||
|
- return await vscode.window.withProgress<string>({
|
||||||
- const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));
|
- location: vscode.ProgressLocation.Notification,
|
||||||
|
- title: localize('signingIn', "Signing in to github.com..."),
|
||||||
|
- cancellable: true
|
||||||
|
- }, async (_, token) => {
|
||||||
|
- const existingNonces = this._pendingNonces.get(scopes) || [];
|
||||||
|
- this._pendingNonces.set(scopes, [...existingNonces, nonce]);
|
||||||
|
- const redirectUri = await this.getRedirectEndpoint;
|
||||||
|
- const searchParams = new URLSearchParams([
|
||||||
|
- ['client_id', CLIENT_ID],
|
||||||
|
- ['redirect_uri', redirectUri],
|
||||||
|
- ['scope', scopes],
|
||||||
|
- ['state', encodeURIComponent(callbackUri.toString(true))]
|
||||||
|
- ]);
|
||||||
|
- const uri = vscode.Uri.parse(`${GITHUB_AUTHORIZE_URL}?${searchParams.toString()}`);
|
||||||
|
- await vscode.env.openExternal(uri);
|
||||||
-
|
-
|
||||||
- if (!isSupportedEnvironment(callbackUri)) {
|
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
||||||
- const token = this._supportDeviceCodeFlow
|
- // before completing it.
|
||||||
- ? await this.doDeviceCodeFlow(scopes)
|
- let codeExchangePromise = this._codeExchangePromises.get(scopes);
|
||||||
- : await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
- if (!codeExchangePromise) {
|
||||||
-
|
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.handleUri(scopes));
|
||||||
- if (!token) { throw new Error('No token provided'); }
|
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
||||||
-
|
|
||||||
- const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
|
||||||
- const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
|
||||||
- if (!scopesList.every(scope => {
|
|
||||||
- const included = tokenScopes.includes(scope);
|
|
||||||
- if (included || !scope.includes(':')) {
|
|
||||||
- return included;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return scope.split(':').some(splitScopes => {
|
|
||||||
- return tokenScopes.includes(splitScopes);
|
|
||||||
- });
|
|
||||||
- })) {
|
|
||||||
- throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- return token;
|
- try {
|
||||||
- }
|
- return await Promise.race([
|
||||||
-
|
- codeExchangePromise.promise,
|
||||||
- this.updateStatusBarItem(true);
|
- new Promise<string>((_, reject) => setTimeout(() => reject('Cancelled'), 60000)),
|
||||||
-
|
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||||
- const state = uuid();
|
- ]);
|
||||||
- const existingStates = this._pendingStates.get(scopes) || [];
|
- } finally {
|
||||||
- this._pendingStates.set(scopes, [...existingStates, state]);
|
- this._pendingNonces.delete(scopes);
|
||||||
-
|
- codeExchangePromise?.cancel.fire();
|
||||||
- const uri = vscode.Uri.parse(`https://${AUTH_RELAY_SERVER}/authorize/?callbackUri=${encodeURIComponent(callbackUri.toString())}&scope=${scopes}&state=${state}&responseType=code&authServer=https://github.com`);
|
- this._codeExchangePromises.delete(scopes);
|
||||||
- await vscode.env.openExternal(uri);
|
- }
|
||||||
-
|
|
||||||
- // Register a single listener for the URI callback, in case the user starts the login process multiple times
|
|
||||||
- // before completing it.
|
|
||||||
- let codeExchangePromise = this._codeExchangePromises.get(scopes);
|
|
||||||
- if (!codeExchangePromise) {
|
|
||||||
- codeExchangePromise = promiseFromEvent(this._uriHandler.event, this.exchangeCodeForToken(scopes));
|
|
||||||
- this._codeExchangePromises.set(scopes, codeExchangePromise);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return Promise.race([
|
|
||||||
- codeExchangePromise.promise,
|
|
||||||
- promiseFromEvent<string | undefined, string>(this._onDidManuallyProvideToken.event, (token: string | undefined, resolve, reject): void => {
|
|
||||||
- if (!token) {
|
|
||||||
- reject('Cancelled');
|
|
||||||
- } else {
|
|
||||||
- resolve(token);
|
|
||||||
- }
|
|
||||||
- }).promise,
|
|
||||||
- new Promise<string>((_, reject) => setTimeout(() => reject('Cancelled'), 60000))
|
|
||||||
- ]).finally(() => {
|
|
||||||
- this._pendingStates.delete(scopes);
|
|
||||||
- codeExchangePromise?.cancel.fire();
|
|
||||||
- this._codeExchangePromises.delete(scopes);
|
|
||||||
- this.updateStatusBarItem(false);
|
|
||||||
- });
|
- });
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- private async doDeviceCodeFlow(scopes: string): Promise<string> {
|
- private async doLoginWithLocalServer(scopes: string): Promise<string> {
|
||||||
|
- this._logger.info(`Trying with local server... (${scopes})`);
|
||||||
|
- return await vscode.window.withProgress<string>({
|
||||||
|
- location: vscode.ProgressLocation.Notification,
|
||||||
|
- title: localize('signingInAnotherWay', "Signing in to github.com..."),
|
||||||
|
- cancellable: true
|
||||||
|
- }, async (_, token) => {
|
||||||
|
- const redirectUri = await this.getRedirectEndpoint;
|
||||||
|
- const searchParams = new URLSearchParams([
|
||||||
|
- ['client_id', CLIENT_ID],
|
||||||
|
- ['redirect_uri', redirectUri],
|
||||||
|
- ['scope', scopes],
|
||||||
|
- ]);
|
||||||
|
- const loginUrl = `${GITHUB_AUTHORIZE_URL}?${searchParams.toString()}`;
|
||||||
|
- const server = new LoopbackAuthServer(path.join(__dirname, '../media'), loginUrl);
|
||||||
|
- const port = await server.start();
|
||||||
|
-
|
||||||
|
- let codeToExchange;
|
||||||
|
- try {
|
||||||
|
- vscode.env.openExternal(vscode.Uri.parse(`http://127.0.0.1:${port}/signin?nonce=${encodeURIComponent(server.nonce)}`));
|
||||||
|
- const { code } = await Promise.race([
|
||||||
|
- server.waitForOAuthResponse(),
|
||||||
|
- new Promise<any>((_, reject) => setTimeout(() => reject('Cancelled'), 60000)),
|
||||||
|
- promiseFromEvent<any, any>(token.onCancellationRequested, (_, __, reject) => { reject('User Cancelled'); }).promise
|
||||||
|
- ]);
|
||||||
|
- codeToExchange = code;
|
||||||
|
- } finally {
|
||||||
|
- setTimeout(() => {
|
||||||
|
- void server.stop();
|
||||||
|
- }, 5000);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- const accessToken = await this.exchangeCodeForToken(codeToExchange);
|
||||||
|
- return accessToken;
|
||||||
|
- });
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- private async doLoginDeviceCodeFlow(scopes: string): Promise<string> {
|
||||||
|
- this._logger.info(`Trying device code flow... (${scopes})`);
|
||||||
|
-
|
||||||
- // Get initial device code
|
- // Get initial device code
|
||||||
- const uri = `https://github.com/login/device/code?client_id=${CLIENT_ID}&scope=${scopes}`;
|
- const uri = `https://github.com/login/device/code?client_id=${CLIENT_ID}&scope=${scopes}`;
|
||||||
- const result = await fetch(uri, {
|
- const result = await fetch(uri, {
|
||||||
@@ -177,7 +245,7 @@ index 92313d0..a69da37 100644
|
|||||||
- }, 'Copy & Continue to GitHub');
|
- }, 'Copy & Continue to GitHub');
|
||||||
-
|
-
|
||||||
- if (modalResult !== 'Copy & Continue to GitHub') {
|
- if (modalResult !== 'Copy & Continue to GitHub') {
|
||||||
- throw new Error('Cancelled');
|
- throw new Error('User Cancelled');
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- await vscode.env.clipboard.writeText(json.user_code);
|
- await vscode.env.clipboard.writeText(json.user_code);
|
||||||
@@ -185,6 +253,18 @@ index 92313d0..a69da37 100644
|
|||||||
- const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
|
- const uriToOpen = await vscode.env.asExternalUri(vscode.Uri.parse(json.verification_uri));
|
||||||
- await vscode.env.openExternal(uriToOpen);
|
- await vscode.env.openExternal(uriToOpen);
|
||||||
-
|
-
|
||||||
|
- return await this.waitForDeviceCodeAccessToken(json);
|
||||||
|
- }
|
||||||
|
|
||||||
|
private async doLoginWithPat(scopes: string): Promise<string> {
|
||||||
|
this._logger.info(`Trying to retrieve PAT... (${scopes})`);
|
||||||
|
@@ -351,118 +153,6 @@ export class GitHubServer implements IGitHubServer {
|
||||||
|
return token;
|
||||||
|
}
|
||||||
|
|
||||||
|
- private async waitForDeviceCodeAccessToken(
|
||||||
|
- json: IGitHubDeviceCodeResponse,
|
||||||
|
- ): Promise<string> {
|
||||||
- return await vscode.window.withProgress<string>({
|
- return await vscode.window.withProgress<string>({
|
||||||
- location: vscode.ProgressLocation.Notification,
|
- location: vscode.ProgressLocation.Notification,
|
||||||
- cancellable: true,
|
- cancellable: true,
|
||||||
@@ -194,199 +274,140 @@ index 92313d0..a69da37 100644
|
|||||||
- json.verification_uri,
|
- json.verification_uri,
|
||||||
- json.user_code)
|
- json.user_code)
|
||||||
- }, async (_, token) => {
|
- }, async (_, token) => {
|
||||||
- return await this.waitForDeviceCodeAccessToken(json, token);
|
- const refreshTokenUri = `https://github.com/login/oauth/access_token?client_id=${CLIENT_ID}&device_code=${json.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`;
|
||||||
|
-
|
||||||
|
- // Try for 2 minutes
|
||||||
|
- const attempts = 120 / json.interval;
|
||||||
|
- for (let i = 0; i < attempts; i++) {
|
||||||
|
- await new Promise(resolve => setTimeout(resolve, json.interval * 1000));
|
||||||
|
- if (token.isCancellationRequested) {
|
||||||
|
- throw new Error('User Cancelled');
|
||||||
|
- }
|
||||||
|
- let accessTokenResult;
|
||||||
|
- try {
|
||||||
|
- accessTokenResult = await fetch(refreshTokenUri, {
|
||||||
|
- method: 'POST',
|
||||||
|
- headers: {
|
||||||
|
- Accept: 'application/json'
|
||||||
|
- }
|
||||||
|
- });
|
||||||
|
- } catch {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!accessTokenResult.ok) {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- const accessTokenJson = await accessTokenResult.json();
|
||||||
|
-
|
||||||
|
- if (accessTokenJson.error === 'authorization_pending') {
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (accessTokenJson.error) {
|
||||||
|
- throw new Error(accessTokenJson.error_description);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return accessTokenJson.access_token;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- throw new Error('Cancelled');
|
||||||
- });
|
- });
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- private async waitForDeviceCodeAccessToken(
|
- private handleUri: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
||||||
- json: IGitHubDeviceCodeResponse,
|
- (scopes) => (uri, resolve, reject) => {
|
||||||
- token: vscode.CancellationToken
|
- const query = new URLSearchParams(uri.query);
|
||||||
- ): Promise<string> {
|
- const code = query.get('code');
|
||||||
-
|
- const nonce = query.get('nonce');
|
||||||
- const refreshTokenUri = `https://github.com/login/oauth/access_token?client_id=${CLIENT_ID}&device_code=${json.device_code}&grant_type=urn:ietf:params:oauth:grant-type:device_code`;
|
- if (!code) {
|
||||||
-
|
- reject(new Error('No code'));
|
||||||
- // Try for 2 minutes
|
- return;
|
||||||
- const attempts = 120 / json.interval;
|
|
||||||
- for (let i = 0; i < attempts; i++) {
|
|
||||||
- await new Promise(resolve => setTimeout(resolve, json.interval * 1000));
|
|
||||||
- if (token.isCancellationRequested) {
|
|
||||||
- throw new Error('Cancelled');
|
|
||||||
- }
|
- }
|
||||||
- let accessTokenResult;
|
- if (!nonce) {
|
||||||
- try {
|
- reject(new Error('No nonce'));
|
||||||
- accessTokenResult = await fetch(refreshTokenUri, {
|
- return;
|
||||||
- method: 'POST',
|
|
||||||
- headers: {
|
|
||||||
- Accept: 'application/json'
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
- } catch {
|
|
||||||
- continue;
|
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- if (!accessTokenResult.ok) {
|
- const acceptedNonces = this._pendingNonces.get(scopes) || [];
|
||||||
- continue;
|
- if (!acceptedNonces.includes(nonce)) {
|
||||||
- }
|
|
||||||
+ const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
|
|
||||||
|
|
||||||
- const accessTokenJson = await accessTokenResult.json();
|
|
||||||
+ if (!token) { throw new Error('No token provided'); }
|
|
||||||
|
|
||||||
- if (accessTokenJson.error === 'authorization_pending') {
|
|
||||||
- continue;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (accessTokenJson.error) {
|
|
||||||
- throw new Error(accessTokenJson.error_description);
|
|
||||||
+ const tokenScopes = await getScopes(token, this.getServerUri('/'), this._logger); // Example: ['repo', 'user']
|
|
||||||
+ const scopesList = scopes.split(' '); // Example: 'read:user repo user:email'
|
|
||||||
+ if (!scopesList.every(scope => {
|
|
||||||
+ const included = tokenScopes.includes(scope);
|
|
||||||
+ if (included || !scope.includes(':')) {
|
|
||||||
+ return included;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return accessTokenJson.access_token;
|
|
||||||
+ return scope.split(':').some(splitScopes => {
|
|
||||||
+ return tokenScopes.includes(splitScopes);
|
|
||||||
+ });
|
|
||||||
+ })) {
|
|
||||||
+ throw new Error(`The provided token does not match the requested scopes: ${scopes}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
- throw new Error('Cancelled');
|
|
||||||
+ return token;
|
|
||||||
}
|
|
||||||
|
|
||||||
- private exchangeCodeForToken: (scopes: string) => PromiseAdapter<vscode.Uri, string> =
|
|
||||||
- (scopes) => async (uri, resolve, reject) => {
|
|
||||||
- const query = parseQuery(uri);
|
|
||||||
- const code = query.code;
|
|
||||||
-
|
|
||||||
- const acceptedStates = this._pendingStates.get(scopes) || [];
|
|
||||||
- if (!acceptedStates.includes(query.state)) {
|
|
||||||
- // A common scenario of this happening is if you:
|
- // A common scenario of this happening is if you:
|
||||||
- // 1. Trigger a sign in with one set of scopes
|
- // 1. Trigger a sign in with one set of scopes
|
||||||
- // 2. Before finishing 1, you trigger a sign in with a different set of scopes
|
- // 2. Before finishing 1, you trigger a sign in with a different set of scopes
|
||||||
- // In this scenario we should just return and wait for the next UriHandler event
|
- // In this scenario we should just return and wait for the next UriHandler event
|
||||||
- // to run as we are probably still waiting on the user to hit 'Continue'
|
- // to run as we are probably still waiting on the user to hit 'Continue'
|
||||||
- this._logger.info('State not found in accepted state. Skipping this execution...');
|
- this._logger.info('Nonce not found in accepted nonces. Skipping this execution...');
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- const url = `https://${AUTH_RELAY_SERVER}/token?code=${code}&state=${query.state}`;
|
- resolve(this.exchangeCodeForToken(code));
|
||||||
- this._logger.info('Exchanging code for token...');
|
|
||||||
-
|
|
||||||
- try {
|
|
||||||
- const result = await fetch(url, {
|
|
||||||
- method: 'POST',
|
|
||||||
- headers: {
|
|
||||||
- Accept: 'application/json'
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
-
|
|
||||||
- if (result.ok) {
|
|
||||||
- const json = await result.json();
|
|
||||||
- this._logger.info('Token exchange success!');
|
|
||||||
- resolve(json.access_token);
|
|
||||||
- } else {
|
|
||||||
- reject(result.statusText);
|
|
||||||
- }
|
|
||||||
- } catch (ex) {
|
|
||||||
- reject(ex);
|
|
||||||
- }
|
|
||||||
- };
|
- };
|
||||||
|
-
|
||||||
|
- private async exchangeCodeForToken(code: string): Promise<string> {
|
||||||
|
- this._logger.info('Exchanging code for token...');
|
||||||
|
-
|
||||||
|
- const proxyEndpoints: { [providerId: string]: string } | undefined = await vscode.commands.executeCommand('workbench.getCodeExchangeProxyEndpoints');
|
||||||
|
- const endpointUrl = proxyEndpoints?.github ? `${proxyEndpoints.github}login/oauth/access_token` : GITHUB_TOKEN_URL;
|
||||||
|
-
|
||||||
|
- const body = `code=${code}`;
|
||||||
|
- const result = await fetch(endpointUrl, {
|
||||||
|
- method: 'POST',
|
||||||
|
- headers: {
|
||||||
|
- Accept: 'application/json',
|
||||||
|
- 'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
- 'Content-Length': body.toString()
|
||||||
|
-
|
||||||
|
- },
|
||||||
|
- body
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- if (result.ok) {
|
||||||
|
- const json = await result.json();
|
||||||
|
- this._logger.info('Token exchange success!');
|
||||||
|
- return json.access_token;
|
||||||
|
- } else {
|
||||||
|
- const text = await result.text();
|
||||||
|
- const error = new Error(text);
|
||||||
|
- error.name = 'GitHubTokenExchangeError';
|
||||||
|
- throw error;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
-
|
-
|
||||||
private getServerUri(path: string = '') {
|
private getServerUri(path: string = '') {
|
||||||
const apiUri = vscode.Uri.parse('https://api.github.com');
|
const apiUri = vscode.Uri.parse('https://api.github.com');
|
||||||
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`);
|
return vscode.Uri.parse(`${apiUri.scheme}://${apiUri.authority}${path}`);
|
||||||
}
|
diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||||
|
index 36647e6..55e722b 100644
|
||||||
|
--- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||||
|
+++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts
|
||||||
|
@@ -271,7 +271,7 @@ export class AccountsActivityActionViewItem extends MenuActivityActionViewItem {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
- private updateStatusBarItem(isStart?: boolean) {
|
- if (providers.length && !menus.length) {
|
||||||
- if (isStart && !this._statusBarItem) {
|
+ if (!menus.length) {
|
||||||
- this._statusBarItem = vscode.window.createStatusBarItem('status.git.signIn', vscode.StatusBarAlignment.Left);
|
const noAccountsAvailableAction = disposables.add(new Action('noAccountsAvailable', localize('noAccounts', "You are not signed in to any accounts"), undefined, false));
|
||||||
- this._statusBarItem.name = localize('status.git.signIn.name', "GitHub Sign-in");
|
menus.push(noAccountsAvailableAction);
|
||||||
- this._statusBarItem.text = localize('signingIn', "$(mark-github) Signing in to github.com...");
|
}
|
||||||
- this._statusBarItem.command = this._statusBarCommandId;
|
diff --git a/src/vs/workbench/services/authentication/browser/authenticationService.ts b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||||
- this._statusBarItem.show();
|
index f543021..ad40bc3 100644
|
||||||
- }
|
--- a/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||||
|
+++ b/src/vs/workbench/services/authentication/browser/authenticationService.ts
|
||||||
|
@@ -272,16 +272,6 @@ export class AuthenticationService extends Disposable implements IAuthentication
|
||||||
|
this.removeAccessRequest(id, extensionId);
|
||||||
|
});
|
||||||
|
}
|
||||||
-
|
-
|
||||||
- if (!isStart && this._statusBarItem) {
|
- if (!this._authenticationProviders.size) {
|
||||||
- this._statusBarItem.dispose();
|
- this._placeholderMenuItem = MenuRegistry.appendMenuItem(MenuId.AccountsContext, {
|
||||||
- this._statusBarItem = undefined;
|
- command: {
|
||||||
- }
|
- id: 'noAuthenticationProviders',
|
||||||
- }
|
- title: nls.localize('loading', "Loading..."),
|
||||||
-
|
- precondition: ContextKeyExpr.false()
|
||||||
- private async manuallyProvideUri() {
|
- },
|
||||||
- const uri = await vscode.window.showInputBox({
|
|
||||||
- prompt: 'Uri',
|
|
||||||
- ignoreFocusOut: true,
|
|
||||||
- validateInput(value) {
|
|
||||||
- if (!value) {
|
|
||||||
- return undefined;
|
|
||||||
- }
|
|
||||||
- const error = localize('validUri', "Please enter a valid Uri from the GitHub login page.");
|
|
||||||
- try {
|
|
||||||
- const uri = vscode.Uri.parse(value.trim());
|
|
||||||
- if (!uri.scheme || uri.scheme === 'file') {
|
|
||||||
- return error;
|
|
||||||
- }
|
|
||||||
- } catch (e) {
|
|
||||||
- return error;
|
|
||||||
- }
|
|
||||||
- return undefined;
|
|
||||||
- }
|
|
||||||
- });
|
|
||||||
- if (!uri) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- this._uriHandler.handleUri(vscode.Uri.parse(uri.trim()));
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
public getUserInfo(token: string): Promise<{ id: string; accountName: string }> {
|
|
||||||
return getUserInfo(token, this.getServerUri('/user'), this._logger);
|
|
||||||
}
|
|
||||||
|
|
||||||
- public async sendAdditionalTelemetryInfo(token: string): Promise<void> {
|
|
||||||
- if (!vscode.env.isTelemetryEnabled) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- const nocors = await this.isNoCorsEnvironment();
|
|
||||||
-
|
|
||||||
- if (nocors) {
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- try {
|
|
||||||
- const result = await fetch('https://education.github.com/api/user', {
|
|
||||||
- headers: {
|
|
||||||
- Authorization: `token ${token}`,
|
|
||||||
- 'faculty-check-preview': 'true',
|
|
||||||
- 'User-Agent': 'Visual-Studio-Code'
|
|
||||||
- }
|
|
||||||
- });
|
- });
|
||||||
-
|
|
||||||
- if (result.ok) {
|
|
||||||
- const json: { student: boolean; faculty: boolean } = await result.json();
|
|
||||||
-
|
|
||||||
- /* __GDPR__
|
|
||||||
- "session" : {
|
|
||||||
- "isEdu": { "classification": "NonIdentifiableDemographicInfo", "purpose": "FeatureInsight" }
|
|
||||||
- }
|
|
||||||
- */
|
|
||||||
- this._telemetryReporter.sendTelemetryEvent('session', {
|
|
||||||
- isEdu: json.student
|
|
||||||
- ? 'student'
|
|
||||||
- : json.faculty
|
|
||||||
- ? 'faculty'
|
|
||||||
- : 'none'
|
|
||||||
- });
|
|
||||||
- }
|
|
||||||
- } catch (e) {
|
|
||||||
- // No-op
|
|
||||||
- }
|
- }
|
||||||
+ public async sendAdditionalTelemetryInfo(_: string): Promise<void> {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async checkEnterpriseVersion(token: string): Promise<void> {
|
async sessionsUpdate(id: string, event: AuthenticationSessionsChangeEvent): Promise<void> {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -50,7 +60,6 @@ twitterUrl='setpath(["twitterUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533
|
|||||||
requestFeatureUrl='setpath(["requestFeatureUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533482")'
|
requestFeatureUrl='setpath(["requestFeatureUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533482")'
|
||||||
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
||||||
introductoryVideosUrl='setpath(["introductoryVideosUrl"]; "https://go.microsoft.com/fwlink/?linkid=832146")'
|
introductoryVideosUrl='setpath(["introductoryVideosUrl"]; "https://go.microsoft.com/fwlink/?linkid=832146")'
|
||||||
extensionAllowedBadgeProviders='setpath(["extensionAllowedBadgeProviders"]; ["api.bintray.com", "api.travis-ci.com", "api.travis-ci.org", "app.fossa.io", "badge.fury.io", "badge.waffle.io", "badgen.net", "badges.frapsoft.com", "badges.gitter.im", "badges.greenkeeper.io", "cdn.travis-ci.com", "cdn.travis-ci.org", "ci.appveyor.com", "circleci.com", "cla.opensource.microsoft.com", "codacy.com", "codeclimate.com", "codecov.io", "coveralls.io", "david-dm.org", "deepscan.io", "dev.azure.com", "flat.badgen.net", "gemnasium.com", "githost.io", "gitlab.com", "godoc.org", "goreportcard.com", "img.shields.io", "isitmaintained.com", "marketplace.visualstudio.com", "nodesecurity.io", "opencollective.com", "snyk.io", "travis-ci.com", "travis-ci.org", "visualstudio.com", "vsmarketplacebadge.apphb.com", "www.bithound.io", "www.versioneye.com"])'
|
|
||||||
updateUrl='setpath(["updateUrl"]; "https://vscodium.now.sh")'
|
updateUrl='setpath(["updateUrl"]; "https://vscodium.now.sh")'
|
||||||
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
||||||
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
||||||
@@ -71,18 +80,22 @@ 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")'
|
||||||
extensionAllowedProposedApi='setpath(["extensionAllowedProposedApi"]; getpath(["extensionAllowedProposedApi"]) + ["ms-vscode.cpptools", "ms-azuretools.vscode-docker", "visualstudioexptteam.vscodeintellicode", "GitHub.codespaces", "GitHub.vscode-pull-request-github-insiders", "GitHub.vscode-pull-request-github", "Microsoft.vscode-nmake-tools", "ms-ai-tools.notebook-renderers", "ms-dotnettools.dotnet-interactive-vscode", "ms-python.gather", "ms-python.python", "ms-toolsai.jupyter", "ms-toolsai.vscode-ai", "ms-toolsai.vscode-ai-remote", "ms-vscode-remote.remote-containers-nightly", "ms-vscode-remote.remote-containers", "ms-vscode-remote.remote-ssh-edit-nightly", "ms-vscode-remote.remote-ssh-edit", "ms-vscode-remote.remote-ssh-nightly", "ms-vscode-remote.remote-ssh", "ms-vscode-remote.remote-wsl-nightly", "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-wsl-recommender", "ms-vscode-remote.vscode-remote-extensionpack-nightly", "ms-vscode-remote.vscode-remote-extensionpack", "ms-vscode.azure-account", "ms-vscode.azure-sphere-tools-ui", "ms-vscode.azure-sphere-tools", "ms-vscode.github-browser", "ms-vscode.github-richnav", "ms-vscode.js-debug-nightly", "ms-vscode.js-debug", "ms-vscode.lsif-browser", "ms-vscode.vscode-js-profile-flame", "ms-vscode.vscode-js-profile-table", "ms-vscode.vscode-selfhost-test-provider", "ms-vsliveshare.cloudenv-explorer", "ms-vsliveshare.cloudenv", "ms-vsliveshare.vsliveshare", "ms-vsonline.vsonline", "dbaeumer.vscode-eslint"])'
|
serverApplicationName='setpath(["serverApplicationName"]; "codium-server")'
|
||||||
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscode-server-oss")'
|
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscodium-server")'
|
||||||
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new/choose")'
|
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} | ${extensionAllowedBadgeProviders} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${extensionAllowedProposedApi} | ${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
|
cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
|
||||||
|
|
||||||
|
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
|
||||||
|
rm -f product.json.tmp
|
||||||
|
|
||||||
cat product.json
|
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
|
||||||
|
|||||||
427
product.json
Normal file
427
product.json
Normal file
@@ -0,0 +1,427 @@
|
|||||||
|
{
|
||||||
|
"extensionAllowedBadgeProviders": [
|
||||||
|
"api.bintray.com",
|
||||||
|
"api.travis-ci.com",
|
||||||
|
"api.travis-ci.org",
|
||||||
|
"app.fossa.io",
|
||||||
|
"badge.buildkite.com",
|
||||||
|
"badge.fury.io",
|
||||||
|
"badge.waffle.io",
|
||||||
|
"badgen.net",
|
||||||
|
"badges.frapsoft.com",
|
||||||
|
"badges.gitter.im",
|
||||||
|
"badges.greenkeeper.io",
|
||||||
|
"cdn.travis-ci.com",
|
||||||
|
"cdn.travis-ci.org",
|
||||||
|
"ci.appveyor.com",
|
||||||
|
"circleci.com",
|
||||||
|
"cla.opensource.microsoft.com",
|
||||||
|
"codacy.com",
|
||||||
|
"codeclimate.com",
|
||||||
|
"codecov.io",
|
||||||
|
"coveralls.io",
|
||||||
|
"david-dm.org",
|
||||||
|
"deepscan.io",
|
||||||
|
"dev.azure.com",
|
||||||
|
"docs.rs",
|
||||||
|
"flat.badgen.net",
|
||||||
|
"gemnasium.com",
|
||||||
|
"githost.io",
|
||||||
|
"gitlab.com",
|
||||||
|
"godoc.org",
|
||||||
|
"goreportcard.com",
|
||||||
|
"img.shields.io",
|
||||||
|
"isitmaintained.com",
|
||||||
|
"marketplace.visualstudio.com",
|
||||||
|
"nodesecurity.io",
|
||||||
|
"opencollective.com",
|
||||||
|
"snyk.io",
|
||||||
|
"travis-ci.com",
|
||||||
|
"travis-ci.org",
|
||||||
|
"visualstudio.com",
|
||||||
|
"vsmarketplacebadge.apphb.com",
|
||||||
|
"www.bithound.io",
|
||||||
|
"www.versioneye.com"
|
||||||
|
],
|
||||||
|
"extensionAllowedBadgeProvidersRegex": [
|
||||||
|
"^https:\\/\\/github\\.com\\/[^/]+\\/[^/]+\\/(actions\\/)?workflows\\/.*badge\\.svg"
|
||||||
|
],
|
||||||
|
"extensionEnabledApiProposals": {
|
||||||
|
"ms-vscode.vscode-selfhost-test-provider": [
|
||||||
|
"testObserver"
|
||||||
|
],
|
||||||
|
"VisualStudioExptTeam.vscodeintellicode-completions": [
|
||||||
|
"inlineCompletions"
|
||||||
|
],
|
||||||
|
"ms-vsliveshare.vsliveshare": [
|
||||||
|
"contribMenuBarHome",
|
||||||
|
"diffCommand",
|
||||||
|
"documentFiltersExclusive",
|
||||||
|
"fileSearchProvider",
|
||||||
|
"findTextInFiles",
|
||||||
|
"notebookCellExecutionState",
|
||||||
|
"notebookContentProvider",
|
||||||
|
"notebookDocumentEvents",
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookEditorEdit",
|
||||||
|
"notebookLiveShare",
|
||||||
|
"terminalDimensions",
|
||||||
|
"terminalDataWriteEvent",
|
||||||
|
"textDocumentNotebook",
|
||||||
|
"textSearchProvider"
|
||||||
|
],
|
||||||
|
"ms-vscode.js-debug": [
|
||||||
|
"portsAttributes",
|
||||||
|
"findTextInFiles",
|
||||||
|
"workspaceTrust",
|
||||||
|
"resolvers"
|
||||||
|
],
|
||||||
|
"ms-toolsai.vscode-ai-remote": [
|
||||||
|
"resolvers",
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"ms-python.python": [
|
||||||
|
"quickPickSortByLabel",
|
||||||
|
"testObserver",
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"ms-dotnettools.dotnet-interactive-vscode": [
|
||||||
|
"notebookConcatTextDocument",
|
||||||
|
"notebookContentProvider",
|
||||||
|
"notebookCellExecutionState",
|
||||||
|
"notebookControllerKind",
|
||||||
|
"notebookDebugOptions",
|
||||||
|
"notebookDeprecated",
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookEditorDecorationType",
|
||||||
|
"notebookEditorEdit",
|
||||||
|
"notebookLiveShare",
|
||||||
|
"notebookMessaging",
|
||||||
|
"notebookMime",
|
||||||
|
"textDocumentNotebook"
|
||||||
|
],
|
||||||
|
"GitHub.codespaces": [
|
||||||
|
"contribMenuBarHome",
|
||||||
|
"contribRemoteHelp",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"notebookEditor",
|
||||||
|
"resolvers",
|
||||||
|
"terminalDataWriteEvent",
|
||||||
|
"treeViewReveal"
|
||||||
|
],
|
||||||
|
"ms-vscode.azure-repos": [
|
||||||
|
"extensionRuntime",
|
||||||
|
"fileSearchProvider",
|
||||||
|
"resolvers",
|
||||||
|
"textSearchProvider"
|
||||||
|
],
|
||||||
|
"ms-vscode.remote-repositories": [
|
||||||
|
"contribRemoteHelp",
|
||||||
|
"contribMenuBarHome",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"contribViewsWelcome",
|
||||||
|
"documentFiltersExclusive",
|
||||||
|
"extensionRuntime",
|
||||||
|
"fileSearchProvider",
|
||||||
|
"quickPickSortByLabel",
|
||||||
|
"workspaceTrust",
|
||||||
|
"scmSelectedProvider",
|
||||||
|
"scmValidation",
|
||||||
|
"textSearchProvider",
|
||||||
|
"timeline",
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"ms-vscode.vscode-github-issue-notebooks": [
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"tanhakabir.rest-book": [
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"ms-vscode-remote.remote-wsl": [
|
||||||
|
"resolvers",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"telemetry"
|
||||||
|
],
|
||||||
|
"ms-vscode-remote.remote-ssh": [
|
||||||
|
"resolvers",
|
||||||
|
"terminalDataWriteEvent",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"telemetry"
|
||||||
|
],
|
||||||
|
"ms-vscode-remote.remote-containers": [
|
||||||
|
"resolvers",
|
||||||
|
"workspaceTrust",
|
||||||
|
"terminalDimensions",
|
||||||
|
"contribViewsRemote"
|
||||||
|
],
|
||||||
|
"ms-vscode.js-debug-nightly": [
|
||||||
|
"portsAttributes",
|
||||||
|
"findTextInFiles",
|
||||||
|
"workspaceTrust",
|
||||||
|
"resolvers"
|
||||||
|
],
|
||||||
|
"ms-vscode.lsif-browser": [
|
||||||
|
"documentFiltersExclusive"
|
||||||
|
],
|
||||||
|
"GitHub.vscode-pull-request-github": [
|
||||||
|
"tokenInformation"
|
||||||
|
],
|
||||||
|
"GitHub.copilot": [
|
||||||
|
"inlineCompletions",
|
||||||
|
"textDocumentNotebook"
|
||||||
|
],
|
||||||
|
"GitHub.copilot-nightly": [
|
||||||
|
"inlineCompletions",
|
||||||
|
"textDocumentNotebook"
|
||||||
|
],
|
||||||
|
"GitHub.remotehub": [
|
||||||
|
"contribRemoteHelp",
|
||||||
|
"contribMenuBarHome",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"contribViewsWelcome",
|
||||||
|
"documentFiltersExclusive",
|
||||||
|
"extensionRuntime",
|
||||||
|
"fileSearchProvider",
|
||||||
|
"quickPickSortByLabel",
|
||||||
|
"workspaceTrust",
|
||||||
|
"resolvers",
|
||||||
|
"scmSelectedProvider",
|
||||||
|
"scmValidation",
|
||||||
|
"textSearchProvider",
|
||||||
|
"timeline",
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"GitHub.remotehub-insiders": [
|
||||||
|
"contribRemoteHelp",
|
||||||
|
"contribMenuBarHome",
|
||||||
|
"contribViewsRemote",
|
||||||
|
"contribViewsWelcome",
|
||||||
|
"documentFiltersExclusive",
|
||||||
|
"extensionRuntime",
|
||||||
|
"fileSearchProvider",
|
||||||
|
"quickPickSortByLabel",
|
||||||
|
"workspaceTrust",
|
||||||
|
"resolvers",
|
||||||
|
"scmSelectedProvider",
|
||||||
|
"scmValidation",
|
||||||
|
"textSearchProvider",
|
||||||
|
"timeline",
|
||||||
|
"notebookEditor"
|
||||||
|
],
|
||||||
|
"ms-python.gather": [
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookCellExecutionState"
|
||||||
|
],
|
||||||
|
"ms-python.vscode-pylance": [
|
||||||
|
"notebookDocumentEvents",
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookCellExecutionState"
|
||||||
|
],
|
||||||
|
"ms-toolsai.jupyter": [
|
||||||
|
"notebookConcatTextDocument",
|
||||||
|
"notebookControllerKind",
|
||||||
|
"notebookDebugOptions",
|
||||||
|
"notebookDeprecated",
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookDocumentEvents",
|
||||||
|
"notebookEditorDecorationType",
|
||||||
|
"notebookEditorEdit",
|
||||||
|
"notebookMessaging",
|
||||||
|
"notebookMime",
|
||||||
|
"notebookCellExecutionState",
|
||||||
|
"portsAttributes",
|
||||||
|
"textDocumentNotebook",
|
||||||
|
"quickPickSortByLabel"
|
||||||
|
],
|
||||||
|
"dbaeumer.vscode-eslint": [
|
||||||
|
"tabs",
|
||||||
|
"notebookDocumentEvents",
|
||||||
|
"notebookEditor",
|
||||||
|
"notebookCellExecutionState"
|
||||||
|
],
|
||||||
|
"ms-vscode.azure-sphere-tools-ui": [
|
||||||
|
"resolvers"
|
||||||
|
],
|
||||||
|
"ms-azuretools.vscode-azureappservice": [
|
||||||
|
"terminalDataWriteEvent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extensionKind": {
|
||||||
|
"Shan.code-settings-sync": [
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
|
"shalldie.background": [
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
|
"techer.open-in-browser": [
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
|
"CoenraadS.bracket-pair-colorizer-2": [
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
|
"CoenraadS.bracket-pair-colorizer": [
|
||||||
|
"ui",
|
||||||
|
"workspace"
|
||||||
|
],
|
||||||
|
"hiro-sun.vscode-emacs": [
|
||||||
|
"ui",
|
||||||
|
"workspace"
|
||||||
|
],
|
||||||
|
"hnw.vscode-auto-open-markdown-preview": [
|
||||||
|
"ui",
|
||||||
|
"workspace"
|
||||||
|
],
|
||||||
|
"wayou.vscode-todo-highlight": [
|
||||||
|
"ui",
|
||||||
|
"workspace"
|
||||||
|
],
|
||||||
|
"aaron-bond.better-comments": [
|
||||||
|
"ui",
|
||||||
|
"workspace"
|
||||||
|
],
|
||||||
|
"vscodevim.vim": [
|
||||||
|
"ui"
|
||||||
|
],
|
||||||
|
"ollyhayes.colmak-vim": [
|
||||||
|
"ui"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extensionPointExtensionKind": {
|
||||||
|
"typescriptServerPlugins": [
|
||||||
|
"workspace"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extensionSyncedKeys": {
|
||||||
|
"ritwickdey.liveserver": [
|
||||||
|
"liveServer.setup.version"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"extensionVirtualWorkspacesSupport": {
|
||||||
|
"esbenp.prettier-vscode": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"msjsdiag.debugger-for-chrome": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"redhat.java": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"HookyQR.beautify": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"ritwickdey.LiveServer": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"VisualStudioExptTeam.vscodeintellicode": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"octref.vetur": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"formulahendry.code-runner": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"xdebug.php-debug": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"ms-mssql.mssql": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"christian-kohler.path-intellisense": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"eg2.tslint": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"eg2.vscode-npm-script": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"donjayamanne.githistory": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"Zignd.html-css-class-completion": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"christian-kohler.npm-intellisense": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"EditorConfig.EditorConfig": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"austin.code-gnu-global": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"johnpapa.Angular2": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"ms-vscode.vscode-typescript-tslint-plugin": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"DotJoshJohnson.xml": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"techer.open-in-browser": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"tht13.python": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"bmewburn.vscode-intelephense-client": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"Angular.ng-template": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"xdebug.php-pack": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"dbaeumer.jshint": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"yzhang.markdown-all-in-one": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"Dart-Code.flutter": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"streetsidesoftware.code-spell-checker": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"rebornix.Ruby": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"ms-vscode.sublime-keybindings": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"mitaki28.vscode-clang": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"steoates.autoimport": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"donjayamanne.python-extension-pack": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"shd101wyy.markdown-preview-enhanced": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"mikestead.dotenv": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"pranaygp.vscode-css-peek": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"ikappas.phpcs": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"platformio.platformio-ide": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"jchannon.csharpextensions": {
|
||||||
|
"default": false
|
||||||
|
},
|
||||||
|
"gruntfuggly.todo-tree": {
|
||||||
|
"default": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
release.sh
16
release.sh
@@ -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"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 7.5 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
@@ -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
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ base: core18
|
|||||||
grade: stable
|
grade: stable
|
||||||
confinement: classic
|
confinement: classic
|
||||||
compression: lzo
|
compression: lzo
|
||||||
architectures:
|
# architectures:
|
||||||
- build-on: amd64
|
# - build-on: amd64
|
||||||
- build-on: arm64
|
# - build-on: arm64
|
||||||
|
|
||||||
parts:
|
parts:
|
||||||
codium:
|
codium:
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
# dc.services.visualstudio.com
|
# mobile.events.data.microsoft.com
|
||||||
# vortex.data.microsoft.com
|
# vortex.data.microsoft.com
|
||||||
TELEMETRY_URLS="(dc\.services\.visualstudio\.com)|(vortex\.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
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ DEFAULT_TRUE="'default': true"
|
|||||||
DEFAULT_FALSE="'default': false"
|
DEFAULT_FALSE="'default': false"
|
||||||
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
DEFAULT_ON="'default': TelemetryConfiguration.ON"
|
||||||
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
DEFAULT_OFF="'default': TelemetryConfiguration.OFF"
|
||||||
TELEMETRY_ENABLE="'telemetry.enableTelemetry':"
|
|
||||||
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
TELEMETRY_CRASH_REPORTER="'telemetry.enableCrashReporter':"
|
||||||
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
TELEMETRY_CONFIGURATION=" TelemetryConfiguration.ON"
|
||||||
|
|
||||||
@@ -10,42 +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_ENABLE" src/vs/platform/telemetry/common/telemetryService.ts
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user