From f6da5769d68db5377dd25e04725d5ecbd02b3737 Mon Sep 17 00:00:00 2001 From: jaby Date: Wed, 9 Oct 2024 20:56:24 +0200 Subject: [PATCH] Rename jaby_engine_fconv to fileconv --- examples/PoolBox/assets/Makefile | 8 +- src/Library/Makefile | 6 +- src/Tools/Makefile | 2 +- src/Tools/Tests/Test.mk | 6 +- src/Tools/Tools.code-workspace | 140 +++++++++--------- .../Cargo.toml | 2 +- .../{jaby_engine_fconv => fileconv}/Makefile | 2 +- .../src/audio/mod.rs | 0 .../src/audio/vag/mod.rs | 0 .../src/audio/xa/mod.rs | 0 .../src/images/mod.rs | 0 .../src/images/reduced_tim/color_clut.rs | 0 .../src/images/reduced_tim/color_full16.rs | 0 .../src/images/reduced_tim/mod.rs | 0 .../src/images/reduced_tim/types.rs | 0 .../src/lib.rs | 0 .../src/main.rs | 2 +- .../src/nothing/mod.rs | 0 support/src/FontWriter/Makefile | 2 +- template/JabyEngine-PSX_Game/assets/Makefile | 2 +- 20 files changed, 86 insertions(+), 86 deletions(-) rename src/Tools/{jaby_engine_fconv => fileconv}/Cargo.toml (73%) rename src/Tools/{jaby_engine_fconv => fileconv}/Makefile (76%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/audio/mod.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/audio/vag/mod.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/audio/xa/mod.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/images/mod.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/images/reduced_tim/color_clut.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/images/reduced_tim/color_full16.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/images/reduced_tim/mod.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/images/reduced_tim/types.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/lib.rs (100%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/main.rs (98%) rename src/Tools/{jaby_engine_fconv => fileconv}/src/nothing/mod.rs (100%) diff --git a/examples/PoolBox/assets/Makefile b/examples/PoolBox/assets/Makefile index 644f7b10..ae1f52f7 100644 --- a/examples/PoolBox/assets/Makefile +++ b/examples/PoolBox/assets/Makefile @@ -40,19 +40,19 @@ JabyTails_FLAGS = $(CLUT_4_COLOR_TRANS_FLAGS) $(OUTPUT_DIR)/fox.xa: audio/temp/fox.wav @mkdir -p $(OUTPUT_DIR) - jaby_engine_fconv $< -o $@ xa + fileconv $< -o $@ xa $(OUTPUT_DIR)/%.vag: audio/temp/%.wav @mkdir -p $(OUTPUT_DIR) - jaby_engine_fconv --lz4 $< -o $@ vag + fileconv --lz4 $< -o $@ vag $(OUTPUT_DIR)/%.xa: audio/%.wav @mkdir -p $(OUTPUT_DIR) - jaby_engine_fconv $< -o $@ xa + fileconv $< -o $@ xa $(OUTPUT_DIR)/%.img: %.png @mkdir -p $(OUTPUT_DIR) - jaby_engine_fconv --lz4 $< -o $@ $($*_FLAGS) + fileconv --lz4 $< -o $@ $($*_FLAGS) all: $(INPUT) diff --git a/src/Library/Makefile b/src/Library/Makefile index 4c209cc9..bc574b48 100644 --- a/src/Library/Makefile +++ b/src/Library/Makefile @@ -33,13 +33,13 @@ $(LIB_DIR)/$(ARTIFACT).a: $(TARGET).a @mkdir -p $(LIB_DIR) cp $(TARGET).a $(LIB_DIR)/$(ARTIFACT).a -# Improve later +# TODO: Improve later # rule to make the boot image $(SPLASH_IMAGE): ressources/Splash.png - jaby_engine_fconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@ + fileconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@ $(SPLASH_IMAGE_NTSC): ressources/Splash_ntsc.png - jaby_engine_fconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@ + fileconv --lz4 $< simple-tim full16 | cpp_out --name SplashScreen -o $@ #Rules section for default compilation and linking all: $(SPLASH_IMAGE) $(SPLASH_IMAGE_NTSC) $(LIB_DIR)/$(ARTIFACT).a diff --git a/src/Tools/Makefile b/src/Tools/Makefile index d8187906..ab05f31e 100644 --- a/src/Tools/Makefile +++ b/src/Tools/Makefile @@ -1,4 +1,4 @@ -PROJECTS = cpp_out jaby_engine_fconv mkoverlay psxcdgen_ex psxreadmap wslpath +PROJECTS = cpp_out fileconv mkoverlay psxcdgen_ex psxreadmap wslpath .PHONY: $(PROJECTS) $(foreach var,$(PROJECTS),$(var)): diff --git a/src/Tools/Tests/Test.mk b/src/Tools/Tests/Test.mk index cfde7ba9..1a5b4f5a 100644 --- a/src/Tools/Tests/Test.mk +++ b/src/Tools/Tests/Test.mk @@ -4,7 +4,7 @@ test_cpp_out: always @echo "Planschbecken" | ./../cpp_out/target/x86_64-unknown-linux-gnu/release/cpp_out --name Dino -o "Test_Planschbecken.cpp" @echo "Planschbecken" | ./../cpp_out/target/x86_64-unknown-linux-gnu/release/cpp_out --name Dino -o "Test_Planschbecken.hpp" -test_jaby_engine_fconv: always -# @./../jaby_engine_fconv/target/x86_64-unknown-linux-musl/release/jaby_engine_fconv -o Test_Planschi.bin Test_PNG.PNG simple-tim full16 - @./../jaby_engine_fconv/target/x86_64-unknown-linux-gnu/release/jaby_engine_fconv --lz4 -o Test_Planschi.bin ../../Library/ressources/Splash.PNG simple-tim full16 +test_fileconv: always +# @./../fileconv/target/x86_64-unknown-linux-musl/release/fileconv -o Test_Planschi.bin Test_PNG.PNG simple-tim full16 + @./../fileconv/target/x86_64-unknown-linux-gnu/release/fileconv --lz4 -o Test_Planschi.bin ../../Library/ressources/Splash.PNG simple-tim full16 always: ; \ No newline at end of file diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index aa91f88f..a14b2e5f 100644 --- a/src/Tools/Tools.code-workspace +++ b/src/Tools/Tools.code-workspace @@ -1,73 +1,73 @@ { - "folders": [ - { - "path": "." - } - ], - "settings": { - "cargo_task": [ - "./ all!Unix: All", - "cpp_out all!Unix: cpp_out", - "jaby_engine_fconv all!Unix: jaby_engine_fconv", - "mkoverlay all!Unix: mkoverlay", - "psxcdgen_ex all!Unix: psxcdgen_ex", - "psxcdread all!Unix: psxcdread", - "psxreadmap all!Unix: psxreadmap", - "wslpath all!Unix: wslpath", + "folders": [ + { + "path": "." + } + ], + "settings": { + "cargo_task": [ + "./ all!Unix: All", + "cpp_out all!Unix: cpp_out", + "fileconv all!Unix: fileconv", + "mkoverlay all!Unix: mkoverlay", + "psxcdgen_ex all!Unix: psxcdgen_ex", + "psxcdread all!Unix: psxcdread", + "psxreadmap all!Unix: psxreadmap", + "wslpath all!Unix: wslpath", - "./ all-windows!Windows: All", - "cpp_out all-windows!Windows: cpp_out", - "jaby_engine_fconv all-windows!Windows: jaby_engine_fconv", - "mkoverlay all-windows!Windows: mkoverlay", - "psxcdgen_ex all-windows!Windows: psxcdgen_ex", - "psxcdread all-windows!Windows: psxcdread", - "psxreadmap all-windows!Windows: psxreadmap", - "wslpath all-windows!Windows: wslpath" - ] - }, - "tasks": { - "version": "2.0.0", - "tasks": [ - { - "label": "cargo", - "type": "shell", - "group": { - "kind": "build" - }, - "windows": { - "command": "wsl --shell-type login make -C ${input:windows_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}" - }, - "linux": { - "command": "make -C ${input:linux_cargo_task} BUILD_PROFILE=${input:build cfg}" - }, - "problemMatcher": [] - } - ], - "inputs": [ - { - "id": "windows_cargo_task", - "type": "command", - "command": "shellCommand.execute", - "args": { - "command": "powershell", - "commandArgs": ["-command", "'${config:cargo_task}'.Replace(',',\"`n\")"], - "fieldSeparator": "!" - } - }, - { - "id": "build cfg", - "type": "pickString", - "options": ["debug", "release"], - "default": "release", - "description": "build configuration" - }, - { - "id": "cargo cmd", - "type":"pickString", - "options": ["build", "check", "update", "clean", "run", "tree"], - "default": "build", - "description": "cargo command to run" - } - ] - } + "./ all-windows!Windows: All", + "cpp_out all-windows!Windows: cpp_out", + "fileconv all-windows!Windows: fileconv", + "mkoverlay all-windows!Windows: mkoverlay", + "psxcdgen_ex all-windows!Windows: psxcdgen_ex", + "psxcdread all-windows!Windows: psxcdread", + "psxreadmap all-windows!Windows: psxreadmap", + "wslpath all-windows!Windows: wslpath" + ] + }, + "tasks": { + "version": "2.0.0", + "tasks": [ + { + "label": "cargo", + "type": "shell", + "group": { + "kind": "build" + }, + "windows": { + "command": "wsl --shell-type login make -C ${input:windows_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}" + }, + "linux": { + "command": "make -C ${input:linux_cargo_task} BUILD_PROFILE=${input:build cfg}" + }, + "problemMatcher": [] + } + ], + "inputs": [ + { + "id": "windows_cargo_task", + "type": "command", + "command": "shellCommand.execute", + "args": { + "command": "powershell", + "commandArgs": ["-command", "'${config:cargo_task}'.Replace(',',\"`n\")"], + "fieldSeparator": "!" + } + }, + { + "id": "build cfg", + "type": "pickString", + "options": ["debug", "release"], + "default": "release", + "description": "build configuration" + }, + { + "id": "cargo cmd", + "type":"pickString", + "options": ["build", "check", "update", "clean", "run", "tree"], + "default": "build", + "description": "cargo command to run" + } + ] + } } \ No newline at end of file diff --git a/src/Tools/jaby_engine_fconv/Cargo.toml b/src/Tools/fileconv/Cargo.toml similarity index 73% rename from src/Tools/jaby_engine_fconv/Cargo.toml rename to src/Tools/fileconv/Cargo.toml index 41a00bc1..11040700 100644 --- a/src/Tools/jaby_engine_fconv/Cargo.toml +++ b/src/Tools/fileconv/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "jaby_engine_fconv" +name = "fileconv" version = "0.5.0" edition = "2021" diff --git a/src/Tools/jaby_engine_fconv/Makefile b/src/Tools/fileconv/Makefile similarity index 76% rename from src/Tools/jaby_engine_fconv/Makefile rename to src/Tools/fileconv/Makefile index 5e994cd7..b4ba059d 100644 --- a/src/Tools/jaby_engine_fconv/Makefile +++ b/src/Tools/fileconv/Makefile @@ -1,6 +1,6 @@ include ../Common.mk -ARTIFACT = jaby_engine_fconv +ARTIFACT = fileconv .PHONY: $(WINDOWS_ARTIFACT) $(UNIX_ARTIFACT) $(WINDOWS_ARTIFACT): diff --git a/src/Tools/jaby_engine_fconv/src/audio/mod.rs b/src/Tools/fileconv/src/audio/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/audio/mod.rs rename to src/Tools/fileconv/src/audio/mod.rs diff --git a/src/Tools/jaby_engine_fconv/src/audio/vag/mod.rs b/src/Tools/fileconv/src/audio/vag/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/audio/vag/mod.rs rename to src/Tools/fileconv/src/audio/vag/mod.rs diff --git a/src/Tools/jaby_engine_fconv/src/audio/xa/mod.rs b/src/Tools/fileconv/src/audio/xa/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/audio/xa/mod.rs rename to src/Tools/fileconv/src/audio/xa/mod.rs diff --git a/src/Tools/jaby_engine_fconv/src/images/mod.rs b/src/Tools/fileconv/src/images/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/images/mod.rs rename to src/Tools/fileconv/src/images/mod.rs diff --git a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/color_clut.rs b/src/Tools/fileconv/src/images/reduced_tim/color_clut.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/images/reduced_tim/color_clut.rs rename to src/Tools/fileconv/src/images/reduced_tim/color_clut.rs diff --git a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/color_full16.rs b/src/Tools/fileconv/src/images/reduced_tim/color_full16.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/images/reduced_tim/color_full16.rs rename to src/Tools/fileconv/src/images/reduced_tim/color_full16.rs diff --git a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs b/src/Tools/fileconv/src/images/reduced_tim/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/images/reduced_tim/mod.rs rename to src/Tools/fileconv/src/images/reduced_tim/mod.rs diff --git a/src/Tools/jaby_engine_fconv/src/images/reduced_tim/types.rs b/src/Tools/fileconv/src/images/reduced_tim/types.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/images/reduced_tim/types.rs rename to src/Tools/fileconv/src/images/reduced_tim/types.rs diff --git a/src/Tools/jaby_engine_fconv/src/lib.rs b/src/Tools/fileconv/src/lib.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/lib.rs rename to src/Tools/fileconv/src/lib.rs diff --git a/src/Tools/jaby_engine_fconv/src/main.rs b/src/Tools/fileconv/src/main.rs similarity index 98% rename from src/Tools/jaby_engine_fconv/src/main.rs rename to src/Tools/fileconv/src/main.rs index e0487ff6..6eb50788 100644 --- a/src/Tools/jaby_engine_fconv/src/main.rs +++ b/src/Tools/fileconv/src/main.rs @@ -1,5 +1,5 @@ use clap::{Parser, Subcommand}; -use jaby_engine_fconv::{audio::*, images::*, nothing}; +use fileconv::{audio::*, images::*, nothing}; use std::path::PathBuf; use tool_helper::{exit_with_error, print_warning, Error}; diff --git a/src/Tools/jaby_engine_fconv/src/nothing/mod.rs b/src/Tools/fileconv/src/nothing/mod.rs similarity index 100% rename from src/Tools/jaby_engine_fconv/src/nothing/mod.rs rename to src/Tools/fileconv/src/nothing/mod.rs diff --git a/support/src/FontWriter/Makefile b/support/src/FontWriter/Makefile index 4d75f761..2b34f69f 100644 --- a/support/src/FontWriter/Makefile +++ b/support/src/FontWriter/Makefile @@ -21,7 +21,7 @@ LIB_OBJS = $(filter-out $(MAIN_BOOT_OBJ) $(OVERLAY_BOOT_OBJ),$(OBJS)) #$(info $$var2 is [${LIB_OBJS}]) $(DEFAULT_FONT_IMAGE): ressources/DefaultFont.png - jaby_engine_fconv --lz4 $< simple-tim clut4 --semi-trans --color-trans | cpp_out --name default_font_data -o $@ + fileconv --lz4 $< simple-tim clut4 --semi-trans --color-trans | cpp_out --name default_font_data -o $@ #Linking rule $(TARGET).a: $(LIB_OBJS) diff --git a/template/JabyEngine-PSX_Game/assets/Makefile b/template/JabyEngine-PSX_Game/assets/Makefile index 00a88343..341868c3 100644 --- a/template/JabyEngine-PSX_Game/assets/Makefile +++ b/template/JabyEngine-PSX_Game/assets/Makefile @@ -6,7 +6,7 @@ OUTPUT_DIR = bin # Create build targets like # $(OUTPUT_DIR)/TexturePage.bin: TexturePage.png # @mkdir -p $(OUTPUT_DIR) -# jaby_engine_fconv --lz4 $< -o $@ simple-tim clut4 +# fileconv --lz4 $< -o $@ simple-tim clut4 all: #$(OUTPUT_DIR)/TexturePage.bin