Revert "Merge branch 'dev' of https://github.com/ClaraCrazy/Flipper-Xtreme into dev"

This reverts commit 708dd167c8.
This commit is contained in:
Willy-JL
2023-02-10 20:50:30 +00:00
parent 176c01c0da
commit 6555082e2a
2348 changed files with 216 additions and 298 deletions

View File

@@ -26,20 +26,6 @@ ICONS_TEMPLATE_C_FRAME = "const uint8_t {name}[] = {data};\n"
ICONS_TEMPLATE_C_DATA = "const uint8_t* const {name}[] = {data};\n"
ICONS_TEMPLATE_C_ICONS = "const Icon {name} = {{.width={width},.height={height},.frame_count={frame_count},.frame_rate={frame_rate},.frames=_{name}}};\n"
valid_dirs = list()
# This will not stay, dont worry! This is temp code until we got time to rewrite this all
root_dir = pathlib.Path(__file__).absolute().parent.parent
dolphin_external = root_dir / "assets/dolphin/external/"
potential_directories = [
item for item in dolphin_external.iterdir() if item.is_dir()
] # Get all animation directories
for directory in potential_directories: # loop through all of them
if (
directory / "manifest.txt"
).exists(): # check if they contain a manifest.txt TODO: This code should be moved to wherever manifest.txt files are validated!
valid_dirs.append(directory) # append valid directory to list
class Main(App):
def init(self):
@@ -263,20 +249,8 @@ class Main(App):
else:
self.logger.info("Manifest is up-to-date!")
# This will not stay, dont worry! This is temp code until we got time to rewrite this all
global valid_dirs # access our global variable
for (
valid_dir
) in valid_dirs: # We can copy the manifest for all of the valid dirs!
(root_dir / f"assets/resources/dolphin/{valid_dir.name}").mkdir(
parents=True, exist_ok=True
)
shutil.copyfile(
valid_dir / "manifest.txt",
root_dir / f"assets/resources/dolphin/{valid_dir.name}/manifest.txt",
)
(root_dir / "assets/resources/dolphin/manifest.txt").unlink()
self.logger.info("Packing custom asset packs")
root_dir = pathlib.Path(__file__).absolute().parent.parent
asset_packer.pack(
root_dir / "assets/dolphin/custom",
root_dir / f"assets/resources/dolphin_custom",
@@ -311,12 +285,7 @@ class Main(App):
self.logger.info(f"Processing Dolphin sources")
dolphin = Dolphin()
self.logger.info(f"Loading data")
if f"dolphin{os.sep}external" in str(
self.args.input_directory
): # AHEM... oopsie. This script apparently just loads all assets, not only external assets, lol.
dolphin.load(self.args.input_directory, valid_dirs)
else:
dolphin.load(self.args.input_directory)
dolphin.load(self.args.input_directory)
self.logger.info(f"Packing")
dolphin.pack(self.args.output_directory, self.args.symbol_name)
self.logger.info(f"Complete")