mindstorm38 / portablemc

A fast, reliable and cross-platform command-line Minecraft launcher and API for developers. Including fast and easy installation of common mod loaders such as Fabric, Forge, NeoForge and Quilt.
https://pypi.org/project/portablemc/
GNU General Public License v3.0
320 stars 19 forks source link

Arch Linux package incoherencies #176

Closed qwenger closed 7 months ago

qwenger commented 10 months ago

Hi,

I'm kinda new to the minecraft ecosystem. I run on GNU/Linux.

I had first installed the official launcher, which as expected set up its files in ~/.minecraft.

Now I've installed portablemc, which by default (no command line arguments used) created folders ~/.local/share/portablemc/main and ~/.local/share/portablemc/work. In particular, this means that it doesn't use my settings from ~/.minecraft/options.txt but instead uses a separate file in ~/.local/share/portablemc/work/options.txt.

Doesn't that conflict with the README that says

By default the launcher will run any command from the OS standard .minecraft directory (check wiki for more information). You can change this directory using --main-dir <path> global argument.

You may also need --work-dir <path> to change the directory where your saves, resource packs and all "user-specific" content is stored. This can be useful if you have a shared read-only main directory (--main-dir) and user-specific working directory (for example in .minecraft, by default it's the location of your main directory). The launcher also stores cached version manifest and authentication database in the working directory.

?

mindstorm38 commented 10 months ago

Doesn't that conflict with the README that says

It does! But I'm really confused because there is no way for these directories, if unspecified, to point to different directories as shown in this snippet from the context constructor:

main_dir = get_minecraft_dir() if main_dir is None else main_dir
self.work_dir = main_dir if work_dir is None else work_dir

There is also no way for get_minecraft_dir() to return such directories.

So are you using the correct version ? How have you installed the launcher ?

qwenger commented 10 months ago
$ portablemc show about
Version: 3.3.1
Authors: Théo Rozier <contact@theorozier.fr>, Github contributors
Website: https://github.com/mindstorm38/portablemc
License: PortableMC  Copyright (C) 2021-2023  Théo Rozier
         This program comes with ABSOLUTELY NO WARRANTY. This is free software,
         and you are welcome to redistribute it under certain conditions.
         See <https://www.gnu.org/licenses/gpl-3.0.html>.

I use the version provided by my OS's package manager, https://aur.archlinux.org/packages/portablemc.

mindstorm38 commented 10 months ago

I see, this isn't from me, but honestly this seems to be a good quality package.

The default main/work directories are modified by the package, I don't really agree with this way of silently breaking assumptions (even if, .minecraft in the home directory is not correct regarding XDG conventions, it's Mojang's fault).

For now, you can install the latest version (4.0.2) using Python's pip.

I'll try to contact the author to see if the package can be updated/fixed.

qwenger commented 10 months ago

Oh I didn't notice that the AUR package was doing some nasty patching. Definitely not very sensible.

In general I prefer using official/AUR-provided packages than pip-installing directly, but for now I'll switch (or provide main and work explicitly on the CLI).

Thanks a lot for your work and very responsive support!

mindstorm38 commented 8 months ago

The package has not been updated for long, I don't know how AUR is managed, so if you know how to contact the author, please let me know (I'll be able to create a AUR account this weekend when I'll have access to my manjaro PC).

qwenger commented 8 months ago

The basic steps are explained on the wiki: https://wiki.archlinux.org/title/Arch_User_Repository

Basically, once you've created an AUR account, you get the ability to

If you don't have access to an archlinux system with pacman installed and thus cannot get past the security question, email me and I'll give you the output on my system.

mindstorm38 commented 8 months ago

I can get access to a arch system this weekend, I'll investigate!

mindstorm38 commented 8 months ago

I'm in contact with the maintainer, we're trying to improve the directory management. Maybe by supporting XDG directories by default but using .minecraft if present.

mindstorm38 commented 7 months ago

By the way this the package has been improved by the author!

https://aur.archlinux.org/packages/portablemc

Also, versions should be released automatically from now on.