Skip to content

Commit

Permalink
Electron v2.0.0 (#48290)
Browse files Browse the repository at this point in the history
* Update to Electron 2.0-beta.7

* back to exploration build

* fix compile errors

* workaround build issue (go back to 1.24.0)

* bump to 1.25.0

* use electron 2.0.2

* revert custom distro
  • Loading branch information
bpasero committed Jun 8, 2018
1 parent a1dd65b commit e7d29e9
Show file tree
Hide file tree
Showing 19 changed files with 7,459 additions and 3,942 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "1.7.12"
target "2.0.2"
runtime "electron"
3 changes: 2 additions & 1 deletion resources/linux/debian/control.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: @@NAME@@
Version: @@VERSION@@
Section: devel
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0
Depends: libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0, libgtk-3-0 (>= 3.10.0)

This comment has been minimized.

Copy link
@enihcam

enihcam Jun 9, 2018

@bpasero @Tyriar
Is libgconf build dependency or runtime dependency for electron 2?

Priority: optional
Architecture: @@ARCHITECTURE@@
Maintainer: Microsoft Corporation <vscode-linux@microsoft.com>
Expand All @@ -12,3 +12,4 @@ Conflicts: visual-studio-@@NAME@@
Replaces: visual-studio-@@NAME@@
Description: Code editing. Redefined.
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.

4 changes: 2 additions & 2 deletions resources/linux/rpm/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"libpthread.so.0(GLIBC_2.2.5)(64bit)",
"libpthread.so.0(GLIBC_2.3.2)(64bit)",
"libpthread.so.0(GLIBC_2.3.3)(64bit)",
"libgtk-x11-2.0.so.0()(64bit)",
"libgtk-3.so.0()(64bit)",
"libgdk-x11-2.0.so.0()(64bit)",
"libatk-1.0.so.0()(64bit)",
"libgio-2.0.so.0()(64bit)",
Expand Down Expand Up @@ -114,7 +114,7 @@
"libglib-2.0.so.0",
"libgmodule-2.0.so.0",
"libgobject-2.0.so.0",
"libgtk-x11-2.0.so.0",
"libgtk-3.so.0",
"libm.so.6",
"libm.so.6(GLIBC_2.0)",
"libm.so.6(GLIBC_2.1)",
Expand Down
2 changes: 1 addition & 1 deletion scripts/code-cli.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1

:: Launch Code
%CODE% --debug=5874 out\cli.js . %*
%CODE% --inspect=5874 out\cli.js . %*
popd

endlocal
2 changes: 1 addition & 1 deletion scripts/code-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function code() {
VSCODE_DEV=1 \
ELECTRON_ENABLE_LOGGING=1 \
ELECTRON_ENABLE_STACK_DUMPING=1 \
"$CODE" --debug=5874 "$ROOT/out/cli.js" . "$@"
"$CODE" --inspect=5874 "$ROOT/out/cli.js" . "$@"
}

code "$@"
5 changes: 4 additions & 1 deletion scripts/code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname "$(dirname "$(realpath "$0")")")

# On Linux with Electron 2.0.x running out of a VM causes
# a freeze so we only enable this flag on macOS
export ELECTRON_ENABLE_LOGGING=1
else
ROOT=$(dirname "$(dirname "$(readlink -f $0)")")
fi
Expand Down Expand Up @@ -40,7 +44,6 @@ function code() {
export NODE_ENV=development
export VSCODE_DEV=1
export VSCODE_CLI=1
export ELECTRON_ENABLE_LOGGING=1
export ELECTRON_ENABLE_STACK_DUMPING=1

# Launch Code
Expand Down
5 changes: 4 additions & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
if [[ "$OSTYPE" == "darwin"* ]]; then
realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; }
ROOT=$(dirname $(dirname $(realpath "$0")))

# On Linux with Electron 2.0.x running out of a VM causes
# a freeze so we only enable this flag on macOS
export ELECTRON_ENABLE_LOGGING=1
else
ROOT=$(dirname $(dirname $(readlink -f $0)))
fi
Expand All @@ -25,7 +29,6 @@ test -d node_modules || yarn
node build/lib/electron.js || ./node_modules/.bin/gulp electron

# Unit Tests
export ELECTRON_ENABLE_LOGGING=1
if [[ "$OSTYPE" == "darwin"* ]]; then
cd $ROOT ; ulimit -n 4096 ; \
"$CODE" \
Expand Down
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Error.stackTraceLimit = 100; // increase number of stack frames (from 10, https:
//#endregion

let app = require('electron').app;

// TODO@Ben Electron 2.0.x: prevent localStorage migration from SQLite to LevelDB due to issues
app.commandLine.appendSwitch('disable-mojo-local-storage');

let fs = require('fs');
let path = require('path');
let minimist = require('minimist');
Expand Down
Loading

0 comments on commit e7d29e9

Please sign in to comment.