Skip to content

Commit 3417c1f

Browse files
authored
win32-ia32 deprecation warning (microsoft#189031)
1 parent 4f40b14 commit 3417c1f

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

src/vs/platform/window/common/window.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export interface IWindowConfiguration {
273273
export interface IOSConfiguration {
274274
readonly release: string;
275275
readonly hostname: string;
276+
readonly arch: string;
276277
}
277278

278279
export interface INativeWindowConfiguration extends IWindowConfiguration, NativeParsedArgs, ISandboxConfiguration {

src/vs/platform/windows/electron-main/windowsMainService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { app, BrowserWindow, WebContents, shell } from 'electron';
77
import { Promises } from 'vs/base/node/pfs';
88
import { addUNCHostToAllowlist } from 'vs/base/node/unc';
9-
import { hostname, release } from 'os';
9+
import { hostname, release, arch } from 'os';
1010
import { coalesce, distinct, firstOrDefault } from 'vs/base/common/arrays';
1111
import { CancellationToken } from 'vs/base/common/cancellation';
1212
import { CharCode } from 'vs/base/common/charCode';
@@ -1424,7 +1424,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
14241424
product,
14251425
isInitialStartup: options.initialStartup,
14261426
perfMarks: getMarks(),
1427-
os: { release: release(), hostname: hostname() },
1427+
os: { release: release(), hostname: hostname(), arch: arch() },
14281428
zoomLevel: typeof windowConfig?.zoomLevel === 'number' ? windowConfig.zoomLevel : undefined,
14291429

14301430
autoDetectHighContrast: windowConfig?.autoDetectHighContrast ?? true,

src/vs/workbench/electron-sandbox/window.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,36 @@ export class NativeWindow extends Disposable {
766766
}
767767
);
768768
}
769+
770+
else if (this.environmentService.os.arch === 'ia32') {
771+
const message = localize('windows32eolmessage', "{0} on Windows 32-bit will soon stop receiving updates. Consider upgrading to the 64-bit build.", this.productService.nameLong);
772+
const actions = [{
773+
label: localize('windowseolBannerLearnMore', "Learn More"),
774+
href: 'https://aka.ms/vscode-faq-old-windows'
775+
}];
776+
777+
this.bannerService.show({
778+
id: 'windows32eol.banner',
779+
message,
780+
ariaLabel: localize('windowseolarialabel', "{0}. Use navigation keys to access banner actions.", message),
781+
actions,
782+
icon: Codicon.warning
783+
});
784+
785+
this.notificationService.prompt(
786+
Severity.Warning,
787+
message,
788+
[{
789+
label: localize('learnMore', "Learn More"),
790+
run: () => this.openerService.open(URI.parse('https://aka.ms/vscode-faq-old-windows'))
791+
}],
792+
{
793+
neverShowAgain: { id: 'windows32eol', isSecondary: true, scope: NeverShowAgainScope.APPLICATION },
794+
priority: NotificationPriority.URGENT,
795+
sticky: true
796+
}
797+
);
798+
}
769799
}
770800

771801
// MacOS 10.11 and 10.12 warning

src/vs/workbench/services/workingCopy/test/electron-sandbox/workingCopyBackupService.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const TestNativeWindowConfiguration: INativeWindowConfiguration = {
5959
execPath: process.execPath,
6060
perfMarks: [],
6161
colorScheme: { dark: true, highContrast: false },
62-
os: { release: 'unknown', hostname: 'unknown' },
62+
os: { release: 'unknown', hostname: 'unknown', arch: 'unknown' },
6363
product,
6464
homeDir: homeDir.fsPath,
6565
tmpDir: tmpDir.fsPath,

0 commit comments

Comments
 (0)