Giter Site home page Giter Site logo

Comments (3)

dec avatar dec commented on September 1, 2024

Hello to all,

Just to inform that I trying by forcing some specific version of Cordova Electron like 2.0.0 and 3.0.0... with the same result. Additionally, I try by using a different path in the "ElectronSettingsFilePath" value like:

<platform name="electron"> <preference name="ElectronSettingsFilePath" value="/electron_settings.json" /> </platform>

<platform name="electron"> <preference name="ElectronSettingsFilePath" value="./electron_settings.json" /> </platform>

<platform name="electron"> <preference name="ElectronSettingsFilePath" value=".\electron_settings.json" /> </platform>

... also with the same result... and it's rare, because I also use relative paths in the Cordova config.xml to set the installer icon, for example, and, in this case it's working as expected.

I am near to think that something is wrong here, because I can't believe this "error" is present, I mean, we are talking about to set the configuration file by the "ElectronSettingsFilePath": I see this working in the past, and, probably it's working now...

So there is something wrong in my own app / configuration, but I can't figure it out... since I try several things, paths, the settings file certainly exists, etc., so, I just can't figure out what can be happened.

Any possible help or advice is really appreciated! Thanks in advance for that!

from cordova-electron.

dec avatar dec commented on September 1, 2024

Hello to all,

Finally I can found where is the problem! In my Cordova config.xml file, I have a couple of:

<platform name="electron">

In the first one I place the settings file path and the icons for the electron platform, and, in a second one I place the splash screen file path. When I remove the second "platform" XML tag, I can see that the settings file is now working as expected.

So for some reason Cordova Electron is "overridden" the first "platform" XML tag with the second one, which do not contain the settings file path.

It's a bit rare... because the first "platform" XML stuff contains the icons configuration, and, these are working as expected. So I am not sure why a second "platform" node specifically cause the ignoring of the settings file established in the first "platform" XML node.

Maybe this information can be useful for someone... or maybe this issue will be revised in order to see what is happening if we place a second "platform=electron" node in the Cordova config.xml file.

The point is that in my Cordova config.xml I have also a couple of "platform" nodes for the Android platform, and, apparently both of these nodes are taken and used without problems, so, maybe this must be also the expected behaviour for the case of the electron platform.

from cordova-electron.

dec avatar dec commented on September 1, 2024

Hello to all,

A bit more of information about this issue. I mention that I have a couple of "platform=electron" nodes in my Cordova config.xml file. Ok, if I move the "ElectronSettingsFilePath" seeting to the second "platform=electron" node, then the configuration file is also loaded / taken as expected.

So to me is like if the XML parser take the "ElectronSettingsFilePath" setting from the last "platform=electron" node: if not exists, no matter if exists in the first node, the configuration file is not loaded / taken as expected. Maybe this information can be useful in some manner!

from cordova-electron.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.