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))
def make(self): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): command = "vcbuild /M1 %s \"%s|WIN32\"" % ( self.__slnFileName(), self.buildType()) elif compiler.isMSVC2015(): command = "msbuild /maxcpucount %s /t:ALL_BUILD /p:Configuration=\"%s\"" % ( self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): EmergeDebug.die("has to be implemented") elif self.subinfo.options.cmake.useCTest: # first make clean self.system(self.makeProgramm + " clean", "make clean") command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system(command, "make")
def make( self ): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): if self.isTargetBuild(): command = "vcbuild /M1 %s \"%s|Windows Mobile 6 Professional SDK (ARMV4I)\"" % (self.__slnFileName(), self.buildType()) else: command = "vcbuild /M1 %s \"%s|WIN32\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): utils.die("has to be implemented"); elif self.subinfo.options.cmake.useCTest: # first make clean self.system( self.makeProgramm + " clean", "make clean" ) command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) if self.isTargetBuild(): self.setupTargetToolchain() return self.system( command, "make" )
def make( self ): """implements the make step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) if self.subinfo.options.cmake.openIDE: if compiler.isMSVC2008(): command = "start %s" % self.__slnFileName() elif compiler.isMSVC2010(): command = "start vcexpress %s" % self.__slnFileName() elif self.subinfo.options.cmake.useIDE: if compiler.isMSVC2008(): command = "vcbuild /M1 %s \"%s|WIN32\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2015(): command = "msbuild /maxcpucount %s /t:ALL_BUILD /p:Configuration=\"%s\"" % (self.__slnFileName(), self.buildType()) elif compiler.isMSVC2010(): EmergeDebug.die("has to be implemented"); elif self.subinfo.options.cmake.useCTest: # first make clean self.system( self.makeProgramm + " clean", "make clean" ) command = "ctest -M " + "Nightly" + " -T Start -T Update -T Configure -T Build -T Submit" else: command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system( command, "make" )
def make( self ): """implements the make step for Makefile projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system( command, "make" )
def make(self): """implements the make step for Makefile projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) command = ' '.join([self.makeProgramm, self.makeOptions()]) return self.system(command, "make")
def install( self ): if self.isTargetBuild(): # Configuring Qt for WinCE ignores the -prefix option, # so we have to do the job manually... # delete this because it is not working for windows utils.deleteFile( os.path.join( self.buildDir(), "plugin", "bearer", "qnmbearerd4.dll" )) utils.deleteFile( os.path.join( self.buildDir(), "plugin", "bearer", "qnmbearer4.dll" )) # syncqt expects qconfig.h to be in the install dir and fails if not utils.createDir( os.path.join( self.installDir(), "src", "corelib", "global") ) utils.copyFile( os.path.join( self.buildDir(), "src", "corelib", "global", "qconfig.h" ), os.path.join( self.installDir(), "src", "corelib" , "global", "qconfig.h" ) ) # headers need to be copied using syncqt because of the relative paths utils.prependPath(self.sourceDir(), "bin") command = os.path.join(self.sourceDir(), "bin", "syncqt.bat") command += " -base-dir \"" + self.sourceDir() + "\"" command += " -outdir \"" + self.installDir() + "\"" command += " -copy" command += " -quiet" utils.system( command ) utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "bin" ) , os.path.join( self.installDir(), "bin" ) ) utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "lib" ) , os.path.join( self.installDir(), "lib" ) ) # the dlls must be copied to the bin dir too for file in os.listdir( os.path.join( self.installDir(), "lib" ) ): if file.endswith( ".dll" ): utils.copyFile( os.path.join( self.installDir(), "lib" , file ), os.path.join( self.installDir(), "bin" , file ) ) utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "mkspecs" ) , os.path.join( self.installDir(), "mkspecs" ) ) utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "plugins" ) , os.path.join( self.installDir(), "plugins" ) ) # create qt.conf utils.copyFile( os.path.join( self.packageDir(), "qt.conf" ), os.path.join( self.installDir(), "bin", "qt.conf" ) ) return True if not QMakeBuildSystem.install(self): return False # Workaround QTBUG-12034 utils.copySrcDirToDestDir( os.path.join( self.buildDir(), "plugins", "imageformats" ) , os.path.join( self.installDir(), "bin", "imageformats" ) ) # create qt.conf utils.copyFile( os.path.join( self.packageDir(), "qt.conf" ), os.path.join( self.installDir(), "bin", "qt.conf" ) ) # install msvc debug files if available if self.buildType() == "Debug" and (self.compiler() == "msvc2005" or self.compiler() == "msvc2008" or self.compiler() == "msvc2010"): srcdir = os.path.join( self.buildDir(), "lib" ) destdir = os.path.join( self.installDir(), "lib" ) filelist = os.listdir( srcdir ) for file in filelist: if file.endswith( ".pdb" ): utils.copyFile( os.path.join( srcdir, file ), os.path.join( destdir, file ) ) return True
def configure( self, defines=""): """implements configure step for cmake projects""" self.enterBuildDir() utils.prependPath(self.rootdir, self.envPath) command = r"""cmake -G "%s" %s""" % (self.__makeFileGenerator(), self.configureOptions(defines) ) with open(os.path.join(self.buildDir(), "cmake-command.bat"), "w") as fc: fc.write(command) return self.system( command, "configure", 0 )
def configure( self, buildType=None, defines=""): thirdparty_dir = os.path.join( self.buildDir(), "3rdparty" ) utils.prependPath(self.buildDir(), "bin") configure = os.path.join( self.sourceDir(), "configure.exe" ).replace( "/", "\\" ) self.enterBuildDir() # so that the mkspecs can be found, when -prefix is set os.putenv( "QMAKEPATH", self.sourceDir() ) # configure qt # prefix = os.path.join( self.rootdir, "qt" ).replace( "\\", "/" ) prefix = self.installDir() platform = "" libtmp = os.getenv( "LIB" ) inctmp = os.getenv( "INCLUDE" ) if self.compiler() == "msvc2005" or self.compiler() == "msvc2008": platform = "win32-%s" % self.compiler() elif self.compiler() == "mingw": os.environ[ "LIB" ] = "" os.environ[ "INCLUDE" ] = "" platform = "win32-g++" else: exit( 1 ) os.environ[ "USERIN" ] = "y" userin = "y" command = r"echo %s | %s -opensource -platform %s -prefix %s " \ "-qt-gif -qt-libpng -qt-libjpeg -qt-libtiff -plugin-sql-mysql " \ "-no-phonon -qdbus -openssl -dbus-linked " \ "-fast -no-vcproj -no-dsp -plugin-sql-mysql " \ "-nomake demos -nomake examples -nomake docs " \ "-I \"%s\" -L \"%s\" " % \ ( userin, configure, platform, prefix, os.path.join( thirdparty_dir, "include" ), os.path.join( thirdparty_dir, "lib" ) ) if self.buildType() == "Debug": command = command + " -debug " else: command = command + " -release " print "command: ", command utils.system( command ) if( not libtmp == None ): os.environ[ "LIB" ] = libtmp if( not inctmp == None ): os.environ[ "INCLUDE" ] = inctmp return True
def install( self ): qtbindir = os.path.join( self.workdir, self.instsrcdir ) utils.prependPath(qtbindir, "bin") os.chdir(qtbindir) self.system( "%s install" % self.cmakeMakeProgramm ) src = os.path.join( self.packagedir, "qt.conf" ) dst = os.path.join( self.imagedir, self.instdestdir, "bin", "qt.conf" ) shutil.copy( src, dst ) if self.buildType == "Debug" and (self.compiler == "msvc2005" or self.compiler == "msvc2008"): srcdir = os.path.join( qtbindir, "lib" ) destdir = os.path.join( self.imagedir, self.instdestdir, "lib" ) filelist = os.listdir( srcdir ) for file in filelist: if file.endswith( ".pdb" ): shutil.copy( os.path.join( srcdir, file ), os.path.join( destdir, file ) ) return True
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 ))
def compile( self ): qtsrcdir = os.path.join( self.kdesvndir, self.kdeSvnPath() ) qtbindir = os.path.join( self.workdir, self.instsrcdir ) thirdparty_dir = os.path.join( self.workdir, "3rdparty" ) utils.prependPath(qtbindir, "bin") configure = os.path.join( qtsrcdir, "configure.exe" ).replace( "/", "\\" ) if not os.path.exists( qtbindir ): os.mkdir( qtbindir ) os.chdir( qtbindir ) # so that the mkspecs can be found, when -prefix is set os.putenv( "QMAKEPATH", qtsrcdir ) # configure qt # prefix = os.path.join( self.rootdir, "qt" ).replace( "\\", "/" ) prefix = os.path.join( self.imagedir, self.instdestdir ) platform = "" libtmp = os.getenv( "LIB" ) inctmp = os.getenv( "INCLUDE" ) if self.compiler == "msvc2005" or self.compiler == "msvc2008": platform = "win32-%s" % self.compiler elif self.compiler == "mingw": os.environ[ "LIB" ] = "" os.environ[ "INCLUDE" ] = "" platform = "win32-g++" else: exit( 1 ) if self.buildTarget == '4.4.3-3': os.environ[ "USERIN" ] = "y" userin = "y" else: os.environ[ "USERIN" ] = "y" userin = "y" os.chdir( qtbindir ) command = r"echo %s | %s -opensource -platform %s -prefix %s " \ "-qt-gif -qt-libpng -qt-libjpeg -qt-libtiff " \ "-no-phonon -qdbus -openssl -dbus-linked " \ "-fast -no-vcproj -no-dsp " \ "-nomake demos -nomake examples -nomake docs " \ "-I \"%s\" -L \"%s\" " % \ ( userin, configure, platform, prefix, os.path.join( thirdparty_dir, "include" ), os.path.join( thirdparty_dir, "lib" ) ) if self.buildType == "Debug": command = command + " -debug " else: command = command + " -release " print "command: ", command self.system( command ) # build qt self.system( self.cmakeMakeProgramm ) # build Qt documentation - currently does not work with mingw # it does not work with msvc either; unless you have a Qt4-Installation # already at hand. (otherwise qdoc3 fails to locate qtxml4.dll) # #if self.compiler == "msvc2005": # self.system( self.cmakeMakeProgramm + " docs" ) if( not libtmp == None ): os.environ[ "LIB" ] = libtmp if( not inctmp == None ): os.environ[ "INCLUDE" ] = inctmp return True