docs: rework README and BUILD

This commit is contained in:
dada513 2022-01-27 13:46:58 +01:00
parent cd5faee7d7
commit bbf0508846
No known key found for this signature in database
GPG Key ID: 403448C14FA4B33E
2 changed files with 214 additions and 123 deletions

210
BUILD.md
View File

@ -1,14 +1,11 @@
Build Instructions # Build Instructions
==================
# Contents # Contents
* [Note](#note) - [Getting the source](#getting-the-source)
* [Getting the source](#source) - [Linux](#linux)
* [Linux](#linux) - [Windows](#windows)
* [Windows](#windows) - [macOS](#macos)
* [macOS](#macos)
# Getting the source # Getting the source
@ -16,29 +13,59 @@ Clone the source code using git and grab all the submodules:
``` ```
git clone https://github.com/PolyMC/PolyMC.git git clone https://github.com/PolyMC/PolyMC.git
cd PolyMC
git submodule init git submodule init
git submodule update git submodule update
``` ```
The rest of the documentation assumes you have already cloned the repository.
# Linux # Linux
Getting the project to build and run on Linux is easy if you use any modern and up-to-date linux distribution. Getting the project to build and run on Linux is easy if you use any modern and up-to-date linux distribution.
## Build dependencies ## Build dependencies
* A C++ compiler capable of building C++11 code.
* Qt Development tools 5.6 or newer (`qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5` on Debian-based system) - A C++ compiler capable of building C++11 code.
* cmake 3.1 or newer (`cmake` on Debian-based system) - Qt Development tools 5.6 or newer (`qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5` on Debian-based system)
* zlib (`zlib1g-dev` on Debian-based system) - cmake 3.1 or newer (`cmake` on Debian-based system)
* Java JDK (`openjdk-17-jdk`on Debian-based system) - zlib (`zlib1g-dev` on Debian-based system)
* GL headers (`libgl1-mesa-dev` on Debian-based system) - Java JDK (`openjdk-17-jdk`on Debian-based system)
- GL headers (`libgl1-mesa-dev` on Debian-based system)
You can use IDEs like KDevelop or QtCreator to open the CMake project if you want to work on the code.
### Building a portable binary
```sh
mkdir install
# configure the project
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=./install
# build
cd build
make -j$(nproc) install
```
### Building & Installing to the System
This is the preferred method for installation, and is suitable for packages.
```sh
# configure everything
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr" \ # Use "/usr" for packages, otherwise, leave it at the default "/usr/local".
-DLauncher_LAYOUT=lin-system
cd build
make -j$(nproc) install # Optionally specify DESTDIR for packages (i.e. DESTDIR=${pkgdir})
```
### Building a .deb ### Building a .deb
You need to install the build dependencies first You need to install the build dependencies first
``` ```sh
git clone https://github.com/PolyMC/PolyMC.git
git submodule init && git submodule update
cd packages/debian cd packages/debian
./makedeb.sh ./makedeb.sh
``` ```
@ -47,73 +74,63 @@ If everything works correctly, the .deb will be next to the build script, in `Po
### Building a .rpm ### Building a .rpm
You don't need to install the build dependencies, as the script will use `dnf` to install them for you. Build dependencies are automatically installed using `dnf`, but you do need the `rpmdevtools` package (on Fedora)
in order to fetch sources and setup your tree.
``` ```
cd ~
# setup your ~/rpmbuild directory, required for rpmbuild to work.
rpmdev-setuptree
# note: submodules are not needed here, as the spec file will download the tarball instead
git clone https://github.com/PolyMC/PolyMC.git git clone https://github.com/PolyMC/PolyMC.git
cd packages/rpm cd PolyMC/packages/rpm
sudo dnf builddep ./polymec.spec # install build dependencies
rpmbuild -bb ./polymec.spec sudo dnf builddep polymc.spec
# download build sources
spectool -g -R polymc.spec
# now build!
rpmbuild -bb polymc.spec
``` ```
The path to the rpm packages will be printed at the end of building The path to the rpm packages will be printed when the build is complete.
### Building from command line ### Building a flatpak
You need a source folder, a build folder and an install folder.
``` You only need to clone the flatpak sources
# make all the folders `flatpak` and `flatpak-builder` need to be installed on your system
mkdir ~/PolyMC && cd ~/PolyMC
mkdir build
mkdir install
# clone the complete source
git clone --recursive https://github.com/PolyMC/PolyMC.git src
# configure the project
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ../src
make -j$(nproc) install
```
You can use IDEs like KDevelop or QtCreator to open the CMake project if you want to work on the code. ```sh
git clone https://github.com/flathub/org.polymc.PolyMC
### Building & Installing to the System cd org.polymc.PolyMC
This is the preferred method for installation, and is suitable for packages. # remove --user and --install if you want to build without installing
flatpak-builder --user --install flatbuild org.polymc.PolyMC.yml
```
git clone --recursive https://github.com/PolyMC/PolyMC.git && cd PolyMC
# configure everything
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr" \ # Use "/usr" for packages, otherwise, leave it at the default "/usr/local".
-DLauncher_LAYOUT=lin-system
make -j$(nproc) install # Optionally specify DESTDIR for packages (i.e. DESTDIR=${pkgdir})
``` ```
### Installing Qt using the installer (optional) ### Installing Qt using the installer (optional)
1. Run the Qt installer. 1. Run the Qt installer.
2. Choose a place to install Qt. 2. Choose a place to install Qt.
3. Choose the components you want to install. 3. Choose the components you want to install.
- You need Qt 5.6.x 64-bit ticked. - You need Qt 5.6.x 64-bit ticked.
- You need Tools/Qt Creator ticked. - You need Tools/Qt Creator ticked.
- Other components are selected by default, you can untick them if you don't need them. - Other components are selected by default, you can untick them if you don't need them.
4. Accept the license agreements. 4. Accept the license agreements.
5. Double check the install details and then click "Install". 5. Double check the install details and then click "Install".
- Installation can take a very long time, go grab a cup of tea or something and let it work. - Installation can take a very long time, go grab a cup of tea or something and let it work.
### Loading the project in Qt Creator (optional) ### Loading the project in Qt Creator (optional)
1. Open Qt Creator. 1. Open Qt Creator.
2. Choose `File->Open File or Project`. 2. Choose `File->Open File or Project`.
3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt. 3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt.
4. Read the instructions that just popped up about a build location and choose one. 4. Read the instructions that just popped up about a build location and choose one.
5. You should see "Run CMake" in the window. 5. You should see "Run CMake" in the window.
- Make sure that Generator is set to "Unix Generator (Desktop Qt 5.6.x GCC 64bit)". - Make sure that Generator is set to "Unix Generator (Desktop Qt 5.6.x GCC 64bit)".
- Hit the "Run CMake" button. - Hit the "Run CMake" button.
- You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window. - You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window.
- Hit "Finish" if CMake ran successfully. - Hit "Finish" if CMake ran successfully.
6. Cross your fingers and press the Run button (bottom left of Qt Creator). 6. Cross your fingers and press the Run button (bottom left of Qt Creator).
- If the project builds successfully it will run and the Launcher window will pop up. - If the project builds successfully it will run and the Launcher window will pop up.
**If this doesn't work for you, let us know on our Discord.** **If this doesn't work for you, let us know on our Discord.**
@ -122,61 +139,68 @@ make -j$(nproc) install # Optionally specify DESTDIR for packages (i.e. DESTDIR=
Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt Creator. The project will simply not compile using Microsoft build tools, because that's not something we do. If it does compile, it is by chance only. Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt Creator. The project will simply not compile using Microsoft build tools, because that's not something we do. If it does compile, it is by chance only.
## Dependencies ## Dependencies
* [Qt 5.6+ Development tools](http://qt-project.org/downloads) -- Qt Online Installer for Windows
- http://download.qt.io/new_archive/qt/5.6/5.6.0/qt-opensource-windows-x86-mingw492-5.6.0.exe - [Qt 5.6+ Development tools](http://qt-project.org/downloads) -- Qt Online Installer for Windows
- Download the MinGW version (MSVC version does not work). - http://download.qt.io/new_archive/qt/5.6/5.6.0/qt-opensource-windows-x86-mingw492-5.6.0.exe
* [OpenSSL](https://github.com/IndySockets/OpenSSL-Binaries/tree/master/Archive/) -- Win32 OpenSSL, version 1.0.2g (from 2016) - Download the MinGW version (MSVC version does not work).
- https://github.com/IndySockets/OpenSSL-Binaries/raw/master/Archive/openssl-1.0.2g-i386-win32.zip - [OpenSSL](https://github.com/IndySockets/OpenSSL-Binaries/tree/master/Archive/) -- Win32 OpenSSL, version 1.0.2g (from 2016)
- the usual OpenSSL for Windows (http://slproweb.com/products/Win32OpenSSL.html) only provides the newest version of OpenSSL, and we need the 1.0.2g version - https://github.com/IndySockets/OpenSSL-Binaries/raw/master/Archive/openssl-1.0.2g-i386-win32.zip
- **Download the 32-bit version, not 64-bit.** - the usual OpenSSL for Windows (http://slproweb.com/products/Win32OpenSSL.html) only provides the newest version of OpenSSL, and we need the 1.0.2g version
- Microsoft Visual C++ 2008 Redist is required for this, there's a link on the OpenSSL download page above next to the main download. - **Download the 32-bit version, not 64-bit.**
- We use a custom build of OpenSSL that doesn't have this dependency. For normal development, the custom build is not necessary though. - Microsoft Visual C++ 2008 Redist is required for this, there's a link on the OpenSSL download page above next to the main download.
* [zlib 1.2+](http://gnuwin32.sourceforge.net/packages/zlib.htm) - the Setup is fine - We use a custom build of OpenSSL that doesn't have this dependency. For normal development, the custom build is not necessary though.
* [Java JDK 8](https://adoptium.net/releases.html?variant=openjdk8) - Use the MSI installer. - [zlib 1.2+](http://gnuwin32.sourceforge.net/packages/zlib.htm) - the Setup is fine
* [CMake](http://www.cmake.org/cmake/resources/software.html) -- Windows (Win32 Installer) - [Java JDK 8](https://adoptium.net/releases.html?variant=openjdk8) - Use the MSI installer.
- [CMake](http://www.cmake.org/cmake/resources/software.html) -- Windows (Win32 Installer)
Ensure that OpenSSL, zlib, Java and CMake are on `PATH`. Ensure that OpenSSL, zlib, Java and CMake are on `PATH`.
## Getting set up ## Getting set up
### Installing Qt ### Installing Qt
1. Run the Qt installer 1. Run the Qt installer
2. Choose a place to install Qt (C:\Qt is the default), 2. Choose a place to install Qt (C:\Qt is the default),
3. Choose the components you want to install 3. Choose the components you want to install
- You need Qt 5.6 (32 bit) ticked, - You need Qt 5.6 (32 bit) ticked,
- You need Tools/Qt Creator ticked, - You need Tools/Qt Creator ticked,
- Other components are selected by default, you can untick them if you don't need them. - Other components are selected by default, you can untick them if you don't need them.
4. Accept the license agreements, 4. Accept the license agreements,
5. Double check the install details and then click "Install" 5. Double check the install details and then click "Install"
- Installation can take a very long time, go grab a cup of tea or something and let it work. - Installation can take a very long time, go grab a cup of tea or something and let it work.
### Installing OpenSSL ### Installing OpenSSL
1. Download .zip file from the link above. 1. Download .zip file from the link above.
2. Unzip and add the directory to PATH, so CMake can find it. 2. Unzip and add the directory to PATH, so CMake can find it.
### Installing CMake ### Installing CMake
1. Run the CMake installer, 1. Run the CMake installer,
2. It's easiest if you choose to add CMake to the PATH for all users, 2. It's easiest if you choose to add CMake to the PATH for all users,
- If you don't choose to do this, remember where you installed CMake. - If you don't choose to do this, remember where you installed CMake.
### Loading the project ### Loading the project
1. Open Qt Creator, 1. Open Qt Creator,
2. Choose File->Open File or Project, 2. Choose File->Open File or Project,
3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt, 3. Navigate to the Launcher source folder you cloned and choose CMakeLists.txt,
4. Read the instructions that just popped up about a build location and choose one, 4. Read the instructions that just popped up about a build location and choose one,
5. If you chose not to add CMake to the system PATH, tell Qt Creator where you installed it, 5. If you chose not to add CMake to the system PATH, tell Qt Creator where you installed it,
- Otherwise you can skip this step. - Otherwise you can skip this step.
6. You should see "Run CMake" in the window, 6. You should see "Run CMake" in the window,
- Make sure that Generator is set to "MinGW Generator (Desktop Qt 5.6.x MinGW 32bit)", - Make sure that Generator is set to "MinGW Generator (Desktop Qt 5.6.x MinGW 32bit)",
- Hit the "Run CMake" button, - Hit the "Run CMake" button,
- You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window. - You'll see warnings and it might not be clear that it succeeded until you scroll to the bottom of the window.
- Hit "Finish" if CMake ran successfully. - Hit "Finish" if CMake ran successfully.
7. Cross your fingers and press the Run button (bottom left of Qt Creator)! 7. Cross your fingers and press the Run button (bottom left of Qt Creator)!
- If the project builds successfully it will run and the Launcher window will pop up, - If the project builds successfully it will run and the Launcher window will pop up,
- Test OpenSSL by making an instance and trying to log in. If Qt Creator couldn't find OpenSSL during the CMake stage, login will fail and you'll get an error. - Test OpenSSL by making an instance and trying to log in. If Qt Creator couldn't find OpenSSL during the CMake stage, login will fail and you'll get an error.
The following .dlls are needed for the app to run (copy them to build directory if you want to be able to move the build to another pc): The following .dlls are needed for the app to run (copy them to build directory if you want to be able to move the build to another pc):
``` ```
platforms/qwindows.dll platforms/qwindows.dll
libeay32.dll libeay32.dll
libgcc_s_dw2-1.dll libgcc_s_dw2-1.dll
@ -191,26 +215,32 @@ Qt5Widgets.dll
Qt5Xml.dll Qt5Xml.dll
ssleay32.dll ssleay32.dll
zlib1.dll zlib1.dll
``` ```
**These build instructions worked for me (Drayshak) on a fresh Windows 8 x64 Professional install. If they don't work for you, let us know on our Discord.** **These build instructions worked for me (Drayshak) on a fresh Windows 8 x64 Professional install. If they don't work for you, let us know on our Discord.**
### Compile from command line on Windows ### Compile from command line on Windows
1. If you installed Qt with the web installer, there should be a shortcut called `Qt 5.4 for Desktop (MinGW 4.9 32-bit)` in the Start menu on Windows 7 and 10. Best way to find it is to search for it. Do note you cannot just use cmd.exe, you have to use the shortcut, otherwise the proper MinGW software will not be on the PATH. 1. If you installed Qt with the web installer, there should be a shortcut called `Qt 5.4 for Desktop (MinGW 4.9 32-bit)` in the Start menu on Windows 7 and 10. Best way to find it is to search for it. Do note you cannot just use cmd.exe, you have to use the shortcut, otherwise the proper MinGW software will not be on the PATH.
2. Once that is open, change into your user directory, and clone PolyMC by doing `git clone --recursive https://github.com/PolyMC/PolyMC.git`, and change directory to the folder you cloned to. 2. Once that is open, change into your user directory, and clone PolyMC by doing `git clone --recursive https://github.com/PolyMC/PolyMC.git`, and change directory to the folder you cloned to.
3. Make a build directory, and change directory to the directory and do `cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Path\that\makes\sense\for\you`. By default, it will install to C:\Program Files (x86), which you might not want, if you want a local installation. If you want to install it to that directory, make sure to run the command window as administrator. 3. Make a build directory, and change directory to the directory and do `cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Path\that\makes\sense\for\you`. By default, it will install to C:\Program Files (x86), which you might not want, if you want a local installation. If you want to install it to that directory, make sure to run the command window as administrator.
3. Do `mingw32-make -jX`, where X is the number of cores your CPU has plus one. 4. Do `mingw32-make -jX`, where X is the number of cores your CPU has plus one.
4. Now to wait for it to compile. This could take some time. Hopefully it compiles properly. 5. Now to wait for it to compile. This could take some time. Hopefully it compiles properly.
5. Run the command `mingw32-make install`, and it should install PolyMC, to whatever the `-DCMAKE_INSTALL_PREFIX` was. 6. Run the command `mingw32-make install`, and it should install PolyMC, to whatever the `-DCMAKE_INSTALL_PREFIX` was.
6. In most cases, whenever compiling, the OpenSSL dll's aren't put into the directory to where PolyMC installs, meaning you cannot log in. The best way to fix this is just to do `copy C:\OpenSSL-Win32\*.dll C:\Where\you\installed\PolyMC\to`. This should copy the required OpenSSL dll's to log in. 7. In most cases, whenever compiling, the OpenSSL dll's aren't put into the directory to where PolyMC installs, meaning you cannot log in. The best way to fix this is just to do `copy C:\OpenSSL-Win32\*.dll C:\Where\you\installed\PolyMC\to`. This should copy the required OpenSSL dll's to log in.
# macOS # macOS
### Install prerequisites: ### Install prerequisites:
- Install XCode Command Line tools - Install XCode Command Line tools
- Install the official build of CMake (https://cmake.org/download/) - Install the official build of CMake (https://cmake.org/download/)
- Install JDK 8 (https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html) - Install JDK 8 (https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html)
- Get Qt 5.6 and install it (https://download.qt.io/new_archive/qt/5.6/5.6.3/) - Get Qt 5.6 and install it (https://download.qt.io/new_archive/qt/5.6/5.6.3/)
You can use `homebrew` to simplify the installation of build dependencies
### XCode Command Line tools ### XCode Command Line tools
If you don't have XCode CommandLine tools installed, you can install them by using this command in the Terminal App If you don't have XCode CommandLine tools installed, you can install them by using this command in the Terminal App
@ -224,8 +254,6 @@ xcode-select --install
Pick an installation path - this is where the final `.app` will be constructed when you run `make install`. Supply it as the `CMAKE_INSTALL_PREFIX` argument during CMake configuration. Pick an installation path - this is where the final `.app` will be constructed when you run `make install`. Supply it as the `CMAKE_INSTALL_PREFIX` argument during CMake configuration.
``` ```
git clone --recursive https://github.com/PolyMC/PolyMC.git
cd Launcher
mkdir build mkdir build
cd build cd build
cmake \ cmake \
@ -241,5 +269,7 @@ cmake \
make install make install
``` ```
Remember to replace `/path/to/Qt5.6/` with the actual path. For newer Qt installations, it is often in your home directory.
**Note:** The final app bundle may not run due to code signing issues, which **Note:** The final app bundle may not run due to code signing issues, which
need to be fixed with `codesign -fs -`. need to be fixed with `codesign -fs -`.

127
README.md
View File

@ -7,51 +7,84 @@
PolyMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity. PolyMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.
This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The PolyMC community felt that the maintainer was not acting in the spirit of Free Software so this fork was made. Read "[Why was this fork made?](https://github.com/PolyMC/PolyMC/wiki/FAQ)" on the wiki for more details. This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The PolyMC community felt that the maintainer was not acting in the spirit of Free Software so this fork was made. Read "[Why was this fork made?](https://github.com/PolyMC/PolyMC/wiki/FAQ)" on the wiki for more details.
<br>
## Packages # Installation
Several source build packages are available, along with experimental pre-built generic packages.
## 🐧 Linux
### <img src="https://www.vectorlogo.zone/logos/linuxfoundation/linuxfoundation-icon.svg" height="20" alt=""/> Cross-distro packages
<a href='https://flathub.org/apps/details/org.polymc.PolyMC'><img width='240' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-en.png'/></a> <a href='https://flathub.org/apps/details/org.polymc.PolyMC'><img width='240' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-en.png'/></a>
<br>
[![AUR package](https://img.shields.io/aur/version/polymc-git)](https://aur.archlinux.org/packages/polymc-git/) <a href="https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage"><img src="https://docs.appimage.org/_images/download-appimage-banner.svg" width="240" alt="Download as AppImage" /></a>
- A [Nix](packages/nix/NIX.md) derivation is available in repo.
- A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay. - [AppImage SHA256](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage.sha256)
- The Flatpak can be built using [this source](https://github.com/flathub/org.polymc.PolyMC). - All packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest)).
- An RPM package is available on [COPR](https://copr.fedorainfracloud.org/coprs/sentry/polymc/), or can be built by going to the `packages/rpm` directory and running `rpmbuild -bb polymc.spec`.
- Generic, prebuilt packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest)).
- Last build status: https://jenkins.polymc.org/job/PolyMC/lastBuild/ - Last build status: https://jenkins.polymc.org/job/PolyMC/lastBuild/
- [Linux (AMD64) System](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst) ([SHA256](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst.sha256)) - this is a generic system package intended to be used as a base for making distro-specific packages. - [System Package (AMD64)](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst) ([SHA256](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst.sha256)) - a generic system package intended to be used as a base for making distro-specific packages
- [Windows (32-bit)](https://packages.polymc.org/latest/win32/win32.zip) ([SHA256](https://packages.polymc.org/latest/win32/win32.zip.sha256)) - this is a portable package, you can extract it anywhere and run it. This package needs testing.
- [Debian (AMD64)](https://packages.polymc.org/latest/deb/polymc-amd64.deb) ([SHA256](https://packages.polymc.org/latest/deb/polymc-amd64.deb.sha256)) - this is intended to be installed with `dpkg -i`. Alternatively, you may build the `.deb` yourself, by going to `packages/debian` and running `./makedeb.sh`.
- [AppImage (AMD64)](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage) ([SHA256](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage.sha256)) - `chmod +x` must be run on this file before usage. This should work on any distribution.
- [Arch Linux (AMD64)](https://packages.polymc.org/latest/arch/polymc-bin-latest-1-x86_64.pkg.tar.zst) ([SHA256](https://packages.polymc.org/latest/arch/polymc-bin-latest-1-x86_64.pkg.tar.zst.sha256)) - this is intended to be installed with `pacman -U`. This is an alternative if building the AUR package is not desired.
- MacOS currently does not have any packages. We are still working on setting up MacOS packaging.
## Development ### <img src="https://www.vectorlogo.zone/logos/archlinux/archlinux-icon.svg" height="20"/> Arch Linux
If you want to contribute to PolyMC you might find it useful to join [#development:polymc.org on Matrix](https://matrix.to/#/#development:polymc.org) or join [our Discord server](https://discord.gg/xq7fxrgtMP), which is bridged with the PolyMC Matrix rooms. Thank you!
### Building There are several AUR packages available:
If you want to build PolyMC yourself, check [BUILD.md](BUILD.md) for build instructions. [![polymc](https://img.shields.io/aur/version/polymc?label=aur/polymc)](https://aur.archlinux.org/packages/polymc/)
[![polymc-bin](https://img.shields.io/aur/version/polymc-bin?label=aur/polymc-bin)](https://aur.archlinux.org/packages/polymc-bin/)
[![polymc-git](https://img.shields.io/aur/version/polymc-git?label=aur/polymc-git)](https://aur.archlinux.org/packages/polymc-git/)
You can build the flatpak using [this source](https://github.com/flathub/org.polymc.PolyMC). ```sh
# stable source package
yay -S polymc
# stable binary package:
yay -S polymc-bin
# latest git package:
yay -S polymc-git
```
### Code formatting A prebuilt Arch package is available:
Just follow the existing formatting. [Arch Linux (AMD64)](https://packages.polymc.org/latest/arch/polymc-bin-latest-1-x86_64.pkg.tar.zst) ([SHA256](https://packages.polymc.org/latest/arch/polymc-bin-latest-1-x86_64.pkg.tar.zst.sha256))
In general, in order of importance: ```
* Make sure your IDE is not messing up line endings or whitespace and avoid using linters. wget https://packages.polymc.org/latest/arch/polymc-bin-latest-1-x86_64.pkg.tar.zst
* Prefer readability over dogma. sudo pacman -U polymc-bin-latest-1-x86_64.pkg.tar.zst
* Keep to the existing formatting. ```
* Indent with 4 space unless it's in a submodule.
* Keep lists (of arguments, parameters, initializers...) as lists, not paragraphs. It should either read from top to bottom, or left to right. Not both.
## Translations ### <img src="https://www.vectorlogo.zone/logos/debian/debian-icon.svg" height="20" /> Debian
TODO
## Forking/Redistributing/Custom builds policy A prebuilt deb package is available:
Do whatever you want, we don't care. Just follow the license. If you have any questions about this feel free to ask in an issue. [Debian (AMD64)](https://packages.polymc.org/latest/deb/polymc-amd64.deb) ([SHA256](https://packages.polymc.org/latest/deb/polymc-amd64.deb.sha256))
```sh
wget https://packages.polymc.org/latest/deb/polymc-amd64.deb
sudo apt install ./polymc-amd64.deb
```
### <img src="https://www.vectorlogo.zone/logos/nixos/nixos-icon.svg" height="20" /> Nix
A [Nix derivation](packages/nix/NIX.md) is available.
### <img src="https://www.gentoo.org/assets/img/logo/gentoo-signet.svg" height="20" /> Gentoo
A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay.
### <img src="https://www.vectorlogo.zone/logos/getfedora/getfedora-icon.svg" height="20"> Fedora
An RPM package is available on [COPR](https://copr.fedorainfracloud.org/coprs/sentry/polymc/)
```sh
sudo dnf copr enable sentry/polymc
sudo dnf install polymc
```
## <img src="https://www.vectorlogo.zone/logos/microsoft/microsoft-icon.svg" height="20" /> Windows
[Windows (32-bit)](https://packages.polymc.org/latest/win32/win32.zip) ([SHA256](https://packages.polymc.org/latest/win32/win32.zip.sha256)) - this is a portable package, you can extract it anywhere and run it. This package needs testing.
## <img src="https://www.vectorlogo.zone/logos/apple/apple-tile.svg" height="20" /> MacOS
MacOS currently does not have any packages. We are still working on setting up MacOS packaging.
# Help & Support
## Help & Support
Feel free to create an issue if you need help. However, you might find it easier to ask in the Discord server. Feel free to create an issue if you need help. However, you might find it easier to ask in the Discord server.
[![PolyMC Discord](https://img.shields.io/discord/923671181020766230?label=PolyMC%20Discord)](https://discord.gg/xq7fxrgtMP) [![PolyMC Discord](https://img.shields.io/discord/923671181020766230?label=PolyMC%20Discord)](https://discord.gg/xq7fxrgtMP)
@ -66,3 +99,31 @@ If there are any issues with the space or you are using a client that does not s
[![Discussion](https://img.shields.io/matrix/discussion:polymc.org?label=%23discussion&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#discussion:polymc.org) [![Discussion](https://img.shields.io/matrix/discussion:polymc.org?label=%23discussion&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#discussion:polymc.org)
[![Development](https://img.shields.io/matrix/development:polymc.org?label=%23development&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#development:polymc.org) [![Development](https://img.shields.io/matrix/development:polymc.org?label=%23development&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#development:polymc.org)
[![News](https://img.shields.io/matrix/news:polymc.org?label=%23news&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#news:polymc.org) [![News](https://img.shields.io/matrix/news:polymc.org?label=%23news&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#news:polymc.org)
# Development
If you want to contribute to PolyMC you might find it useful to join our Discord Server or Matrix Space.
## Building
If you want to build PolyMC yourself, check [BUILD.md](BUILD.md) for build instructions.
## Code formatting
Just follow the existing formatting.
In general, in order of importance:
- Make sure your IDE is not messing up line endings or whitespace and avoid using linters.
- Prefer readability over dogma.
- Keep to the existing formatting.
- Indent with 4 space unless it's in a submodule.
- Keep lists (of arguments, parameters, initializers...) as lists, not paragraphs. It should either read from top to bottom, or left to right. Not both.
## Translations
TODO
## Forking/Redistributing/Custom builds policy
Do whatever you want, we don't care. Just follow the license. If you have any questions about this feel free to ask in an issue.