File tree Expand file tree Collapse file tree
packages/app-lib/src/launcher Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,15 +55,11 @@ pub fn get_class_paths(
5555 return None ;
5656 }
5757
58- if !library. include_in_classpath {
58+ if !library. include_in_classpath || library . is_native ( ) {
5959 return None ;
6060 }
6161
62- Some ( get_lib_path (
63- libraries_path,
64- & library. name ,
65- library. native_classifier ( java_arch) . is_some ( ) ,
66- ) )
62+ Some ( get_lib_path ( libraries_path, & library. name , false ) )
6763 } ) )
6864 . process_results ( |iter| {
6965 iter. unique ( ) . join ( classpath_separator ( java_arch) )
Original file line number Diff line number Diff line change @@ -890,7 +890,16 @@ pub async fn download_libraries(
890890 return Ok ( ( ) ) ;
891891 }
892892
893- // When a library has natives, we only need to download such natives, as PrismLauncher does
893+ if library. is_native ( )
894+ && library. native_classifier ( java_arch) . is_none ( )
895+ {
896+ tracing:: trace!(
897+ "Skipped incompatible native library {}" ,
898+ & library. name
899+ ) ;
900+ return Ok ( ( ) ) ;
901+ }
902+
894903 if let Some ( ( url, sha1, size) ) =
895904 library. native_download ( java_arch) ?
896905 {
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ use minecraft_meta_manifest::{
66use url:: Url ;
77
88pub ( crate ) trait LibraryExt {
9+ /// Whether this library declares platform-specific native classifiers.
10+ fn is_native ( & self ) -> bool ;
11+
912 /// Native classification does not depend on classifier download metadata.
1013 fn native_classifier ( & self , java_arch : & str ) -> Option < String > ;
1114
@@ -17,6 +20,12 @@ pub(crate) trait LibraryExt {
1720}
1821
1922impl LibraryExt for Library {
23+ fn is_native ( & self ) -> bool {
24+ self . natives
25+ . as_ref ( )
26+ . is_some_and ( |natives| !natives. is_empty ( ) )
27+ }
28+
2029 /// Native classification does not depend on classifier download metadata.
2130 fn native_classifier ( & self , java_arch : & str ) -> Option < String > {
2231 let natives = self . natives . as_ref ( ) ?;
You can’t perform that action at this time.
0 commit comments