@@ -416,10 +416,22 @@ def setup_platform(cls):
416
416
cls .LIBRARY_PATH = _
417
417
else :
418
418
if ConfigInstall .OS .on_windows :
419
- ngspice_path = Path (__file__ ).parent .joinpath ('Spice64_dll' )
420
- cls .NGSPICE_PATH = ngspice_path
421
- # path = ngspice_path.joinpath('dll-vs', 'ngspice-{version}{id}.dll')
422
- path = ngspice_path .joinpath ('dll-vs' , 'ngspice{}.dll' )
419
+ # Check for MSYSTEM environment first
420
+ msystem = os .environ .get ('MSYSTEM' )
421
+ mingw_prefix = os .environ .get ('MINGW_PREFIX' )
422
+
423
+ if msystem and mingw_prefix :
424
+ # Use MINGW paths
425
+ path = str (Path (mingw_prefix ) / 'bin' / 'libngspice-0{}.dll' )
426
+ if 'SPICE_LIB_DIR' not in os .environ :
427
+ os .environ ['SPICE_LIB_DIR' ] = str (Path (mingw_prefix ) / 'share' / 'ngspice' / 'scripts' )
428
+ else :
429
+ # Fall back to original Windows paths
430
+ ngspice_path = Path (__file__ ).parent .joinpath ('Spice64_dll' )
431
+ cls .NGSPICE_PATH = ngspice_path
432
+ # path = ngspice_path.joinpath('dll-vs', 'ngspice-{version}{id}.dll')
433
+ path = str (ngspice_path .joinpath ('dll-vs' , 'ngspice{}.dll' ))
434
+
423
435
elif ConfigInstall .OS .on_osx :
424
436
path = 'libngspice{}.dylib'
425
437
elif ConfigInstall .OS .on_linux :
@@ -619,7 +631,8 @@ def _send_char(message_c, ngspice_id, user_data):
619
631
func = self ._logger .info
620
632
elif content .startswith ('Warning:' ):
621
633
func = self ._logger .warning
622
- # elif content.startswith('Warning:'):
634
+ elif content .startswith ('Using' ): # Ignore "Using ... as Direct Linear Solver" messages
635
+ func = self ._logger .debug
623
636
else :
624
637
self ._error_in_stderr = True
625
638
func = self ._logger .error
0 commit comments