Пример #1
0
def _polycode_build_and_install( buildPath, buildType, log_file ):
    
    if sys.platform == 'linux2':
        typePth = buildPath + '/' + buildType
        if not os.path.isdir(typePth):
            os.mkdir(typePth)
        os.chdir(typePth)

        heliumbuildtools.cmakeGenerate( buildType, 'Unix Makefiles', '../..', [], log_file )
        heliumbuildtools.runCmd(['make'], log_file)
        heliumbuildtools.runCmd(['make', 'install'], log_file)

    elif sys.platform == 'win32':
        os.chdir(buildPath)
        heliumbuildtools.cmakeGenerate( buildType, 'Visual Studio 11', '..', [], log_file )
        
        cmd = 'c:/Windows/Microsoft.NET/Framework'
        arg1 = 'ALL_BUILD.vcxproj'                   
        arg2 = '/p:Configuration='+buildType
        arg3 = '/nologo'
        heliumbuildtools.runCmd([cmd, arg1, arg2, arg3], log_file)
        
        arg1 = 'INSTALL.vcxproj'                   
        heliumbuildtools.runCmd([cmd, arg1, arg2, arg3], log_file)
    
    return
Пример #2
0
    '\tHelium buld : platform       : '+ targetPlatform+'\n'+\
    '------------------------------------------------------------\n'
print('\n')
print(header)

sandboxDir = rootScriptName + '/product'

if not os.path.isdir(sandboxDir):
    os.mkdir(sandboxDir)

buildDir = sandboxDir + '/' + buildType

if os.path.isdir(buildDir):
    shutil.rmtree(buildDir)
os.mkdir(buildDir)

log_file = open(buildDir+'/Heluim_'+buildType+'_build.log', 'w')
log_file.write(header)
log_file.write('\n')

os.chdir(buildDir)

heliumbuildtools.cmakeGenerate( buildType, cmakeGenerator, '../../..',[''], log_file )
heliumbuildtools.buildProject( buildType, log_file )
heliumbuildtools.installProject( buildType, log_file )

log_file.close()

os.chdir(rootScriptName)