wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.18k stars 1.21k forks source link

Any plan about customize startURL? #3181

Open secoba opened 10 months ago

secoba commented 10 months ago

Is your feature request related to a problem? Please describe.

customize startURL, change default wails://

Describe the solution you'd like

export "const startURL = "wails://wails/""

Describe alternatives you've considered

No response

Additional context

image image
leaanthony commented 10 months ago

Hi! Thanks for opening this. What are the reasons for wanting this? Thanks.

secoba commented 9 months ago

Hi~ sometimes will callback app custom url schema.

W1M0R commented 5 months ago

@leaanthony @stffabi I'm also interested in being able to configure the startUrl (especially for windows): https://github.com/wailsapp/wails/blob/8e88e1454f6613670a77b3b07776adb2fbf570b1/v2/internal/frontend/desktop/windows/frontend.go#L36

I'm running an Echo server in a goroutine within my wails app and rendering html using the htmx library. I want the startUrl to point to the url of the Echo server, e.g. http://localhost:8090. Ideally, when I configure the Wails App options, I'd like to be able to specify a StartURL option, that would then be used instead of the built-in hard-coded startUrl. I'd be fine with loosing the wails rpc functionality, since most of by app is implemented by my Echo server backend.

This is still a desktop app, but based on the HATEOS paradigm (https://intercoolerjs.org/2016/05/08/hatoeas-is-for-humans.html), which prefers html and server-side state, with minimal javascript.

This issue is probably also related to:

  1. https://github.com/wailsapp/wails/issues/2116
  2. https://github.com/wailsapp/wails/issues/2116#issuecomment-1328010219
  3. https://github.com/wailsapp/wails/issues/1516
  4. https://github.com/wailsapp/wails/issues/1516#issuecomment-1172906284
  5. https://github.com/wailsapp/wails/issues/1516#issuecomment-1938575895

I'm currently trying to replace wails with webview/webview-go directly, just because I want to navigate to my own url, but this is proving to be quite a pain, especially with cross-compilation and CGO. Wails solves quite a few problems very well, and I'd prefer to just stick with Wails if I could.