asticode / go-astilectron

Build cross platform GUI apps with GO and HTML/JS/CSS (powered by Electron)
MIT License
4.9k stars 344 forks source link

I'm not quite sure how I can debug my program while developing, I build with Bootstrap #357

Closed zichen8552 closed 2 years ago

zichen8552 commented 2 years ago

I saw the example https://github.com/asticode/go-astilectron/tree/master/example You can use go run main.go directly to quickly run and see the effect Bootstrap can only be viewed every time a file is generated using astilen-bundler? If I use (go run main.go) directly, it prompts: .\main.go:29:13: undefined: Asset .\main.go:30:13: undefined: AssetDir .\main.go:73:18: undefined: RestoreAssets

asticode commented 2 years ago

you need to run go run *.go so that it takes all go files (including bind file)

zichen8552 commented 2 years ago

$ go run *.go Running app built at

I can use 【astillen-bundlerastillen-bundler】 to generate exe files, but using【 go run *.go】 will prompt 【Running app built at】, and it’s over.

zichen8552 commented 2 years ago

QQ截图20220321104348

asticode commented 2 years ago

If you're looking to use go run *.go you need to use astilectron-bundler bd (note the bd at the end) to only bind data. Can you share all the output if you're still encountering issues ?

zichen8552 commented 2 years ago

That's all the prompts, very few, so I'm not sure what's wrong QQ截图20220321175035

asticode commented 2 years ago

Are you setting the logger properly?

Could you share your bootstrap options ?

zichen8552 commented 2 years ago

Thank you very much for your help, I solved it because the version of C:\Users\Administrator\AppData\Roaming\vendo\rastiletron-v0.51.0.zip is incorrect, it is version 0.49.0 in it.