Compare commits

...

17 Commits

Author SHA1 Message Date
Baptiste Augrain
3fa8eee9fe feat: add script to update patches (#1138) 2022-06-20 10:34:50 +02:00
Baptiste Augrain
55d502d659 doc: add patch update process (#1136) 2022-06-19 12:08:28 +02:00
Pavel Sterin
f6a99949c5 feat: use github versions of included extensions (#1133) 2022-06-19 11:49:56 +02:00
Baptiste Augrain
85126f1a7c fix: set the built files at the built time (#1132) 2022-06-17 14:47:08 +02:00
Baptiste Augrain
bca4eea470 fix(snap): remove double env variable (#1131) 2022-06-16 23:09:25 +02:00
Baptiste Augrain
2b190dfe51 fix(snap): use master branch to publish (#1130) 2022-06-16 23:06:07 +02:00
Baptiste Augrain
c4583ad3f0 fix: use env variable instead of login option (#1128) 2022-06-16 12:20:10 +02:00
laksith19
79a9f4a292 Remove repeated dependency (#1125) 2022-06-15 18:36:20 +03:00
Baptiste Augrain
112f730493 fix: generate mssing out directory (#1117) 2022-06-11 13:46:15 +02:00
Baptiste Augrain
7313f3ad25 ci(linux): correctly detect reh binaries (#1116) 2022-06-10 07:31:34 +02:00
Baptiste Augrain
bbaaed2ec1 fix: update patches & install optional dependencies (#1115) 2022-06-09 22:19:30 +02:00
Frazer Smith
3737c9f4e2 build: Use cd ... || exit in case cd fails (#1107) 2022-06-08 22:03:44 +02:00
Baptiste Augrain
90bc38c840 vcs: fix lock workflow config (#1113) 2022-06-08 18:00:26 +02:00
Baptiste Augrain
84b4396476 feat: add support for reh (#1111) 2022-06-08 16:59:06 +02:00
Frazer Smith
add78d6829 build(stores/snapcraft): quote grep pattern so shell won't interpret it (#1108) 2022-06-07 23:20:09 +02:00
Frazer Smith
98d30bdc2c build: double quote args and wrap in brace expansions (#1105) 2022-06-05 21:30:23 +02:00
Baptiste Augrain
31355417a8 vcs: add workflow to lock old closed issues (#1106) 2022-06-05 16:52:38 +02:00
24 changed files with 280 additions and 130 deletions

View File

@@ -116,7 +116,7 @@ jobs:
run: ./stores/snapcraft/check_version.sh run: ./stores/snapcraft/check_version.sh
env: env:
ARCHITECTURE: ${{ matrix.platform }} ARCHITECTURE: ${{ matrix.platform }}
SNAP_STORE_LOGIN: ${{ secrets.SNAP_STORE_LOGIN }} SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
# - uses: docker/setup-qemu-action@v1 # - uses: docker/setup-qemu-action@v1
# if: env.SHOULD_DEPLOY == 'yes' # if: env.SHOULD_DEPLOY == 'yes'
@@ -140,9 +140,10 @@ jobs:
if: env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_DEPLOY == 'yes'
- uses: snapcore/action-publish@v1 - uses: snapcore/action-publish@master
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with: with:
store_login: ${{ secrets.SNAP_STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
release: stable release: stable
if: env.SHOULD_DEPLOY == 'yes' if: env.SHOULD_DEPLOY == 'yes'

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

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

4
.gitignore vendored
View File

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

View File

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

View File

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

21
build/update_patches.sh Executable file
View File

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

View File

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

View File

@@ -24,10 +24,10 @@ ICON_DIR="..\\..\\..\\src\\resources\\win32"
LICENSE_DIR="..\\..\\..\\vscode" LICENSE_DIR="..\\..\\..\\vscode"
PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' ) PROGRAM_FILES_86=$( env | sed -n 's/^ProgramFiles(x86)=//p' )
if [[ -z "$1" ]]; then if [[ -z "${1}" ]]; then
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${MS_TAG}" OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${MS_TAG}"
else else
OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-$1-${MS_TAG}" OUTPUT_BASE_FILENAME="${PRODUCT_NAME}-${VSCODE_ARCH}-${1}-${MS_TAG}"
fi fi
if [[ "${VSCODE_ARCH}" == "ia32" ]]; then if [[ "${VSCODE_ARCH}" == "ia32" ]]; then
@@ -38,8 +38,8 @@ fi
BuildSetupTranslationTransform() { BuildSetupTranslationTransform() {
local CULTURE=$1 local CULTURE=${1}
local LANGID=$2 local LANGID=${2}
LANGIDS="${LANGIDS},${LANGID}" LANGIDS="${LANGIDS},${LANGID}"
@@ -47,13 +47,13 @@ BuildSetupTranslationTransform() {
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -reusecab -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69 "${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -reusecab -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\WiLangId.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi Product "${LANGID}" cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\WiLangId.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" Product "${LANGID}"
"${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\x86\\msitran" -g "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst" "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\x86\\msitran" -g "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst "${LANGID}" cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst" "${LANGID}"
cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" ${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi cscript "${PROGRAM_FILES_86}\\Windows Kits\\${WIN_SDK_MAJOR_VERSION}\\bin\\${WIN_SDK_FULL_VERSION}\\${PLATFORM}\\wisubstg.vbs" "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi" rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.msi"
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst" rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"

View File

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

View File

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

View File

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

View File

@@ -8,6 +8,11 @@
- [Windows](#dependencies-windows) - [Windows](#dependencies-windows)
- [Build Scripts](#build-scripts) - [Build Scripts](#build-scripts)
- [Build in Docker](#build-docker) - [Build in Docker](#build-docker)
- [X64](#build-docker-x64)
- [ARM 32bits](#build-docker-arm32)
- [Patch Update Process](#patch-update-process)
- [Semi-Automated](#patch-update-process-semiauto)
- [Manual](#patch-update-process-manual)
## <a id="dependencies"></a>Dependencies ## <a id="dependencies"></a>Dependencies
@@ -29,7 +34,6 @@
- rpmbuild - rpmbuild
- dpkg - dpkg
- python3 - python3
- libsecret-1-dev
- imagemagick (for AppImage) - imagemagick (for AppImage)
### <a id="dependencies-macos"></a>MacOS ### <a id="dependencies-macos"></a>MacOS
@@ -55,7 +59,7 @@ 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
### X64 ### <a id="build-docker-x64"></a>X64
Firstly, create the container with: Firstly, create the container with:
``` ```
@@ -80,7 +84,7 @@ export VSCODE_ARCH=x64
./build.sh ./build.sh
``` ```
### ARM 32bits ### <a id="build-docker-arm32"></a>ARM 32bits
Firstly, create the container with: Firstly, create the container with:
``` ```
@@ -104,3 +108,26 @@ export npm_config_force_process_config="true"
./build.sh ./build.sh
``` ```
## <a id="patch-update-process"></a>Patch Update Process
## <a id="patch-update-process-semiauto"></a>Semi-Automated
- run `./build/build_<os>.sh`, if a patch is failing then,
- run `./build/update_patches.sh`
- when the script pause at `Press any key when the conflict have been resolved...`, open `vscode` directory in **VSCodium**
- fix all the `*.rej` files
- run `yarn watch`
- run `./script/code.sh` until everything ok
- press any key to continue the script `update_patches.sh`
## <a id="patch-update-process-manual"></a>Manual
- run `./build/build_<os>.sh`, if a patch is failing then,
- open `vscode` directory in **VSCodium**
- revert all changes
- run `git apply --reject ../patches/<name>.patch`
- fix all the `*.rej` files
- run `yarn watch`
- run `./script/code.sh` until everything ok
- run `git diff > ../patches/<name>.patch`

View File

@@ -1,20 +1,20 @@
#!/bin/bash #!/bin/bash
mkdir -p vscode mkdir -p vscode
cd vscode cd vscode || { echo "'vscode' dir not found"; exit 1; }
git init -q git init -q
git remote add origin https://github.com/Microsoft/vscode.git git remote add origin https://github.com/Microsoft/vscode.git
# figure out latest tag by calling MS update API # figure out latest tag by calling MS update API
if [ "$INSIDER" == "1" ]; then if [ "${INSIDER}" == "1" ]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/insider/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
elif [[ -z "${MS_TAG}" ]]; then elif [[ -z "${MS_TAG}" ]]; then
UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol) UPDATE_INFO=$(curl https://update.code.visualstudio.com/api/update/darwin/stable/lol)
export MS_COMMIT=$(echo $UPDATE_INFO | jq -r '.version') export MS_COMMIT=$(echo "${UPDATE_INFO}" | jq -r '.version')
export MS_TAG=$(echo $UPDATE_INFO | jq -r '.name') export MS_TAG=$(echo "${UPDATE_INFO}" | jq -r '.name')
else else
reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 ) reference=$( git ls-remote --tags | grep -x ".*refs\/tags\/${MS_TAG}" | head -1 )
@@ -32,13 +32,13 @@ fi
echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}" echo "Got the MS tag: ${MS_TAG} version: ${MS_COMMIT}"
git fetch --depth 1 origin $MS_COMMIT git fetch --depth 1 origin "${MS_COMMIT}"
git checkout FETCH_HEAD git checkout FETCH_HEAD
cd .. cd ..
# for GH actions # for GH actions
if [[ $GITHUB_ENV ]]; then if [[ ${GITHUB_ENV} ]]; then
echo "MS_TAG=$MS_TAG" >> $GITHUB_ENV echo "MS_TAG=${MS_TAG}" >> "${GITHUB_ENV}"
echo "MS_COMMIT=$MS_COMMIT" >> $GITHUB_ENV echo "MS_COMMIT=${MS_COMMIT}" >> "${GITHUB_ENV}"
fi fi

View File

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

View File

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

View File

@@ -1,17 +1,17 @@
diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts diff --git a/src/vs/base/common/product.ts b/src/vs/base/common/product.ts
index 1edc76f..4c0bf98 100644 index f822373..30a0a66 100644
--- a/src/vs/base/common/product.ts --- a/src/vs/base/common/product.ts
+++ b/src/vs/base/common/product.ts +++ b/src/vs/base/common/product.ts
@@ -69,6 +69,7 @@ export interface IProductConfiguration { @@ -70,6 +70,7 @@ export interface IProductConfiguration {
readonly extensionsGallery?: { readonly extensionsGallery?: {
readonly serviceUrl: string; readonly serviceUrl: string;
+ readonly cacheUrl?: string; + readonly cacheUrl?: string;
readonly itemUrl: string; readonly itemUrl: string;
readonly publisherUrl: string;
readonly resourceUrlTemplate: string; readonly resourceUrlTemplate: string;
readonly controlUrl: string;
diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts diff --git a/src/vs/platform/product/common/product.ts b/src/vs/platform/product/common/product.ts
index e22b33e..98cec93 100644 index 7e63a16..3bfeab8 100644
--- a/src/vs/platform/product/common/product.ts --- a/src/vs/platform/product/common/product.ts
+++ b/src/vs/platform/product/common/product.ts +++ b/src/vs/platform/product/common/product.ts
@@ -4,11 +4,12 @@ @@ -4,11 +4,12 @@

View File

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

View File

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

View File

@@ -5,7 +5,7 @@ set -e
cp -rp src/* vscode/ cp -rp src/* vscode/
cp -f LICENSE vscode/LICENSE.txt cp -f LICENSE vscode/LICENSE.txt
cd vscode || exit cd vscode || { echo "'vscode' dir not found"; exit 1; }
../update_settings.sh ../update_settings.sh
@@ -13,21 +13,21 @@ 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
@@ -35,8 +35,8 @@ 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 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 # 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 # from the custom headers path if dist-url option was set instead of
@@ -80,11 +80,12 @@ win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")' win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")' win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
urlProtocol='setpath(["urlProtocol"]; "vscodium")' urlProtocol='setpath(["urlProtocol"]; "vscodium")'
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscode-server-oss")' serverApplicationName='setpath(["serverApplicationName"]; "codium-server")'
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscodium-server")'
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")' reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")'
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")' licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")'
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}" product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverApplicationName} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
cat product.json.bak | jq "${product_json_changes}" > product.json.tmp cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
@@ -94,7 +95,7 @@ cat product.json
../undo_telemetry.sh ../undo_telemetry.sh
if [[ "$OS_NAME" == "linux" ]]; then if [[ "${OS_NAME}" == "linux" ]]; then
# microsoft adds their apt repo to sources # microsoft adds their apt repo to sources
# unless the app name is code-oss # unless the app name is code-oss
# as we are renaming the application to vscodium # as we are renaming the application to vscodium

View File

@@ -33,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"
@@ -46,15 +46,15 @@ do
gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" gh release upload "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"
EXIT_STATUS=$? EXIT_STATUS=$?
echo "exit: $EXIT_STATUS" echo "exit: ${EXIT_STATUS}"
if ! (( $EXIT_STATUS )); then if ! (( "${EXIT_STATUS}" )); then
break break
fi fi
done done
echo "exit: $EXIT_STATUS" echo "exit: ${EXIT_STATUS}"
if (( $EXIT_STATUS )); then if (( "${EXIT_STATUS}" )); then
echo "'${FILE}' hasn't been uploaded!" echo "'${FILE}' hasn't been uploaded!"
github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256" github-release delete --owner "${OWNER}" --repo "${REPOSITORY}" --tag "${MS_TAG}" "${FILE}" "${FILE}.sha1" "${FILE}.sha256"

View File

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

View File

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

View File

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

View File

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