chore: version 1.0.5
All checks were successful
Deploy Tools / build-package (push) Successful in 22s
All checks were successful
Deploy Tools / build-package (push) Successful in 22s
This commit is contained in:
parent
6e39db32bd
commit
0c3a3d00b0
@ -1,4 +1,5 @@
|
|||||||
import pl_build.core as pl
|
import pl_build.core as pl
|
||||||
|
import pathlib
|
||||||
|
|
||||||
class plWin32Helper:
|
class plWin32Helper:
|
||||||
|
|
||||||
@ -50,8 +51,9 @@ class plWin32Helper:
|
|||||||
self.buffer += ' ' * self.indent + '@if not exist "' + directory + '" @mkdir "' + directory + '"\n\n'
|
self.buffer += ' ' * self.indent + '@if not exist "' + directory + '" @mkdir "' + directory + '"\n\n'
|
||||||
|
|
||||||
def delete_file(self, file):
|
def delete_file(self, file):
|
||||||
|
p = pathlib.PureWindowsPath(file)
|
||||||
self.buffer += ' ' * self.indent + '@if exist "' + file + '"'
|
self.buffer += ' ' * self.indent + '@if exist "' + file + '"'
|
||||||
self.buffer += ' del "' + file + '"\n'
|
self.buffer += ' del "' + str(p) + '"\n'
|
||||||
|
|
||||||
def generate_build(name, user_options = None):
|
def generate_build(name, user_options = None):
|
||||||
|
|
||||||
@ -257,10 +259,6 @@ def generate_build(name, user_options = None):
|
|||||||
helper.add_raw(flag + " ")
|
helper.add_raw(flag + " ")
|
||||||
helper.add_spacing()
|
helper.add_spacing()
|
||||||
|
|
||||||
settings.linker_flags.extend(["-incremental:no"])
|
|
||||||
if settings.target_type == pl.TargetType.DYNAMIC_LIBRARY:
|
|
||||||
settings.linker_flags.extend(["-noimplib", "-noexp"])
|
|
||||||
|
|
||||||
if settings.linker_flags:
|
if settings.linker_flags:
|
||||||
helper.add_raw('@set PL_LINKER_FLAGS=')
|
helper.add_raw('@set PL_LINKER_FLAGS=')
|
||||||
for flag in settings.linker_flags:
|
for flag in settings.linker_flags:
|
||||||
@ -431,7 +429,8 @@ def generate_build(name, user_options = None):
|
|||||||
helper.add_spacing()
|
helper.add_spacing()
|
||||||
helper.add_comment("delete obj files(s)")
|
helper.add_comment("delete obj files(s)")
|
||||||
for dir in output_dirs:
|
for dir in output_dirs:
|
||||||
helper.add_line('@del "' + dir + '/*.obj" > nul 2> nul')
|
p = pathlib.PureWindowsPath(dir + '/*.obj')
|
||||||
|
helper.add_line('@del "' + str(p) + '" > nul 2> nul')
|
||||||
|
|
||||||
helper.add_spacing()
|
helper.add_spacing()
|
||||||
helper.add_comment("delete lock file(s)")
|
helper.add_comment("delete lock file(s)")
|
||||||
|
@ -156,6 +156,7 @@ class _CompilerProfile:
|
|||||||
self.platform_filter = None
|
self.platform_filter = None
|
||||||
self.configuration_filter = None
|
self.configuration_filter = None
|
||||||
self.target_filter = None
|
self.target_filter = None
|
||||||
|
self.target_type_filter = None
|
||||||
|
|
||||||
self.output_directory = None
|
self.output_directory = None
|
||||||
self.definitions = []
|
self.definitions = []
|
||||||
@ -171,6 +172,16 @@ class _CompilerProfile:
|
|||||||
|
|
||||||
def is_active(self):
|
def is_active(self):
|
||||||
|
|
||||||
|
if self.target_type_filter is not None:
|
||||||
|
|
||||||
|
found = False
|
||||||
|
for target in self.target_type_filter:
|
||||||
|
if target == _context._target_type:
|
||||||
|
found = True
|
||||||
|
break
|
||||||
|
if not found:
|
||||||
|
return False
|
||||||
|
|
||||||
if self.target_filter is not None:
|
if self.target_filter is not None:
|
||||||
|
|
||||||
found = False
|
found = False
|
||||||
@ -587,7 +598,7 @@ def set_pre_target_build_step(code: str):
|
|||||||
def set_post_target_build_step(code: str):
|
def set_post_target_build_step(code: str):
|
||||||
_context._working_settings.post_build_step = code
|
_context._working_settings.post_build_step = code
|
||||||
|
|
||||||
def add_profile(*, compiler_filter=None, platform_filter=None, configuration_filter=None, target_filter=None, definitions=[], include_directories=[],
|
def add_profile(*, compiler_filter=None, platform_filter=None, configuration_filter=None, target_filter=None, target_type_filter=None, definitions=[], include_directories=[],
|
||||||
link_directories=[], static_link_libraries=[], dynamic_link_libraries=[], link_frameworks=[], source_files=[],
|
link_directories=[], static_link_libraries=[], dynamic_link_libraries=[], link_frameworks=[], source_files=[],
|
||||||
compiler_flags=[], linker_flags=[], output_directory: str = None, output_binary_extension: str = None):
|
compiler_flags=[], linker_flags=[], output_directory: str = None, output_binary_extension: str = None):
|
||||||
|
|
||||||
@ -596,6 +607,7 @@ def add_profile(*, compiler_filter=None, platform_filter=None, configuration_fil
|
|||||||
profile.platform_filter = platform_filter
|
profile.platform_filter = platform_filter
|
||||||
profile.configuration_filter = configuration_filter
|
profile.configuration_filter = configuration_filter
|
||||||
profile.target_filter = target_filter
|
profile.target_filter = target_filter
|
||||||
|
profile.target_type_filter = target_type_filter
|
||||||
profile.definitions = definitions
|
profile.definitions = definitions
|
||||||
profile.include_directories = include_directories
|
profile.include_directories = include_directories
|
||||||
profile.output_directory = output_directory
|
profile.output_directory = output_directory
|
||||||
|
Loading…
Reference in New Issue
Block a user