Installing Optifine/OptiForge for custom launcher
srnyx opened this issue ยท 13 comments
Is it possible to install Optifine/OptiForge (specifically Optifine) for a custom launcher like GDLauncher?
When I try to install Optifine (by double-clicking on it, selecting my instance's folder, and then clicking install) it says this:
I know it says "official launcher," that's exactly why I'm asking this question.
I've run the instance already without any mods, and it's only Optifine and OptiForge that I'm using.
- Extract OptiFine jar via this command: sp614x/optifine#5323 (comment)
- Rename the jar to
OptiFine-1.17.1_HD_U_G9_pre34.jar
- Create
libraries/optifine/OptiFine/1.17.1_HD_U_G9_pre34
folder and put extracted OptiFine jar into it
1. Extract OptiFine jar via this command: [[Enhancement] Command Line Arguments sp614x/optifine#5323 (comment)](https://github.com/sp614x/optifine/issues/5323#issuecomment-778670456) 2. Rename the jar to `OptiFine-1.17.1_HD_U_G9_pre34.jar` 3. Create `libraries/optifine/OptiFine/1.17.1_HD_U_G9_pre34` folder and put extracted OptiFine jar into it
should I create the libraries/optifine/Optifine/...... folder inside the folder of the version or in the .minecraft folder?
should I create the libraries/optifine/Optifine/...... folder inside the folder of the version or in the .minecraft folder?
If you are using GDLauncher, then /optifine/OptiFine/...
should be created in .../datastore/libraries/
inside your GDLauncher user data path.
do I need to do anything else? because I've extracted the optifine.jar into $HOME/.config/gdlauncher_next/datastore/libraries/optifine/Optifine/OptiFine-version/
My instances are at $HOME/.config/gdlauncher_next/instances/
If you've installed forge and optiforge correctly, that should be all. Just make sure the version name of the folder matches the optifine version you are using.
In my original comment I made an error, the correct path is .../optifine/OptiFine/...
. The capitalization is important.
huh... Optiforge is installed via the modmanager, optifine is extracted to $HOME/.config/gdlauncher_next/datastore/libraries/optifine/OptiFine/OptiFine-1.17.1_HD_U_G9_pre32
, but on launching the instance I get an error from Optiforge that Optifine is not installed. I have Forge 37.0.51 installed
Make sure that you name both the folder and jar with the correct. If you're using the latest version, it should be 1.17.1_HD_U_G9
. If not, be sure to use the latest forge and optifine versions, and try again.
If you still have trouble, try also creating the same library folder inside your instance folder as well. In my experience, I had success when using the just datastore folder, but your mileage may vary.
1. Extract OptiFine jar via this command: [[Enhancement] Command Line Arguments sp614x/optifine#5323 (comment)](https://github.com/sp614x/optifine/issues/5323#issuecomment-778670456) 2. Rename the jar to `OptiFine-1.17.1_HD_U_G9_pre34.jar` 3. Create `libraries/optifine/OptiFine/1.17.1_HD_U_G9_pre34` folder and put extracted OptiFine jar into it
so I need to have the OptiFine-version.jar AND the extracted OptiFine.jar in the .../optifine/OptiFine/OptiFine-version/
Folder?
I have now created a instance of Minecraft 1.17.1 with Forge 37.0.51 in GDLauncher
I have downloaded & extracted the newest ("OptiFine_1.17.1_HD_U_G9.jar") into $HOME/.config/gdlauncher_next/datastore/libraries/optifine/OptiFine/OptiFine_1.17.1_HD_U_G9/
I have installed OptiForge (OptiForge-MC1.17.1-0.1.0) via GDLauncher's ModManager
but if I launch the instance, I get the error from OptiForge that Optifine isn't installed
You should extract optifine as per the instructions, and rename the extracted jar to the format described in the post. That extracted should go in /datastore/libraries/optifine/OptiFine/OptiFine/<version>/
. The directory OptiFine/ should be named the same as your extracted OptiFine jar.
The downloaded optifine jar shouldn't be placed in any Minecraft or GDlauncher directory, you only need it for the extraction process.
As I said before, you can try following the same process, but creating the required directory inside your instance folder as well as in datastore
. Given that I'm not an optifine or a GDlauncher dev, I don't personally know which of these directories optifine/optiforge looks in to find the jar, so I personally created both directories, just to be sure.
I've figured it out now!
I looked at the source code from OptiForge, specifically at https://github.com/ZekerZhayard/OptiForge/blob/1.17.1/src/main/java/io/github/zekerzhayard/optiforge/asm/fml/VersionChecker.java searched there for the Error String I got, and found that it searches for "OptiFine-" and NOT "OptiFine_"
also in the comment from that section @ZekerZhayard wrote that this searches the .minecraft/libraries/optifine/OptiFine
Folder, so this is where you need to put the OptiFine.jar
What was the Error:
The /optifine/OptiFine/OptiFine_version/
Folder actually needs to be /optifine/OptiFine/version/
Also the Optifine.jar File inside that Folder needs to be OptiFine-version.jar
instead of OptiFine_version.jar
So here's a full guide on what I did and worked for me (with GDLauncher v.1.1.14, Minecraft 1.17.1, Forge 37.0.51, OptiFine 1.17.1_HD_U_G9 and OptiForge-MC1.17.1-0.1.0)
- create a new Instance in GDLauncher, select Forge->1.17.1->37.0.51
- install OptiForge from the ModManager (right-click the instance->Manage->Mods->Add Mod->search for "OptiForge")
- Download OptiFine from https://optifine.net/downloads
- execute the DOWNLOADED OptiFine.jar and select "Extract"
- put the EXTRACTED OptiFine.jar to
.minecraft/libraries/optifine/OptiFine/1.17.1_HD_U_G9/
- also put that File into
GDLauncherUserDataPath/datastore/libraries/optifine/OptiFine/1.17.1_HD_U_G9/
ยน - rename these files to
OptiFine-1.17.1_HD_U_G9.jar
- start the instance from GDLauncher
P.S.:
This probably also works with other versions of Minecraft/Forge/OptiForge/OptiFine, just change the version Numbers/File Names/Folder Names
ยน You can find the location of this folder in GDLauncher->Settings(icon on the top-right)->scroll down to User Data Path (see image)
Thanks to @Empoliam
Glad you managed to get it working in the end. Having double checked my own installation, I can see that the naming scheme is actually as you've described, my bad for not checking properly. However, I can confirm from testing that in my experience, my instances only launch if the library/optifine/OptiFine/...
folder is inside the datastore
folder in GDLaunchers local files.
I've updated my previous comments to reflect the correct directory structure. For anyone having trouble with the above method, please also try following these steps, as this is what worked for me in the end.
- Set up your forge instance in GDlauncher, with the latest available version, and ensure that you can launch without any mods first
- Download the latest version of optifine to a folder outside of your install directory
- Extract OptiFine, either by executing the downloaded jar and clicking
Extract
, or using the command line as described here: #87 (comment) - Ensure that the Extracted jar is named correctly. For example, at the time of writing, the latest version is 1.17.1_HD_U_G9, so the correct name here would be
OptiFine-1.17.1_HD_U_G9.jar
- Navigate to your GDlauncher local data directory, and find the
datastore
folder. Inside this folder, create a new directorylibraries/optifine/OptiFine/<version>/
. should be the same as in your optifine jar - Move the extracted optifine jar to this folder
- Install OptiForge as normal, either from the launcher, or using the mods folder
For anyone having difficulty, please try both methods in this thread, as the solution seems to vary based on your setup.
Glad you managed to get it working in the end. Having double checked my own installation, I can see that the naming scheme is actually as you've described, my bad for not checking properly. However, I can confirm from testing that in my experience, my instances only launch if the
library/optifine/OptiFine/...
folder is inside thedatastore
folder in GDLaunchers local files.I've updated my previous comments to reflect the correct directory structure. For anyone having trouble with the above method, please also try following these steps, as this is what worked for me in the end.
1. Set up your forge instance in GDlauncher, with the latest available version, and ensure that you can launch without any mods first 2. Download the latest version of optifine to a folder outside of your install directory 3. Extract OptiFine, either by executing the downloaded jar and clicking `Extract`, or using the command line as described here: [Installing Optifine/OptiForge for custom launcher #87 (comment)](https://github.com/ZekerZhayard/OptiForge/issues/87#issuecomment-903843436) 4. Ensure that the _Extracted_ jar is named correctly. For example, at the time of writing, the latest version is 1.17.1_HD_U_G9, so the correct name here would be `OptiFine-1.17.1_HD_U_G9.jar` 5. Navigate to your GDlauncher local data directory, and find the `datastore` folder. Inside this folder, create a new directory `libraries/optifine/OptiFine/<version>/`. should be the same as in your optifine jar 6. Move the _extracted_ optifine jar to this folder 7. Install OptiForge as normal, either from the launcher, or using the mods folder
For anyone having difficulty, please try both methods in this thread, as the solution seems to vary based on your setup.
Thanks, I also have the OptiFine.jar File in the datastore, I just forgot to include it in the "Guide", I've updated it now
I started making a small Installer Program at GitHub.com/JonLit/GDLauncherOptiFineInstaller
As of today (2.9.2021) it's not (yet) working, it's just a test
Edit: It is now working (at least on Linux, can't test on Windows / Mac OS)
Now also published as .jar File!