def main(): """ Main processing function. """ #src_olddir = libastylewx.get_astylewx_directory() + "/srcOLD" #src_newdir = libastylewx.get_astylewx_directory() + "/src" # change line 61 or 62 when the following are used src_olddir = libastylewx.get_astylewxtest_directory() + "/srcOLD" src_newdir = libastylewx.get_astylewxtest_directory() + "/src" libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) if not os.path.isdir(src_olddir): print("rename src to srcOLD") os.rename(src_newdir, src_olddir) os.mkdir(src_newdir) print("copy srcOLD to src") file_list_old = glob.glob(src_olddir + "/*") for file_path in file_list_old: shutil.copy(file_path, src_newdir) print("convert src") file_list_new = glob.glob(src_newdir + "/*") for file_path in file_list_new: process_file(file_path)
def main(): """Main processing function.""" header_variables = [] # variables in astyle.h class_variables = [] # variables in the class constructor header_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.h" astyleiface_path = libastylewx.get_astylewx_directory( ) + "/src/AStyleIFace.cpp" libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) get_header_variables(header_variables, header_path) get_constructor_variables(class_variables, astyleiface_path) print("Checking AStyleIFace header to class constructor.") total_variables = len(header_variables) print( "There are {0} variables in the header list.".format(total_variables)) print() find_class_diffs(header_variables, class_variables) if __print_variables: print(header_variables) print(class_variables)
def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("Converting xpm files") xpm_files = get_xpm_files() change_files(xpm_files)
def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("Generating AStyleDlgBaseLnx") filedir = libastylewx.get_astylewx_directory(True) + "dialog" os.chdir(filedir) infile = filedir + os.sep + "AStyleDlgBase.cpp" outfile = filedir + os.sep + "AStyleDlgBaseLnx.cpp" create_astyledlggui_lnx(infile, outfile) print_totals()
def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) os.chdir(libastylewx.get_file_py_directory()) remove_dist_directories() if EXTRACT_ALL: build_windows_distribution() build_linux_distribution() build_mac_distribution() elif os.name == "nt": build_windows_distribution() else: build_linux_distribution() build_mac_distribution()
def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) os.chdir(libastylewx.get_file_py_directory()) remove_dist_directories() if EXTRACT_ALL and os.name == "nt": build_windows_distribution() build_linux_distribution() build_mac_distribution() elif os.name == "nt": build_windows_distribution() else: build_linux_distribution() build_mac_distribution()
def main(): """Main processing function.""" # lists to compare virtual function overrides dlggui_functions = [] # functions in AStyleDlgBase.h dlg_functions = [] # functions in AStyleDlg.h # lists to compare events dlggui_identifiers = [] # identifiers in AStyleDlgBase.h dlggui_events = [] # event identifiers in AStyleDlgBase.cpp # lists to compare bind events dlggui_radio_buttons = [] # radio buttons in AStyleDlgBase.h dlg_bind_events = [] # bind events in AStyleDlg.cpp # file paths dlggui_path = libastylewx.get_astylewx_directory( ) + "/dialog/AStyleDlgBase.h" dlg_path = libastylewx.get_astylewx_directory() + "/src/AStyleDlg.h" dlgguisrc_path = libastylewx.get_astylewx_directory( ) + "/dialog/AStyleDlgBase.cpp" dlgsrc_path = libastylewx.get_astylewx_directory() + "/src/AStyleDlg.cpp" # extract data libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("AStyleDlg") # get lists to compare virtual function overrides get_dlggui_functions(dlggui_functions, dlggui_path) get_dlg_functions(dlg_functions, dlg_path) # lists to compare events get_dlggui_identifiers(dlggui_identifiers, dlggui_path) get_dlgguisrc_event_identifiers(dlggui_events, dlgguisrc_path) # lists to compare bind events get_dlggui_radio_buttons(dlggui_radio_buttons, dlggui_path) get_dlgsrc_conect_events(dlg_bind_events, dlgsrc_path) # find diffs find_function_diffs(dlggui_functions, dlg_functions) find_identifier_diffs(dlggui_identifiers, dlggui_events) find_radio_button_diffs(dlggui_radio_buttons, dlg_bind_events) if __is_resizable: print("AStyleDlgBase is resizeable.") if __print_functions: print(dlggui_functions) print(dlg_functions) if __print_identifiers: print(dlggui_identifiers) print(dlggui_events)
def main(): """Main processing function. """ file_paths = ["AStyleDlgBase.h", "AStyleDlgBase.cpp", "EditorDlgBase.h", "EditorDlgBase.cpp", ] libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) # print("Changing to {0}".format(__new_book)) filedir = libastylewx.get_astylewx_directory(True) + "dialog" os.chdir(filedir) for file_path in file_paths: change_variables(file_path) print_totals(file_path)
def main(): """Main processing function.""" # lists to compare virtual function overrides dlggui_functions = [] # functions in AStyleDlgBase.h dlg_functions = [] # functions in AStyleDlg.h # lists to compare events dlggui_identifiers = [] # identifiers in AStyleDlgBase.h dlggui_events = [] # event identifiers in AStyleDlgBase.cpp # lists to compare bind events dlggui_radio_buttons = [] # radio buttons in AStyleDlgBase.h dlg_bind_events = [] # bind events in AStyleDlg.cpp # file paths dlggui_path = libastylewx.get_astylewx_directory() + "/dialog/AStyleDlgBase.h" dlg_path = libastylewx.get_astylewx_directory() + "/src/AStyleDlg.h" dlgguisrc_path = libastylewx.get_astylewx_directory() + "/dialog/AStyleDlgBase.cpp" dlgsrc_path = libastylewx.get_astylewx_directory() + "/src/AStyleDlg.cpp" # extract data libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("AStyleDlg") # get lists to compare virtual function overrides get_dlggui_functions(dlggui_functions, dlggui_path) get_dlg_functions(dlg_functions, dlg_path) # lists to compare events get_dlggui_identifiers(dlggui_identifiers, dlggui_path) get_dlgguisrc_event_identifiers(dlggui_events, dlgguisrc_path) # lists to compare bind events get_dlggui_radio_buttons(dlggui_radio_buttons, dlggui_path) get_dlgsrc_conect_events(dlg_bind_events, dlgsrc_path) # find diffs find_function_diffs(dlggui_functions, dlg_functions) find_identifier_diffs(dlggui_identifiers, dlggui_events) find_radio_button_diffs(dlggui_radio_buttons, dlg_bind_events) if __is_resizable: print("AStyleDlgBase is resizeable.") if __print_functions: print(dlggui_functions) print(dlg_functions) if __print_identifiers: print(dlggui_identifiers) print(dlggui_events)
def main(): """Main processing function.""" dlggui_functions = [] # functions in EditorDlgBase.h dlg_functions = [] # functions in EditorDlg.h dlggui_path = libastylewx.get_astylewx_directory() + "/dialog/EditorDlgBase.h" dlg_path = libastylewx.get_astylewx_directory() + "/src/EditorDlg.h" libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("EditorDlg") get_dlggui_functions(dlggui_functions, dlggui_path) get_dlg_functions(dlg_functions, dlg_path) find_function_diffs(dlggui_functions, dlg_functions) if __print_functions: print(dlggui_functions) print(dlg_functions)
def main(): """ Main processing function. """ if os.name != "nt": libastylewx.system_exit("\nThis script is for Windows only!") libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) for wx_path in wx_paths: print() if not check_static_config(wx_path): continue process_project_files(wx_path) print() process_wxstc_vcxproj_file(wx_path) print() process_wxstc_catalogue_file(wx_path) print() process_wxsetup_props_file(wx_path)
def main(): """Main processing function.""" header_variables = [] # variables in astyle.h class_variables = [] # variables in the class constructor header_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.h" astyleiface_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.cpp" libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) get_header_variables(header_variables, header_path) get_constructor_variables(class_variables, astyleiface_path) print("Checking AStyleIFace header to class constructor.") total_variables = len(header_variables) print("There are {0} variables in the header list.".format(total_variables)) print() find_class_diffs(header_variables, class_variables) if __print_variables: print(header_variables) print(class_variables)
def main(): """Main processing function.""" # lists to compare virtual function overrides iface_functions = [] # functions in AStyleDlgBase.h mtest_functions = [] # functions in AStyleDlg.h # file paths iface_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.h" mtest_path = libastylewx.get_astylewxtest_directory() + "/src/Main_Test.h" # extract data libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("Virtual Functions") get_iface_functions(iface_functions, iface_path) get_mtest_functions(mtest_functions, mtest_path) # find diffs find_function_diffs(iface_functions, mtest_functions) if __print_functions: # iface_functions.sort() print(iface_functions) # mtest_functions.sort() print(mtest_functions)