neutralinojs / neutralinojs-cli

neu cli for Neutralinojs
https://neutralino.js.org/docs/cli/neu-cli
MIT License
91 stars 56 forks source link

[Fix] Resolve issue involving improper handling of cases where 'icon' variable is undefined when 'neu' CLI attempts to create an ASAR file using the 'bundler.js' module #254

Closed Arc8ne closed 3 months ago

Arc8ne commented 4 months ago

This PR aims to resolve the issue mentioned in its title.

This issue causes the neu CLI program's build subcommand to fail to build a NeutralinoJS application properly (no dist containing the generated binaries was created and only a .tmp folder remained after the CLI tool reportedly claimed to have successfully finished building the said application).

Arc8ne commented 4 months ago

can we use Neutralinojs icon as default icon if the icon is not defined?

Sure.

Arc8ne commented 4 months ago

In that case, is it possible if the documentation could be updated to inform users about this new behavior (if it is implemented)?

Arc8ne commented 4 months ago

I have updated my PR to allow the neu CLI to use the Neutralino icon by default if the 'icon' variable is undefined.

Arc8ne commented 4 months ago

However, while taking a look through the code as well as the result of the build process (using the neu CLI), I have noticed that after the build process is completed, the icon associated with the outputted program (i.e. an EXE file on Windows) does not seem to be set to the icon specified in the Neutralino config file (or the Neutralino logo if no icon is specified in the Neutralino config file).

I suppose this issue might be related to https://github.com/neutralinojs/neutralinojs/issues/207, which is currently closed but has not actually been resolved yet.

As a result, it should be noted that although this PR fixes the issue where the neu CLI tool fails to properly build a NeutralinoJS program if the icon value is not specified in neutralino.config.json, it does not seem to have any impact on the actual icon of the outputted program.

Arc8ne commented 3 months ago

Hi @viralgupta, any updates regarding this PR? Is it ready to be merged?

shalithasuranga commented 3 months ago

Hello everyone, thanks so much for working on solving this bug. I've added more simpler solution by copying the icon only if exists: https://github.com/neutralinojs/neutralinojs-cli/commit/39c925ab0593c5cf2f3b6ec6dc4c49de539ec7d1

Thanks :tada: