Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apps/desktop/src/api/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ macro_rules! collect_commands {
get_zulu_packages,
install_java_from_package,
open_dev_tools,
check_java,
locate_java,
]
}};
}
Expand Down Expand Up @@ -118,6 +120,18 @@ pub async fn get_featured_packages() -> Result<Vec<onelauncher::package::content
Ok(onelauncher::package::content::get_featured_packages().await?)
}

#[specta::specta]
#[tauri::command]
pub async fn check_java(path: std::path::PathBuf) -> Result<Option<onelauncher::prelude::JavaVersion>, String> {
Ok(onelauncher::java::check_java(path).await?)
}

#[specta::specta]
#[tauri::command]
pub async fn locate_java() -> Result<Vec<onelauncher::prelude::JavaVersion>, String> {
Ok(onelauncher::utils::java::locate_java().await.map_err(|e| e.to_string())?)
}

#[specta::specta]
#[tauri::command]
pub fn get_program_info() -> Result<super::statics::ProgramInfo, String> {
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"withGlobalTauri": true,
"macOSPrivateApi": true,
"security": {
"csp": "img-src 'self' asset: http://asset.localhost",
"csp": null,
"assetProtocol": {
"enable": true,
"scope": {
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/ui/pages/cluster/ClusterSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ function PageSettings(cluster: Accessor<Cluster>) {
<GameSettings
{...{
fullscreen,
memory,
resolution,
}}
/>
Expand All @@ -107,6 +106,7 @@ function PageSettings(cluster: Accessor<Cluster>) {
javaVersions,
javaArgs,
envVars,
memory,
}}
/>
</>
Expand Down
Loading
Loading