mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-02 13:48:15 +02:00
Remove unused code
This commit is contained in:
parent
656a5dd4d0
commit
9bf0ebc7c6
@ -131,19 +131,14 @@ fn run_stirling_pdf_jar(app: &tauri::AppHandle, java_path: &PathBuf, jar_path: &
|
||||
|
||||
// Create all necessary directories
|
||||
std::fs::create_dir_all(&app_data_dir).ok();
|
||||
std::fs::create_dir_all(&config_dir).ok();
|
||||
std::fs::create_dir_all(&log_dir).ok();
|
||||
std::fs::create_dir_all(&work_dir).ok();
|
||||
|
||||
add_log(format!("📁 App data directory: {}", app_data_dir.display()));
|
||||
add_log(format!("📁 Config directory: {}", config_dir.display()));
|
||||
add_log(format!("📁 Log directory: {}", log_dir.display()));
|
||||
add_log(format!("📁 Working directory: {}", work_dir.display()));
|
||||
|
||||
// Define all Java options with Tauri-specific paths
|
||||
let log_path_option = format!("-Dlogging.file.path={}", log_dir.display());
|
||||
let config_path_option = format!("-Dspring.config.location={}/", config_dir.display());
|
||||
let user_dir_option = format!("-Duser.dir={}", work_dir.display());
|
||||
|
||||
|
||||
let java_options = vec![
|
||||
"-Xmx2g",
|
||||
|
@ -11,7 +11,7 @@ pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.setup(|app| {
|
||||
.setup(|_| {
|
||||
// Check command line arguments at startup for macOS file opening
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
for arg in args.iter().skip(1) {
|
||||
@ -21,7 +21,6 @@ pub fn run() {
|
||||
break; // Only handle the first PDF file
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![start_backend, check_backend_health, get_opened_file, clear_opened_file])
|
||||
|
@ -76,14 +76,3 @@ fn write_to_log_file(log_entry: &str) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Get current logs for debugging
|
||||
pub fn get_logs() -> Vec<String> {
|
||||
let logs = BACKEND_LOGS.lock().unwrap();
|
||||
logs.iter().cloned().collect()
|
||||
}
|
||||
|
||||
// Get log file path for external access
|
||||
pub fn get_log_file_path() -> PathBuf {
|
||||
get_log_directory().join("tauri-backend.log")
|
||||
}
|
Loading…
Reference in New Issue
Block a user