mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-26 21:00:15 +10:00
build(win32): appx contextmenu (#2801)
This commit is contained in:
2
.github/workflows/ci-build-windows.yml
vendored
2
.github/workflows/ci-build-windows.yml
vendored
@@ -109,6 +109,8 @@ jobs:
|
||||
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
|
||||
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
|
||||
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
|
||||
SHOULD_BUILD_REH: no
|
||||
SHOULD_BUILD_REH_WEB: no
|
||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||
outputs:
|
||||
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
|
||||
|
||||
@@ -8,7 +8,7 @@ export PATH="${SDK}:${PATH}"
|
||||
|
||||
APPX_NAME="${BINARY_NAME//-/_}"
|
||||
|
||||
makeappx pack /d "../../../VSCode-win32-${VSCODE_ARCH}/appx/manifest" /p "../../../VSCode-win32-${VSCODE_ARCH}/appx/${APPX_NAME}_${VSCODE_ARCH}.appx" /nv
|
||||
powershell "makeappx pack /d ..\\VSCode-win32-${VSCODE_ARCH}\\appx\\manifest /p ..\\VSCode-win32-${VSCODE_ARCH}\\appx\\${APPX_NAME}_${VSCODE_ARCH}.appx /nv"
|
||||
|
||||
# Remove the raw manifest folder
|
||||
rm -rf "../../../VSCode-win32-${VSCODE_ARCH}/appx/manifest"
|
||||
rm -rf "../VSCode-win32-${VSCODE_ARCH}/appx/manifest"
|
||||
|
||||
@@ -31,6 +31,8 @@ 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
|
||||
|
||||
npm run gulp "vscode-win32-${VSCODE_ARCH}-min-packing"
|
||||
|
||||
. ../build_cli.sh
|
||||
|
||||
@@ -4,12 +4,12 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
|
||||
npm run gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
||||
|
||||
. ../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
|
||||
fi
|
||||
|
||||
# . ../build/windows/appx/build.sh
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||
npm run gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
|
||||
fi
|
||||
|
||||
File diff suppressed because one or more lines are too long
37
patches/windows/00-build-contextmenu-appx.patch
Normal file
37
patches/windows/00-build-contextmenu-appx.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
diff --git a/build/gulpfile.vscode.ts b/build/gulpfile.vscode.ts
|
||||
index 080d97f3..b01d710a 100644
|
||||
--- a/build/gulpfile.vscode.ts
|
||||
+++ b/build/gulpfile.vscode.ts
|
||||
@@ -624,3 +624,3 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d
|
||||
const rawVersion = version.replace(/-\w+$/, '').split('.');
|
||||
- const appxVersion = `${rawVersion[0]}.0.${rawVersion[1]}.${rawVersion[2]}`;
|
||||
+ const appxVersion = `${rawVersion[0]}.0.${rawVersion[1]}.${rawVersion[2].slice(1)}`;
|
||||
result = es.merge(result, gulp.src('resources/win32/appx/AppxManifest.xml', { base: '.' })
|
||||
diff --git a/build/gulpfile.vscode.win32.ts b/build/gulpfile.vscode.win32.ts
|
||||
index 7a711276..2675bd85 100644
|
||||
--- a/build/gulpfile.vscode.win32.ts
|
||||
+++ b/build/gulpfile.vscode.win32.ts
|
||||
@@ -134,4 +134,4 @@ 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['AppxPackage'] = `${product.applicationName.replaceAll('-', '_')}_${arch}.appx`;
|
||||
+ definitions['AppxPackageDll'] = `${product.applicationName.replaceAll('-', '_')}_explorer_command_${arch}.dll`;
|
||||
definitions['AppxPackageName'] = `${product.win32AppUserModelId}`;
|
||||
diff --git a/build/win32/explorer-dll-fetcher.ts b/build/win32/explorer-dll-fetcher.ts
|
||||
index 33603ef9..ead89fe4 100644
|
||||
--- a/build/win32/explorer-dll-fetcher.ts
|
||||
+++ b/build/win32/explorer-dll-fetcher.ts
|
||||
@@ -11,2 +11,3 @@ import productJson from '../../product.json' with { type: 'json' };
|
||||
interface ProductConfiguration {
|
||||
+ applicationName: string;
|
||||
quality?: string;
|
||||
@@ -55,4 +56,6 @@ export async function downloadExplorerDll(outDir: string, quality: string = 'sta
|
||||
|
||||
- d(`moving ${artifact} to ${outDir}`);
|
||||
- await fs.copyFileSync(artifact, path.join(outDir, fileName));
|
||||
+ const outFilePath = path.join(outDir, `${product.applicationName.replaceAll('-', '_')}_explorer_command_${targetArch}.dll`);
|
||||
+
|
||||
+ d(`moving ${artifact} as ${outFilePath}`);
|
||||
+ await fs.copyFileSync(artifact, outFilePath);
|
||||
}
|
||||
Reference in New Issue
Block a user