コード例 #1
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""

    environ = msys.environ
    msys_root = msys.msys_root
    destination_dir = os.path.abspath(options.destination_dir)
    environ['BDWD'] = msys.windows_to_msys(destination_dir)
    environ['BDBIN'] = '/usr/local/bin'
    environ['BDLIB'] = '/usr/local/lib'
    subsystem = '-mwindows'
    if options.console:
        subsystem = '-mconsole'
    strip = ''
    if options.strip:
        strip = '-Wl,--strip-all'
    environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''),
                                       subsystem,
                                       strip,
                                       sep=' ')
    library_path = os.path.join(msys_root, 'local', 'lib')
    msvcr90_path = os.path.join(destination_dir, 'msvcr90')
    environ['DBMSVCR90'] = msys.windows_to_msys(msvcr90_path)
    # For dependency libraries and msvcrt hiding.
    environ['LIBRARY_PATH'] = merge_strings(msvcr90_path,
                                            environ.get('LIBRARY_PATH', ''),
                                            sep=';')
コード例 #2
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""
    
    environ = msys.environ
    msys_root = msys.msys_root
    destination_dir = os.path.abspath(options.destination_dir)
    environ['BDWD'] = msys.windows_to_msys(destination_dir)
    environ['BDBIN'] = '/usr/local/bin'
    environ['BDLIB'] = '/usr/local/lib'
    subsystem = '-mwindows'
    if options.console:
        subsystem = '-mconsole'
    strip = ''
    if options.strip:
        strip = '-Wl,--strip-all'
    environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''),
                                       subsystem,
                                       strip,
                                       sep=' ')
    library_path = os.path.join(msys_root, 'local', 'lib')
    msvcr90_path = os.path.join(destination_dir, 'msvcr90')
    environ['DBMSVCR90'] = msys.windows_to_msys(msvcr90_path)
    # For dependency libraries and msvcrt hiding.
    environ['LIBRARY_PATH'] = merge_strings(msvcr90_path,
                                            environ.get('LIBRARY_PATH', ''),
                                            sep=';')
コード例 #3
0
 def build(self, msys):
     if self.path is not None:
         msys.environ['BDWD'] = msys.windows_to_msys(self.path)
         return_code = msys.run_shell_script(self.shell_script)
         if return_code != 0:
             raise BuildError("The build for %s failed with code %d" %
                              (self.name, return_code))
     else:
         raise BuildError("No source directory for %s" % self.name)
コード例 #4
0
 def build(self, msys):
     if self.path is not None:
         msys.environ['BDWD'] = msys.windows_to_msys(self.path)
         return_code = msys.run_shell_script(self.shell_script)
         if return_code != 0:
             raise BuildError("The build for %s failed with code %d" %
                              (self.name, return_code))
     else:
         raise BuildError("No source directory for %s" % self.name)
コード例 #5
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""
    
    environ = msys.environ
    msys_root_wp = msys.msys_root
    destination_dir_wp = os.path.abspath(options.destination_dir)
    environ['BDWD'] = msys.windows_to_msys(destination_dir_wp)
    source_mp = default_source_mp
    if options.source_directory:
        source_mp = msys.windows_to_msys(options.source_directory)
    environ['BDBIN'] = source_mp + '/bin'
    environ['BDLIB'] = source_mp + '/lib'
    strip = ''
    if options.strip:
        strip = '-Wl,--strip-all'
    environ['LDFLAGS'] = merge_strings(strip, environ.get('LDFLAGS', ''),
                                       sep=' ')
    msvcr90_wp = os.path.join(destination_dir_wp, 'msvcr90')
    environ['DBMSVCR90'] = msys.windows_to_msys(msvcr90_wp)
    # For dependency libraries and msvcrt hiding.
    environ['LIBRARY_PATH'] = merge_strings(msvcr90_wp,
                                            environ.get('LIBRARY_PATH', ''),
                                            sep=';')
コード例 #6
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""

    environ = msys.environ
    msys_root_wp = msys.msys_root
    destination_dir_wp = os.path.abspath(options.destination_dir)
    environ['BDWD'] = msys.windows_to_msys(destination_dir_wp)
    source_mp = default_source_mp
    if options.source_directory:
        source_mp = msys.windows_to_msys(options.source_directory)
    environ['BDBIN'] = source_mp + '/bin'
    environ['BDLIB'] = source_mp + '/lib'
    strip = ''
    if options.strip:
        strip = '-Wl,--strip-all'
    environ['LDFLAGS'] = merge_strings(strip,
                                       environ.get('LDFLAGS', ''),
                                       sep=' ')
    msvcr90_wp = os.path.join(destination_dir_wp, 'msvcr90')
    environ['DBMSVCR90'] = msys.windows_to_msys(msvcr90_wp)
    # For dependency libraries and msvcrt hiding.
    environ['LIBRARY_PATH'] = merge_strings(msvcr90_wp,
                                            environ.get('LIBRARY_PATH', ''),
                                            sep=';')
コード例 #7
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""
    
    environ = msys.environ

    msys_root_wp = msys.msys_root
    prefix_wp = options.prefix
    if not prefix_wp:
        prefix_wp = environ.get('PREFIX', '')
    if prefix_wp:
        prefix_mp = msys.windows_to_msys(prefix_wp)
    else:
        prefix_mp = default_prefix_mp
        prefix_wp = msys.msys_to_windows(prefix_mp)
    include_mp = prefix_mp + '/include'
    lib_mp = prefix_mp + '/lib'
    subsystem = ''
    if not options.subsystem_noforce:
        subsystem = '-mwindows'
    resources_mp = ''

    environ['PREFIX'] = prefix_mp
    environ.pop('INCLUDE', None)  # INCLUDE causes problems with MIXER.
    environ['CPPFLAGS'] = merge_strings(as_preprocessor_header_path(include_mp),
                                        environ.get('CPPFLAGS', ''),
                                        sep=' ')
    # Need to make the resources object file an explicit linker option to
    # bypass libtool (freetype).
    environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''),
                                       as_linker_lib_path(lib_mp),
                                       as_linker_option(resources_mp),
                                       subsystem,
                                       sep=' ')

    environ['BDCONF'] = as_flag(options.configure and
                                not options.clean_only)
    environ['BDCOMP'] = as_flag(options.compile and
                                not options.clean_only)
    environ['BDINST'] = as_flag(options.install and
                                options.compile and
                                not options.clean_only)
    environ['BDSTRIP'] = as_flag(options.compile and
                                 options.install and
                                 options.strip and
                                 not options.clean_only)
    environ['BDCLEAN'] = as_flag(options.clean or options.clean_only)
    environ['BDMSVCRT_VERSION'] = '%i' % (options.msvcrt_version,)
    environ['BDRESOURCES'] = resources_mp
コード例 #8
0
def set_environment_variables(msys, options):
    """Set the environment variables used by the scripts"""
    
    environ = msys.environ
    msys_root_wp = msys.msys_root
    prefix_wp = options.prefix
    if not prefix_wp:
        prefix_wp = environ.get('PREFIX', '')
    if prefix_wp:
        prefix_mp = msys.windows_to_msys(prefix_wp)
    else:
        prefix_mp = default_prefix_mp
        prefix_wp = msys.msys_to_windows(prefix_mp)
    environ['PREFIX'] = prefix_mp
    environ['BDCONF'] = as_flag(options.configure and
                                not options.clean_only)
    environ['BDCOMP'] = as_flag(options.compile and
                                not options.clean_only)
    environ['BDINST'] = as_flag(options.install and
                                options.compile and
                                not options.clean_only)
    environ['BDSTRIP'] = as_flag(options.compile and
                                 options.install and
                                 options.strip and
                                 not options.clean_only)
    environ['BDCLEAN'] = as_flag(options.clean or options.clean_only)
    environ.pop('INCLUDE', None)  # INCLUDE causes problems with MIXER.
    lib_mp = prefix_mp + '/lib'
    msvcr71_mp = ''
    if options.msvcr71:
        # Hide the msvcrt.dll import libraries with those for msvcr71.dll.
        # Their subdirectory is in the same directory as the SDL library.
        msvcr71_mp = lib_mp + '/msvcr71'
        environ['DBMSVCR71'] = msvcr71_mp
    subsystem = ''
    if not options.subsystem_noforce:
        subsystem = '-mwindows'
    environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''),
                                       as_linker_lib_path(lib_mp),
                                       as_linker_lib_path(msvcr71_mp),
                                       subsystem,
                                       sep=' ')

    # For dependency headers.
    include_wp = prefix_wp + '/include'
    environ['CPATH'] = merge_strings(include_wp, environ.get('CPATH', ''),
                                     sep=';')