Commits

Leonard Ritter committed 5b7bd1c

win32 compatibility

  • Participants
  • Parent commits d17e66f

Comments (0)

Files changed (3)

-python utils/mksdl.py $*
+@echo off
+python utils/mksdl.py %*
 
+python utils/mksdl.py $*
+
 REVISION = "c294faf5fce5"
 THISDIR = os.path.abspath(os.path.dirname(__file__))
 basedir = os.path.abspath(os.path.join(THISDIR, '..'))
+bindir = os.path.abspath(os.path.join(basedir, 'sdl-bin'))
+targetdir = os.path.abspath(os.path.join(basedir, 'sdl-src'))
 
-def run_linux_build():
-    bindir = os.path.abspath(os.path.join(basedir, 'sdl-bin'))
-    targetdir = os.path.abspath(os.path.join(basedir, 'sdl-src'))
+def clone_repo():
     if not os.path.isdir(targetdir):
         cmd = 'hg clone -r {0} {1} {2}'.format(
             REVISION, SOURCE, targetdir)
         if os.system(cmd):
             print("failed :(")
             return
+    return True
+
+def run_win32_build():
+    if not clone_repo():
+        return
+
+def run_linux_build():
+    if not clone_repo():
+        return
     
     os.chdir(targetdir)
     builddir = os.path.join(targetdir, 'build')
 if __name__ == '__main__':
     if sys.platform == 'linux2':
         run_linux_build()
+    elif sys.platform == 'win32':
+        run_win32_build()