mirror of
https://github.com/VSCodium/vscodium.git
synced 2025-01-03 14:52:19 +03:00
feat: build successfully with new patches
This commit is contained in:
parent
4e1058ef10
commit
aa508b1322
@ -9,8 +9,14 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"
|
|||||||
WIN_SDK_MAJOR_VERSION="10"
|
WIN_SDK_MAJOR_VERSION="10"
|
||||||
WIN_SDK_FULL_VERSION="10.0.17763.0"
|
WIN_SDK_FULL_VERSION="10.0.17763.0"
|
||||||
|
|
||||||
PRODUCT_NAME="VSCodium"
|
if [[ "${INSIDER}" == "yes" ]]; then
|
||||||
PRODUCT_SKU="vscodium"
|
PRODUCT_NAME="VSCodium - Insiders"
|
||||||
|
PRODUCT_SKU="vscodium-insiders"
|
||||||
|
else
|
||||||
|
PRODUCT_NAME="VSCodium"
|
||||||
|
PRODUCT_SKU="vscodium"
|
||||||
|
fi
|
||||||
|
|
||||||
PRODUCT_ID=$( powershell.exe -command "[guid]::NewGuid().ToString().ToUpper()" )
|
PRODUCT_ID=$( powershell.exe -command "[guid]::NewGuid().ToString().ToUpper()" )
|
||||||
PRODUCT_ID="${PRODUCT_ID%%[[:cntrl:]]}"
|
PRODUCT_ID="${PRODUCT_ID%%[[:cntrl:]]}"
|
||||||
|
|
||||||
@ -36,7 +42,6 @@ else
|
|||||||
export PLATFORM="${VSCODE_ARCH}"
|
export PLATFORM="${VSCODE_ARCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
BuildSetupTranslationTransform() {
|
BuildSetupTranslationTransform() {
|
||||||
local CULTURE=${1}
|
local CULTURE=${1}
|
||||||
local LANGID=${2}
|
local LANGID=${2}
|
||||||
@ -60,7 +65,7 @@ BuildSetupTranslationTransform() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
"${WIX}bin\\heat.exe" dir "${BINARY_DIR}" -out "Files-${OUTPUT_BASE_FILENAME}.wxs" -t vscodium.xsl -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.AppName -var var.ProductVersion -var var.IconDir -var var.LicenseDir -var var.BinaryDir -dr APPLICATIONFOLDER -platform "${PLATFORM}"
|
"${WIX}bin\\heat.exe" dir "${BINARY_DIR}" -out "Files-${OUTPUT_BASE_FILENAME}.wxs" -t vscodium.xsl -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.AppName -var var.ProductVersion -var var.IconDir -var var.LicenseDir -var var.BinaryDir -dr APPLICATIONFOLDER -platform "${PLATFORM}"
|
||||||
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dAppName=${PRODUCT_NAME} -dProductVersion="${RELEASE_VERSION}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
|
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dAppName="${PRODUCT_NAME}" -dProductVersion="${RELEASE_VERSION%-insider}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
|
||||||
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
|
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" -loc "i18n\\${PRODUCT_SKU}.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
|
||||||
|
|
||||||
BuildSetupTranslationTransform de-de 1031
|
BuildSetupTranslationTransform de-de 1031
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"tag": "1.71.0",
|
"tag": "1.71.0",
|
||||||
"commit": "8e42bda5487a953d59fab7792eedd4ca209cabba"
|
"commit": "7ed02a69658fc07f08740b98fa0d8d96c1a61ed4"
|
||||||
}
|
}
|
||||||
|
21
patches/insider/disable-sandbox.patch
Normal file
21
patches/insider/disable-sandbox.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff --git a/src/vs/platform/windows/electron-main/windowImpl.ts b/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||||
|
index c9501cb..a6958ff 100644
|
||||||
|
--- a/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||||
|
+++ b/src/vs/platform/windows/electron-main/windowImpl.ts
|
||||||
|
@@ -42,7 +42,6 @@ import { Color } from 'vs/base/common/color';
|
||||||
|
import { IPolicyService } from 'vs/platform/policy/common/policy';
|
||||||
|
import { IUserDataProfile } from 'vs/platform/userDataProfile/common/userDataProfile';
|
||||||
|
import { IStateMainService } from 'vs/platform/state/electron-main/state';
|
||||||
|
-import product from 'vs/platform/product/common/product';
|
||||||
|
import { IUserDataProfilesMainService } from 'vs/platform/userDataProfile/electron-main/userDataProfile';
|
||||||
|
|
||||||
|
export interface IWindowCreationOptions {
|
||||||
|
@@ -203,7 +202,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||||
|
if (typeof windowSettings?.experimental?.useSandbox === 'boolean') {
|
||||||
|
useSandbox = windowSettings.experimental.useSandbox;
|
||||||
|
} else {
|
||||||
|
- useSandbox = typeof product.quality === 'string' && product.quality !== 'stable';
|
||||||
|
+ useSandbox = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const options: BrowserWindowConstructorOptions & { experimentalDarkMode: boolean } = {
|
13
patches/insider/system-extensions.patch
Normal file
13
patches/insider/system-extensions.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||||
|
index 81bf4b2..5a88688 100644
|
||||||
|
--- a/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||||
|
+++ b/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts
|
||||||
|
@@ -233,7 +233,7 @@ export class Extension implements IExtension {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Do not allow updating system extensions in stable
|
||||||
|
- if (this.type === ExtensionType.System && this.productService.quality === 'stable') {
|
||||||
|
+ if (this.type === ExtensionType.System) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!this.local.preRelease && this.gallery.properties.isPreReleaseVersion) {
|
@ -25,6 +25,18 @@ for file in ../patches/*.patch; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ "${INSIDER}" == "yes" ]]; then
|
||||||
|
for file in ../patches/insider/*.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}" 1>&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
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}";
|
||||||
@ -54,53 +66,86 @@ else
|
|||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv product.json product.json.bak
|
cp product.json product.json.bak
|
||||||
|
|
||||||
|
setpath() {
|
||||||
|
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --arg 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
setpath_json() {
|
||||||
|
echo "$( cat "${1}.json" | jq --arg 'path' "${2}" --argjson 'value' "${3}" 'setpath([$path]; $value)' )" > "${1}.json"
|
||||||
|
}
|
||||||
|
|
||||||
# set fields in product.json
|
# set fields in product.json
|
||||||
checksumFailMoreInfoUrl='setpath(["checksumFailMoreInfoUrl"]; "https://go.microsoft.com/fwlink/?LinkId=828886")'
|
setpath "product" "checksumFailMoreInfoUrl" "https://go.microsoft.com/fwlink/?LinkId=828886"
|
||||||
tipsAndTricksUrl='setpath(["tipsAndTricksUrl"]; "https://go.microsoft.com/fwlink/?linkid=852118")'
|
setpath "product" "documentationUrl" "https://go.microsoft.com/fwlink/?LinkID=533484#vscode"
|
||||||
twitterUrl='setpath(["twitterUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533687")'
|
setpath_json "product" "extensionsGallery" '{"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item"}'
|
||||||
requestFeatureUrl='setpath(["requestFeatureUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533482")'
|
setpath "product" "introductoryVideosUrl" "https://go.microsoft.com/fwlink/?linkid=832146"
|
||||||
documentationUrl='setpath(["documentationUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533484#vscode")'
|
setpath "product" "keyboardShortcutsUrlLinux" "https://go.microsoft.com/fwlink/?linkid=832144"
|
||||||
introductoryVideosUrl='setpath(["introductoryVideosUrl"]; "https://go.microsoft.com/fwlink/?linkid=832146")'
|
setpath "product" "keyboardShortcutsUrlMac" "https://go.microsoft.com/fwlink/?linkid=832143"
|
||||||
updateUrl='setpath(["updateUrl"]; "https://vscodium.now.sh")'
|
setpath "product" "keyboardShortcutsUrlWin" "https://go.microsoft.com/fwlink/?linkid=832145"
|
||||||
releaseNotesUrl='setpath(["releaseNotesUrl"]; "https://go.microsoft.com/fwlink/?LinkID=533483#vscode")'
|
setpath "product" "licenseUrl" "https://github.com/VSCodium/vscodium/blob/master/LICENSE"
|
||||||
keyboardShortcutsUrlMac='setpath(["keyboardShortcutsUrlMac"]; "https://go.microsoft.com/fwlink/?linkid=832143")'
|
setpath "product" "linkProtectionTrustedDomains" '["https://open-vsx.org"]'
|
||||||
keyboardShortcutsUrlLinux='setpath(["keyboardShortcutsUrlLinux"]; "https://go.microsoft.com/fwlink/?linkid=832144")'
|
setpath "product" "linuxIconName" "vscodium"
|
||||||
keyboardShortcutsUrlWin='setpath(["keyboardShortcutsUrlWin"]; "https://go.microsoft.com/fwlink/?linkid=832145")'
|
setpath "product" "releaseNotesUrl" "https://go.microsoft.com/fwlink/?LinkID=533483#vscode"
|
||||||
quality='setpath(["quality"]; "stable")'
|
setpath "product" "reportIssueUrl" "https://github.com/VSCodium/vscodium/issues/new"
|
||||||
extensionsGallery='setpath(["extensionsGallery"]; {"serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item"})'
|
setpath "product" "requestFeatureUrl" "https://go.microsoft.com/fwlink/?LinkID=533482"
|
||||||
linkProtectionTrustedDomains='setpath(["linkProtectionTrustedDomains"]; ["https://open-vsx.org"])'
|
setpath "product" "tipsAndTricksUrl" "https://go.microsoft.com/fwlink/?linkid=852118"
|
||||||
nameShort='setpath(["nameShort"]; "VSCodium")'
|
setpath "product" "twitterUrl" "https://go.microsoft.com/fwlink/?LinkID=533687"
|
||||||
nameLong='setpath(["nameLong"]; "VSCodium")'
|
setpath "product" "updateUrl" "https://vscodium.now.sh"
|
||||||
linuxIconName='setpath(["linuxIconName"]; "vscodium")'
|
|
||||||
applicationName='setpath(["applicationName"]; "codium")'
|
|
||||||
win32MutexName='setpath(["win32MutexName"]; "vscodium")'
|
|
||||||
win32DirName='setpath(["win32DirName"]; "VSCodium")'
|
|
||||||
win32NameVersion='setpath(["win32NameVersion"]; "VSCodium")'
|
|
||||||
win32RegValueName='setpath(["win32RegValueName"]; "VSCodium")'
|
|
||||||
win32AppUserModelId='setpath(["win32AppUserModelId"]; "Microsoft.VSCodium")'
|
|
||||||
win32ShellNameShort='setpath(["win32ShellNameShort"]; "VSCodium")'
|
|
||||||
win32x64UserAppId='setpath (["win32x64UserAppId"]; "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}")'
|
|
||||||
urlProtocol='setpath(["urlProtocol"]; "vscodium")'
|
|
||||||
serverApplicationName='setpath(["serverApplicationName"]; "codium-server")'
|
|
||||||
serverDataFolderName='setpath(["serverDataFolderName"]; ".vscodium-server")'
|
|
||||||
reportIssueUrl='setpath(["reportIssueUrl"]; "https://github.com/VSCodium/vscodium/issues/new")'
|
|
||||||
licenseUrl='setpath(["licenseUrl"]; "https://github.com/VSCodium/vscodium/blob/master/LICENSE")'
|
|
||||||
|
|
||||||
product_json_changes="${checksumFailMoreInfoUrl} | ${tipsAndTricksUrl} | ${twitterUrl} | ${requestFeatureUrl} | ${documentationUrl} | ${introductoryVideosUrl} | ${updateUrl} | ${releaseNotesUrl} | ${keyboardShortcutsUrlMac} | ${keyboardShortcutsUrlLinux} | ${keyboardShortcutsUrlWin} | ${quality} | ${extensionsGallery} | ${linkProtectionTrustedDomains} | ${nameShort} | ${nameLong} | ${linuxIconName} | ${applicationName} | ${win32MutexName} | ${win32DirName} | ${win32NameVersion} | ${win32RegValueName} | ${win32AppUserModelId} | ${win32ShellNameShort} | ${win32x64UserAppId} | ${urlProtocol} | ${serverApplicationName} | ${serverDataFolderName} | ${reportIssueUrl} | ${licenseUrl}"
|
if [[ "${INSIDER}" == "yes" ]]; then
|
||||||
cat product.json.bak | jq "${product_json_changes}" > product.json.tmp
|
setpath "product" "nameShort" "VSCodium - Insiders"
|
||||||
|
setpath "product" "nameLong" "VSCodium - Insiders"
|
||||||
|
setpath "product" "applicationName" "codium-insiders"
|
||||||
|
setpath "product" "dataFolderName" ".vscodium-insiders"
|
||||||
|
setpath "product" "quality" "insider"
|
||||||
|
setpath "product" "urlProtocol" "vscodium-insiders"
|
||||||
|
setpath "product" "serverApplicationName" "codium-server-insiders"
|
||||||
|
setpath "product" "serverDataFolderName" ".vscodium-server-insiders"
|
||||||
|
setpath "product" "darwinBundleIdentifier" "com.vscodium.VSCodiumInsiders"
|
||||||
|
setpath "product" "win32AppUserModelId" "VSCodium.VSCodiumInsiders"
|
||||||
|
setpath "product" "win32DirName" "VSCodium Insiders"
|
||||||
|
setpath "product" "win32MutexName" "vscodiuminsiders"
|
||||||
|
setpath "product" "win32NameVersion" "VSCodium Insiders"
|
||||||
|
setpath "product" "win32RegValueName" "VSCodiumInsiders"
|
||||||
|
setpath "product" "win32ShellNameShort" "VSCodium Insiders"
|
||||||
|
setpath "product" "win32AppId" "{{EF35BB36-FA7E-4BB9-B7DA-D1E09F2DA9C9}"
|
||||||
|
setpath "product" "win32x64AppId" "{{B2E0DDB2-120E-4D34-9F7E-8C688FF839A2}"
|
||||||
|
setpath "product" "win32arm64AppId" "{{44721278-64C6-4513-BC45-D48E07830599}"
|
||||||
|
setpath "product" "win32UserAppId" "{{ED2E5618-3E7E-4888-BF3C-A6CCC84F586F}"
|
||||||
|
setpath "product" "win32x64UserAppId" "{{20F79D0D-A9AC-4220-9A81-CE675FFB6B41}"
|
||||||
|
setpath "product" "win32arm64UserAppId" "{{2E362F92-14EA-455A-9ABD-3E656BBBFE71}"
|
||||||
|
else
|
||||||
|
setpath "product" "nameShort" "VSCodium"
|
||||||
|
setpath "product" "nameLong" "VSCodium"
|
||||||
|
setpath "product" "applicationName" "codium"
|
||||||
|
setpath "product" "quality" "stable"
|
||||||
|
setpath "product" "urlProtocol" "vscodium"
|
||||||
|
setpath "product" "serverApplicationName" "codium-server"
|
||||||
|
setpath "product" "serverDataFolderName" ".vscodium-server"
|
||||||
|
setpath "product" "darwinBundleIdentifier" "com.vscodium"
|
||||||
|
setpath "product" "win32AppUserModelId" "VSCodium.VSCodium"
|
||||||
|
setpath "product" "win32DirName" "VSCodium"
|
||||||
|
setpath "product" "win32MutexName" "vscodium"
|
||||||
|
setpath "product" "win32NameVersion" "VSCodium"
|
||||||
|
setpath "product" "win32RegValueName" "VSCodium"
|
||||||
|
setpath "product" "win32ShellNameShort" "VSCodium"
|
||||||
|
setpath "product" "win32AppId" "{{763CBF88-25C6-4B10-952F-326AE657F16B}"
|
||||||
|
setpath "product" "win32x64AppId" "{{88DA3577-054F-4CA1-8122-7D820494CFFB}"
|
||||||
|
setpath "product" "win32arm64AppId" "{{67DEE444-3D04-4258-B92A-BC1F0FF2CAE4}"
|
||||||
|
setpath "product" "win32UserAppId" "{{0FD05EB4-651E-4E78-A062-515204B47A3A}"
|
||||||
|
setpath "product" "win32x64UserAppId" "{{2E1F05D1-C245-4562-81EE-28188DB6FD17}"
|
||||||
|
setpath "product" "win32arm64UserAppId" "{{57FD70A5-1B8D-4875-9F40-C5553F094828}"
|
||||||
|
fi
|
||||||
|
|
||||||
jq -s '.[0] * .[1]' product.json.tmp ../product.json > product.json
|
echo "$( jq -s '.[0] * .[1]' product.json ../product.json )" > product.json
|
||||||
rm -f product.json.tmp
|
|
||||||
|
|
||||||
cat product.json
|
cat product.json
|
||||||
|
|
||||||
mv package.json package.json.bak
|
cp package.json package.json.bak
|
||||||
package_json_changes="setpath(["\""version"\""]; "\""${RELEASE_VERSION}"\"") | setpath(["\""release"\""]; "\""${RELEASE_VERSION}"\"")"
|
setpath "package" "version" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\1/p" )
|
||||||
cat package.json.bak | jq "${package_json_changes}" > package.json
|
setpath "package" "release" $( echo "${RELEASE_VERSION}" | sed -n -E "s/^(.*)\.([0-9]+)(-insider)?$/\2/p" )
|
||||||
gsed -i -E 's/"version": "(.*)\.([0-9]+)(-insider)?"/"version": "\1\3"/' package.json
|
|
||||||
gsed -i -E 's/"release": "(.*)\.([0-9]+)(-insider)?"/"release": "\2"/' package.json
|
|
||||||
|
|
||||||
../undo_telemetry.sh
|
../undo_telemetry.sh
|
||||||
|
|
||||||
@ -109,7 +154,11 @@ if [[ "${OS_NAME}" == "linux" ]]; then
|
|||||||
# 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
|
||||||
# we need to edit a line in the post install template
|
# we need to edit a line in the post install template
|
||||||
sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template
|
if [[ "${INSIDER}" == "yes" ]]; then
|
||||||
|
sed -i "s/code-oss/codium-insiders/" resources/linux/debian/postinst.template
|
||||||
|
else
|
||||||
|
sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template
|
||||||
|
fi
|
||||||
|
|
||||||
# fix the packages metadata
|
# fix the packages metadata
|
||||||
# code.appdata.xml
|
# code.appdata.xml
|
||||||
|
Loading…
Reference in New Issue
Block a user