From e4091b268cbe89db92332e7bc8596f29797b1c01 Mon Sep 17 00:00:00 2001 From: Baptiste Augrain Date: Mon, 4 Aug 2025 14:47:08 +0200 Subject: [PATCH] fix(windows): disable appx --- patches/windows/setup.patch | 57 +++++++++++++++++++++++++++++++++---- prepare_assets.sh | 2 +- 2 files changed, 52 insertions(+), 7 deletions(-) diff --git a/patches/windows/setup.patch b/patches/windows/setup.patch index 5892b42..bd4934f 100644 --- a/patches/windows/setup.patch +++ b/patches/windows/setup.patch @@ -1,11 +1,56 @@ +diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js +index 25d8916..95863d2 100644 +--- a/build/gulpfile.vscode.js ++++ b/build/gulpfile.vscode.js +@@ -406,18 +406,18 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op + +- if (quality !== 'exploration') { +- 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.win32ContextMenu[arch].clsid)) +- .pipe(replace('@@FileExplorerContextMenuDLL@@', `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`)) +- .pipe(rename(f => f.dirname = `appx/manifest`))); +- } ++ // if (quality !== 'exploration') { ++ // 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.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.js b/build/gulpfile.vscode.win32.js -index 0c4dc52..0e8db9b 100644 +index 0c4dc52..156322b 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js -@@ -115,4 +115,4 @@ function buildWin32Setup(arch, target) { - if (quality !== 'exploration') { +@@ -114,7 +114,7 @@ function buildWin32Setup(arch, target) { + +- if (quality !== 'exploration') { - definitions['AppxPackage'] = `${quality === 'stable' ? 'code' : 'code_insider'}_${arch}.appx`; - definitions['AppxPackageDll'] = `${quality === 'stable' ? 'code' : 'code_insider'}_explorer_command_${arch}.dll`; -+ definitions['AppxPackage'] = `${product.applicationName.replace(/-/g, '_')}_${arch}.appx`; -+ definitions['AppxPackageDll'] = `${product.applicationName.replace(/-/g, '_')}_explorer_command_${arch}.dll`; - definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; +- definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; +- } ++ // if (quality !== 'exploration') { ++ // definitions['AppxPackage'] = `${product.applicationName.replace(/-/g, '_')}_${arch}.appx`; ++ // definitions['AppxPackageDll'] = `${product.applicationName.replace(/-/g, '_')}_explorer_command_${arch}.dll`; ++ // definitions['AppxPackageName'] = `${product.win32AppUserModelId}`; ++ // } + diff --git a/prepare_assets.sh b/prepare_assets.sh index df4c58d..0e7e0b5 100755 --- a/prepare_assets.sh +++ b/prepare_assets.sh @@ -101,7 +101,7 @@ elif [[ "${OS_NAME}" == "windows" ]]; then 7z.exe a -tzip "../assets/${APP_NAME}-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip" -x!CodeSignSummary*.md -x!tools "../VSCode-win32-${VSCODE_ARCH}/*" -r fi - . ../build/windows/appx/build.sh + # . ../build/windows/appx/build.sh if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then npm run gulp "vscode-win32-${VSCODE_ARCH}-system-setup"