Source

pysdl-cffi / utils / mksdl.py

Diff from to

File utils/mksdl.py

 def run_win32_build():
     if not clone_repo():
         return
+    builddir = os.path.join(targetdir, 'VisualC', 'SDL', 'Release')
+    if not os.path.isdir(builddir):
+        print("You must build the visual studio solution file in release mode first.")
+        return
+    if os.path.isdir(bindir):
+        print("Removing stale {0}...".format(bindir))
+        shutil.rmtree(bindir)
+    os.makedirs(bindir)
+    shutil.copytree(
+        os.path.join(targetdir, 'include'), 
+        os.path.join(bindir, 'include'))
+    libdir = os.path.join(bindir, 'lib')
+    os.makedirs(libdir)
+    shutil.copy2(
+        os.path.join(builddir, 'SDL2.lib'),
+        libdir)
+    shutil.copy2(
+        os.path.join(builddir, 'SDL2.dll'),
+        os.path.join(basedir, 'sdl'))
 
 def run_linux_build():
     if not clone_repo():
         return
     
     # copy over
-    shutil.copy2(os.path.join(bindir, 'lib', 'libSDL2-2.0.so.0.0.0'),
-        os.path.join(basedir, 'sdl', 'libSDL2.so'))
+    #shutil.copy2(os.path.join(bindir, 'lib', 'libSDL2-2.0.so.0.0.0'),
+    #    os.path.join(basedir, 'sdl', 'libSDL2.so'))
     
     print("SDL is ready.")