def build_windows_distribution():
    """Copy astyle files to the windows directory.
    """
    print()
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    print("*        Copying AStyle Windows XP Distribution         *")
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    # the following variables may be modified except vscfg=libastyle.STATIC_XP
    vsdir = libastyle.VS_RELEASE
    vscfg = libastyle.STATIC_XP

    print("Compiling with", vsdir)
    print("Building AStyle release", AS_RELEASE)
    if not vsdir >= "vs2013":
        libastyle.system_exit("Must compile with vs2013 or greater in libastyle: " + vsdir)
    dist_base = __base_dir + "/DistWindowsXP"
    dist_astyle = dist_base + "/AStyleXP"
    os.makedirs(dist_astyle)
    libastyle.build_astyle_executable(vscfg)

    # Windows includes an executable in the bin directory
    print("copying exe")
    dist_astyle_bin = dist_astyle + "/bin/"
    os.mkdir(dist_astyle_bin)
    astyle_build_directory = libastyle.get_astyle_build_directory(vscfg)
    if vscfg == libastyle.DEBUG:
        shutil.copy(astyle_build_directory + "/debug/AStyle.exe", dist_astyle_bin)
    elif vscfg == libastyle.RELEASE:
        shutil.copy(astyle_build_directory + "/bin/AStyle.exe", dist_astyle_bin)
    elif vscfg == libastyle.STATIC or vscfg == libastyle.STATIC_XP:
        shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe", dist_astyle_bin)
    else:
        libastyle.system_exit("Invalid compile configuration: " + vscfg)

    # top directory
    dist_top = dist_astyle + "/"
    copy_astyle_top(dist_top, True)

    # build directory
    dist_build = dist_astyle + "/build"
    os.mkdir(dist_build)
    copy_windows_build_directories(dist_build)

    # doc directory
    dist_doc = dist_astyle + "/doc/"
    os.mkdir(dist_doc)
    copy_astyle_doc(dist_doc, True)

    # src directory
    dist_src = dist_astyle + "/src/"
    os.mkdir(dist_src)
    copy_astyle_src(dist_src, True)

    # create zip
    zipfile = "AStyle_{0}_windows_xp.zip".format(AS_RELEASE)
    call_7zip(dist_base, zipfile)
Exemple #2
0
def build_windows_distribution():
    """Copy astyle files to the windows directory.
    """
    print()
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    print("*          Copying AStyle Windows Distribution          *")
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    # the following variables may be modified
    vsdir = libastyle.VS_RELEASE
    vscfg= libastyle.STATIC

    print("Compiling with", vsdir)
    print("Building release", __release)
    if not vsdir >= "vs2013":
        libastyle.system_exit("Must compile with vs2013 or greater in libastyle: " + vsdir)
    dist_base = __base_dir + "/DistWindows"
    dist_astyle = dist_base + "/AStyle"
    os.makedirs(dist_astyle)
    libastyle.build_astyle_executable(vscfg)

    # Windows includes an executable in the bin directory
    print("copying exe")
    dist_astyle_bin = dist_astyle + "/bin/"
    os.mkdir(dist_astyle_bin)
    astyle_build_directory = libastyle.get_astyle_build_directory(vscfg)
    if vscfg ==  libastyle.DEBUG:
        shutil.copy(astyle_build_directory + "/debug/AStyle.exe", dist_astyle_bin)
    elif vscfg ==  libastyle.RELEASE:
        shutil.copy(astyle_build_directory + "/bin/AStyle.exe", dist_astyle_bin)
    elif vscfg ==  libastyle.STATIC:
        shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe", dist_astyle_bin)
    else:
        libastyle.system_exit("Invalid compile configuration: " + vscfg)

    # top directory
    dist_top = dist_astyle + "/"
    copy_astyle_top(dist_top, True)

    # build directory
    dist_build = dist_astyle + "/build"
    os.mkdir(dist_build)
    copy_windows_build_directories(dist_build)

    # doc directory
    dist_doc = dist_astyle + "/doc/"
    os.mkdir(dist_doc)
    copy_astyle_doc(dist_doc, True)

    # src directory
    dist_src = dist_astyle + "/src/"
    os.mkdir(dist_src)
    copy_astyle_src(dist_src, True)

    # create zip
    zipfile = "AStyle_{0}_windows.zip".format(__release)
    call_7zip(dist_base, zipfile)
Exemple #3
0
def build_windows_distribution():
    """Copy astyle files to the windows directory.
    """
    print()
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    print("*          Copying AStyle Windows Distribution          *")
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    print("Building release", __release)
    vsdir = libastyle.VS_RELEASE
    print("Compiling with", vsdir)
    if not vsdir >= "vs2013":
        libastyle.system_exit(
            "Must compile with vs2013 or greater in libastyle: " + vsdir)
    dist_base = __base_dir + "/DistWindows"
    dist_astyle = dist_base + "/AStyle"
    os.makedirs(dist_astyle)
    libastyle.build_astyle_executable(libastyle.STATIC_XP)

    # Windows includes an executable in the bin directory
    print("copying exe ({0})".format(vsdir))
    dist_astyle_bin = dist_astyle + "/bin/"
    os.mkdir(dist_astyle_bin)
    astyle_build_directory = libastyle.get_astyle_build_directory(
        libastyle.STATIC_XP)
    shutil.copy(astyle_build_directory + "/binstatic_xp/AStyle.exe",
                dist_astyle_bin)

    # top directory
    dist_top = dist_astyle + "/"
    copy_astyle_top(dist_top, True)

    # build directory
    dist_build = dist_astyle + "/build"
    os.mkdir(dist_build)
    copy_windows_build_directories(dist_build)

    # doc directory
    dist_doc = dist_astyle + "/doc/"
    os.mkdir(dist_doc)
    copy_astyle_doc(dist_doc, True)

    # src directory
    dist_src = dist_astyle + "/src/"
    os.mkdir(dist_src)
    copy_astyle_src(dist_src, True)

    # create zip
    zipfile = "AStyle_{0}_windows.zip".format(__release)
    call_7zip(dist_base, zipfile)
Exemple #4
0
def build_windows_distribution():
	"""Copy astyle files to the windows directory.
	"""
	print()
	print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
	print("*             Copying Windows Distribution              *")
	print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
	print("Building release", __release)
	vsdir = libastyle.VS_RELEASE
	print("Compiling with", vsdir)
	if not vsdir >= "vs2013":
		libastyle.system_exit("Must compile with vs2013 in libastyle: "  + vsdir)
	dist_base = __base_dir + "/DistWindows"
	dist_astyle = dist_base + "/AStyle"
	os.makedirs(dist_astyle)

	# Windows includes an executable in the bin directory
	libastyle.build_astyle_executable(libastyle.STATIC)
	dist_astyle_bin = dist_astyle +  "/bin/"
	os.mkdir(dist_astyle_bin)
	astyle_build_directory = libastyle.get_astyle_build_directory(libastyle.STATIC)
	shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe", dist_astyle_bin)
	print("exe copied ({0})".format(vsdir))

	# top directory
	dist_top = dist_astyle + "/"
	copy_astyle_top(dist_top, True)

	# doc directory
	dist_doc = dist_astyle + "/doc/"
	os.mkdir(dist_doc)
	copy_astyle_doc(dist_doc, True)

	# src directory
	dist_src = dist_astyle +  "/src/"
	os.mkdir(dist_src)
	copy_astyle_src(dist_src, True)

	# build directory
	astyle_build_dir = __astyle_dir + "/build"
	dist_astyle_build = dist_astyle +  "/build"
	os.mkdir(dist_astyle_build)
	copy_vs20xx_directories(astyle_build_dir, dist_astyle_build)

	# create zip
	zipfile = "AStyle_{0}_windows.zip".format(__release)
	call_7zip(dist_base, zipfile)
Exemple #5
0
def build_windows_distribution():
    """Copy astyle files to the windows directory.
	"""
    print()
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    print("*             Copying Windows Distribution              *")
    print("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
    dist_base = __base_dir + "/DistWindows"
    dist_astyle = dist_base + "/AStyle"
    vsdir = libastyle.VS_RELEASE
    if vsdir != "vs2010":
        libastyle.system_exit("Must compile with vs2010 in libastyle: " +
                              vsdir)
    os.makedirs(dist_astyle)

    # Windows includes an executable in the bin directory
    libastyle.build_astyle_executable(libastyle.STATIC)
    dist_astyle_bin = dist_astyle + "/bin/"
    os.mkdir(dist_astyle_bin)
    astyle_build_directory = libastyle.get_astyle_build_directory(
        libastyle.STATIC)
    shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe",
                dist_astyle_bin)
    print("exe copied ({0})".format(vsdir))

    # doc directory
    dist_doc = dist_astyle + "/doc/"
    os.mkdir(dist_doc)
    copy_astyle_doc(dist_doc, True)

    # src directory
    dist_src = dist_astyle + "/src/"
    os.mkdir(dist_src)
    copy_astyle_src(dist_src, True)

    # build directory
    astyle_build_dir = __astyle_dir + "/build"
    dist_astyle_build = dist_astyle + "/build"
    os.mkdir(dist_astyle_build)
    # copy_vs2003_directory(astyle_build_dir, dist_astyle_build)
    copy_vs20xx_directories(astyle_build_dir, dist_astyle_build)

    # create zip
    zipfile = "AStyle_{0}_windows.zip".format(__release)
    call_7zip(dist_base, zipfile)
Exemple #6
0
def build_windows_distribution():
    """Copy astyle files to the windows directory.
	"""
    print
    print "* * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
    print "*             Copying Windows Distribution              *"
    print "* * * * * * * * * * * * * * * * * * * * * * * * * * * * *"
    distBase = baseDir + "/DistWindows"
    distAStyle = distBase + "/AStyle"
    os.makedirs(distAStyle)

    # Windows includes an executable in the bin directory
    libastyle.build_astyle_executable(libastyle.STATIC)
    distAStyleBin = distAStyle + "/bin/"
    os.mkdir(distAStyleBin)
    astyle_build_directory = libastyle.get_astyle_build_directory(
        libastyle.STATIC)
    shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe",
                distAStyleBin)
    vsi = astyle_build_directory.find("vs20")
    if vsi != -1:
        vsdir = astyle_build_directory[vsi:vsi + 6]
    print "exe copied ({0})".format(vsdir)

    # doc directory
    distDoc = distAStyle + "/doc/"
    os.mkdir(distDoc)
    copy_astyle_doc(distDoc, True)

    # src directory
    distSrc = distAStyle + "/src/"
    os.mkdir(distSrc)
    copy_astyle_src(distSrc, True)

    # build directory
    astyleBuildDir = astyleDir + "/build"
    distAStyleBuild = distAStyle + "/build"
    os.mkdir(distAStyleBuild)
    # copy_vs2003_directory(astyleBuildDir, distAStyleBuild)
    copy_vs20xx_directories(astyleBuildDir, distAStyleBuild)

    # create zip
    zipfile = "AStyle_{0}_windows.zip".format(release)
    call_7zip(distBase, zipfile)
Exemple #7
0
def build_windows_distribution():
	"""Copy astyle files to the windows directory.
	"""
	print ()
	print ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
	print ("*             Copying Windows Distribution              *")
	print ("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
	distBase = baseDir + "/DistWindows"
	distAStyle = distBase + "/AStyle"
	os.makedirs(distAStyle)

	# Windows includes an executable in the bin directory
	libastyle.build_astyle_executable(libastyle.STATIC)
	distAStyleBin = distAStyle +  "/bin/"
	os.mkdir(distAStyleBin)
	astyle_build_directory = libastyle.get_astyle_build_directory(libastyle.STATIC)
	shutil.copy(astyle_build_directory + "/binstatic/AStyle.exe", distAStyleBin)
	vsi = astyle_build_directory.find("vs20")
	if vsi != -1:
		vsdir = astyle_build_directory[vsi:vsi+6]
	print ("exe copied ({0})".format(vsdir))

	# doc directory
	distDoc = distAStyle + "/doc/"
	os.mkdir(distDoc)
	copy_astyle_doc(distDoc, True)

	# src directory
	distSrc = distAStyle +  "/src/"
	os.mkdir(distSrc)
	copy_astyle_src(distSrc, True)

	# build directory
	astyleBuildDir = astyleDir + "/build"
	distAStyleBuild = distAStyle +  "/build"
	os.mkdir(distAStyleBuild)
	# copy_vs2003_directory(astyleBuildDir, distAStyleBuild)
	copy_vs20xx_directories(astyleBuildDir, distAStyleBuild)

	# create zip
	zipfile = "AStyle_{0}_windows.zip".format(release)
	call_7zip(distBase, zipfile)