Closed janschiefer closed 3 years ago
Hi Jan
Until now, the master branch was only used for development. All executables was made from electron_bundler branch. The changes in master was merged to electron_bundler when needed/stable.
The only reason for having the build scripts in the master branch was that we don't get problems when merging package.json to electron_builder.
I am able to compile the Windows x64 installer. This is the most used version and works as a standalone Program (no need for an installed browser). Thats the only reason to use electron, because it packs a chromium browser into the exe.
The exe has the frontend compiled into it and additionally publishes the webpage (webpacked) from the app folder to localhost:8000. These could be two different versions of the frontpage, because it was planned to publish a simplyfied frontend version via webaddress for mobile devices and tablets.
Ok.
However, I cannot understand why there is a separate branch just for building the redistributable packages and why this is not a feature of the main development branch. This means code duplication and decreased maintainability.
My changes allow compilation of the .AppImage including the standalone webpack browser module with auto-launching the application.
However building the Windows NSIS-Installer sesms to fail on non-Windows platform because of the mentioned bug ( https://github.com/electron-userland/electron-builder/issues/2462 ).
Maybe my changes should be merged in the electron_bundler branch.
I also already have an idea for a workaround for the bug mentioned earlier...
I'm open for changing the way it works, if we get it more convenient for other devs, but we must preserve all actual use-cases as:
Because only a few of the use-cases need electron, it makes sense to have an electron branch only for these cases and another branch for all cases that don't need electron. At the moment, I see it like electron_builder beeing the branch for all versions that need electron and master for all other.
I don't see a big need for compiling the Windows version on other OSes. I prefer to compile it on Windows because this is the main target.
Yeah, absolutely right!
The "cp" commands in the original targets had totally wrong paths and the build failed if the executables already existed.
Add "mkdir" for output directory.
Linux has ELF executables and not EXE. Also we build an .AppImage archive. Correct this in the build rules.
Separate x64 and x86 targets. Current distributions don't include all required libraries/dependencies for architectures other than the current one when cross-compiling (for example libnode:i386 is missing in most 64-bit distributions). All these dependencies have to be cross-compiled manually. The build would fail for 90 % of the people with the old configuration.
There is still the problem, that you need to checkout the branch "electron_bundler" in the scripts of lw.electron-server if you want to build a executable that automatically launches an browser window. This also overwrites your local git-copy of the master branch. Why is that so? If you type in the URL "laserweb:8000" manually, you do not need this.
The build was already (and is still) affected by this ( https://github.com/electron-userland/electron-builder/issues/2462 ) unfixed electron-builder bug. The build for Windows targets fails because of an bug in electron-builder icon-handling. I think this has to do with the mysterious "electron_bundler" branch. I have to look into this... (maybe the changes to icon handling from my previous commit also need to be done in "electron_bundler").
BTW: Dear god, please stop the "nodejs package manager dependency-insanity" and make npm and git work together in a reasonable way...