asticode/go-astilectron

not load the index.html when I Click start the compiled program in GUI mode

Closed this issue · 4 comments

it works well when I excute the compiled program in command line mode, but when I start the program by clicking in GUI mode, the program does not load any html page, show only blank page, what the problem? I use a MacOS computer

I guess you're using both bootstrap and bundler. Can you share your bootstrap options you provide to the Run method and more specifically your Windows options ?

I use neither bootstrap nor bundler, just the basic usage...

now I find the problem:
when I start the program under command line mod,the work dir is the project dir, and it works good, but it changed to system user dir when I start program by clicking under GUI mod, this leads to the problem that the program can not find the static resources, I don't know why, how can I resovle this problem?

the code:
20210908111825

Since you're not using either bootstrap or bundler, you're left with the default GO/Electron behavior. Unfortunately there's nothing this lib can do for you in this case 😞 Your only solution is to provide absolute paths to functions like what the bundler does.

thank you for the help