From c5db5546a455b5445f82cfffa7e90c8865cd65aa Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 22 Jun 2017 17:36:17 +0200 Subject: [PATCH] windows x64 setup --- build/gulpfile.vscode.win32.js | 9 ++++++++- build/win32/code.iss | 24 ++++++++++++++++++++++++ package.json | 4 ++-- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index 4ac842af71b..8630284bc1f 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -40,6 +40,9 @@ function packageInnoSetup(iss, options, cb) { function buildWin32Setup(arch) { return cb => { + const ia32AppId = product.win32AppId; + const x64AppId = product.win32x64AppId; + const definitions = { NameLong: product.nameLong, NameShort: product.nameShort, @@ -51,8 +54,12 @@ function buildWin32Setup(arch) { RegValueName: product.win32RegValueName, ShellNameShort: product.win32ShellNameShort, AppMutex: product.win32MutexName, - AppId: product.win32AppId, + Arch: arch, + AppId: arch === 'ia32' ? ia32AppId : x64AppId, + IncompatibleAppId: arch === 'ia32' ? x64AppId : ia32AppId, AppUserId: product.win32AppUserModelId, + ArchitecturesAllowed: arch === 'ia32' ? '' : 'x64', + ArchitecturesInstallIn64BitMode: arch === 'ia32' ? '' : 'x64', SourceDir: buildPath(arch), RepoDir: repoPath, OutputDir: setupDir(arch) diff --git a/build/win32/code.iss b/build/win32/code.iss index b7988b383cc..686c5092424 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -30,6 +30,8 @@ SourceDir={#SourceDir} AppVersion={#Version} VersionInfoVersion={#RawVersion} ShowLanguageDialog=auto +ArchitecturesAllowed={#ArchitecturesAllowed} +ArchitecturesInstallIn64BitMode={#ArchitecturesInstallIn64BitMode} [Languages] Name: "english"; MessagesFile: "compiler:Default.isl,{#RepoDir}\build\win32\i18n\messages.en.isl" {#LocalizedLanguageFile} @@ -790,6 +792,28 @@ Root: HKCU; Subkey: "SOFTWARE\Classes\Drive\shell\{#RegValueName}"; ValueType: e Root: HKCU; Subkey: "SOFTWARE\Classes\Drive\shell\{#RegValueName}\command"; ValueType: expandsz; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%V"""; Tasks: addcontextmenufolders [Code] +// Don't allow installing conflicting architectures +function InitializeSetup(): Boolean; +var + RegKey: String; + AltArch: String; +begin + Result := True; + RegKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + copy('{#IncompatibleAppId}', 2, 38) + '_is1'; + + if '{#Arch}' = 'ia32' then begin + Result := not RegKeyExists(HKLM64, RegKey); + AltArch := 'x64'; + end else begin + Result := not RegKeyExists(HKLM32, RegKey); + AltArch := 'ia32'; + end; + + if not Result then begin + MsgBox('Please uninstall "{#NameShort}" ' + AltArch + ' before installing this package.', mbInformation, MB_OK); + end; +end; + function WizardNotSilent(): Boolean; begin Result := not WizardSilent(); diff --git a/package.json b/package.json index 1b80a6ce192..9e926b9878c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.14.0", "electronVersion": "1.6.6", - "distro": "652d5121d4004df51b085158050ea4a4af10693d", + "distro": "e1ebae615f927063affde84ceee25d4c47415821", "author": { "name": "Microsoft Corporation" }, @@ -127,4 +127,4 @@ "windows-mutex": "^0.2.0", "fsevents": "0.3.8" } -} +} \ No newline at end of file