Commits

Leonard Ritter  committed b999074

mksdl: adding library to module folder

  • Participants
  • Parent commits ef03574

Comments (0)

Files changed (2)

 __pycache__
 *.orig
 *.bgeconf
+*.so
 .project
 .pydevproject
 

File utils/mksdl.py

 SOURCE = "http://hg.libsdl.org/SDL"
 REVISION = "c294faf5fce5"
 THISDIR = os.path.abspath(os.path.dirname(__file__))
+basedir = os.path.abspath(os.path.join(THISDIR, '..'))
 
 def run_linux_build():
-    bindir = os.path.abspath(os.path.join(THISDIR, '..', 'sdl-bin'))
-    targetdir = os.path.abspath(os.path.join(THISDIR, '..', 'sdl-src'))
+    bindir = os.path.abspath(os.path.join(basedir, 'sdl-bin'))
+    targetdir = os.path.abspath(os.path.join(basedir, 'sdl-src'))
     if not os.path.isdir(targetdir):
         cmd = 'hg clone -r {0} {1} {2}'.format(
             REVISION, SOURCE, targetdir)
         print("failed :(")
         return
     
+    # copy over
+    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.")
 
 if __name__ == '__main__':