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

Suddenly not working anymore #366

Closed GameBurrow closed 2 years ago

GameBurrow commented 2 years ago

I have 2 computers, one running Windows 10 and one running Windows 11. Both are quite cleanly installed. When open my executables that have been built by astielectron, they look like this:

image

The computer that is running Windows 10, was my main computer up until last week. The same version of the .exe worked just fine there both with Win 11 and Win 11.

Just incease tried to update all go packages and rebuild, still the same.

It should look like this: image

asticode commented 2 years ago

Mmmm it seems the .html is not loaded properly 🤔 And the icon next to the window title is the wrong one too...

Can you tell me if there's something at C:\Users\kerts\AppData\Roaming\GO Group Virtual OMSI Tool\resources\icon.png ?

GameBurrow commented 2 years ago

Mmmm it seems the .html is not loaded properly 🤔 And the icon next to the window title is the wrong one too...

Can you tell me if there's something at C:\Users\kerts\AppData\Roaming\GO Group Virtual OMSI Tool\resources\icon.png ?

Not at all image

asticode commented 2 years ago

Are you using the bundler?

GameBurrow commented 2 years ago

Are you using the bundler?

Yep. My entire project is open-sourced: https://gitlab.com/gogroupvirtual/omsi-map-overhaul-generator

packet-sent commented 2 years ago

I was having something like this so I just ended up using go embed to bundle the resources in the binary itself. So it could be used as a temp fix if you want, until you find whats the real fix.

asticode commented 2 years ago

From which directory are you running the bundler ? And what are the ouput logs ?

I think what's happening is that you're not running the bundler from inside your src directory, therefore your resources are not binded to the binary.

GameBurrow commented 2 years ago

As I said, it worked before.

This .exe https://gitlab.com/gogroupvirtual/omsi-map-overhaul-generator/-/releases/0.7.1, built 2 months ago. Worked up just fine, starting from around last week. It no longer works. Same - already built .exe

asticode commented 2 years ago

This stopped working at this commit: without the Asset methods, the bootstrap has no way to disembed resources properly.

GameBurrow commented 2 years ago

Ah I see. I'm guessing it worked on the old computer because I already had the files there from previous runs.

Let me try to fix that.

GameBurrow commented 2 years ago

Indeed, that was the cause.