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

Custom Install Dir not respected #4

Open
tom-a-wagner opened this issue Jun 30, 2021 · 7 comments
Open

Custom Install Dir not respected #4

tom-a-wagner opened this issue Jun 30, 2021 · 7 comments

Comments

@tom-a-wagner
Copy link

tom-a-wagner commented Jun 30, 2021

I use Fedora 34 Linux and have minecraft installed via Flatpak, so my Minecraft is installed at /var/home/tomwagner/.var/app/com.mojang.Minecraft/data/minecraft.

When using the installer, I provide this path as a custom Install Path, but the installation fails, with this output on the terminal:

Launching installer...
Launched!
Using custom loader
Installing 1.17 with fabric 0.11.5
Could not find launcher_profiles

No changed happen in the provided folder, but the new Iris version appears at /var/home/tomwagner/.minecraft/versions, which is not where my minecraft folder is at.

@tom-a-wagner
Copy link
Author

As a temporary fix, i have symlinked ~/.minecraft to my actual minecraft folder.
Installing Iris with the default install path works that way.

@3lpsy
Copy link

3lpsy commented Jul 2, 2021

The home directory is hardcoded in the installer for ~/.minecraft on nix systems. XDG support would probably be the easiest solution and then the XDG_ variable could just be specified when launching the installer. Change would need to go here:

@3lpsy
Copy link

3lpsy commented Jul 2, 2021

From the arch wiki, Minecraft won't support XDG variables so I'm not sure they even allow customization of install directories. Might want to cehckout how flatpak knows about the custom directory or if it's symlinked at runtime.

A wallhack could be something with a custom var that is: /var/home/tomwagner/.var/app/com.mojang.Minecraft/data

    public Path getAppDataDirectory() {
        String os = System.getProperty("os.name").toLowerCase();
        if (os.contains("win"))
            return new File(System.getenv("APPDATA")).toPath();
        else if (os.contains("mac"))
            return new File(System.getProperty("user.home") + "/Library/Application Support").toPath();
        else if (os.contains("nux"))
            // might need trailing slash, not sure
            // should be parent of "minecraft dir
            String custom = System.getenv("IRIS_CUSTOM_DATA_DIR");
            if (custom != null) {
                return File(custom).toPath();
            }
            return new File(System.getProperty("user.home")).toPath();
        else
            return new File(System.getProperty("user.dir")).toPath();
    }

Warning: my java is trash

@tom-a-wagner
Copy link
Author

I feel like, because I provided a full custom path in the "Select Install Directory" in the Installer GUI, the installer should not deal with any variables or default locations at all, and install exactly at the provided path instead, but maybe I'm misunderstanding something.

@AlsoSylv
Copy link
Contributor

AlsoSylv commented Jul 7, 2021

The installer just creates a "mods" or "iris-reserverd" folder for the fabric install linked to that location to draw from (iris-reserverd is for iris loader, and only meant for iris and sodium) we can't change that without breaking the installer

@tom-a-wagner
Copy link
Author

So custom .minecraft paths are not supported?

The wording "Select Install Directory" and the fact the button says .minecraft by default made me think this is where I select my minecraft installation directory so the installer can add its new versions subdirectory and append it to the launcher_profiles file there.

@AlsoSylv
Copy link
Contributor

AlsoSylv commented Jul 7, 2021

Currently it only supports the default installation location for each OS. It may be possible to fix that, but currently it's not high on the priority list because there are other ways for users to get the mod when they want it

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

3 participants