Skip to content

Commit

Permalink
SCons: Use more native to scons approach for scu
Browse files Browse the repository at this point in the history
Followup to godotengine#98888. Note here can't be any regressions like godotengine#99607
because here separator is not OS dependent and set explicitly

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
  • Loading branch information
dustdfg committed Dec 7, 2024
1 parent aa8d9b8 commit a263936
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions scu_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,28 +130,10 @@ def write_exception_output_file(file_count, exception_string, output_folder, out


def find_section_name(sub_folder):
# Construct a useful name for the section from the path for debug logging
section_path = os.path.abspath(base_folder_path + sub_folder) + "/"

folders = []
folder = ""

for i in range(8):
folder = os.path.dirname(section_path)
folder = os.path.basename(folder)
if folder == base_folder_only:
break
folders.append(folder)
section_path += "../"
section_path = os.path.abspath(section_path) + "/"

section_name = ""
for n in range(len(folders)):
section_name += folders[len(folders) - n - 1]
if n != (len(folders) - 1):
section_name += "_"

return section_name
from SCons.Script import Dir

rel_path = Dir(sub_folder).get_tpath()
return "_".join(Path(rel_path).parts)


# "folders" is a list of folders to add all the files from to add to the SCU
Expand Down

0 comments on commit a263936

Please sign in to comment.