Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win32-ia32 deprecation warning #189031

Merged
merged 1 commit into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vs/platform/window/common/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export interface IWindowConfiguration {
export interface IOSConfiguration {
readonly release: string;
readonly hostname: string;
readonly arch: string;
}

export interface INativeWindowConfiguration extends IWindowConfiguration, NativeParsedArgs, ISandboxConfiguration {
Expand Down
4 changes: 2 additions & 2 deletions src/vs/platform/windows/electron-main/windowsMainService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { app, BrowserWindow, WebContents, shell } from 'electron';
import { Promises } from 'vs/base/node/pfs';
import { addUNCHostToAllowlist } from 'vs/base/node/unc';
import { hostname, release } from 'os';
import { hostname, release, arch } from 'os';
import { coalesce, distinct, firstOrDefault } from 'vs/base/common/arrays';
import { CancellationToken } from 'vs/base/common/cancellation';
import { CharCode } from 'vs/base/common/charCode';
Expand Down Expand Up @@ -1424,7 +1424,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic
product,
isInitialStartup: options.initialStartup,
perfMarks: getMarks(),
os: { release: release(), hostname: hostname() },
os: { release: release(), hostname: hostname(), arch: arch() },
zoomLevel: typeof windowConfig?.zoomLevel === 'number' ? windowConfig.zoomLevel : undefined,

autoDetectHighContrast: windowConfig?.autoDetectHighContrast ?? true,
Expand Down
30 changes: 30 additions & 0 deletions src/vs/workbench/electron-sandbox/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,36 @@ export class NativeWindow extends Disposable {
}
);
}

else if (this.environmentService.os.arch === 'ia32') {
const message = localize('windows32eolmessage', "{0} on Windows 32-bit will soon stop receiving updates. Consider upgrading to the 64-bit build.", this.productService.nameLong);
const actions = [{
label: localize('windowseolBannerLearnMore', "Learn More"),
href: 'https://aka.ms/vscode-faq-old-windows'
}];

this.bannerService.show({
id: 'windows32eol.banner',
message,
ariaLabel: localize('windowseolarialabel', "{0}. Use navigation keys to access banner actions.", message),
actions,
icon: Codicon.warning
});

this.notificationService.prompt(
Severity.Warning,
message,
[{
label: localize('learnMore', "Learn More"),
run: () => this.openerService.open(URI.parse('https://aka.ms/vscode-faq-old-windows'))
}],
{
neverShowAgain: { id: 'windows32eol', isSecondary: true, scope: NeverShowAgainScope.APPLICATION },
priority: NotificationPriority.URGENT,
sticky: true
}
);
}
}

// MacOS 10.11 and 10.12 warning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const TestNativeWindowConfiguration: INativeWindowConfiguration = {
execPath: process.execPath,
perfMarks: [],
colorScheme: { dark: true, highContrast: false },
os: { release: 'unknown', hostname: 'unknown' },
os: { release: 'unknown', hostname: 'unknown', arch: 'unknown' },
product,
homeDir: homeDir.fsPath,
tmpDir: tmpDir.fsPath,
Expand Down