mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2025-01-31 03:50:33 +00:00
aedi: fix reuse of variables with different types
This commit is contained in:
parent
7ade9daeb4
commit
557f5a79d3
4 changed files with 15 additions and 13 deletions
|
@ -200,7 +200,7 @@ class Builder(object):
|
|||
|
||||
# Apply ad-hoc code signing on executable files outside of application bundles
|
||||
if is_executable and '.app/Contents/' not in str(src):
|
||||
args = ('codesign', '--sign', '-', dst_file)
|
||||
args = ['codesign', '--sign', '-', dst_file]
|
||||
subprocess.check_call(args)
|
||||
else:
|
||||
if not Builder._compare_files(src_sub_paths):
|
||||
|
@ -276,9 +276,9 @@ class Builder(object):
|
|||
|
||||
parser = argparse.ArgumentParser(description='*ZDoom binary dependencies for macOS')
|
||||
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument('--target', choices=self._targets.keys(), help='target to build')
|
||||
group.add_argument('--source', metavar='path', help='path to target\'s source code')
|
||||
excl_group = parser.add_mutually_exclusive_group(required=True)
|
||||
excl_group.add_argument('--target', choices=self._targets.keys(), help='target to build')
|
||||
excl_group.add_argument('--source', metavar='path', help='path to target\'s source code')
|
||||
|
||||
group = parser.add_argument_group()
|
||||
group.add_argument('--xcode', action='store_true', help='generate Xcode project instead of build')
|
||||
|
@ -293,8 +293,8 @@ class Builder(object):
|
|||
group.add_argument('--verbose', action='store_true', help='enable verbose build output')
|
||||
group.add_argument('--jobs', help='number of parallel compilation jobs')
|
||||
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument('--disable-x64', action='store_true', help='disable x86_64 support')
|
||||
group.add_argument('--disable-arm', action='store_true', help='disable ARM64 support')
|
||||
excl_group = parser.add_mutually_exclusive_group()
|
||||
excl_group.add_argument('--disable-x64', action='store_true', help='disable x86_64 support')
|
||||
excl_group.add_argument('--disable-arm', action='store_true', help='disable ARM64 support')
|
||||
|
||||
return parser.parse_args(args)
|
||||
|
|
|
@ -142,11 +142,11 @@ class BuildState:
|
|||
raise Exception(f'Checksum of {filepath} does not match, expected: {checksum}, actual: {file_checksum}')
|
||||
|
||||
def _unpack_source_package(self, filepath: Path) -> typing.Tuple[str, Path]:
|
||||
filepaths = subprocess.check_output(['tar', '-tf', filepath]).decode("utf-8")
|
||||
filepaths = filepaths.split('\n')
|
||||
file_paths_str = subprocess.check_output(['tar', '-tf', filepath]).decode("utf-8")
|
||||
file_paths = file_paths_str.split('\n')
|
||||
first_path_component = None
|
||||
|
||||
for path in filepaths:
|
||||
for path in file_paths:
|
||||
if os.sep in path:
|
||||
first_path_component = path[:path.find(os.sep)]
|
||||
break
|
||||
|
|
|
@ -419,7 +419,7 @@ class CMakeTarget(BuildTarget):
|
|||
|
||||
def build(self, state: BuildState):
|
||||
if state.xcode:
|
||||
args = ('cmake', '--open', '.')
|
||||
args = ['cmake', '--open', '.']
|
||||
else:
|
||||
args = ['gmake', '-j', state.jobs]
|
||||
|
||||
|
|
|
@ -53,8 +53,10 @@ class CMakeMainTarget(CMakeTarget):
|
|||
dst_sep_pos = output.rfind(os.sep)
|
||||
dst = state.install_path / (output if dst_sep_pos == -1 else output[dst_sep_pos + 1:])
|
||||
|
||||
copy_func = shutil.copytree if src.is_dir() else shutil.copy
|
||||
copy_func(src, dst)
|
||||
if src.is_dir():
|
||||
shutil.copytree(src, dst)
|
||||
else:
|
||||
shutil.copy(src, dst)
|
||||
|
||||
def _force_cross_compilation(self, state: BuildState):
|
||||
if state.architecture() == machine():
|
||||
|
|
Loading…
Reference in a new issue