Skip to content

Commit 4c0eda1

Browse files
fix: embed tpk file
1 parent 31fa6f6 commit 4c0eda1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

resources/lz4.tpk

288 KB
Binary file not shown.

src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,7 @@ fn run() -> Result<()> {
179179
.with_context(|| format!("couldn't find object json '{}'", args.objects.display()))?;
180180
let preloads: IndexMap<String, Vec<String>> = json5::from_str(&preloads)?;
181181

182-
let mut tpk_file = File::open("lz4.tpk").map_err(|_| {
183-
anyhow::anyhow!("missing lz4.tpk file, download from https://github.com/AssetRipper/Tpk")
184-
})?;
185-
let tpk_file = TpkFile::from_reader(&mut tpk_file)?;
182+
let tpk_file = TpkFile::from_reader(&mut include_bytes!("../resources/lz4.tpk").as_slice())?;
186183
let tpk = tpk_file.as_type_tree()?.unwrap();
187184
let typetree_provider = TypeTreeCache::new(&tpk);
188185

0 commit comments

Comments
 (0)