Ejemplo n.º 1
0
 def setPathes(self):
     # for building qt with qmake
     utils.prependPath(os.path.join(self.buildDir(), "bin"))
     # so that the mkspecs can be found, when -prefix is set
     utils.putenv("QMAKEPATH", self.sourceDir())
     utils.putenv("QMAKESPEC",
                  os.path.join(self.sourceDir(), 'mkspecs', self.platform))
Ejemplo n.º 2
0
 def _environmentSetup(self):
     # unset make to remove things like jom
     #this cant be set using export
     utils.putenv("MAKE", "")
     out = ""
     for var, val in  self.environment.items():
         out += "%s='%s' " %( var, val )
     return out
Ejemplo n.º 3
0
    def setPathes( self ):
            # for building qt with qmake
        utils.putenv( "PATH", os.path.join( self.buildDir(), "bin" ) + ";" + os.getenv("PATH") )

        # so that the mkspecs can be found, when -prefix is set
        utils.putenv( "QMAKEPATH", self.sourceDir() )
        # to be sure
        utils.putenv( "QMAKESPEC", os.path.join(self.sourceDir(), 'mkspecs', self.platform ))
Ejemplo n.º 4
0
def main():
    shell = MSysShell()
    shell.initEnvironment()
    utils.putenv("MSYS_LOGIN_DIR",os.getcwd())
    utils.system("%s %s" % (os.path.join( shell.msysdir, "bin", "sh.exe" ), "--login -i"))
Ejemplo n.º 5
0
    def initEnvironment(self, cflags="", ldflags=""):
        mergeroot = self.toNativePath(os.getenv("KDEROOT"))
        cflags = "-I%s/include %s" % (mergeroot, cflags)
        ldflags = "-L%s/lib %s" % (mergeroot, ldflags)
        if compiler.isMinGW():
            if self.buildType == "RelWithDebInfo":
                cflags += " -O2 -g "
            elif self.buildType == "Debug":
                cflags += " -O0 -g3 "
        elif compiler.isMSVC():
            utils.putenv("LD", "link.exe")

        utils.putenv("CFLAGS", cflags)
        utils.putenv("LDFLAGS", ldflags)
        #unset make to remove things like jom
        os.unsetenv("MAKE")
        utils.putenv("PATH", "%s;%s" %  ( os.environ.get( "PATH" ), os.path.join( os.environ.get( "KDEROOT" ), "dev-utils", "bin" )))
        #seting perl to prevent msys from using msys-perl
        perl = self.toNativePath(os.path.join( os.environ.get( "KDEROOT" ), "dev-utils", "bin", "perl.exe" ))
        utils.putenv("PERL", perl)
        utils.putenv("INTLTOOL_PERL", perl)

        #prepare path to sue autotools
        utils.putenv("PATH", "%s;%s" %  ( os.environ.get( "PATH" ), os.path.join( os.environ.get( "MSYSDIR" ), "opt", "autotools", "bin" )))
Ejemplo n.º 6
0
def main():
    shell = MSysShell()
    utils.putenv("CHERE_INVOKING","1")
    utils.system("%s --login -i" % shell.sh)
Ejemplo n.º 7
0
    def initEnvironment(self, cflags="", ldflags=""):
        mergeroot = self.toNativePath(os.getenv("KDEROOT"))

        if compiler.isMinGW():
            ldflags = "-L%s/lib %s" % (mergeroot, ldflags)
            cflags = "-I%s/include %s" % (mergeroot, cflags)
            if self.buildType == "RelWithDebInfo":
                cflags += " -O2 -g "
            elif self.buildType == "Debug":
                cflags += " -O0 -g3 "
        elif compiler.isMSVC():
            utils.putenv("LIB", "%s;%s\\lib" % ( os.getenv("LIB"), os.getenv("KDEROOT")))
            utils.putenv("INCLUDE", "%s;%s\\include" % ( os.getenv("INCLUDE"), os.getenv("KDEROOT")))
            utils.putenv("LD", "link")
            utils.putenv("CC", "/share/automake-1.13/compile cl -nologo")
            utils.putenv("CXX", "/share/automake-1.13/compile cl -nologo")
            utils.putenv("NM", "dumpbin -symbols")
            utils.putenv("AR", "/share/automake-1.13/ar-lib lib")
            utils.putenv("WINDRES","rc-windres")
            utils.putenv("RC","rc-windres")
            utils.putenv("STRIP",":")
            utils.putenv("RANLIB",":")
            utils.putenv("F77", "no")
            utils.putenv("FC", "no")
            cflags += " -MD -Zi"

        
        utils.putenv("PKG_CONFIG_PATH", "%s/lib/pkgconfig" % mergeroot)

        utils.putenv("CFLAGS", cflags)
        utils.putenv("LDFLAGS", ldflags)
        #unset make to remove things like jom
        if "MAKE" in os.environ:
            del os.environ["MAKE"]
        utils.putenv("PATH", "%s;%s" %  ( os.environ.get( "PATH" ), os.path.join( os.environ.get( "KDEROOT" ), "dev-utils", "bin" )))
        if not self.options.features.msys2:
            #seting perl to prevent msys from using msys-perl
            perl = self.toNativePath(os.path.join( os.environ.get( "KDEROOT" ), "dev-utils", "bin", "perl.exe" ))
            utils.putenv("PERL", perl)
            utils.putenv("INTLTOOL_PERL", perl)

            #prepare path to use autotools
            utils.putenv("PATH", "%s;%s" %  ( os.environ.get( "PATH" ), os.path.join( self.msysdir, "opt", "autotools", "bin" )))
        else:
            utils.putenv("MSYSTEM","MINGW32")