Venv
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Protože osobně používám venv...
|
||||
/venv
|
||||
|
||||
/assets/vanilla
|
||||
/output
|
||||
/target
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Překlad uživatelského rozhraní do češtiny
|
||||
|
||||
Tento repozitář bude obsahovat přeložené Unity assety pro Higurashi a skripty na kompilaci. Byl také sobecky přizpůsoben unixovým systémům. S mírnými úpravami by měl fungovat i na Oknech™.
|
||||
Tento repozitář bude obsahovat přeložené Unity assety pro Higuraši a skripty na kompilaci. Byl také sobecky přizpůsoben unixovým systémům a tomu, aby běžel ve venvu.
|
||||
|
||||
Pro více informací a zasloužené titulky autorů, bez kterých by tento projekt nebyl uskutečnitelný, se prosím podívejte na [původní repozitář](https://github.com/07th-mod/ui-editing-scripts).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
numpy
|
||||
Pillow
|
||||
unitypack @ git+https://github.com/drojf/UnityPack@master # custom build of unitypack which does not require 'decrunch'
|
||||
setuptools # required for unitypack or else get `pkg_resources` error
|
||||
setuptools<81 # required for unitypack or else get `pkg_resources` error
|
||||
16
src/main.rs
16
src/main.rs
@@ -42,15 +42,15 @@ fn main() -> ExitCode {
|
||||
};
|
||||
|
||||
// Check if python is correctly installed
|
||||
println!("Running 'python3 --version' to check if python is correctly installed...");
|
||||
let result = Command::new("python3")
|
||||
println!("Running 'venv/bin/python --version' to check if python is correctly installed...");
|
||||
let result = Command::new("venv/bin/python")
|
||||
.arg("--version")
|
||||
.status()
|
||||
.expect("Failed to run python");
|
||||
|
||||
if !result.success()
|
||||
{
|
||||
println!("Python not found! via `python3`. Make sure you:");
|
||||
println!("Python not found! via `venv/bin/python`. 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("python3")
|
||||
let output = Command::new("venv/bin/python")
|
||||
.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("python3")
|
||||
let status = Command::new("venv/bin/python")
|
||||
.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("python3")
|
||||
let status = Command::new("venv/bin/python")
|
||||
.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("python3")
|
||||
let status = Command::new("venv/bin/python")
|
||||
.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("python3")
|
||||
let status = Command::new("venv/bin/python")
|
||||
.env("PYTHONIOENCODING", "utf-8")
|
||||
.arg("scripts/EMIPGenerator.py")
|
||||
.arg(format!("{}/sharedassets0.assets", &directory_data))
|
||||
|
||||
Reference in New Issue
Block a user