示例#1
0
def command_tools_clean():
    tools = os.path.normpath(os.path.join(TURBULENZROOT, 'tools'))
    if TURBULENZOS == 'win32':
        devenv, vs_version_name, msbuild = find_devenv()
        if not devenv and not msbuild:
            error('Could not find a valid install of Visual Studio')
            return 1
        if vs_version_name == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
            vs_version = '9.0'
        elif vs_version_name == '2010':
            proj_postfix = '-2010.vcxproj'
            sln_postfix = '-2010.sln'
            vs_version = '10.0'
        elif vs_version_name == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'
            vs_version = '11.0'
        if devenv:
            base_cmd = [devenv, '/clean', 'Release']
        elif msbuild:
            base_cmd = [msbuild, '/t:clean', '/p:Configuration=Release',
                        '/p:Platform=Win32', '/p:VisualStudioVersion=%s' % vs_version]

        cgfx2json_proj = os.path.join(tools, 'cgfx2json', 'cgfx2json%s' % proj_postfix)
        cmd = base_cmd + [cgfx2json_proj]
        sh(cmd, console=True, shell=True)

        nvtristrip_sln = os.path.join(tools, 'NvTriStrip', 'NvTriStrip%s' % sln_postfix)
        cmd = base_cmd + [nvtristrip_sln]
        sh(cmd, console=True, shell=True)
    else:
        sh('make clean', cwd=tools)
示例#2
0
def command_tools():
    tools = 'tools'
    tools_bin = 'tools/bin/%s' % TURBULENZOS

    mkdir(tools_bin)
    if TURBULENZOS == 'win32':
        devenv, vs_version = find_devenv()
        if vs_version == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
        elif vs_version == '2010':
            proj_postfix = '-2010.vcxproj'
            sln_postfix = '-2010.sln'
        elif vs_version == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'

        cgfx2json_proj = os.path.normpath(
                            os.path.join(TURBULENZROOT, tools, 'cgfx2json', 'cgfx2json%s' % proj_postfix))
        sh([devenv, cgfx2json_proj, '/build', 'Release'], console=True)
        cp('tools/cgfx2json/Release/cgfx2json.exe', tools_bin)
        cp('external/Cg/bin/cg.dll', tools_bin)
        cp('external/Cg/bin/cgGL.dll', tools_bin)

        nvtristrip_sln = os.path.normpath(
                            os.path.join(TURBULENZROOT, tools, 'NvTriStrip', 'NvTriStrip%s' % sln_postfix))
        sh([devenv, nvtristrip_sln, '/build', 'Release'], console=True)
        cp('tools/NvTriStrip/NvTriStripper/bin/release/NvTriStripper.exe', tools_bin)

    else:
        sh('make', tools, console=True)
        cp('tools/cgfx2json/bin/release/cgfx2json', tools_bin)
        cp('tools/NvTriStrip/NvTriStripper/bin/release/NvTriStripper', tools_bin)
示例#3
0
def command_tools_clean():
    tools = 'tools'
    if TURBULENZOS == 'win32':
        project_file = os.path.join(TURBULENZROOT, tools, 'cgfx2json', 'cgfx2json.vcproj')
        project_file = os.path.normpath(project_file)
        devenv = find_devenv()
        sh([devenv, project_file, '/clean', 'Release'], console=True)
    else:
        sh('make clean', cwd=tools)
示例#4
0
def command_tools_clean():
    tools = 'tools'
    if TURBULENZOS == 'win32':
        project_file = os.path.join(TURBULENZROOT, tools, 'cgfx2json',
                                    'cgfx2json.vcproj')
        project_file = os.path.normpath(project_file)
        devenv = find_devenv()
        sh([devenv, project_file, '/clean', 'Release'], console=True)
    else:
        sh('make clean', cwd=tools)
示例#5
0
def command_tools():
    tools = os.path.normpath(os.path.join(TURBULENZROOT, 'tools'))
    tools_bin = os.path.normpath(os.path.join(tools, 'bin', TURBULENZOS))
    mkdir(tools_bin)

    if TURBULENZOS == 'win32':
        devenv, vs_version_name, msbuild = find_devenv()
        if not devenv and not msbuild:
            error('Could not find a valid install of Visual Studio')
            return 1
        if vs_version_name == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
            vs_version = '9.0'
        elif vs_version_name == '2010':
            proj_postfix = '-2010.vcxproj'
            sln_postfix = '-2010.sln'
            vs_version = '10.0'
        elif vs_version_name == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'
            vs_version = '11.0'
        elif vs_version_name == '2013':
            proj_postfix = '-2013.vcxproj'
            sln_postfix = '-2013.sln'
            vs_version = '12.0'
        if devenv:
            base_cmd = [devenv, '/build', 'Release']
        elif msbuild:
            base_cmd = [
                msbuild, '/t:build', '/p:Configuration=Release',
                '/p:Platform=Win32',
                '/p:VisualStudioVersion=%s' % vs_version
            ]

        cgfx2json_proj = os.path.join(tools, 'cgfx2json',
                                      'cgfx2json%s' % proj_postfix)
        cmd = base_cmd + [cgfx2json_proj]
        sh(cmd, console=True, shell=True)
        cp('%s/cgfx2json/Release/cgfx2json.exe' % tools, tools_bin)
        cp('%s/external/Cg/bin/cg.dll' % TURBULENZROOT, tools_bin)
        cp('%s/external/Cg/bin/cgGL.dll' % TURBULENZROOT, tools_bin)

        nvtristrip_sln = os.path.join(tools, 'NvTriStrip',
                                      'NvTriStrip%s' % sln_postfix)
        cmd = base_cmd + [nvtristrip_sln]
        sh(cmd, console=True, shell=True)
        cp('%s/NvTriStrip/NvTriStripper/bin/release/NvTriStripper.exe' % tools,
           tools_bin)

    else:
        sh('make', cwd=tools, console=True)
        cp('%s/cgfx2json/bin/release/cgfx2json' % tools, tools_bin)
        cp('%s/NvTriStrip/NvTriStripper/bin/release/NvTriStripper' % tools,
           tools_bin)
示例#6
0
def command_tools():
    tools = os.path.normpath(os.path.join(TURBULENZROOT, 'tools'))
    tools_bin = os.path.normpath(os.path.join(tools, 'bin', TURBULENZOS))
    mkdir(tools_bin)

    if TURBULENZOS == 'win32':
        devenv, vs_version_name, msbuild = find_devenv()
        if not devenv and not msbuild:
            error('Could not find a valid install of Visual Studio')
            return 1
        if vs_version_name == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
            vs_version = '9.0'
        elif vs_version_name == '2010':
            proj_postfix = '-2010.vcxproj'
            sln_postfix = '-2010.sln'
            vs_version = '10.0'
        elif vs_version_name == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'
            vs_version = '11.0'
        elif vs_version_name == '2013':
            proj_postfix = '-2013.vcxproj'
            sln_postfix = '-2013.sln'
            vs_version = '12.0'
        if devenv:
            base_cmd = [devenv, '/build', 'Release']
        elif msbuild:
            base_cmd = [msbuild, '/t:build', '/p:Configuration=Release',
                        '/p:Platform=Win32', '/p:VisualStudioVersion=%s' % vs_version]

        cgfx2json_proj = os.path.join(tools, 'cgfx2json', 'cgfx2json%s' % proj_postfix)
        cmd = base_cmd + [cgfx2json_proj]
        sh(cmd, console=True, shell=True)
        cp('%s/cgfx2json/Release/cgfx2json.exe' % tools, tools_bin)
        cp('%s/external/Cg/bin/cg.dll' % TURBULENZROOT, tools_bin)
        cp('%s/external/Cg/bin/cgGL.dll' % TURBULENZROOT, tools_bin)

        nvtristrip_sln = os.path.join(tools, 'NvTriStrip', 'NvTriStrip%s' % sln_postfix)
        cmd = base_cmd + [nvtristrip_sln]
        sh(cmd, console=True, shell=True)
        cp('%s/NvTriStrip/NvTriStripper/bin/release/NvTriStripper.exe' % tools, tools_bin)

    else:
        sh('make', cwd=tools, console=True)
        cp('%s/cgfx2json/bin/release/cgfx2json' % tools, tools_bin)
        cp('%s/NvTriStrip/NvTriStripper/bin/release/NvTriStripper' % tools, tools_bin)
示例#7
0
def command_tools_clean():
    tools = os.path.normpath(os.path.join(TURBULENZROOT, 'tools'))
    if TURBULENZOS == 'win32':
        devenv, vs_version_name, msbuild = find_devenv()
        if not devenv and not msbuild:
            error('Could not find a valid install of Visual Studio')
            return 1
        if vs_version_name == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
            vs_version = '9.0'
        elif vs_version_name == '2010':
            proj_postfix = '-2010.vcxproj'
            sln_postfix = '-2010.sln'
            vs_version = '10.0'
        elif vs_version_name == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'
            vs_version = '11.0'
        elif vs_version_name == '2013':
            proj_postfix = '-2013.vcxproj'
            sln_postfix = '-2013.sln'
            vs_version = '12.0'
        if devenv:
            base_cmd = [devenv, '/clean', 'Release']
        elif msbuild:
            base_cmd = [
                msbuild, '/t:clean', '/p:Configuration=Release',
                '/p:Platform=Win32',
                '/p:VisualStudioVersion=%s' % vs_version
            ]

        cgfx2json_proj = os.path.join(tools, 'cgfx2json',
                                      'cgfx2json%s' % proj_postfix)
        cmd = base_cmd + [cgfx2json_proj]
        sh(cmd, console=True, shell=True)

        nvtristrip_sln = os.path.join(tools, 'NvTriStrip',
                                      'NvTriStrip%s' % sln_postfix)
        cmd = base_cmd + [nvtristrip_sln]
        sh(cmd, console=True, shell=True)
    else:
        sh('make clean', cwd=tools)
示例#8
0
def command_tools_clean():
    tools = 'tools'
    if TURBULENZOS == 'win32':
        devenv, vs_version = find_devenv()
        if vs_version == '2008':
            proj_postfix = '.vcproj'
            sln_postfix = '.sln'
        elif vs_version == '2010':
            proj_postfix = '-2010.vxproj'
            sln_postfix = '-2010.sln'
        elif vs_version == '2012':
            proj_postfix = '-2012.vcxproj'
            sln_postfix = '-2012.sln'

        cgfx2json_proj = os.path.normpath(
                            os.path.join(TURBULENZROOT, tools, 'cgfx2json', 'cgfx2json%s' % proj_postfix))
        sh([devenv, cgfx2json_proj, '/clean', 'Release'], console=True)

        nvtristrip_sln = os.path.normpath(
                            os.path.join(TURBULENZROOT, tools, 'NvTriStrip', 'NvTriStrip%s' % sln_postfix))
        sh([devenv, nvtristrip_sln, '/clean', 'Release'], console=True)
    else:
        sh('make clean', cwd=tools)