def buildPackage():
    versionInfo = MSVC_VERSION_TABLE[ARGS.msvc_version]

    packageName = "winpty-%s-%s" % (
        common_ship.winptyVersion,
        versionInfo["package_name"],
    )

    packageRoot = os.path.join(common_ship.topDir, "ship/packages")
    packageDir = os.path.join(packageRoot, packageName)
    packageFile = packageDir + ".zip"

    common_ship.rmrf([packageDir])
    common_ship.rmrf([packageFile])
    common_ship.mkdir(packageDir)

    checkoutGyp()
    cleanMsvc()
    build("ia32", packageDir, True)
    build("x64", packageDir, True)
    cleanMsvc()
    build("ia32", packageDir)
    build("x64", packageDir)

    topDir = common_ship.topDir

    common_ship.mkdir(packageDir + "/include")
    shutil.copy(topDir + "/src/include/winpty.h",               packageDir + "/include")
    shutil.copy(topDir + "/src/include/winpty_constants.h",     packageDir + "/include")
    shutil.copy(topDir + "/LICENSE",                            packageDir)
    shutil.copy(topDir + "/README.md",                          packageDir)
    shutil.copy(topDir + "/RELEASES.md",                        packageDir)

    subprocess.check_call([ZIP_TOOL, "a", packageFile, "."], cwd=packageDir)
def buildPackage():
    versionInfo = MSVC_VERSION_TABLE[ARGS.msvc_version]

    packageName = "winpty-%s-%s" % (
        common_ship.winptyVersion,
        versionInfo["package_name"],
    )

    packageRoot = os.path.join(common_ship.topDir, "ship/packages")
    packageDir = os.path.join(packageRoot, packageName)
    packageFile = packageDir + ".zip"

    common_ship.rmrf([packageDir])
    common_ship.rmrf([packageFile])
    common_ship.mkdir(packageDir)

    checkoutGyp()
    cleanMsvc()
    build("ia32", packageDir, True)
    build("x64", packageDir, True)
    cleanMsvc()
    build("ia32", packageDir)
    build("x64", packageDir)

    topDir = common_ship.topDir

    common_ship.mkdir(packageDir + "/include")
    shutil.copy(topDir + "/src/include/winpty.h", packageDir + "/include")
    shutil.copy(topDir + "/src/include/winpty_constants.h",
                packageDir + "/include")
    shutil.copy(topDir + "/LICENSE", packageDir)
    shutil.copy(topDir + "/README.md", packageDir)
    shutil.copy(topDir + "/RELEASES.md", packageDir)

    subprocess.check_call([ZIP_TOOL, "a", packageFile, "."], cwd=packageDir)
Beispiel #3
0
def cleanMsvc():
    common_ship.rmrf("""
        src/Release src/.vs src/gen
        src/*.vcxproj src/*.vcxproj.filters src/*.sln src/*.sdf
    """.split())
Beispiel #4
0
def cleanMsvc():
    common_ship.rmrf("""
        src/Release src/.vs
        src/*.vcxproj src/*.vcxproj.filters src/*.sln src/*.sdf
    """.split())