Skip to content

Commit

Permalink
On Windows, login::launch now decides whether to run `TTREngine64.e…
Browse files Browse the repository at this point in the history
…xe` or `TTREngine.exe` based on whether or not the machine is 64-bit. Fixes #3
  • Loading branch information
JonathanHelianthicusDoe committed Dec 24, 2021
1 parent 459c1d8 commit dd97b93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "shticker_book_unwritten"
version = "1.0.3"
version = "1.0.4"
authors = ["Dr. Jonathan Helianthicus Doe, IV <[email protected]>"]
edition = "2021"
description = "Minimal CLI launcher for the Toontown Rewritten MMORPG"
Expand Down
6 changes: 6 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ deny = [
"ZPL-2.0",
"ZPL-2.1",
]

[[licenses.clarify]]
name = "encoding_rs"
version = "*"
expression = "(Apache-2.0 OR MIT) AND BSD-3-Clause"
license-files = [{ path = "COPYRIGHT", hash = 0x39f8ad31 }]
9 changes: 7 additions & 2 deletions src/login.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,16 @@ fn launch<S: AsRef<OsStr>, T: AsRef<OsStr>>(
let command_text = "./TTREngine";
#[cfg(windows)]
let command_text = {
#[cfg(target_arch = "x86")]
const EXE_NAME: &str = "TTREngine.exe";
#[cfg(target_arch = "x86_64")]
const EXE_NAME: &str = "TTREngine64.exe";

// `.current_dir(&config.install_dir)` doesn't seem to work like it
// does on Linux, so this is just a (naive) way of making real sure
// does on Linux, so this is just a (naïve) way of making real sure
// that we are pointing at the right executable.
let mut command_buf = config.install_dir.clone();
command_buf.push("TTREngine.exe");
command_buf.push(EXE_NAME);

command_buf
};
Expand Down

0 comments on commit dd97b93

Please sign in to comment.