--- a/scripts/wrap/__main__.py
+++ b/scripts/wrap/__main__.py
@@ -1624,7 +1624,7 @@
                     cpp_files_text = ''
                     for i in cpp_files:
                         cpp_files_text += ' ' + os.path.relpath(i)
-                    libmupdfcpp = f'{build_dirs.dir_so}/libmupdfcpp.so{so_version}'
+                    libmupdfcpp = f'{build_dirs.dir_so}/libmupdfcpp.dll'
                     libmupdf = f'{build_dirs.dir_so}/libmupdf.so{so_version}'
                     if pyodide:
                         # Compile/link separately. Otherwise
@@ -1687,7 +1687,8 @@
                                     -I {include1}
                                     -I {include2}
                                     {cpp_files_text}
-                                    {link_l_flags(libmupdf)}
+                                    -L {build_dirs.dir_so}
+                                    -l:libmupdf.dll
                                 ''')
                                 )
                         command_was_run = jlib.build(
@@ -2981,6 +2982,6 @@
                 if state.state_.windows:
                     command_venv_enter = f'{venv}\\Scripts\\activate.bat'
                 else:
-                    command_venv_enter = f'. {venv}/bin/activate'
+                    command_venv_enter = f'bash {venv}/bin/activate'
 
                 command = f'{command_venv_enter} && python -m pip install --upgrade pip'
--- a/scripts/wrap/state.py
+++ b/scripts/wrap/state.py
@@ -66,8 +66,8 @@
 class State:
     def __init__( self):
         self.os_name = platform.system()
-        self.windows = (self.os_name == 'Windows' or self.os_name.startswith('CYGWIN'))
-        self.cygwin = self.os_name.startswith('CYGWIN')
+        self.windows = False
+        self.cygwin = False
         self.openbsd = self.os_name == 'OpenBSD'
         self.linux = self.os_name == 'Linux'
         self.macos = self.os_name == 'Darwin'
