asticode / go-astilectron-demo

Discover the power of Astilectron through a demo app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo doesn't run at all

GreeDev opened this issue · comments

D:\GoLand\TestProject\go-astilectron-demo>astilectron-bundler -v
DEBU[0000] Creating D:\GoLand\TestProject\go-astilectron-demo\output app_name= source="bundler.go:316"
DEBU[0000] Bundling for environment windows/amd64 app_name= source="bundler.go:324"
DEBU[0000] Binding data app_name= source="bundler.go:336"
DEBU[0000] Removing C:\Users\sunm5\AppData\Local\Temp\astibundler\bind app_name= source="bundler.go:415"
DEBU[0000] Creating C:\Users\sunm5\AppData\Local\Temp\astibundler\bind app_name= source="bundler.go:422"
DEBU[0000] Creating C:\Users\sunm5\AppData\Local\Temp\astibundler\bind\vendor_astilectron_bundler app_name= source="bundler.go:467"
DEBU[0000] Creating C:\Users\sunm5\AppData\Local\Temp\astibundler\cache app_name= source="bundler.go:474"
DEBU[0000] C:\Users\sunm5\AppData\Local\Temp\astibundler\cache\astilectron-0.32.0.zip already exists, skipping download of https://github.com/asticode/astilectron/archive/v0.32.0.zip app_name= source="bundler.
go:503"
DEBU[0000] Copying C:\Users\sunm5\AppData\Local\Temp\astibundler\cache\astilectron-0.32.0.zip to C:\Users\sunm5\AppData\Local\Temp\astibundler\bind\vendor_astilectron_bundler\astilectron.zip app_name= source="
bundler.go:512"
DEBU[0000] C:\Users\sunm5\AppData\Local\Temp\astibundler\cache\electron-windows-amd64-4.0.1.zip already exists, skipping download of https://github.com/electron/electron/releases/download/v4.0.1/electron-v4.0.1
-win32-x64.zip app_name= source="bundler.go:503"
DEBU[0000] Copying C:\Users\sunm5\AppData\Local\Temp\astibundler\cache\electron-windows-amd64-4.0.1.zip to C:\Users\sunm5\AppData\Local\Temp\astibundler\bind\vendor_astilectron_bundler\electron.zip app_name= s
ource="bundler.go:512"
DEBU[0000] Creating C:\Users\sunm5\AppData\Local\Temp\astibundler\bind\resources app_name= source="bundler.go:552"
DEBU[0000] Copying D:\GoLand\TestProject\go-astilectron-demo\resources to C:\Users\sunm5\AppData\Local\Temp\astibundler\bind\resources app_name= source="bundler.go:560"
DEBU[0009] Generating D:\GoLand\TestProject\go-astilectron-demo\bind_windows_amd64.go app_name= source="bundler.go:459"
DEBU[0016] Running rsrc for icon D:\GoLand\TestProject\go-astilectron-demo\resources\icon.ico into D:\GoLand\TestProject\go-astilectron-demo\windows.syso app_name= source="bundler.go:595"
DEBU[0016] Removing D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64 app_name= source="bundler.go:415"
DEBU[0016] Creating D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64 app_name= source="bundler.go:422"
DEBU[0017] Building for os windows and arch amd64 app_name= source="bundler.go:375"
DEBU[0017] Executing go build -ldflags -H "windowsgui" -X "main.AppName=Astilectron demo" -X "main.BuiltAt=2019-09-25 08:42:29.1268423 +0900 KST m=+16.956192101" -o D:\GoLand\TestProject\go-astilectron-demo\out
put\windows-amd64\binary . app_name= source="bundler.go:393"
DEBU[0032] Moving D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\binary to D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\Astilectron demo.exe app_name= source="bundler.go:741"

the build works well, but when I run it, nothing happens.

Can you paste logs when you run D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\Astilectron demo.exe -v?

When I ran
"D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\Astilectron demo.exe" -v
there's no log.

I renamed Astilectron demo.exe to AstilectronDemo.exe and ran
D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\AstilectronDemo.exe -v
nothing happened.
Is the log .txt file?

Mmm this is really weird, logs should appear in the terminal (stdout). Have you made any changes to the demo? You're running the binary from a terminal right?

I installed go-astilectron with
go get -u github.com/asticode/go-astilectron/...
I donwloaded demo with
go get -u github.com/asticode/go-astilectron-demo/...
and bundler,
go get -u github.com/asticode/go-astilectron-bundler/...

I removed bind.go
and I used GoLand terminal for ran
"D:\GoLand\TestProject\go-astilectron-demo\output\windows-amd64\Astilectron demo.exe" -v

What happens if you double click the .exe file instead ?

nothing happens.

I remember having some similar problems when I used Avast. Can you try disabling your antivirus and try again?

I dont have Avast.
I stopped Malwarebyte Free, turned off Windows defender, removed nprotect online security and nxTs.
but still nothing happen.

Can you upload the generated binary so that I can test it in a Windows?

When I bundle the file, the size is slightly different.

Can you try executing this file in windows and tell me whether this is working?

it has same problem.
nothing happens.
Is there more thing I should install?

I had the same issue then deleted C:/Users/<your user>/AppData/Roaming/Astilectron Demo directory. Can you confirm that when you delete this folder, the binary I uploaded works on your machine?

OHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

Now it works well!
why wasn't it works well???

I don't know why, but your build seems to have mixed up resources. Can you try:

  • git pull --rebase the following projects: go-astilectron, go-astilectron-bundler, go-astilectron-demo
  • go install ./... the project go-astilectron-bundler
  • remove the directory from my previous comment
  • bundle the demo
  • try again?

Now It works well!
I re-bundled the demo projcet, ran, works well!
really thank you.

(and I dont know about git well :/)

Cheers