summaryrefslogtreecommitdiffstats
path: root/src/launcher/jre
diff options
context:
space:
mode:
Diffstat (limited to 'src/launcher/jre')
-rw-r--r--src/launcher/jre/manifest.rs31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/launcher/jre/manifest.rs b/src/launcher/jre/manifest.rs
index 9b84377..ca21a2b 100644
--- a/src/launcher/jre/manifest.rs
+++ b/src/launcher/jre/manifest.rs
@@ -19,28 +19,29 @@ pub struct JavaRuntimeInfo {
// I don't see how half of this information is useful with how the JRE system currently functions -figboot
pub availability: Availability,
pub manifest: DownloadInfo,
- pub version: Version
+ //pub version: Version
}
pub type JavaRuntimesManifest = HashMap<String, HashMap<String, Vec<JavaRuntimeInfo>>>;
-#[derive(Debug, Deserialize, Clone, Copy, Eq, PartialEq)]
-#[serde(rename_all = "lowercase")]
-pub enum FileType {
- File,
- Directory,
- Link
+#[derive(Debug, Deserialize)]
+pub struct FileDownloads {
+ lzma: Option<DownloadInfo>,
+ raw: DownloadInfo
}
#[derive(Debug, Deserialize)]
-pub struct JavaRuntimeFile {
- #[serde(rename = "type")]
- pub file_type: FileType,
- #[serde(default)]
- pub executable: bool,
-
- pub lzma: DownloadInfo,
- pub raw: DownloadInfo
+#[serde(rename_all = "lowercase", tag = "type")]
+pub enum JavaRuntimeFile {
+ File {
+ #[serde(default)]
+ executable: bool,
+ downloads: FileDownloads
+ },
+ Directory,
+ Link {
+ target: String
+ }
}
#[derive(Debug, Deserialize)]