Compare commits
No commits in common. "d7cfdaf6f230298ca7e79892ca6de77dc926a50e" and "525af0db425314f682b510e0eacaba92dc0cca91" have entirely different histories.
d7cfdaf6f2
...
525af0db42
@ -306,33 +306,11 @@ func (i *InstanceManager)InstallFabric(instance string, fabricVersion string) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("unable to get version metadata\n")
|
fmt.Printf("unable to get version metadata\n")
|
||||||
}
|
}
|
||||||
client:
|
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
for _, lib := range metadata.LauncherMeta.Libraries.Client {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
|
||||||
pkg := tokens[len(tokens)-2]
|
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
|
||||||
tokens := strings.Split(path, string(os.PathSeparator))
|
|
||||||
if pkg == tokens[len(tokens)-3] {
|
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
|
||||||
continue client
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
common:
|
|
||||||
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
for _, lib := range metadata.LauncherMeta.Libraries.Common {
|
||||||
tokens := strings.Split(ProcessMavenPath(lib.Name), string(os.PathSeparator))
|
|
||||||
pkg := tokens[len(tokens)-2]
|
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name)))
|
||||||
for ind, path := range instanceObject.Libraries {
|
|
||||||
tokens := strings.Split(path, string(os.PathSeparator))
|
|
||||||
if pkg == tokens[len(tokens)-3] {
|
|
||||||
instanceObject.Libraries[ind] = filepath.Join(ProcessMavenPath(lib.Name), ProcessMavenFilename(lib.Name))
|
|
||||||
fmt.Printf("duplicate library %s\n", pkg)
|
|
||||||
continue common
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(metadata.Loader.Maven), ProcessMavenFilename(metadata.Loader.Maven)))
|
instanceObject.Libraries = append(instanceObject.Libraries, filepath.Join(ProcessMavenPath(metadata.Loader.Maven), ProcessMavenFilename(metadata.Loader.Maven)))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user