Skip to content

Commit 4c3982a

Browse files
authored
Merge branch 'main' into joh/effective-kingfisher
2 parents 620a649 + eb1dd49 commit 4c3982a

File tree

195 files changed

+3408
-1944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+3408
-1944
lines changed

build/.moduleignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ vsda/src/**
102102
vsda/.gitignore
103103
vsda/binding.gyp
104104
vsda/README.md
105+
vsda/SECURITY.md
105106
vsda/targets
106107
!vsda/build/Release/vsda.node
107108

build/.webignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,5 @@ xterm-addon-webgl/out/**
4949
!@microsoft/applicationinsights-core-js/browser/applicationinsights-core-js.min.js
5050
!@microsoft/applicationinsights-shims/dist/umd/applicationinsights-shims.min.js
5151

52-
53-
54-
52+
vsda/**
53+
!vsda/rust/web/**

build/gulpfile.reh.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ const serverResources = [
7272
'out-build/vs/base/node/ps.sh',
7373

7474
// Terminal shell integration
75-
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish',
7675
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.ps1',
7776
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh',
7877
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-env.zsh',
7978
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-profile.zsh',
8079
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-rc.zsh',
8180
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration-login.zsh',
82-
'out-build/vs/workbench/contrib/terminal/browser/media/shellIntegration.fish',
81+
'out-build/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/shellIntegration.fish',
8382

8483
'!**/test/**'
8584
];

build/gulpfile.vscode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const vscodeResources = [
6868
'out-build/vs/workbench/browser/media/*-theme.css',
6969
'out-build/vs/workbench/contrib/debug/**/*.json',
7070
'out-build/vs/workbench/contrib/externalTerminal/**/*.scpt',
71-
'out-build/vs/workbench/contrib/terminal/browser/media/*.fish',
71+
'out-build/vs/workbench/contrib/terminal/browser/media/fish_xdg_data/fish/vendor_conf.d/*.fish',
7272
'out-build/vs/workbench/contrib/terminal/browser/media/*.ps1',
7373
'out-build/vs/workbench/contrib/terminal/browser/media/*.sh',
7474
'out-build/vs/workbench/contrib/terminal/browser/media/*.zsh',

build/gulpfile.vscode.win32.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ function buildWin32Setup(arch, target) {
9999
RegValueName: product.win32RegValueName,
100100
ShellNameShort: product.win32ShellNameShort,
101101
AppMutex: product.win32MutexName,
102+
TunnelMutex: product.win32TunnelMutex,
103+
TunnelServiceMutex: product.win32TunnelServiceMutex,
104+
ApplicationName: product.applicationName,
102105
Arch: arch,
103106
AppId: { 'ia32': ia32AppId, 'x64': x64AppId, 'arm64': arm64AppId }[arch],
104107
IncompatibleTargetAppId: { 'ia32': product.win32AppId, 'x64': product.win32x64AppId, 'arm64': product.win32arm64AppId }[arch],

build/lib/stylelint/vscode-known-variables.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"--vscode-charts-purple",
3737
"--vscode-charts-red",
3838
"--vscode-charts-yellow",
39+
"--vscode-chat-requestBackground",
40+
"--vscode-chat-requestBorder",
3941
"--vscode-checkbox-background",
4042
"--vscode-checkbox-border",
4143
"--vscode-checkbox-foreground",
@@ -304,8 +306,6 @@
304306
"--vscode-inputValidation-warningBackground",
305307
"--vscode-inputValidation-warningBorder",
306308
"--vscode-inputValidation-warningForeground",
307-
"--vscode-interactive-requestBackground",
308-
"--vscode-interactive-requestBorder",
309309
"--vscode-interactiveEditor-border",
310310
"--vscode-interactiveEditor-regionHighlight",
311311
"--vscode-interactiveEditor-shadow",

build/lib/util.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/util.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,13 @@ export function acquireWebNodePaths() {
394394
const root = path.join(__dirname, '..', '..');
395395
const webPackageJSON = path.join(root, '/remote/web', 'package.json');
396396
const webPackages = JSON.parse(fs.readFileSync(webPackageJSON, 'utf8')).dependencies;
397+
398+
const distroWebPackageJson = path.join(root, '.build/distro/npm/remote/web/package.json');
399+
if (fs.existsSync(distroWebPackageJson)) {
400+
const distroWebPackages = JSON.parse(fs.readFileSync(distroWebPackageJson, 'utf8')).dependencies;
401+
Object.assign(webPackages, distroWebPackages);
402+
}
403+
397404
const nodePaths: { [key: string]: string } = {};
398405
for (const key of Object.keys(webPackages)) {
399406
const packageJSON = path.join(root, 'node_modules', key, 'package.json');

build/win32/code.iss

Lines changed: 81 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ Name: "hungarian"; MessagesFile: "{#RepoDir}\build\win32\i18n\Default.hu.isl,{#R
6262
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl,{#RepoDir}\build\win32\i18n\messages.tr.isl" {#LocalizedLanguageFile("trk")}
6363

6464
[InstallDelete]
65-
Type: filesandordirs; Name: "{app}\resources\app\out"; Check: IsNotUpdate
66-
Type: filesandordirs; Name: "{app}\resources\app\plugins"; Check: IsNotUpdate
67-
Type: filesandordirs; Name: "{app}\resources\app\extensions"; Check: IsNotUpdate
68-
Type: filesandordirs; Name: "{app}\resources\app\node_modules"; Check: IsNotUpdate
69-
Type: filesandordirs; Name: "{app}\resources\app\node_modules.asar.unpacked"; Check: IsNotUpdate
70-
Type: files; Name: "{app}\resources\app\node_modules.asar"; Check: IsNotUpdate
71-
Type: files; Name: "{app}\resources\app\Credits_45.0.2454.85.html"; Check: IsNotUpdate
65+
Type: filesandordirs; Name: "{app}\resources\app\out"; Check: IsNotBackgroundUpdate
66+
Type: filesandordirs; Name: "{app}\resources\app\plugins"; Check: IsNotBackgroundUpdate
67+
Type: filesandordirs; Name: "{app}\resources\app\extensions"; Check: IsNotBackgroundUpdate
68+
Type: filesandordirs; Name: "{app}\resources\app\node_modules"; Check: IsNotBackgroundUpdate
69+
Type: filesandordirs; Name: "{app}\resources\app\node_modules.asar.unpacked"; Check: IsNotBackgroundUpdate
70+
Type: files; Name: "{app}\resources\app\node_modules.asar"; Check: IsNotBackgroundUpdate
71+
Type: files; Name: "{app}\resources\app\Credits_45.0.2454.85.html"; Check: IsNotBackgroundUpdate
7272

7373
[UninstallDelete]
7474
Type: filesandordirs; Name: "{app}\_"
@@ -1299,6 +1299,16 @@ Root: {#SoftwareClassesRootKey}; Subkey: "Software\Classes\Drive\shell\{#RegValu
12991299
Root: {#EnvironmentRootKey}; Subkey: "{#EnvironmentKey}"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Tasks: addtopath; Check: NeedsAddPath(ExpandConstant('{app}\bin'))
13001300

13011301
[Code]
1302+
function IsBackgroundUpdate(): Boolean;
1303+
begin
1304+
Result := ExpandConstant('{param:update|false}') <> 'false';
1305+
end;
1306+
1307+
function IsNotBackgroundUpdate(): Boolean;
1308+
begin
1309+
Result := not IsBackgroundUpdate();
1310+
end;
1311+
13021312
// Don't allow installing conflicting architectures
13031313
function InitializeSetup(): Boolean;
13041314
var
@@ -1351,6 +1361,13 @@ begin
13511361
MsgBox('Please uninstall the ' + AltArch + '-bit version of {#NameShort} before installing this ' + ThisArch + '-bit version.', mbInformation, MB_OK);
13521362
end;
13531363
end;
1364+
1365+
if IsNotBackgroundUpdate() and CheckForMutexes('{#TunnelMutex}') then
1366+
begin
1367+
MsgBox('{#NameShort} is still running a tunnel. Please stop the tunnel before installing.', mbInformation, MB_OK);
1368+
Result := false
1369+
end;
1370+
13541371
end;
13551372
13561373
function WizardNotSilent(): Boolean;
@@ -1359,14 +1376,44 @@ begin
13591376
end;
13601377
13611378
// Updates
1362-
function IsBackgroundUpdate(): Boolean;
1379+
1380+
var
1381+
ShouldRestartTunnelService: Boolean;
1382+
1383+
procedure StopTunnelServiceIfNeeded();
1384+
var
1385+
StopServiceResultCode: Integer;
1386+
WaitCounter: Integer;
13631387
begin
1364-
Result := ExpandConstant('{param:update|false}') <> 'false';
1388+
ShouldRestartTunnelService := False;
1389+
if CheckForMutexes('{#TunnelServiceMutex}') then begin
1390+
// stop the tunnel service
1391+
Log('Stopping the tunnel service using ' + ExpandConstant('"{app}\bin\{#ApplicationName}.cmd"'));
1392+
ShellExec('', ExpandConstant('"{app}\bin\{#ApplicationName}.cmd"'), 'tunnel service uninstall', '', SW_HIDE, ewWaitUntilTerminated, StopServiceResultCode);
1393+
1394+
Log('Stopping the tunnel service completed with result code ' + IntToStr(StopServiceResultCode));
1395+
1396+
WaitCounter := 10;
1397+
while (WaitCounter > 0) and CheckForMutexes('{#TunnelServiceMutex}') do
1398+
begin
1399+
Log('Tunnel service is still running, waiting');
1400+
Sleep(500);
1401+
WaitCounter := WaitCounter - 1
1402+
end;
1403+
if CheckForMutexes('{#TunnelServiceMutex}') then
1404+
Log('Unable to stop tunnel service')
1405+
else
1406+
ShouldRestartTunnelService := True;
1407+
end
13651408
end;
13661409
1367-
function IsNotUpdate(): Boolean;
1410+
1411+
// called before the wizard checks for running application
1412+
function PrepareToInstall(var NeedsRestart: Boolean): String;
13681413
begin
1369-
Result := not IsBackgroundUpdate();
1414+
if IsNotBackgroundUpdate() then
1415+
StopTunnelServiceIfNeeded();
1416+
Result := ''
13701417
end;
13711418
13721419
// VS Code will create a flag file before the update starts (/update=C:\foo\bar)
@@ -1450,18 +1497,33 @@ end;
14501497
procedure CurStepChanged(CurStep: TSetupStep);
14511498
var
14521499
UpdateResultCode: Integer;
1500+
StartServiceResultCode: Integer;
14531501
begin
1454-
if IsBackgroundUpdate() and (CurStep = ssPostInstall) then
1502+
if CurStep = ssPostInstall then
14551503
begin
1456-
CreateMutex('{#AppMutex}-ready');
1457-
1458-
while (CheckForMutexes('{#AppMutex}')) do
1504+
if IsBackgroundUpdate() then
14591505
begin
1460-
Log('Application is still running, waiting');
1461-
Sleep(1000);
1506+
CreateMutex('{#AppMutex}-ready');
1507+
1508+
while (CheckForMutexes('{#AppMutex}')) do
1509+
begin
1510+
Log('Application is still running, waiting');
1511+
Sleep(1000)
1512+
end;
1513+
1514+
StopTunnelServiceIfNeeded();
1515+
1516+
Exec(ExpandConstant('{app}\tools\inno_updater.exe'), ExpandConstant('"{app}\{#ExeBasename}.exe" ' + BoolToStr(LockFileExists())), '', SW_SHOW, ewWaitUntilTerminated, UpdateResultCode);
14621517
end;
14631518
1464-
Exec(ExpandConstant('{app}\tools\inno_updater.exe'), ExpandConstant('"{app}\{#ExeBasename}.exe" ' + BoolToStr(LockFileExists())), '', SW_SHOW, ewWaitUntilTerminated, UpdateResultCode);
1519+
if ShouldRestartTunnelService then
1520+
begin
1521+
// start the tunnel service
1522+
Log('Restarting the tunnel service...');
1523+
ShellExec('', ExpandConstant('"{app}\bin\{#ApplicationName}.cmd"'), 'tunnel service install', '', SW_HIDE, ewWaitUntilTerminated, StartServiceResultCode);
1524+
Log('Starting the tunnel service completed with result code ' + IntToStr(StartServiceResultCode));
1525+
ShouldRestartTunnelService := False
1526+
end;
14651527
end;
14661528
end;
14671529
@@ -1545,4 +1607,4 @@ begin
15451607
#endif
15461608
15471609
Exec(ExpandConstant('{sys}\icacls.exe'), ExpandConstant('"{app}" /inheritancelevel:r ') + Permissions, '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
1548-
end;
1610+
end;

cli/Cargo.lock

Lines changed: 0 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)