Specify/Override Options.ElectronSwitches for a built app
olof-nord opened this issue · comments
Hello @asticode, thanks for your work on this functionality!
With the flags provided during startup sometimes meaning that Electron either works or not, is there any built-in way of specifying, or overriding the ElectronSwitches for a built bundle?
From what I understand the intended design at the moment is that the flags are specified at build-time and are not intended to be modified by the user starting the bundle.
Looking at the astilectron-bundler
, the below option is listed in the readme - would a similar approach be possible with astilectron itself? Either to be implemented, or to use something which is already available.
-ldflags X:main.Version=xyzzy,main.CommitCount=100 -ldflags race
As far as I'm concern, you can already override Options.ElectronSwitches
in your app at runtime since they're provided to astilectron. For instance you could add flags to your app, and depending on those flags set different ElectronSwitches
to astilectron
.
Does that make sense or did I misunderstand your question?
I understand: the handling of the flags is the responsibility of the app using go-astilectron, and not of go-astilectron
itself.
Thus is the ldflags
option implemented within astilectron-bundler
, and not within this library.
Makes sense, question answered. Thanks!