win32ss / supermium-electron

Supermium-based Electron
https://electronjs.org
MIT License
78 stars 3 forks source link

[Feature Request]: Provide a sample pre-compiled Electron-supermium dummy app #1

Closed gdmeunier closed 7 months ago

gdmeunier commented 1 year ago

Preflight Checklist

Problem Description

Hello, I want to request that for each major developments / changes of Supermium-electron that this projects also provides a sample already compiled dummy application.

It's for making more Electron programs compatible with Windows 7.

Proposed Solution

Providing prebuilt binaries of a sample dummy app (with dummy app.asar file).

The goal is to generate a binary distribution of Electron based on Supermium, alongwith proper DLL & EXE files for backporting many other Electron programs.

NodeJS also has a backported version which could be used / integrated into Electron-supermium.

All this is for ensuring that we get atleast one precompiled version of Electron-supermium, alongwith a backported NodejS & a dummy app.asar file for replacing other Electron program files.

This way Electron apps that use the incompatible Chrome engine can be 'file-swapped' into using Supermium versions of Chrome DLL & EXE files.

The NodeJS DLLs & EXE file can also be replaced with node-win7 afterwards.

Perhaps some resource-editing might have to be done with Resource Hacker on other Electron apps' main EXE file later on, but this isn't a problem (with batch resources import/export).

Alternatives Considered

This is the only alternative that I considered since asking developers to individually each move on to Electron-supermium isn't a viable option.

Whereas having a precompiled Supermium version of Electron will provide long-lasting binaries for backporting many other Electron-based apps much like how we run newer programs on Windows 7 with VxKex or the api-ms-win-core-path DLL file.

Additional Information

No response

win32ss commented 1 year ago

Supermium Electron (will) exist(s) only because an Electron "host" can run other Electron apps, aware that very few Electron developers are likely to rebase their projects on it. So providing node-js is a good idea.

idontyboi commented 1 year ago

This should work for compiling a fully-working Node 16.7.0+ for Win7

1- Replace function uv_gethostname of deps/uv/src/win/util.c with the one from Node.JS 16.6.2 2- If compiling Node 20.3.0+ replace call GetSystemTimePreciseAsFileTime of function uv_clock_gettime the same file with GetSystemTimeAsFileTime. 2.1- Optionally remove the environment variable lock (on or around line 38 - 50 at src/node_main.cc). Should not be neccessary for Electron. 3- Press compile and it should work. I compiled Node 16.7.1 under my old 2GB RAM PC in... only 5 hours. But I prefer to use my DLL wrappers and polyfills instead.

There is no Win7-incompatible code in Node itself.

Win7 as a development platform in future

The requirement for Node 21 will be Visual C++ 17.6, "unsupported" but exactly the last version installable under Windows 7 (close to the cliff on Win7-buildability). So if open-source tools move to a newer Visual Studio version than you have to get someone using Windows 10 to build them for you or try to force-install 17.7 under Win7 or try them to use Clang (has anyone tried either of them?)

Small rant: "Please Upgrade"

With the current desktop landscape forcing upgrades suddenly and without advice, forcing business security requirements to personal users, reducing PC support periods to be equalivent of phones purposefully, what will consumers do? They will buy a phone and never touch the PC again. Windows 12 will likely block unsigned applications by default. When that happens there is no reason to buy a PC over a phone (espically after Authenticator 2FA forces them to switch back and forth). And then they wonder why everything is quickly panickly moving over from desktops to mobile.
idontyboi commented 1 year ago

Looks like the fork has great progress based on comments. Can't wait for the first release! Would certainly to see VSCode working on 7 again... Extensions are gonna rapidly drop support for VSCode 1.81.1.

very few Electron developers are likely to rebase their projects on it.

Supermium-Electron got mentioned in Proton Mail, and the issue got marked WONTFIX.

If you would like applications for testing Supermium-Electron, here's a short list:

Visual Studio Code Insiders 1.82 CEF detector 0.1.0 which shows space wasted by Chrome apps. Which is itself a Electron app ProtonMail's Windows 10 binaries Users complaining at Electron applications that Windows 7 will not work. Great target. 60 results. Closed Electron 25 upgrade discussions. A ton of it is closed, but a ton of it is still open. 31000 results.

There is also the issue that is never talked about, although it does not affect me: CPUs without SSE3 can not run virtually all Electron apps. Supermium-Electron will fix this thankfully!

MVoloshin commented 11 months ago

I hope to get latest Discord working on Win7 using Supermium-Electron

win32ss commented 11 months ago

At this point, most Electron applications I have tested are working. But two are causing me problems: Discord and VS Code 1.82 Insider.

VS Code is failing because of a crash in another node module while Discord can't find some js files which are placed somewhere else in its regular distribution.

If I can find a way to make (or find) debugging symbols for a node module I'll be happy. I hope this crash is not happening because of some integration attempt with the .appx packages that are bundled with it or something.

MVoloshin commented 11 months ago

At this point, most Electron applications I have tested are working. But two are causing me problems: Discord and VS Code 1.82 Insider.

VS Code is failing because of a crash in another node module while Discord can't find some js files which are placed somewhere else in its regular distribution.

If I can find a way to make (or find) debugging symbols for a node module I'll be happy. I hope this crash is not happening because of some integration attempt with the .appx packages that are bundled with it or something.

Could you also give some step-by-step instruction how to compile or port Electron applications for Win7 using Supermium, please?

win32ss commented 11 months ago

All the application specific code in an Electron application is in the resources folder. If you move the contents of the folder from the target Electron application to the same folder in the Supermium Electron package, the application should work.

Please note that only the contents of one application can be in this folder at a time.

MVoloshin commented 11 months ago

All the application specific code in an Electron application is in the resources folder. If you move the contents of the folder from the target Electron application to the same folder in the Supermium Electron package, the application should work.

Please note that only the contents of one application can be in this folder at a time.

Thank you very much. P.S. Could you send me Supermium Electron binaries, please?

win32ss commented 11 months ago

All the application specific code in an Electron application is in the resources folder. If you move the contents of the folder from the target Electron application to the same folder in the Supermium Electron package, the application should work. Please note that only the contents of one application can be in this folder at a time.

Thank you very much. P.S. Could you send me Supermium Electron binaries, please?

https://github.com/win32ss/supermium-electron/releases/tag/v28-testing

idontyboi commented 11 months ago

Thanks for the first release. Going to test it out.

The VS Code fail could be due to mismatched Electron versions [25 vs 28].

win32ss commented 11 months ago

The VS Code fail could be due to mismatched Electron versions [25 vs 28].

I don't think so. CEF Detector X was originally Electron 24 and it works with Supermium Electron.

win32ss commented 11 months ago

I just tried VS Code 1.83 Insider with the CEF Detector X executable and it does work. It crashes with newer Electron executables because of an issue in spdlog.node. I looked up that module and it has been deprecated for months. Perhaps it can be modified to work with Supermium Electron v28, or another build of Supermium Electron can be made on a v25/26-based tag until MS can catch up.

swinokur commented 11 months ago

I'm excited to find this project! I hope that Signal will be able to run on Win7 once the the project is stabilized?

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

github-actions[bot] commented 7 months ago

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.