ScottLogic / kdb-boothroyd

a prototype re-implementation of KDB Studio using JavaScript and Electron
Apache License 2.0
5 stars 2 forks source link

Blank window when starting up #66

Closed gyorokpeter closed 2 years ago

gyorokpeter commented 2 years ago

This applies to the .exe file created by running "npm run dist". There is not even an "Open" option in the file menu studio2 .

OiNutter commented 2 years ago

Did you run npm run build before this? npm run dist only packages up the app into the electron executables. You need to have compiled the source code with the build command first.

gyorokpeter commented 2 years ago

No, because there is no indication in the readme to do this. Even "npm run dist" is not mentioned, I ran that out of guessing. I just tried like that but still no change in behavior.

OiNutter commented 2 years ago

There is currently no documentation in the README on how to create release builds because the expectation is you wouldn't do that manually,. We have an automated build process in place using GitHub Actions that creates the release build, packages it and adds it to a tagged release.

I'm not sure why you're still getting a blank screen, I'm assuming from the other issues you've raised that you've run npm install and have been able to run the dev versions?

gyorokpeter commented 2 years ago

Yes, the dev version runs fine, but it's inconvenient to have to run two separate console apps one by one and also it clutters my taskbar with three icons instead of just one. I'm also trying to test from the user perspective and the user will not run the dev version.

However by looking at the full output of the entire operation I noticed there is this error in the middle:

> kdb-studio-2@1.0.1 build:electron
> NODE_ENV=production webpack --config webpack.electron.config.js --mode production

'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
OiNutter commented 2 years ago

Aah, I assume you're running on Windows? You'll want to change the build:electron and build:react scripts in package.json to start with cross-env like the dev and test ones. Most of our dev and testing has been done on OS X and we run the production builds on a linux runner so this hasn't been an issue for us but I'll update the file with that anyway as it doesn't cause us any issues.

gyorokpeter commented 2 years ago

Thanks, that fixes it. Since Windows will be the primary target platform, it would be good to add safeguards to ensure that the build is working fine.