Patch pro Onikakushi, vývojové prostředí

This commit is contained in:
sneedmaster
2025-12-21 16:40:07 +01:00
parent 793eac7ac2
commit cccc928b2d
34 changed files with 239 additions and 499 deletions

View File

@@ -42,15 +42,15 @@ fn main() -> ExitCode {
};
// Check if python is correctly installed
println!("Running 'python --version' to check if python is correctly installed...");
let result = Command::new("python")
println!("Running 'python3 --version' to check if python is correctly installed...");
let result = Command::new("python3")
.arg("--version")
.status()
.expect("Failed to run python");
if !result.success()
{
println!("Python not found! via `python`. Make sure you:");
println!("Python not found! via `python3`. Make sure you:");
println!("- ticked 'Add Python to environment variables' in the python installer.");
println!("- can run 'python' in the console and get no error/the Microsoft Store does NOT appear");
println!("Failed to run python: {:?}", result);
@@ -108,7 +108,7 @@ fn main() -> ExitCode {
fs::create_dir_all(&directory_data).expect("Failed to recreate directory");
// 0. check version
let output = Command::new("python")
let output = Command::new("python3")
.env("PYTHONIOENCODING", "utf-8")
.arg("scripts/AssetVersion.py")
.arg(&assets)
@@ -126,7 +126,7 @@ fn main() -> ExitCode {
assert_eq!(unity, &version.trim());
// 1. texts
let status = Command::new("python")
let status = Command::new("python3")
.env("PYTHONIOENCODING", "utf-8")
.arg("scripts/UnityTextModifier.py")
.arg(&assets)
@@ -189,7 +189,7 @@ fn main() -> ExitCode {
_ => panic!("Couldn't identify version for arc {}", arc_number),
};
let status = Command::new("python")
let status = Command::new("python3")
.env("PYTHONIOENCODING", "utf-8")
.arg("scripts/TMPAssetConverter.py")
.arg("assets/fonts/msgothic_0 SDF Atlas_Texture2D.dat")
@@ -214,7 +214,7 @@ fn main() -> ExitCode {
panic!("Couldn't find msgothic_2 font for chapter {} with config {}-{} at path [{}]", &chapter, &system, &unity, &font_path);
}
let status = Command::new("python")
let status = Command::new("python3")
.env("PYTHONIOENCODING", "utf-8")
.arg("scripts/TMPAssetConverter.py")
.arg("assets/fonts/msgothic_2 SDF Atlas_Texture2D.dat")
@@ -236,7 +236,7 @@ fn main() -> ExitCode {
println!();
// 5. generate emip
let status = Command::new("python")
let status = Command::new("python3")
.env("PYTHONIOENCODING", "utf-8")
.arg("scripts/EMIPGenerator.py")
.arg(format!("{}/sharedassets0.assets", &directory_data))
@@ -250,10 +250,11 @@ fn main() -> ExitCode {
println!();
// 6. apply emip
let status = Command::new("AssetBundleExtractor")
let status = Command::new("wine")
.arg("64bit/AssetBundleExtractor.exe")
.arg("applyemip")
.arg(&emip)
.arg("output")
.arg(".")
.status()
.expect("failed to execute AssetBundleExtractor");