diff --git a/fclauncher/InstanceManager.go b/fclauncher/InstanceManager.go index 77f3bcd..4b0c0e8 100644 --- a/fclauncher/InstanceManager.go +++ b/fclauncher/InstanceManager.go @@ -65,7 +65,6 @@ func (i *InstanceManager)SearchInstances() { io.Copy(buff, f) instance := Instance{} json.Unmarshal(buff.Bytes(), &instance) - fmt.Printf("Found Instance: %+v\n", instance) i.instances = append(i.instances, instance) } } @@ -397,6 +396,8 @@ func (i *InstanceManager)InstallQuilt(instance string, quiltVersion string) { instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(metadata.Intermediary.Maven), ProcessMavenFilename(metadata.Intermediary.Maven))) + instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(metadata.Hashed.Maven), ProcessMavenFilename(metadata.Hashed.Maven))) + instanceObject.MainClass = metadata.LauncherMeta.MainClass["client"] instanceObject.QuiltVersion = quiltVersion dir, _ := os.UserConfigDir() diff --git a/fclauncher/frontend/src/Instances.svelte b/fclauncher/frontend/src/Instances.svelte index 9a04cb8..ac2812f 100644 --- a/fclauncher/frontend/src/Instances.svelte +++ b/fclauncher/frontend/src/Instances.svelte @@ -78,7 +78,7 @@ break case "quilt": InstallQuilt(name, quilt_ver).then(() => { - addingInstance = false + $addingInstance = false $loading = false updateLists() }) diff --git a/fclauncher/frontend/wailsjs/go/models.ts b/fclauncher/frontend/wailsjs/go/models.ts index 1bd2341..b966a54 100755 --- a/fclauncher/frontend/wailsjs/go/models.ts +++ b/fclauncher/frontend/wailsjs/go/models.ts @@ -350,6 +350,7 @@ export namespace main { export class QuiltVersion { Loader: QuiltDefinition; Intermediary: QuiltDefinition; + Hashed: QuiltDefinition; LauncherMeta: QuiltMeta; static createFrom(source: any = {}) { @@ -360,6 +361,7 @@ export namespace main { if ('string' === typeof source) source = JSON.parse(source); this.Loader = this.convertValues(source["Loader"], QuiltDefinition); this.Intermediary = this.convertValues(source["Intermediary"], QuiltDefinition); + this.Hashed = this.convertValues(source["Hashed"], QuiltDefinition); this.LauncherMeta = this.convertValues(source["LauncherMeta"], QuiltMeta); } diff --git a/fclauncher/minecraft.go b/fclauncher/minecraft.go index dc7e258..ebf4f74 100644 --- a/fclauncher/minecraft.go +++ b/fclauncher/minecraft.go @@ -549,6 +549,9 @@ func GetBaseLaunchArgs(mcVersion string, instance Instance, libDir string, binDi } for _, lib := range instance.Libraries { arg += filepath.Join(libDir, lib) + separater + if _, err := os.Stat(filepath.Join(libDir, lib)); err != nil { + fmt.Printf("Error: missing library: %s\n", lib) + } } arg += filepath.Join(binDir, mcVersion, "client.jar") args = append(args, arg) diff --git a/fclauncher/quilt.go b/fclauncher/quilt.go index 4df51f3..84de984 100644 --- a/fclauncher/quilt.go +++ b/fclauncher/quilt.go @@ -45,6 +45,7 @@ type QuiltMeta struct { type QuiltVersion struct { Loader QuiltDefinition Intermediary QuiltDefinition + Hashed QuiltDefinition LauncherMeta QuiltMeta } @@ -57,7 +58,6 @@ func (Quilt)GetQuiltVersions(mcVersion string) ([]QuiltVersion, error) { data, _ := io.ReadAll(resp.Body) versions := []QuiltVersion{} json.Unmarshal(data, &versions) - fmt.Printf("Quilt Versions: %s\n", data) return versions, nil } @@ -91,6 +91,10 @@ func InstallQuiltLib(lib QuiltLibrary, libDir string) { return } defer resp.Body.Close() + if resp.StatusCode != 200 { + fmt.Printf("unable to find library: %s\n", lib.Url+path) + return + } os.MkdirAll(filepath.Join(libDir, ProcessMavenPath(lib.Name)), 0755) f, _ := os.OpenFile(filepath.Join(libDir, path), os.O_CREATE|os.O_RDWR, 0755) defer f.Close() @@ -105,7 +109,8 @@ func InstallQuiltLibs(mcVersion string, quiltVersion string, libDir string) { for _, lib := range metadata.LauncherMeta.Libraries.Common { InstallQuiltLib(lib, libDir) } - InstallQuiltLib(QuiltLibrary{Name: metadata.Loader.Maven, Sha1: "", Url: "https://maven.fabricmc.net/"}, libDir) + InstallQuiltLib(QuiltLibrary{Name: metadata.Loader.Maven, Sha1: "", Url: "https://maven.quiltmc.org/repository/release/"}, libDir) InstallQuiltLib(QuiltLibrary{Name: metadata.Intermediary.Maven, Sha1: "", Url: "https://maven.fabricmc.net/"}, libDir) + InstallQuiltLib(QuiltLibrary{Name: metadata.Hashed.Maven, Sha1: "", Url: "https://maven.quiltmc.org/repository/release/"}, libDir) }