From b61242003262a741271a770b745c041431068d70 Mon Sep 17 00:00:00 2001 From: Jaby Date: Tue, 31 Dec 2024 18:57:47 +0100 Subject: [PATCH] Update rust versions --- src/Tools/Common.mk | 9 ++++ src/Tools/Makefile | 3 +- src/Tools/Tools.code-workspace | 4 +- src/Tools/cdtypes/Cargo.toml | 6 +-- src/Tools/cdtypes/Makefile | 13 ++++++ src/Tools/cpp_out/Cargo.toml | 2 +- src/Tools/mkoverlay/Cargo.toml | 6 +-- src/Tools/psxcdgen_ex/Cargo.toml | 6 +-- src/Tools/psxfileconv/Cargo.toml | 76 ++++++++++++++++---------------- src/Tools/psxreadmap/Cargo.toml | 4 +- src/Tools/tool_helper/Cargo.toml | 10 ++--- src/Tools/tool_helper/Makefile | 13 ++++++ src/Tools/wslpath/Cargo.toml | 2 +- 13 files changed, 95 insertions(+), 59 deletions(-) create mode 100644 src/Tools/cdtypes/Makefile create mode 100644 src/Tools/tool_helper/Makefile diff --git a/src/Tools/Common.mk b/src/Tools/Common.mk index ad11b1f7..772d68d5 100644 --- a/src/Tools/Common.mk +++ b/src/Tools/Common.mk @@ -14,13 +14,22 @@ define cp_artifact endef define cargo_windows_default + $(if $(findstring upgrade,$(CARGO_CMD)), + cargo $(CARGO_CMD) --$(BUILD_PROFILE), + cargo $(CARGO_CMD) --$(BUILD_PROFILE) --target=$(WINDOWS_TARGET) $(call cp_artifact,$(WINDOWS_ARTIFACT), ../../../bin/$(ARTIFACT).exe) + ) endef define cargo_unix_default + $(if $(findstring upgrade,$(CARGO_CMD)), + cargo $(CARGO_CMD) --$(BUILD_PROFILE), + cargo $(CARGO_CMD) --$(BUILD_PROFILE) --target=$(UNIX_TARGET) $(call cp_artifact,$(UNIX_ARTIFACT), ../../../bin/$(ARTIFACT)) + ) endef +# Run `cargo install cargo-edit --locked`to support upgrade # Windows build requires "rustup target add x86_64-pc-windows-gnu" and "sudo apt-get install mingw-w64" \ No newline at end of file diff --git a/src/Tools/Makefile b/src/Tools/Makefile index 15bf69db..e78b7f49 100644 --- a/src/Tools/Makefile +++ b/src/Tools/Makefile @@ -1,4 +1,5 @@ -PROJECTS = cpp_out psxfileconv mkoverlay psxcdgen_ex psxreadmap wslpath +SUPPORT_PROJECTS = cdtypes tool_helper +PROJECTS = cpp_out psxfileconv mkoverlay psxcdgen_ex psxreadmap wslpath .PHONY: $(PROJECTS) $(foreach var,$(PROJECTS),$(var)): diff --git a/src/Tools/Tools.code-workspace b/src/Tools/Tools.code-workspace index d7345376..7b35fa07 100644 --- a/src/Tools/Tools.code-workspace +++ b/src/Tools/Tools.code-workspace @@ -66,14 +66,14 @@ { "id": "build cfg", "type": "pickString", - "options": ["debug", "release"], + "options": ["debug", "release", "compatible", "incompatible"], "default": "release", "description": "build configuration" }, { "id": "cargo cmd", "type":"pickString", - "options": ["build", "check", "update", "clean", "run", "tree"], + "options": ["build", "check", "update", "upgrade", "clean", "run", "tree"], "default": "build", "description": "cargo command to run" } diff --git a/src/Tools/cdtypes/Cargo.toml b/src/Tools/cdtypes/Cargo.toml index a0aa2654..639c003f 100644 --- a/src/Tools/cdtypes/Cargo.toml +++ b/src/Tools/cdtypes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cdtypes" -version = "0.7.2" +version = "1.0.0" edition = "2021" [profile.release] @@ -8,5 +8,5 @@ panic = "abort" [dependencies] byteorder = "1.5.0" -chrono = "0.4.31" -paste = "1.0.14" \ No newline at end of file +chrono = "0.4.39" +paste = "1.0.15" diff --git a/src/Tools/cdtypes/Makefile b/src/Tools/cdtypes/Makefile new file mode 100644 index 00000000..d2909708 --- /dev/null +++ b/src/Tools/cdtypes/Makefile @@ -0,0 +1,13 @@ +include ../Common.mk + +ARTIFACT = cdtypes + +.PHONY: $(WINDOWS_ARTIFACT) $(UNIX_ARTIFACT) +$(WINDOWS_ARTIFACT): + $(call cargo_windows_default) + +$(UNIX_ARTIFACT): + $(call cargo_unix_default) + +all-windows: $(WINDOWS_ARTIFACT) +all: $(UNIX_ARTIFACT) \ No newline at end of file diff --git a/src/Tools/cpp_out/Cargo.toml b/src/Tools/cpp_out/Cargo.toml index dabfa826..245ebcb6 100644 --- a/src/Tools/cpp_out/Cargo.toml +++ b/src/Tools/cpp_out/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" panic = "abort" [dependencies] -clap = {version = "4.4.11", features = ["derive"]} +clap = {version = "4.5.23", features = ["derive"]} tool_helper = {path = "../tool_helper"} diff --git a/src/Tools/mkoverlay/Cargo.toml b/src/Tools/mkoverlay/Cargo.toml index 70236f70..c38970ff 100644 --- a/src/Tools/mkoverlay/Cargo.toml +++ b/src/Tools/mkoverlay/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" panic = "abort" [dependencies] -clap = {version = "4.4.11", features = ["derive"]} -serde_json = "1.0.108" -tool_helper = {path = "../tool_helper"} \ No newline at end of file +clap = {version = "4.5.23", features = ["derive"]} +serde_json = "1.0.134" +tool_helper = {path = "../tool_helper"} diff --git a/src/Tools/psxcdgen_ex/Cargo.toml b/src/Tools/psxcdgen_ex/Cargo.toml index cc1bb11e..217bb420 100644 --- a/src/Tools/psxcdgen_ex/Cargo.toml +++ b/src/Tools/psxcdgen_ex/Cargo.toml @@ -8,10 +8,10 @@ panic = "abort" [dependencies] cdtypes = {path = "../cdtypes"} -clap = {version = "4.4.11", features = ["derive"]} -colored = "2.1.0" +clap = {version = "4.5.23", features = ["derive"]} +colored = "2.2.0" hound = "3.5.1" no-comment = "0.0.3" -paste = "1.0.14" +paste = "1.0.15" roxmltree = "0.19.0" tool_helper = {path = "../tool_helper"} diff --git a/src/Tools/psxfileconv/Cargo.toml b/src/Tools/psxfileconv/Cargo.toml index b4b0a577..7cf7d301 100644 --- a/src/Tools/psxfileconv/Cargo.toml +++ b/src/Tools/psxfileconv/Cargo.toml @@ -1,38 +1,38 @@ -[package] -name = "psxfileconv" -version = "0.9.0" -edition = "2021" - -[profile.release] -panic = "abort" - -[features] -default = ["symphonia-all"] - -symphonia-all = ["symphonia", "symphonia/all"] -symphonia-isomp4 = ["symphonia", "symphonia/isomp4"] -symphonia-mkv = ["symphonia", "symphonia/mkv"] -symphonia-ogg = ["symphonia", "symphonia/ogg"] -symphonia-wav = ["symphonia", "symphonia/wav"] -symphonia-aac = ["symphonia", "symphonia/aac"] -symphonia-adpcm = ["symphonia", "symphonia/adpcm"] -symphonia-alac = ["symphonia", "symphonia/alac"] -symphonia-flac = ["symphonia", "symphonia/flac"] -symphonia-mpa = ["symphonia", "symphonia/mpa"] -symphonia-mp1 = ["symphonia", "symphonia/mp1"] -symphonia-mp2 = ["symphonia", "symphonia/mp2"] -symphonia-mp3 = ["symphonia", "symphonia/mp3"] -symphonia-pcm = ["symphonia", "symphonia/pcm"] -symphonia-vorbis = ["symphonia", "symphonia/vorbis"] - -[dependencies] -bitflags = "2.6.0" -cdtypes = {path = "../cdtypes"} -clap = {version = "4.4.11", features = ["derive"]} -image = "0.24.7" -hound = "3.5.1" -paste = "1.0.14" -png = "0.17.10" -rubato = "0.16.1" -symphonia = {version = "0.5.4", optional = true, default-features = false} -tool_helper = {path = "../tool_helper"} \ No newline at end of file +[package] +name = "psxfileconv" +version = "1.0.0" +edition = "2021" + +[profile.release] +panic = "abort" + +[features] +default = ["symphonia-all"] + +symphonia-all = ["symphonia", "symphonia/all"] +symphonia-isomp4 = ["symphonia", "symphonia/isomp4"] +symphonia-mkv = ["symphonia", "symphonia/mkv"] +symphonia-ogg = ["symphonia", "symphonia/ogg"] +symphonia-wav = ["symphonia", "symphonia/wav"] +symphonia-aac = ["symphonia", "symphonia/aac"] +symphonia-adpcm = ["symphonia", "symphonia/adpcm"] +symphonia-alac = ["symphonia", "symphonia/alac"] +symphonia-flac = ["symphonia", "symphonia/flac"] +symphonia-mpa = ["symphonia", "symphonia/mpa"] +symphonia-mp1 = ["symphonia", "symphonia/mp1"] +symphonia-mp2 = ["symphonia", "symphonia/mp2"] +symphonia-mp3 = ["symphonia", "symphonia/mp3"] +symphonia-pcm = ["symphonia", "symphonia/pcm"] +symphonia-vorbis = ["symphonia", "symphonia/vorbis"] + +[dependencies] +bitflags = "2.6.0" +cdtypes = {path = "../cdtypes"} +clap = {version = "4.5.23", features = ["derive"]} +image = "0.24.9" +hound = "3.5.1" +paste = "1.0.15" +png = "0.17.16" +rubato = "0.16.1" +symphonia = {version = "0.5.4", optional = true, default-features = false} +tool_helper = {path = "../tool_helper"} diff --git a/src/Tools/psxreadmap/Cargo.toml b/src/Tools/psxreadmap/Cargo.toml index cd6bf596..3e9684f0 100644 --- a/src/Tools/psxreadmap/Cargo.toml +++ b/src/Tools/psxreadmap/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" panic = "abort" [dependencies] -clap = {version = "4.4.11", features = ["derive"]} +clap = {version = "4.5.23", features = ["derive"]} crossterm = "0.27.0" ratatui = "0.25.0" readmap = {version = "*", path = "readmap"} -tool_helper = {version = "*", path = "../tool_helper"} \ No newline at end of file +tool_helper = {version = "*", path = "../tool_helper"} diff --git a/src/Tools/tool_helper/Cargo.toml b/src/Tools/tool_helper/Cargo.toml index 1e46a6b5..9d282f6c 100644 --- a/src/Tools/tool_helper/Cargo.toml +++ b/src/Tools/tool_helper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tool_helper" -version = "0.9.8" +version = "1.0.0" edition = "2021" [profile.release] @@ -9,9 +9,9 @@ panic = "abort" [dependencies] byteorder = "1.5.0" cdtypes = {path = "../cdtypes"} -colored = "2.0.4" +colored = "2.2.0" envmnt = "0.10.4" hound = "3.5.1" -lz4 = "1.24.0" -paste = "1.0.14" -wslpath = {path = "../wslpath"} \ No newline at end of file +lz4 = "1.28.0" +paste = "1.0.15" +wslpath = {path = "../wslpath"} diff --git a/src/Tools/tool_helper/Makefile b/src/Tools/tool_helper/Makefile new file mode 100644 index 00000000..4f2f74f4 --- /dev/null +++ b/src/Tools/tool_helper/Makefile @@ -0,0 +1,13 @@ +include ../Common.mk + +ARTIFACT = tool_helper + +.PHONY: $(WINDOWS_ARTIFACT) $(UNIX_ARTIFACT) +$(WINDOWS_ARTIFACT): + $(call cargo_windows_default) + +$(UNIX_ARTIFACT): + $(call cargo_unix_default) + +all-windows: $(WINDOWS_ARTIFACT) +all: $(UNIX_ARTIFACT) \ No newline at end of file diff --git a/src/Tools/wslpath/Cargo.toml b/src/Tools/wslpath/Cargo.toml index 4c27bd2b..72c35ec5 100644 --- a/src/Tools/wslpath/Cargo.toml +++ b/src/Tools/wslpath/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" panic = "abort" [dependencies] -clap = {version = "4.4.7", features = ["derive"]} \ No newline at end of file +clap = {version = "4.5.23", features = ["derive"]}