Skip to content

Commit 1ecc3d9

Browse files
author
cair
committed
feat: fix dll path check on windows
1 parent 0b6139c commit 1ecc3d9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cmd/ggo/launch/launch_windows.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,10 @@ func runLaunch(args []string, shareLink, serverURL string, verbose bool) error {
189189

190190
// Get required DLLs based on vendor
191191
requiredDLLs := studio.GetWindowsLibraryNames(vendor)
192+
libDir := filepath.Join(cacheDir, "libs")
192193
missingDLLs := []string{}
193194
for _, dll := range requiredDLLs {
194-
dllPath := filepath.Join(cacheDir, dll)
195+
dllPath := filepath.Join(libDir, dll)
195196
if _, err := os.Stat(dllPath); os.IsNotExist(err) {
196197
missingDLLs = append(missingDLLs, dll)
197198
}
@@ -214,7 +215,7 @@ func runLaunch(args []string, shareLink, serverURL string, verbose bool) error {
214215

215216
// Set DLL search directory BEFORE launching the process
216217
// This ensures our stub DLLs are found before System32
217-
if err := SetDllDirectory(cacheDir); err != nil {
218+
if err := SetDllDirectory(libDir); err != nil {
218219
return fmt.Errorf("failed to set DLL directory: %w", err)
219220
}
220221

@@ -235,7 +236,7 @@ func runLaunch(args []string, shareLink, serverURL string, verbose bool) error {
235236
out.Println()
236237
}
237238

238-
klog.Infof("SetDllDirectory set to: %s", cacheDir)
239+
klog.Infof("SetDllDirectory set to: %s", libDir)
239240
klog.Infof("Launching: %v", args)
240241

241242
// Find the executable

0 commit comments

Comments
 (0)