@@ -659,7 +659,6 @@ private void checkWindowsDLLs(RunnerListener listener, File binary) throws Excep
659659 // Bundled DLLs are in libs/windows-x64 -- copy them next to the binary
660660 File bundledDir = new File (runtimeDir .getParentFile (), "libs/windows-x64" );
661661
662- listener .statusNotice ("CppMode: bundledDir=" + bundledDir .getAbsolutePath () + " exists=" + bundledDir .exists ());
663662 File binaryDir = new File (binary .getParent ());
664663 binaryDir .mkdirs ();
665664
@@ -678,11 +677,12 @@ private void checkWindowsDLLs(RunnerListener listener, File binary) throws Excep
678677 if (!src2 .exists ()) continue ;
679678 // Copy next to binary
680679 try { java .nio .file .Files .copy (src2 .toPath (), new File (binaryDir , dll ).toPath (),
681- java .nio .file .StandardCopyOption .REPLACE_EXISTING ); } catch ( Exception ignored ) {}
682- // Copy to sketch folder
680+ java .nio .file .StandardCopyOption .REPLACE_EXISTING );
681+ } catch ( Exception ignored ) {}
683682 try { java .nio .file .Files .copy (src2 .toPath (), new File (sketch .getFolder (), dll ).toPath (),
684- java .nio .file .StandardCopyOption .REPLACE_EXISTING ); } catch (Exception ignored ) {}
685- break ; // found in this source dir
683+ java .nio .file .StandardCopyOption .REPLACE_EXISTING );
684+ } catch (Exception ignored ) {}
685+ break ;
686686 }
687687 }
688688
@@ -3185,6 +3185,9 @@ else if (!cmd.contains(defaultsCpp.getAbsolutePath()))
31853185 // Link against bundled import libs in libs/windows-x64/
31863186 File winLibs = new File (runtimeDir .getParentFile (), "libs/windows-x64" );
31873187 if (winLibs .exists ()) cmd .add ("-L" + winLibs .getAbsolutePath ());
3188+ // Also add WinLibs portable gcc bin dir for runtime DLLs
3189+ File portableBin = InstallWizard .getPortableGccDir ();
3190+ if (portableBin .exists ()) cmd .add ("-L" + portableBin .getAbsolutePath ());
31883191 Collections .addAll (cmd ,
31893192 "-lglfw3" , "-lglew32" , "-lopengl32" , "-lglu32" ,
31903193 "-lcomdlg32" , "-lshell32" , "-lole32" , "-luuid" ,
0 commit comments