PonyPlayer
|
函数 | |
def | execute (str command) |
变量 | |
parser = ArgumentParser(description="Build cmake project.") | |
group = parser.add_mutually_exclusive_group() | |
help | |
action | |
args = parser.parse_args() | |
self_path = pathlib.Path(sys.argv[0]).absolute() | |
string | build_dir = self_path.absolute().parent.parent / "build" |
exist_ok | |
encoding | |
conf = json.load(f) | |
qt_path = conf["qt_path"].replace("\\", "/") | |
ninja_path = conf['ninja_path'].replace("\\", "/") | |
compiler_path = conf['compiler_path'].replace("\\", "/") | |
toolset = os.path.join(qt_path, "lib/cmake/Qt6/qt.toolchain.cmake") | |
string | os_dependent_args = "-DCMAKE_CXX_FLAGS=\"${CMAKE_CXX_FLAGS} -mwindows\" -DWITH_WINDOWS_ICON=ON" |
string | cmake_command = f"cmake " \ |
string | command = f"cd {build_dir} " \ |
modify_environment = os.environ.copy() | |
p = subprocess.Popen(command, shell=True, env=modify_environment) | |
def build.execute | ( | str | command | ) |
build.action |
build.args = parser.parse_args() |
string build.build_dir = self_path.absolute().parent.parent / "build" |
string build.cmake_command = f"cmake " \ |
string build.command = f"cd {build_dir} " \ |
build.compiler_path = conf['compiler_path'].replace("\\", "/") |
build.conf = json.load(f) |
build.encoding |
build.exist_ok |
build.group = parser.add_mutually_exclusive_group() |
build.help |
build.modify_environment = os.environ.copy() |
build.ninja_path = conf['ninja_path'].replace("\\", "/") |
string build.os_dependent_args = "-DCMAKE_CXX_FLAGS=\"${CMAKE_CXX_FLAGS} -mwindows\" -DWITH_WINDOWS_ICON=ON" |
build.p = subprocess.Popen(command, shell=True, env=modify_environment) |
build.parser = ArgumentParser(description="Build cmake project.") |
build.qt_path = conf["qt_path"].replace("\\", "/") |
build.self_path = pathlib.Path(sys.argv[0]).absolute() |
build.toolset = os.path.join(qt_path, "lib/cmake/Qt6/qt.toolchain.cmake") |