QuiltMC / quilt-installer

The Quilt installer for the official Minecraft launcher and servers
Apache License 2.0
40 stars 20 forks source link

List of changes for native launch #11

Open i509VCB opened 2 years ago

i509VCB commented 2 years ago

A few changes should be made to the native launch mechanism:

  1. Migrate to rfd. Fundamentally it is a better library for message dialogs.
  2. Fully clippy migration: See #10
  3. Rework platform specific search directories to be specified via a trait based api.
    • OS specific field definitions is quite raw. Ideally we would have a JvmPlatform trait like below which each platform exposes an implementation of.
// Not the final definition of the trait
pub trait JvmPlatform: Sized {
    /// Returns a list of paths indicating where a JVM may be installed.
    fn search_directories() -> Vec<PathBuf>;

    /// Returns whether the JVM installed at the location.
    fn is_jvm_installed(path: impl AsRef<Path>) -> bool {
        self.run_jvm(path, &["--version"]).ok()
    }

    /// Run a JVM command using the JVM at the specified path.
    fn run_jvm(path: impl AsRef<Path>, args: &[&str]) -> io::Result<()>;
}
  1. Build changes
    • Binaries should also have symbols stripped, there is a strip field in profiles now.