Skip to content

Commit 0d87aef

Browse files
authored
new package: electron-26 (#29)
[skip ci]
1 parent 0fe8113 commit 0d87aef

9 files changed

+501
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
We pass `--no-history` to gclient, so there will be no version for electron.
2+
--- a/electron/script/lib/get-version.js
3+
+++ b/electron/script/lib/get-version.js
4+
@@ -11,7 +11,7 @@
5+
// The only difference in the "git describe" technique is that technically a commit can "change" it's version
6+
// number if a tag is created / removed retroactively. i.e. the first time a commit is pushed it will be 1.2.3
7+
// and after the tag is made rebuilding the same commit will result in it being 1.2.4
8+
- const output = spawnSync('git', ['describe', '--tags', '--abbrev=0'], {
9+
+ const output = spawnSync('cat', ['ELECTRON_VERSION'], {
10+
cwd: path.resolve(__dirname, '..', '..')
11+
});
12+
if (output.status !== 0) {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h
2+
+++ b/third_party/electron_node/deps/v8/src/trap-handler/trap-handler.h
3+
@@ -19,7 +19,7 @@
4+
5+
// X64 on Linux, Windows, MacOS, FreeBSD.
6+
#if V8_HOST_ARCH_X64 && V8_TARGET_ARCH_X64 && \
7+
- ((V8_OS_LINUX && !V8_OS_ANDROID) || V8_OS_WIN || V8_OS_DARWIN || \
8+
+ (V8_OS_LINUX || V8_OS_WIN || V8_OS_DARWIN || \
9+
V8_OS_FREEBSD)
10+
#define V8_TRAP_HANDLER_SUPPORTED true
11+
// Arm64 (non-simulator) on Mac.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- a/third_party/electron_node/deps/cares/config/linux/ares_config.h
2+
+++ b/third_party/electron_node/deps/cares/config/linux/ares_config.h
3+
@@ -59,10 +59,10 @@
4+
#define HAVE_ARPA_INET_H 1
5+
6+
/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
7+
-#define HAVE_ARPA_NAMESER_COMPAT_H 1
8+
+// #define HAVE_ARPA_NAMESER_COMPAT_H 1
9+
10+
/* Define to 1 if you have the <arpa/nameser.h> header file. */
11+
-#define HAVE_ARPA_NAMESER_H 1
12+
+// #define HAVE_ARPA_NAMESER_H 1
13+
14+
/* Define to 1 if you have the <assert.h> header file. */
15+
#define HAVE_ASSERT_H 1
16+
@@ -128,7 +128,7 @@
17+
#define HAVE_GETNAMEINFO 1
18+
19+
/* Define to 1 if you have the getservbyport_r function. */
20+
-#define HAVE_GETSERVBYPORT_R 1
21+
+// #define HAVE_GETSERVBYPORT_R 1
22+
23+
/* Define to 1 if you have the `gettimeofday' function. */
24+
#define HAVE_GETTIMEOFDAY 1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--- a/electron/shell/app/electron_main_delegate.cc
2+
+++ b/electron/shell/app/electron_main_delegate.cc
3+
@@ -256,8 +256,13 @@
4+
if (env->HasVar(kElectronEnableStackDumping))
5+
base::debug::EnableInProcessStackDumping();
6+
7+
+#ifndef __TERMUX__
8+
if (env->HasVar(kElectronDisableSandbox))
9+
command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox);
10+
+#else
11+
+ command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox);
12+
+ command_line->AppendSwitch(sandbox::policy::switches::kDisableSeccompFilterSandbox);
13+
+#endif
14+
15+
tracing_sampler_profiler_ =
16+
tracing::TracingSamplerProfiler::CreateOnMainThread();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--- a/third_party/electron_node/src/node_internals.h
2+
+++ b/third_party/electron_node/src/node_internals.h
3+
@@ -287,9 +287,9 @@
4+
5+
// Functions defined in node.cc that are exposed via the bootstrapper object
6+
7+
-#if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
8+
+#if defined(__POSIX__) && !defined(__CloudABI__)
9+
#define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1
10+
-#endif // defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__)
11+
+#endif // defined(__POSIX__) && !defined(__CloudABI__)
12+
13+
namespace credentials {
14+
bool SafeGetenv(const char* key,
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--- a/ui/gtk/gtk_compat.cc
2+
+++ b/ui/gtk/gtk_compat.cc
3+
@@ -62,22 +62,38 @@
4+
}
5+
6+
void* GetLibGio() {
7+
+#ifdef __TERMUX__
8+
+ static void* libgio = DlOpen("libgio-2.0.so");
9+
+#else
10+
static void* libgio = DlOpen("libgio-2.0.so.0");
11+
+#endif
12+
return libgio;
13+
}
14+
15+
void* GetLibGdk3() {
16+
+#ifdef __TERMUX__
17+
+ static void* libgdk3 = DlOpen("libgdk-3.so");
18+
+#else
19+
static void* libgdk3 = DlOpen("libgdk-3.so.0");
20+
+#endif
21+
return libgdk3;
22+
}
23+
24+
void* GetLibGtk3(bool check = true) {
25+
+#ifdef __TERMUX__
26+
+ static void* libgtk3 = DlOpen("libgtk-3.so", check);
27+
+#else
28+
static void* libgtk3 = DlOpen("libgtk-3.so.0", check);
29+
+#endif
30+
return libgtk3;
31+
}
32+
33+
void* GetLibGtk4(bool check = true) {
34+
+#ifdef __TERMUX__
35+
+ static void* libgtk4 = DlOpen("libgtk-4.so", check);
36+
+#else
37+
static void* libgtk4 = DlOpen("libgtk-4.so.1", check);
38+
+#endif
39+
return libgtk4;
40+
}
41+
42+
@@ -124,7 +140,11 @@
43+
} // namespace
44+
45+
void* GetLibGdkPixbuf() {
46+
+#ifdef __TERMUX__
47+
+ static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so");
48+
+#else
49+
static void* libgdk_pixbuf = DlOpen("libgdk_pixbuf-2.0.so.0");
50+
+#endif
51+
return libgdk_pixbuf;
52+
}
53+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/electron/shell/browser/electron_browser_context.h
2+
+++ b/electron/shell/browser/electron_browser_context.h
3+
@@ -8,6 +8,7 @@
4+
#include <map>
5+
#include <memory>
6+
#include <string>
7+
+#include <variant>
8+
#include <vector>
9+
10+
#include "base/memory/weak_ptr.h"

0 commit comments

Comments
 (0)