mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 03:51:33 +00:00
build script: add function to copy file to bin directory
This commit is contained in:
parent
c353fe8e2e
commit
16b2601941
1 changed files with 13 additions and 0 deletions
13
build.py
13
build.py
|
@ -272,6 +272,19 @@ Cflags: -I${{includedir}} {cflags}
|
|||
#endif
|
||||
''')
|
||||
|
||||
def copy_to_bin(self, builder: 'Builder', filename: str = None, new_filename: str = None):
|
||||
bin_path = self.prefix + '/bin/'
|
||||
os.makedirs(bin_path, exist_ok=True)
|
||||
|
||||
if not filename:
|
||||
filename = self.name
|
||||
if not new_filename:
|
||||
new_filename = filename
|
||||
|
||||
src_path = builder.build_path + filename
|
||||
dst_path = bin_path + new_filename
|
||||
shutil.copy(src_path, dst_path)
|
||||
|
||||
|
||||
class MakeTarget(Target):
|
||||
def __init__(self, name=None):
|
||||
|
|
Loading…
Reference in a new issue