Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK Installation Failing #5

Closed
LegionnaireZero opened this issue Oct 29, 2022 · 7 comments
Closed

JDK Installation Failing #5

LegionnaireZero opened this issue Oct 29, 2022 · 7 comments

Comments

@LegionnaireZero
Copy link

Hi!

This is my first time writing something like this, so please do bear with me (I'm a newbie in Python, so I'm not 100% correct, nor am I confident on this, but I raised it to verify if it is possible - I'll be doing it a bit later). I posted this just in case there are others who would encounter the same error as I did.

Screenshot (251)

As per the screenshot, it shows that the installation package cannot be opened. It says that either: (a) The package does not exist, or (b) it isn't a valid Windows installer package. Instead, I snooped on install.py, and I found that you specifically used Liberica JDK 17.0.3 (via the download link given) for this project. However, checking the developer's site, I found this which states that:

Some users running on Windows may encounter Windows Defender SmartScreen popup during installation of Liberica JDK: This is caused by a new certificate used by BellSoft to sign the binaries.

Their recommendation is to run it anyway (it gets flagged by Windows Defender Smartscreen Popup, so Situation B is likely the case). Knowing this, there are two possible options: (a) Install the specific JDK version manually (but I'm not sure how this would work, because the code doesn't seem to check if that specific kit is already installed), or (b) as the developer's link says, run a silent installation by adding /quiet to the installation configuration at line 54, as shown below:

pycraft diagnosis-proposed_modification

I haven't really tested any of the two yet, but I'm going to do the latter. I'm hoping it might work. Cheers!

Also to note: I ran this with Python 3.9.12. I tried running it first on 3.10, but it fails because of a problem with the wget() function. Seems like the function isn't working properly on 3.10, based on what I saw after I tried installing a package (I don't remember if it was PIP or not: I'm a newbie, so I didn't completely understand what it statement was when I initially saw it - I only remembered when I tried running this).

@shasankp000
Copy link
Owner

Hi there! Thanks pointing out that it seems I left some errors in my code regarding the file name. I will fix that. And regarding jdk package you can download it and install separately, the launcher will automatically detect the path later on.

Feel free to comment if you have anymore issues. If not then you can close this one!

@pi-dev500
Copy link

pi-dev500 commented Jun 29, 2023

You don't need wget.detect_filename because wget.download return the filename of the download. This can be a solution for the problem if wget.download does not follow wget.detect_filename answer. exemple:

filename=wget.download('https://piston-data.mojang.com/v1/objects/0c3ec587af28e5a785c0b4a7b8a30f9a8f78f838/client.jar')
100% [........................................................................] 23028853 / 23028853
filename
'client.jar'

it's just an idea to make the launcher less buggy and lighter. And if you want, I'm making a program that parses optifine's website to create something like a version_manifest...

@shasankp000
Copy link
Owner

Sure lemme know about the optifine parsing, I am creating a backend for my new launcher in rust, so I will translate that to rust and give credit to your original repo.

@v-pun215
Copy link

@LegionnaireZero Try eClient, the launcher is based of off PyCraft and is actively maintained.

@pi-dev500
Copy link

My script for getting optifine-compatible Minecraft versions and installing them. I didn't created yet the optifine rename function which will move optifine to a much more human readable name ex: Optifine 1.20.1

https://github.com/pi-dev500/mc_py_launcher/blob/main/Minecraft%20Launcher/libs/optifine.py

@v-pun215
Copy link

Hey @pi-dev500, can I use this script in eClient? I'll credit you.

@pi-dev500
Copy link

Yes, you can, @v-pun215 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants