You've already forked AstralRinth
forked from didirus/AstralRinth
Migrate to SQLite for Internal Launcher Data (#1300)
* initial migration * barebones profiles * Finish profiles * Add back file watcher * UI support progress * Finish most of cache * Fix options page * Fix forge, finish modrinth auth * Accounts, process cache * Run SQLX prepare * Finish * Run lint + actions * Fix version to be compat with windows * fix lint * actually fix lint * actually fix lint again
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::api::Result;
|
||||
use dashmap::DashMap;
|
||||
use std::path::PathBuf;
|
||||
use tauri::plugin::TauriPlugin;
|
||||
use theseus::prelude::JavaVersion;
|
||||
use theseus::prelude::*;
|
||||
@@ -8,6 +8,8 @@ use theseus::prelude::*;
|
||||
pub fn init<R: tauri::Runtime>() -> TauriPlugin<R> {
|
||||
tauri::plugin::Builder::new("jre")
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
get_java_versions,
|
||||
set_java_version,
|
||||
jre_find_filtered_jres,
|
||||
jre_get_jre,
|
||||
jre_test_jre,
|
||||
@@ -17,6 +19,17 @@ pub fn init<R: tauri::Runtime>() -> TauriPlugin<R> {
|
||||
.build()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn get_java_versions() -> Result<DashMap<u32, JavaVersion>> {
|
||||
Ok(jre::get_java_versions().await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_java_version(java_version: JavaVersion) -> Result<()> {
|
||||
jre::set_java_version(java_version).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// Finds the installation of Java 8, if it exists
|
||||
#[tauri::command]
|
||||
pub async fn jre_find_filtered_jres(
|
||||
|
||||
Reference in New Issue
Block a user