Skip to content

Commit 5fae91d

Browse files
authored
Merge pull request #54873 from Microsoft/tyriar/electron-2.0.x
Electron 2.0.5
2 parents a7834f8 + 75c6503 commit 5fae91d

File tree

20 files changed

+7584
-3957
lines changed

20 files changed

+7584
-3957
lines changed

.yarnrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://atom.io/download/electron"
2-
target "1.7.12"
2+
target "2.0.5"
33
runtime "electron"

resources/linux/debian/control.template

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: @@NAME@@
22
Version: @@VERSION@@
33
Section: devel
4-
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0
4+
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0, libgtk-3-0 (>= 3.10.0)
55
Priority: optional
66
Architecture: @@ARCHITECTURE@@
77
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
@@ -12,3 +12,4 @@ Conflicts: visual-studio-@@NAME@@
1212
Replaces: visual-studio-@@NAME@@
1313
Description: Code editing. Redefined.
1414
Visual Studio Code is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. See https://code.visualstudio.com/docs/setup/linux for installation instructions and FAQ.
15+

resources/linux/rpm/dependencies.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"libpthread.so.0(GLIBC_2.2.5)(64bit)",
55
"libpthread.so.0(GLIBC_2.3.2)(64bit)",
66
"libpthread.so.0(GLIBC_2.3.3)(64bit)",
7-
"libgtk-x11-2.0.so.0()(64bit)",
7+
"libgtk-3.so.0()(64bit)",
88
"libgdk-x11-2.0.so.0()(64bit)",
99
"libatk-1.0.so.0()(64bit)",
1010
"libgio-2.0.so.0()(64bit)",
@@ -114,7 +114,7 @@
114114
"libglib-2.0.so.0",
115115
"libgmodule-2.0.so.0",
116116
"libgobject-2.0.so.0",
117-
"libgtk-x11-2.0.so.0",
117+
"libgtk-3.so.0",
118118
"libm.so.6",
119119
"libm.so.6(GLIBC_2.0)",
120120
"libm.so.6(GLIBC_2.1)",

scripts/code-cli.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set ELECTRON_ENABLE_LOGGING=1
2929
set ELECTRON_ENABLE_STACK_DUMPING=1
3030

3131
:: Launch Code
32-
%CODE% --debug=5874 out\cli.js . %*
32+
%CODE% --inspect=5874 out\cli.js . %*
3333
popd
3434

3535
endlocal

scripts/code-cli.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function code() {
3232
VSCODE_DEV=1 \
3333
ELECTRON_ENABLE_LOGGING=1 \
3434
ELECTRON_ENABLE_STACK_DUMPING=1 \
35-
"$CODE" --debug=5874 "$ROOT/out/cli.js" . "$@"
35+
"$CODE" --inspect=5874 "$ROOT/out/cli.js" . "$@"
3636
}
3737

3838
code "$@"

scripts/code.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
if [[ "$OSTYPE" == "darwin"* ]]; then
44
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
55
ROOT=$(dirname "$(dirname "$(realpath "$0")")")
6+
7+
# On Linux with Electron 2.0.x running out of a VM causes
8+
# a freeze so we only enable this flag on macOS
9+
export ELECTRON_ENABLE_LOGGING=1
610
else
711
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
812
fi
@@ -40,7 +44,6 @@ function code() {
4044
export NODE_ENV=development
4145
export VSCODE_DEV=1
4246
export VSCODE_CLI=1
43-
export ELECTRON_ENABLE_LOGGING=1
4447
export ELECTRON_ENABLE_STACK_DUMPING=1
4548

4649
# Launch Code

scripts/test.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
if [[ "$OSTYPE" == "darwin"* ]]; then
55
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
66
ROOT=$(dirname $(dirname $(realpath "$0")))
7+
8+
# On Linux with Electron 2.0.x running out of a VM causes
9+
# a freeze so we only enable this flag on macOS
10+
export ELECTRON_ENABLE_LOGGING=1
711
else
812
ROOT=$(dirname $(dirname $(readlink -f $0)))
913
fi
@@ -25,7 +29,6 @@ test -d node_modules || yarn
2529
node build/lib/electron.js || ./node_modules/.bin/gulp electron
2630

2731
# Unit Tests
28-
export ELECTRON_ENABLE_LOGGING=1
2932
if [[ "$OSTYPE" == "darwin"* ]]; then
3033
cd $ROOT ; ulimit -n 4096 ; \
3134
"$CODE" \

src/main.js

+7
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ if (isTempPortable) {
8181

8282
const app = require('electron').app;
8383

84+
// TODO@Ben Electron 2.0.x: prevent localStorage migration from SQLite to LevelDB due to issues
85+
app.commandLine.appendSwitch('disable-mojo-local-storage');
86+
87+
// TODO@Ben Electron 2.0.x: force srgb color profile (for https://github.com/Microsoft/vscode/issues/51791)
88+
// This also seems to fix: https://github.com/Microsoft/vscode/issues/48043
89+
app.commandLine.appendSwitch('force-color-profile', 'srgb');
90+
8491
const minimist = require('minimist');
8592
const paths = require('./paths');
8693

0 commit comments

Comments
 (0)