Lenard Lindstrom  committed 9a6bae5

Update Windows deps build system for SDL 1.2 changeset c5d651a8b679

Additional changes include adding a sources search path option to Also, relative Windows paths are now accepted.

  • Participants
  • Parent commits ff0b5e6
  • Branches default

Comments (0)

Files changed (2)

                        doc="True if the execution environment is MSYS")
     def windows_to_msys(self, path):
-        """Return an MSYS translation of an absolute Windows path
+        """Return an MSYS translation of a Windows path
+        path = os.path.abspath(path)
         msys_root = self.msys_root
         mingw_root = self.mingw_root
         path_lower = path.lower()


 The build environment used: 
-GCC 4.5.0
-MSYS 1.0.13
+GCC 4.6.1
+MSYS 1.0.17
 dx7 headers
-yasm 1.0.1
-see and
+yasm 1.2.0
 The build has been performed on Windows XP, SP3.
             raise BuildError("Preparation '%s' failed with code %d" %
                              (, return_code))
-def configure(dependencies):
+def configure(dependencies, hunt_paths):
     """Find source directories of all dependencies"""
     success = True
              "no more user input is required. The build process will"
              "abort on the first error, as library build order is important.\n"
-             "See --include and --help-args.\n"
+             "See --help-args.\n"
              "For more details see the program's document string\n")
                       help="MSYS directory path, which may include"
                            " the 1.x subdirectory")
+    parser.add_option('-s', '--sources', action='store',
+                      dest='sources',
+                      help="Paths to search for library source directories"
+                           " as a semicolon ';' separated list: defaults to %s"
+                           % (';'.join(hunt_paths),))
     parser.add_option('-p', '--prefix', action='store',
-                      help="Destination directory of the build: defaults to MSYS %s)"
+                      help="Destination directory of the build: defaults to MSYS %s"
                            % (default_prefix_mp,))
     parser.add_option('--help-args', action='store_true', dest='arg_help',
     print_("common CPPFLAGS:", m.environ.get('CPPFLAGS', ''))
     print_("common CFLAGS:", m.environ.get('CFLAGS', ''))
     print_("common LDFLAGS:", m.environ.get('LDFLAGS', ''))
+    sources = hunt_paths
+    if options.sources:
+        sources = options.sources.split(';')
+    print_("library source directories search paths: %s" % (';'.join(sources),))
-        configure(chosen_deps)
+        configure(chosen_deps, sources)
     except BuildError:
         print_("Build aborted:", geterror())
 if [ ! -f "$PREFIX/lib/null.dll.a" ]; then
   dlltool -D null.dll -l "$PREFIX/lib/null.dll.a"
-  cp -fp /mingw/lib/gcc/mingw32/4.5.0/libstdc++.a "$dest_lib/libstdc++_pg.a"
+  cp -fp /mingw/lib/gcc/mingw32/4.6.1/libstdc++.a "$dest_lib/libstdc++_pg.a"
   sed -e "s~^\\(library_names='\\)[^']\\+~\\1null.dll.a~" \
       -e "s~^\\(dependency_libs='\\)[^']\\+~\\1 -lstdc++_pg -lgcc_eh~" \
       -e "s~^\\(libdir='\\)[^']\\+~\\1$PREFIX/lib~" \
-      /mingw/lib/gcc/mingw32/4.5.0/ >"$dest_lib/"
+      /mingw/lib/gcc/mingw32/4.6.1/ >"$dest_lib/"
   sed -e "s~^\\(old_library='\\)[^']\\+~\\1libgcc.a~" \
       -e "s~^\\(dependency_libs='\\)[^']\\+~\\1 -lgcc~" \
       "$dest_lib/" >"$dest_lib/"