def test_build(self): self.assertTrue( build(tests.utils.HOST_SYSTEM, tests.utils.HOST_SYSTEM, self.functions, os.path.abspath(tests.utils.TEMPORARY_FOLDER), 'tmp_dll', self.domains, tests.utils.INTEL64, False, os.environ['COMPILERS_AND_LIBRARIES']))
def autobuild(self): self.get_selected_configs() extension = 'Dynamic library (*' + utils.DYNAMIC_LIB_EXTENSION[ utils.HOST_SYSTEM] + ')' chosen_path = QFileDialog.getSaveFileName( self, 'Save custom library as...', utils.CONFIGS[utils.CUSTOM_LIBRARY_NAME], extension)[0] if not chosen_path: return else: utils.CONFIGS[utils.CUSTOM_LIBRARY_NAME] = os.path.basename( os.path.splitext(chosen_path)[0]) utils.CONFIGS[utils.OUTPUT_PATH] = os.path.dirname(chosen_path) self.parent.setDisabled(True) QMessageBox.information( self, 'Build', 'Building will start after this window is closed. ' 'Please, wait until process is done.') success = build() QMessageBox.information( self, 'Success' if success else 'Failure', 'Build completed!' if success else 'Build failed!') self.parent.setDisabled(False)
sys.exit("Error: " + cpu + " isn't supported for " + utils.HOST_SYSTEM + ' ' + architecture) custom_cpu_set = args.custom_dispatcher custom_library_name = args.name output_path = os.path.abspath(args.output_path) if not os.path.exists(output_path): os.makedirs(output_path) utils.set_configs_dict(package=package, functions_list=functions_list, architecture=architecture, thread_mode=thread_mode, threading_layer_type=threading_layer_type, custom_library_name=custom_library_name, output_path=output_path, custom_cpu_set=custom_cpu_set) if args.generate: success = generate_script() print('Generation', 'completed!' if success else 'failed!') else: build() else: from PyQt5.QtWidgets import QApplication from gui.app import MainAppWindow app = QApplication(sys.argv) ex = MainAppWindow() sys.exit(app.exec_())
tool.utils.COMPILERS_AND_LIBRARIES_PATH = args.cnl if args.generate: if args.ia32: generate_script(package, tool.utils.HOST_SYSTEM, target_system, functions, path, args.name, tool.utils.IA32, args.multi_threaded, threading_layer_type) if args.intel64: generate_script(package, tool.utils.HOST_SYSTEM, target_system, functions, path, args.name, tool.utils.INTEL64, args.multi_threaded, threading_layer_type) print('Generation completed!') else: if args.ia32: build(package, tool.utils.HOST_SYSTEM, target_system, functions, path, args.name, tool.utils.IA32, args.multi_threaded, args.cnl, threading_layer_type) if args.intel64: build(package, tool.utils.HOST_SYSTEM, target_system, functions, path, args.name, tool.utils.INTEL64, args.multi_threaded, args.cnl, threading_layer_type) else: from PyQt5.QtWidgets import QApplication from gui.app import MainAppWindow app = QApplication(sys.argv) ex = MainAppWindow() sys.exit(app.exec_())