#![cfg_attr(target_os = "windows", windows_subsystem = "console")]
#[cfg(all(feature = "generate", feature = "patch"))]
compile_error!("The generate feature requires --no-default-features");
fn main() {
std::panic::set_hook(Box::new(|panic_info| {
eprintln!("\n{panic_info}");
eprintln!("\nBacktrace:\n{}", std::backtrace::Backtrace::force_capture());
eprintln!("GModPatchTool {} ({} {}) crashed! Please report this with everything above:", env!("CARGO_PKG_VERSION"), std::env::consts::OS, std::env::consts::ARCH);
eprintln!("\tDiscord: https://solsticegamestudios.com/discord/");
eprintln!("\tEmail: contact@solsticegamestudios.com");
}));
#[cfg(feature = "generate")]
gmodpatchtool::generate::main();
#[cfg(feature = "patch")]
gmodpatchtool::patch::main();
}