Exemplo n.º 1
0
def main():
	"""Main processing function."""
	libastyle.set_text_color()
	print (libastyle.get_python_version())
	print("Modify Java JDK Version from", __old_release, "to", __new_release)
	if not __file_update:
		print("Files NOT Updated")
	print()

	# project file directories
	project_extension_list = [".cbp", ".vcproj", ".vcxproj"]
	project_directory_list = [libastyle.get_project_directory(True) + "AStyle/build",
					          libastyle.get_project_directory(True) + "AStyleDev/build"]
	update_project_files(project_directory_list, project_extension_list)
Exemplo n.º 2
0
def strip_directory_prefix(directory):
	"""Strip the prefix from a directory or file for printing.
	"""
	prefix = libastyle.get_project_directory(True)
	start = len(prefix)
	if start > len(directory): start = 0
	return directory[start:]
Exemplo n.º 3
0
def main():
    """Main processing function."""
    libastyle.set_text_color()
    print(libastyle.get_python_version())
    print("Modify Java JDK Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("Files NOT Updated")
    print()

    # project file directories
    project_extension_list = [".cbp", ".vcproj", ".vcxproj"]
    project_directory_list = [
        libastyle.get_project_directory(True) + "AStyle/build",
        libastyle.get_project_directory(True) + "AStyleDev/build"
    ]
    update_project_files(project_directory_list, project_extension_list)
Exemplo n.º 4
0
def strip_directory_prefix(directory):
    """Strip the prefix from a directory or file for printing.
	"""
    prefix = libastyle.get_project_directory(True)
    start = len(prefix)
    if start > len(directory): start = 0
    return directory[start:]
Exemplo n.º 5
0
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Java JDK Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("\nFiles NOT Updated")
    # must use this version for newline option on the file open
    if platform.python_implementation() == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = [".cbp", ".vcproj", ".vcxproj"]
    project_directory_list = [libastyle.get_project_directory(True) + "AStyle/build",
                              libastyle.get_project_directory(True) + "AStyleDev/build"]
    update_project_files(project_directory_list, project_extension_list)
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Java JDK Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("\nFiles NOT Updated")
    # must use this version for newline option on the file open
    if platform.python_implementation(
    ) == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = [".cbp", ".vcproj", ".vcxproj"]
    project_directory_list = [
        libastyle.get_project_directory(True) + "AStyle/build",
        libastyle.get_project_directory(True) + "AStyleDev/build"
    ]
    update_project_files(project_directory_list, project_extension_list)
Exemplo n.º 7
0
def get_printble_filepath(absolute_filepath):
    """Get the filepath without the Project directory path.
    """
    prefix = len(libastyle.get_project_directory(True))
    filepath = absolute_filepath[prefix:]
    return filepath
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Copyright Date from", __old_date, "to", __new_date)
    if not __file_update:
        print("\nFILES NOT UPDATED")
    # must use this version for newline option on the file open
    if platform.python_implementation(
    ) == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # source file directories
    source_extension_list = [".h", ".cpp", ".m", ".md", ".java", ".py", ".cs"]
    source_directory_list = [
        libastyle.get_project_directory(True) + "AStyle",
        libastyle.get_project_directory(True) + "AStyle/src",
        libastyle.get_project_directory(True) + "AStyleDev",
        libastyle.get_project_directory(True) + "AStyleDev/src-c",
        libastyle.get_project_directory(True) + "AStyleDev/src-j",
        libastyle.get_project_directory(True) + "AStyleDev/src-o",
        libastyle.get_project_directory(True) + "AStyleDev/src-p",
        libastyle.get_project_directory(True) + "AStyleDev/src-s",
        libastyle.get_project_directory(True) + "AStyleTest",
        libastyle.get_project_directory(True) + "AStyleTest/src",
        libastyle.get_project_directory(True) + "AStyleTest/srccon",
        libastyle.get_project_directory(True) + "AStyleTest/srci18n",
        libastyle.get_project_directory(True) + "AStyleTest/srclib",
        libastyle.get_project_directory(True) + "AStyleTest/srcloc",
        libastyle.get_project_directory(True) + "AStyleTest/srcx",
        libastyle.get_project_directory(True) + "AStyleWin/src",
        libastyle.get_project_directory(True) + "AStyleWx",
        libastyle.get_project_directory(True) + "AStyleWx/src",
        libastyle.get_project_directory(True) + "AStyleWxTest",
        libastyle.get_project_directory(True) + "AStyleWxTest/src",
        libastyle.get_project_directory(True) + "AStyleWxTest/srcx"
    ]
    update_source_files(source_directory_list, source_extension_list)
    if not __file_update:
        print("FILES NOT UPDATED")
Exemplo n.º 9
0
import glob
import libastyle  #local directory
import os
import shutil
import stat
import subprocess
import time

# global variables ------------------------------------------------------------

# release number for distribution file
__release = "2.03"
# inut from AStyle directory
__astyle_dir = libastyle.get_astyle_directory()
# output to Project directory
__base_dir = libastyle.get_project_directory()

# -----------------------------------------------------------------------------


def create_distributions():
    """Main processing function.
	"""
    libastyle.set_text_color()
    print(libastyle.get_python_version())
    os.chdir(libastyle.get_file_py_directory())
    remove_dist_directories()
    if os.name == "nt":
        build_windows_distribution()
    else:
        build_linux_distribution()
Exemplo n.º 10
0
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Copyright Date from", __old_date, "to", __new_date)
    if not __file_update:
        print("\nFILES NOT UPDATED")
    # must use this version for newline option on the file open
    if platform.python_implementation() == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # source file directories
    source_extension_list = [".h", ".cpp", ".m", ".md", ".java", ".py", ".cs"]
    source_directory_list = [libastyle.get_project_directory(True) + "AStyle",
                             libastyle.get_project_directory(True) + "AStyle/src",
                             libastyle.get_project_directory(True) + "AStyleDev",
                             libastyle.get_project_directory(True) + "AStyleDev/src-c",
                             libastyle.get_project_directory(True) + "AStyleDev/src-j",
                             libastyle.get_project_directory(True) + "AStyleDev/src-o",
                             libastyle.get_project_directory(True) + "AStyleDev/src-p",
                             libastyle.get_project_directory(True) + "AStyleDev/src-s",
                             libastyle.get_project_directory(True) + "AStyleTest",
                             libastyle.get_project_directory(True) + "AStyleTest/src",
                             libastyle.get_project_directory(True) + "AStyleTest/srccon",
                             libastyle.get_project_directory(True) + "AStyleTest/srci18n",
                             libastyle.get_project_directory(True) + "AStyleTest/srclib",
                             libastyle.get_project_directory(True) + "AStyleTest/srcloc",
                             libastyle.get_project_directory(True) + "AStyleTest/srcx",
                             libastyle.get_project_directory(True) + "AStyleWin/src",
                             libastyle.get_project_directory(True) + "AStyleWx",
                             libastyle.get_project_directory(True) + "AStyleWx/src",
                             libastyle.get_project_directory(True) + "AStyleWxTest",
                             libastyle.get_project_directory(True) + "AStyleWxTest/src",
                             libastyle.get_project_directory(True) + "AStyleWxTest/srcx"]
    update_source_files(source_directory_list, source_extension_list)
    if not __file_update:
        print("FILES NOT UPDATED")
Exemplo n.º 11
0
"""

# to disable the print statement and use the print() function (version 3 format)
from __future__ import print_function

import glob
import os
import platform
import sys
# local libraries
import libastyle

# global variables ------------------------------------------------------------

# select only one at a time
__html_folder = libastyle.get_project_directory(True) + "AStyle/doc"
#__html_folder = libastyle.get_project_directory(True) + "AStyleDev/doc"
#__html_folder = libastyle.get_project_directory(True) + "AStyleWx/doc"

__file_update = False  # should the files be updated?

# -----------------------------------------------------------------------------


def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Html files from", correct_path_separators(__html_folder))
    if not __file_update:
        print("Files NOT Updated")
Exemplo n.º 12
0
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print (libastyle.get_python_version())
    print("Modify Shared Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("\nFILES NOT UPDATED")
    # must use this version for newline option on the file open
    if platform.python_implementation() == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = ["Makefile", ".cbp", ".vcproj", ".vcxproj", ".pbxproj"]
    project_directory_list = [libastyle.get_project_directory(True) + "AStyle/build",
                              libastyle.get_project_directory(True) + "AStyleDev/build",
                              libastyle.get_project_directory(True) + "AStyleTest/build",
                              libastyle.get_project_directory(True) + "AStyleWin/build",
                              libastyle.get_project_directory(True) + "AStyleWx/build"]
    update_project_files(project_directory_list, project_extension_list)

    # source file directories
    source_extension_list = [".properties", ".cpp", ".m", ".java", ".py", ".cs"]
    source_directory_list = [libastyle.get_project_directory(True) + "AStyle/src",
                             libastyle.get_project_directory(True) + "AStyleDev/src-c",
                             libastyle.get_project_directory(True) + "AStyleDev/src-o",
                             libastyle.get_project_directory(True) + "AStyleDev/src-j",
                             libastyle.get_project_directory(True) + "AStyleDev/src-p",
                             libastyle.get_project_directory(True) + "AStyleDev/src-s",
                             libastyle.get_project_directory(True) + "AStyleTest/src",
                             libastyle.get_project_directory(True) + "AStyleWin/src",
                             libastyle.get_project_directory(True) + "AStyleWx/src"]
    # exclude files with utf-8 encoding (...Other.cpp seems to be an error in linux)
    source_excludes = [libastyle.get_project_directory(True) + "AStyle/src/ASLocalizer.cpp",
                       libastyle.get_project_directory(True) + "AStyleTest/src/AStyleTest_Other.cpp"]
    update_source_files(source_directory_list, source_extension_list, source_excludes)
    if not __file_update:
        print("FILES NOT UPDATED")
Exemplo n.º 13
0
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Shared Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("\nFILES NOT UPDATED")
    # must use this version for newline option on the file open
    if platform.python_implementation() == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = ["Makefile", ".cbp", ".vcproj", ".vcxproj", ".pbxproj"]
    project_directory_list = [libastyle.get_project_directory(True) + "AStyle/build",
                              libastyle.get_project_directory(True) + "AStyleDev/build",
                              libastyle.get_project_directory(True) + "AStyleTest/build",
                              libastyle.get_project_directory(True) + "AStyleWin/build",
                              libastyle.get_project_directory(True) + "AStyleWx/build"]
    update_project_files(project_directory_list, project_extension_list)

    # source file directories
    source_extension_list = [".properties", ".cpp", ".m", ".java", ".py", ".cs"]
    source_directory_list = [libastyle.get_project_directory(True) + "AStyle/src",
                             libastyle.get_project_directory(True) + "AStyleDev/src-c",
                             libastyle.get_project_directory(True) + "AStyleDev/src-j",
                             libastyle.get_project_directory(True) + "AStyleDev/src-o",
                             libastyle.get_project_directory(True) + "AStyleDev/src-p",
                             libastyle.get_project_directory(True) + "AStyleDev/src-s",
                             libastyle.get_project_directory(True) + "AStyleTest/src",
                             libastyle.get_project_directory(True) + "AStyleWin/src",
                             libastyle.get_project_directory(True) + "AStyleWx/src"]
    # exclude files with utf-8 encoding (...Other.cpp seems to be an error in linux)
    source_excludes = [libastyle.get_project_directory(True) + "AStyle/src/ASLocalizer.cpp",
                       libastyle.get_project_directory(True) + "AStyleTest/src/AStyleTest_Other.cpp"]
    update_source_files(source_directory_list, source_extension_list, source_excludes)
    if not __file_update:
        print("FILES NOT UPDATED")
Exemplo n.º 14
0
def main():
    """Main processing function."""
    libastyle.set_text_color()
    print(libastyle.get_python_version())
    print("Modify Shared Version from", __old_release, "to", __new_release)
    if not __file_update:
        print("Files NOT Updated")
    # must use this version for newline option on the file open
    if platform.python_implementation(
    ) == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = [
        "Makefile", ".cbp", ".vcproj", ".vcxproj", ".pbxproj"
    ]
    project_directory_list = [
        libastyle.get_project_directory(True) + "AStyle/build",
        libastyle.get_project_directory(True) + "AStyleDev/build",
        libastyle.get_project_directory(True) + "AStyleWin/build",
        libastyle.get_project_directory(True) + "AStyleWx/build"
    ]
    update_project_files(project_directory_list, project_extension_list)

    # source file directories
    source_extension_list = [
        ".properties", ".cpp", ".m", ".java", ".py", ".cs"
    ]
    source_directory_list = [
        libastyle.get_project_directory(True) + "AStyleDev/src-c",
        libastyle.get_project_directory(True) + "AStyleDev/src-o",
        libastyle.get_project_directory(True) + "AStyleDev/src-j",
        libastyle.get_project_directory(True) + "AStyleDev/src-p",
        libastyle.get_project_directory(True) + "AStyleDev/src-s",
        libastyle.get_project_directory(True) + "AStyleWin/src",
        libastyle.get_project_directory(True) + "AStyleWx/src"
    ]
    update_source_files(source_directory_list, source_extension_list)
Exemplo n.º 15
0
def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify AStyle Version from", __old_release, "to", __new_release)
    print("Modify Solib  Version from", __old_solibver, "to", __new_solibver)
    if not __file_update:
        print("\nFILES NOT UPDATED")
    # must use this version for newline option on the file open
    if platform.python_implementation() == "CPython" and sys.version_info[0] >= 3:
        pass
    else:
        libastyle.system_exit("Must use CPython version 3 or greater")
    print()

    # project file directories
    project_extension_list = ["Makefile", ".cbp", ".vcproj", ".vcxproj", ".pbxproj"]
    project_directory_list = [libastyle.get_project_directory(True) + "AStyle/build",
                              libastyle.get_project_directory(True) + "AStyleDev/build",
                              libastyle.get_project_directory(True) + "AStyleTest/build",
                              libastyle.get_project_directory(True) + "AStyleWin/build",
                              libastyle.get_project_directory(True) + "AStyleWx/build",
                              libastyle.get_project_directory(True) + "AStyleWxTest/build"]
    update_project_files(project_directory_list, project_extension_list)

    # source file directories
    source_extension_list = [".properties", ".cpp", ".m", ".java", ".cs"]
    source_directory_list = [libastyle.get_project_directory(True) + "AStyle/src",
                             libastyle.get_project_directory(True) + "AStyleDev/src-c",
                             libastyle.get_project_directory(True) + "AStyleDev/src-j",
                             libastyle.get_project_directory(True) + "AStyleDev/src-o",
                             libastyle.get_project_directory(True) + "AStyleDev/src-p",
                             libastyle.get_project_directory(True) + "AStyleDev/src-s",
                             libastyle.get_project_directory(True) + "AStyleTest/src",
                             libastyle.get_project_directory(True) + "AStyleTest/srccon",
                             libastyle.get_project_directory(True) + "AStyleTest/srci18n",
                             libastyle.get_project_directory(True) + "AStyleTest/srclib",
                             libastyle.get_project_directory(True) + "AStyleTest/srcloc",
                             libastyle.get_project_directory(True) + "AStyleTest/srcx",
                             libastyle.get_project_directory(True) + "AStyleWin/src",
                             libastyle.get_project_directory(True) + "AStyleWx/src",
                             libastyle.get_project_directory(True) + "AStyleWxTest/src",
                             libastyle.get_project_directory(True) + "AStyleWxTest/srcx"]
    update_source_files(source_directory_list, source_extension_list)

    # change the internal version number in cmake
    cmakelists_file_path = libastyle.get_project_directory(True) + "AStyle/CMakeLists.txt"
    update_cmakelists(cmakelists_file_path)

    # change the internal version number in astyle_main source
    astyle_main_file_path = libastyle.get_project_directory(True) + "AStyle/src/astyle_main.cpp"
    update_astyle_main(astyle_main_file_path)

    if not __file_update:
        print("\nFILES NOT UPDATED")
Exemplo n.º 16
0
import os
import shutil
import subprocess
import time
# local libraries
import libastyle

# global variables ------------------------------------------------------------

# release number for distribution file
AS_RELEASE = "3.1"

# inut from AStyle directory
__astyle_dir = libastyle.get_astyle_directory()
# output to Project directory
__base_dir = libastyle.get_project_directory()

# -----------------------------------------------------------------------------

def main():
    """Main processing function.
    """
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    os.chdir(libastyle.get_file_py_directory())
    remove_dist_directories()
    verify_localizer_signature()
    if os.name == "nt":
        build_windows_distribution()
    else:
        libastyle.system_exit("This is for Windows distribution only!")
Exemplo n.º 17
0
"""

# to disable the print statement and use the print() function (version 3 format)
from __future__ import print_function

import glob
import os
import platform
import sys
# local libraries
import libastyle

# global variables ------------------------------------------------------------

# select only one at a time
__html_folder = libastyle.get_project_directory(True) + "AStyle/doc"
#__html_folder = libastyle.get_project_directory(True) + "AStyleDev/doc"
#__html_folder = libastyle.get_project_directory(True) + "AStyleWx/doc"


__file_update = False           # should the files be updated?

# -----------------------------------------------------------------------------

def main():
    """Main processing function."""
    libastyle.set_text_color("yellow")
    print(libastyle.get_python_version())
    print("Modify Html files from", correct_path_separators(__html_folder))
    if not __file_update:
        print("Files NOT Updated")