LaserWeb / lw.comm-server

Unified communications server for LaserWeb4 (and other frontends)
GNU General Public License v3.0
38 stars 47 forks source link

Fix nightly build targets to build working executables for Linux and Windows from lw.comm-server and LaserWeb4 #81

Closed janschiefer closed 3 years ago

janschiefer commented 4 years ago
  1. Remove the horrible "nightlylinux" and "nighlywindows" targets. Create "nightlylinux64", "nightlylinux32", "nightlywindows64", "nightlywindows32" targets
  1. Remove "dist" target. Use "distlinx64/86", "distwinx64/86" and "distmac" instead.

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...

cprezzi commented 4 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.

janschiefer commented 4 years ago

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...

cprezzi commented 4 years ago

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.

janschiefer commented 4 years ago

Yeah, absolutely right!