This commit is contained in:
cyber-dream 2023-02-03 01:36:40 +03:00
parent b02c858b38
commit 4238de8568

View File

@ -7,15 +7,6 @@ import (
"runtime"
"strconv"
"strings"
<<<<<<< HEAD
<<<<<<< HEAD
=======
"git.gregbrzezinski.com/Skirda/skirdaGoLauncher/api"
"git.gregbrzezinski.com/Skirda/skirdaGoLauncher/downloader"
>>>>>>> 7b3396a (Add java entities)
=======
>>>>>>> 368286c (Add javaentities)
)
type JavaVersion struct {
@ -28,19 +19,10 @@ type JavaMetas struct {
JavaVersions []JavaMeta `json:"javaVersions"`
}
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 368286c (Add javaentities)
func (jm JavaMetas) GetOsURL() (string, error) {
}
<<<<<<< HEAD
=======
>>>>>>> 7b3396a (Add java entities)
=======
>>>>>>> 368286c (Add javaentities)
type JavaMeta struct {
Version struct {
Major string `json:"major"`
@ -69,13 +51,6 @@ func (s Specifics) getOsJava() (SpecificJavaVersion, error) {
}
func (v *JavaVersion) CheckNotExists(launcherPath string) bool {
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 7b3396a (Add java entities)
=======
>>>>>>> 368286c (Add javaentities)
javaBinPath := path.Join(launcherPath, ".redist", "java", v.GetString())
_, err := os.Stat(javaBinPath)
@ -92,37 +67,3 @@ func (v *JavaVersion) GetString() string {
return stringBuilder.String()
}
<<<<<<< HEAD
<<<<<<< HEAD
=======
func (v *JavaVersion) DownloadLatest(downloadDir string) (downloader.DownloadFile, error) {
javaVersionMeta := JavaMetas{}
task := downloader.DownloadFile{
Url: "",
Path: "",
}
javaVersionMeta, err := api.GetJavaVersionMetas()
// if err := downloadJson("https://skirda.gregbrzezinski.com/java_version_manifest.json", &javaVersionMeta); err != nil {
// return task, errors.New("error in download json")
// }
// javaSpecific := SpecificJavaVersion{}
javaSpecific, err := javaVersionMeta.getOsJava()
if err != nil {
return task, err
}
task = downloader.DownloadFile{
Url: javaSpecific.URL,
Path: path.Join(downloadDir, v.GetString()),
}
return task, nil
}
>>>>>>> 7b3396a (Add java entities)
=======
>>>>>>> 368286c (Add javaentities)