-
Notifications
You must be signed in to change notification settings - Fork 21
Description
With go library v2.4.2 the following issues occur:
Issue 1: when using the following -tags webui_log with Go build, a linker error occurs:
go build -ldflags "-w -s " -tags webui_log -o ..\path\to\output.exe
/x86_64-w64-mingw32/bin/ld.exe: cannot find -lwebui-2-static: No such file or directory
collect2.exe: error: ld returned 1 exit status
Without -tags webui_log the program compiles with out any error.
Issue 2: The following does not work similar to Custom web server application in C and Nim repo examples:
if os.Getenv("Desktop") != "" {
ch := make(chan int)
go runServer(r, ch) // r is *gin.Engine, listen and serve on http://localhost:8080/
w := ui.NewWindow()
w.SetPort(8081)
w.Show("http://localhost:8080/")
ui.Wait()
res := <-ch
println("Exiting program ", res)
}
It seems window closes on timeout (30 s) whereas server continues to run.
Also, minimal.go in examples work, but the following doesnt work (window closes abruptly):
ch := make(chan int)
go runServer(r, ch) // r is *gin.Engine, listen and serve on http://localhost:8080/
w := ui.NewWindow()
w.Show("<html><head><script src=\"webui.js\"></script></head> Hello World</html>")
w.Navigate("http://localhost:8080/") // if this line is commented out the window doesnt close abruptly
ui.Wait()
res := <-ch
println("Exiting program ", res)