From 3ab1aeedbfc9b3acfb7d736ad3ba560320a79d7a Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 27 Apr 2026 11:52:11 +0200 Subject: [PATCH] fix: disable wip appx (#2807) --- build/windows/package.sh | 2 +- build/windows/prepare_assets.sh | 2 +- .../windows/00-build-disable-appx.patch.no | 37 ------------ ....patch => 70-build-contextmenu-appx.patch} | 0 patches/windows/71-build-disable-appx.patch | 56 +++++++++++++++++++ 5 files changed, 58 insertions(+), 39 deletions(-) delete mode 100644 patches/windows/00-build-disable-appx.patch.no rename patches/windows/{00-build-contextmenu-appx.patch => 70-build-contextmenu-appx.patch} (100%) create mode 100644 patches/windows/71-build-disable-appx.patch diff --git a/build/windows/package.sh b/build/windows/package.sh index 9e051ae..560c132 100755 --- a/build/windows/package.sh +++ b/build/windows/package.sh @@ -31,7 +31,7 @@ find .build/extensions -type f -name '*.node' -print -delete npm run copy-policy-dto --prefix build node build/lib/policies/policyGenerator.ts build/lib/policies/policyData.jsonc win32 -node build/win32/explorer-dll-fetcher.ts .build/win32/appx +# node build/win32/explorer-dll-fetcher.ts .build/win32/appx npm run gulp "vscode-win32-${VSCODE_ARCH}-min-packing" diff --git a/build/windows/prepare_assets.sh b/build/windows/prepare_assets.sh index 1423005..82ee030 100644 --- a/build/windows/prepare_assets.sh +++ b/build/windows/prepare_assets.sh @@ -4,7 +4,7 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; } npm run gulp "vscode-win32-${VSCODE_ARCH}-inno-updater" -. ../build/windows/appx/build.sh +# . ../build/windows/appx/build.sh if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then 7z.exe a -tzip "../assets/${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" -x!CodeSignSummary*.md -x!tools "../VSCode-win32-${VSCODE_ARCH}/*" -r diff --git a/patches/windows/00-build-disable-appx.patch.no b/patches/windows/00-build-disable-appx.patch.no deleted file mode 100644 index b3cdf4a..0000000 --- a/patches/windows/00-build-disable-appx.patch.no +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/build/gulpfile.vscode.ts b/build/gulpfile.vscode.ts -index 080d97f3..6b1b4032 100644 ---- a/build/gulpfile.vscode.ts -+++ b/build/gulpfile.vscode.ts -@@ -620,19 +620,2 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d - .pipe(rename(f => f.dirname = `policies/${f.dirname}`))); -- -- if (quality === 'stable' || quality === 'insider') { -- result = es.merge(result, gulp.src('.build/win32/appx/**', { base: '.build/win32' })); -- const rawVersion = version.replace(/-\w+$/, '').split('.'); -- const appxVersion = `${rawVersion[0]}.0.${rawVersion[1]}.${rawVersion[2]}`; -- result = es.merge(result, gulp.src('resources/win32/appx/AppxManifest.xml', { base: '.' }) -- .pipe(replace('@@AppxPackageName@@', product.win32AppUserModelId)) -- .pipe(replace('@@AppxPackageVersion@@', appxVersion)) -- .pipe(replace('@@AppxPackageDisplayName@@', product.nameLong)) -- .pipe(replace('@@AppxPackageDescription@@', product.win32NameVersion)) -- .pipe(replace('@@ApplicationIdShort@@', product.win32RegValueName)) -- .pipe(replace('@@ApplicationExe@@', product.nameShort + '.exe')) -- .pipe(replace('@@FileExplorerContextMenuID@@', quality === 'stable' ? 'OpenWithCode' : 'OpenWithCodeInsiders')) -- .pipe(replace('@@FileExplorerContextMenuCLSID@@', (product as { win32ContextMenu?: Record }).win32ContextMenu![arch].clsid)) -- .pipe(replace('@@FileExplorerContextMenuDLL@@', `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`)) -- .pipe(rename(f => f.dirname = `appx/manifest`))); -- } - } else if (platform === 'linux') { -diff --git a/build/gulpfile.vscode.win32.ts b/build/gulpfile.vscode.win32.ts -index 7a711276..e6a838e2 100644 ---- a/build/gulpfile.vscode.win32.ts -+++ b/build/gulpfile.vscode.win32.ts -@@ -133,8 +133,2 @@ function buildWin32Setup(arch: string, target: string): task.CallbackTask { - -- if (quality === 'stable' || quality === 'insider') { -- definitions['AppxPackage'] = `${quality === 'stable' ? 'code' : 'code_insider'}_${arch}.appx`; -- definitions['AppxPackageDll'] = `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`; -- definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; -- } -- - fs.writeFileSync(productJsonPath, JSON.stringify(productJson, undefined, '\t')); diff --git a/patches/windows/00-build-contextmenu-appx.patch b/patches/windows/70-build-contextmenu-appx.patch similarity index 100% rename from patches/windows/00-build-contextmenu-appx.patch rename to patches/windows/70-build-contextmenu-appx.patch diff --git a/patches/windows/71-build-disable-appx.patch b/patches/windows/71-build-disable-appx.patch new file mode 100644 index 0000000..bc342fd --- /dev/null +++ b/patches/windows/71-build-disable-appx.patch @@ -0,0 +1,56 @@ +diff --git a/build/gulpfile.vscode.ts b/build/gulpfile.vscode.ts +index b01d710a..303d2f68 100644 +--- a/build/gulpfile.vscode.ts ++++ b/build/gulpfile.vscode.ts +@@ -621,18 +621,18 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d + +- if (quality === 'stable' || quality === 'insider') { +- result = es.merge(result, gulp.src('.build/win32/appx/**', { base: '.build/win32' })); +- const rawVersion = version.replace(/-\w+$/, '').split('.'); +- const appxVersion = `${rawVersion[0]}.0.${rawVersion[1]}.${rawVersion[2].slice(1)}`; +- result = es.merge(result, gulp.src('resources/win32/appx/AppxManifest.xml', { base: '.' }) +- .pipe(replace('@@AppxPackageName@@', product.win32AppUserModelId)) +- .pipe(replace('@@AppxPackageVersion@@', appxVersion)) +- .pipe(replace('@@AppxPackageDisplayName@@', product.nameLong)) +- .pipe(replace('@@AppxPackageDescription@@', product.win32NameVersion)) +- .pipe(replace('@@ApplicationIdShort@@', product.win32RegValueName)) +- .pipe(replace('@@ApplicationExe@@', product.nameShort + '.exe')) +- .pipe(replace('@@FileExplorerContextMenuID@@', quality === 'stable' ? 'OpenWithCode' : 'OpenWithCodeInsiders')) +- .pipe(replace('@@FileExplorerContextMenuCLSID@@', (product as { win32ContextMenu?: Record }).win32ContextMenu![arch].clsid)) +- .pipe(replace('@@FileExplorerContextMenuDLL@@', `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`)) +- .pipe(rename(f => f.dirname = `appx/manifest`))); +- } ++ // if (quality === 'stable' || quality === 'insider') { ++ // result = es.merge(result, gulp.src('.build/win32/appx/**', { base: '.build/win32' })); ++ // const rawVersion = version.replace(/-\w+$/, '').split('.'); ++ // const appxVersion = `${rawVersion[0]}.0.${rawVersion[1]}.${rawVersion[2].slice(1)}`; ++ // result = es.merge(result, gulp.src('resources/win32/appx/AppxManifest.xml', { base: '.' }) ++ // .pipe(replace('@@AppxPackageName@@', product.win32AppUserModelId)) ++ // .pipe(replace('@@AppxPackageVersion@@', appxVersion)) ++ // .pipe(replace('@@AppxPackageDisplayName@@', product.nameLong)) ++ // .pipe(replace('@@AppxPackageDescription@@', product.win32NameVersion)) ++ // .pipe(replace('@@ApplicationIdShort@@', product.win32RegValueName)) ++ // .pipe(replace('@@ApplicationExe@@', product.nameShort + '.exe')) ++ // .pipe(replace('@@FileExplorerContextMenuID@@', quality === 'stable' ? 'OpenWithCode' : 'OpenWithCodeInsiders')) ++ // .pipe(replace('@@FileExplorerContextMenuCLSID@@', (product as { win32ContextMenu?: Record }).win32ContextMenu![arch].clsid)) ++ // .pipe(replace('@@FileExplorerContextMenuDLL@@', `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`)) ++ // .pipe(rename(f => f.dirname = `appx/manifest`))); ++ // } + } else if (platform === 'linux') { +diff --git a/build/gulpfile.vscode.win32.ts b/build/gulpfile.vscode.win32.ts +index 2675bd85..51723721 100644 +--- a/build/gulpfile.vscode.win32.ts ++++ b/build/gulpfile.vscode.win32.ts +@@ -133,7 +133,7 @@ function buildWin32Setup(arch: string, target: string): task.CallbackTask { + +- if (quality === 'stable' || quality === 'insider') { +- definitions['AppxPackage'] = `${product.applicationName.replaceAll('-', '_')}_${arch}.appx`; +- definitions['AppxPackageDll'] = `${product.applicationName.replaceAll('-', '_')}_explorer_command_${arch}.dll`; +- definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; +- } ++ // if (quality === 'stable' || quality === 'insider') { ++ // definitions['AppxPackage'] = `${product.applicationName.replaceAll('-', '_')}_${arch}.appx`; ++ // definitions['AppxPackageDll'] = `${product.applicationName.replaceAll('-', '_')}_explorer_command_${arch}.dll`; ++ // definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; ++ // } +