Electron: update to latest version 18

-lib hxnodejs is no longer included in the compilation of ApplicationMain (but it is still included for compilation of ElectronSetup, of course). hxnodejs was removed from ApplicationMain because it forces some require() calls to be included in the generated .js, which would require disabling certain Electron security features to work properly in newer versions of Electron than we targeted previously. Electron's documentation recommends not to do that.

To use Node.js APIs, you need to run them in more secure contexts, while communicating over IPC with a "preload script" from the "renderer" process. In Lime/OpenFL, this would require a custom ElectronSetup template override, but that shouldn't be all that surprising. See: https://www.electronjs.org/docs/latest/tutorial/process-model for more details on the Electron side.
This commit is contained in:
Josh Tynjala
2022-04-14 12:08:53 -07:00
parent 1c92c707cc
commit da3705ed20
4 changed files with 1 additions and 4 deletions

View File

@@ -3,7 +3,6 @@
--next
-js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib hxnodejs
-main ApplicationMain ::HAXE_FLAGS::
-D electron

View File

@@ -3,7 +3,6 @@
--next
-js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib hxnodejs
-main ApplicationMain ::HAXE_FLAGS::
-D electron

View File

@@ -3,7 +3,6 @@
--next
-js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-lib hxnodejs
-main ApplicationMain ::HAXE_FLAGS::
-D electron

View File

@@ -6,6 +6,6 @@
"start": "electron ElectronSetup.js"
},
"devDependencies": {
"electron": "^9.1.0"
"electron": "^18.0.4"
}
}