Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func init() {
// On MacOS, only the first thread created by the OS is allowed to be the main GUI thread.
// Also, on Windows, OLE code needs to run on the main thread, which we rely on when creating shortcuts.
runtime.LockOSThread() // This call must be in init().

postInit()
}

func main() {
Expand Down
7 changes: 7 additions & 0 deletions cmd/launcher/post_init_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build linux || darwin
// +build linux darwin

package main

func postInit() {
}
10 changes: 10 additions & 0 deletions cmd/launcher/post_init_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

import "golang.org/x/sys/windows"

func postInit() {
err := windows.SetDllDirectory("")
if err != nil {
panic(err)
}
}
Loading