Merge branch 'master' into insider

This commit is contained in:
Baptiste Augrain
2023-08-04 00:22:50 +02:00
27 changed files with 236 additions and 263 deletions

View File

@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC2129
### Windows
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
@@ -13,7 +14,7 @@ export SKIP_SOURCE="no"
export VSCODE_LATEST="no"
export VSCODE_QUALITY="stable"
while getopts ":ilop" opt; do
while getopts ":ilops" opt; do
case "$opt" in
i)
export VSCODE_QUALITY="insider"
@@ -30,6 +31,8 @@ while getopts ":ilop" opt; do
s)
export SKIP_SOURCE="yes"
;;
*)
;;
esac
done
@@ -100,7 +103,8 @@ if [[ "${SKIP_BUILD}" == "no" ]]; then
. build.sh
if [[ "${VSCODE_QUALITY}" == "insider" && "${VSCODE_LATEST}" == "yes" ]]; then
echo "$( cat "insider.json" | jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. | .tag=$tag | .commit=$commit' )" > "insider.json"
jsonTmp=$( jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit' )
echo "${jsonTmp}" > "insider.json" && unset jsonTmp
fi
fi

View File

@@ -1,6 +1,7 @@
#!/bin/bash
#!/usr/bin/env bash
# shellcheck disable=SC1091
exists() { type -t "$1" > /dev/null 2>&1; }
exists() { type -t "$1" &> /dev/null; }
export APP_NAME="VSCodium"
export CI_BUILD="no"
@@ -19,7 +20,9 @@ while getopts ":ilp" opt; do
export VSCODE_LATEST="yes"
;;
p)
export SKIP_ASSETS="no"
export SKIP_ASSETS="no"
;;
*)
;;
esac
done

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
@@ -15,11 +15,11 @@ if [[ "${VSCODE_ARCH}" == "x64" ]]; then
exit 1
fi
wget -c "${APPIMAGE_URL}"
wget -c "${APPIMAGE_URL}" -O pkg2appimage.AppImage
chmod +x ./pkg2appimage-*.AppImage
chmod +x ./pkg2appimage.AppImage
./pkg2appimage-*.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
./pkg2appimage.AppImage --appimage-extract && mv ./squashfs-root ./pkg2appimage.AppDir
# add update's url
sed -i 's/generate_type2_appimage/generate_type2_appimage -u "gh-releases-zsync|VSCodium|vscodium|latest|*.AppImage.zsync"/' pkg2appimage.AppDir/AppRun

View File

@@ -1,23 +1,25 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
export VSCODE_QUALITY="stable"
while getopts ":ilp" opt; do
while getopts ":i" opt; do
case "$opt" in
i)
export VSCODE_QUALITY="insider"
;;
*)
;;
esac
done
URL=`curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/'`
URL=$( curl -s "https://update.code.visualstudio.com/api/update/win32-x64-archive/${VSCODE_QUALITY}/0000000000000000000000000000000000000000" | jq -c '.url' | sed -E 's/.*"([^"]+)".*/\1/' )
# echo "url: ${URL}"
FILE=`echo "${URL}" | sed -E 's|.*/([^/]+\.zip)$|\1|'`
FILE="${URL##*/}"
# echo "file: ${FILE}"
DIRECTORY=`echo "${URL}" | sed -E 's|.*/([^/]+)\.zip$|\1|'`
DIRECTORY="${FILE%.zip}"
# echo "directory: ${DIRECTORY}"
if [[ ! -f "${FILE}" ]]; then
@@ -28,8 +30,9 @@ if [[ ! -d "${DIRECTORY}" ]]; then
unzip "${FILE}" -d "${DIRECTORY}"
fi
APIS=`cat ${DIRECTORY}/resources/app/product.json | jq -r '.extensionEnabledApiProposals'`
APIS=$( jq -r '.extensionEnabledApiProposals' "${DIRECTORY}/resources/app/product.json" )
APIS=`echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}'`
APIS=$( echo "${APIS}" | jq '. += {"jeanp413.open-remote-ssh": ["resolvers", "tunnels", "terminalDataWriteEvent", "contribRemoteHelp", "contribViewsRemote"]}' )
cat <<< $(jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json) > product.json
jsonTmp=$( jq --argjson v "${APIS}" 'setpath(["extensionEnabledApiProposals"]; $v)' product.json )
echo "${jsonTmp}" > product.json && unset jsonTmp

View File

@@ -1,12 +1,14 @@
#!/bin/bash
#!/usr/bin/env bash
export VSCODE_QUALITY="stable"
while getopts ":ilp" opt; do
while getopts ":i" opt; do
case "$opt" in
i)
export VSCODE_QUALITY="insider"
;;
*)
;;
esac
done
@@ -16,16 +18,15 @@ git add .
git reset -q --hard HEAD
for FILE in ../patches/*.patch; do
if [ -f "${FILE}" ]; then
if [[ -f "${FILE}" ]]; then
echo applying patch: "${FILE}"
git apply --ignore-whitespace "${FILE}"
if [ $? -ne 0 ]; then
if ! git apply --ignore-whitespace "${FILE}"; then
echo failed to apply patch "${FILE}"
git apply --reject "${FILE}"
git apply --reject "../patches/helper/settings.patch"
read -p "Press any key when the conflict have been resolved..." -n1 -s
read -rp "Press any key when the conflict have been resolved..." -n1 -s
git restore .vscode/settings.json
git add .
@@ -38,16 +39,15 @@ done
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
for FILE in ../patches/insider/*.patch; do
if [ -f "${FILE}" ]; then
if [[ -f "${FILE}" ]]; then
echo applying patch: "${FILE}"
git apply --ignore-whitespace "${FILE}"
if [ $? -ne 0 ]; then
if ! git apply --ignore-whitespace "${FILE}"; then
echo failed to apply patch "${FILE}"
git apply --reject "${FILE}"
git apply --reject "../patches/helper/settings.patch"
read -p "Press any key when the conflict have been resolved..." -n1 -s
read -rp "Press any key when the conflict have been resolved..." -n1 -s
git restore .vscode/settings.json
git add .

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
@@ -10,9 +10,8 @@ SCRIPT_DIR=$( pwd )
cd "../../../VSCode-win32-${VSCODE_ARCH}/resources/app"
cp product.json product.json.bak
cat product.json.bak | jq "del(.updateUrl)" > product.json
rm -f product.json.bak
jsonTmp=$( jq "del(.updateUrl)" product.json )
echo "${jsonTmp}" > product.json && unset jsonTmp
cd "${SCRIPT_DIR}"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -ex
@@ -11,14 +11,12 @@ WIN_SDK_FULL_VERSION="10.0.17763.0"
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
PRODUCT_NAME="VSCodium - Insiders"
PRODUCT_SKU="vscodium-insiders"
PRODUCT_CODE="VSCodiumInsiders"
PRODUCT_UPGRADE_CODE="1C9B7195-5A9A-43B3-B4BD-583E20498467"
ICON_DIR="..\\..\\..\\src\\insider\\resources\\win32"
SETUP_RESOURCES_DIR=".\\resources\\insider"
else
PRODUCT_NAME="VSCodium"
PRODUCT_SKU="vscodium"
PRODUCT_CODE="VSCodium"
PRODUCT_UPGRADE_CODE="965370CD-253C-4720-82FC-2E6B02A53808"
ICON_DIR="..\\..\\..\\src\\stable\\resources\\win32"
@@ -51,7 +49,7 @@ fi
sed -i "s|@@PRODUCT_UPGRADE_CODE@@|${PRODUCT_UPGRADE_CODE}|g" .\\includes\\vscodium-variables.wxi
sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" .\\vscodium.xsl
find i18n -name '*.wxl' -exec sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g" {} \;
find i18n -name '*.wxl' -print0 | xargs -0 sed -i "s|@@PRODUCT_NAME@@|${PRODUCT_NAME}|g"
BuildSetupTranslationTransform() {
local CULTURE=${1}

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
cd "$( dirname "${BASH_SOURCE[0]}" )"/../../../vscode || { echo "'vscode' dir not found"; exit 1; }