Merge branch 'develop' into feature/close_after_launch
This commit is contained in:
commit
f5358aa1ca
107
.github/workflows/build.yml
vendored
Normal file
107
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
name: build_portable
|
||||||
|
|
||||||
|
on:
|
||||||
|
[push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
|
||||||
|
- os: ubuntu-20.04
|
||||||
|
qt_version: 5.12.8
|
||||||
|
qt_host: linux
|
||||||
|
|
||||||
|
- os: windows-2022
|
||||||
|
qt_version: 5.15.2
|
||||||
|
qt_host: windows
|
||||||
|
qt_arch: win64_mingw81
|
||||||
|
|
||||||
|
- os: macos-11
|
||||||
|
qt_version: 5.12.12
|
||||||
|
qt_host: mac
|
||||||
|
macosx_deployment_target: 10.12
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
env:
|
||||||
|
MACOSX_DEPLOYMENT_TARGET: ${{matrix.macosx_deployment_target}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'true'
|
||||||
|
|
||||||
|
- name: Install OpenJDK
|
||||||
|
uses: AdoptOpenJDK/install-jdk@v1
|
||||||
|
with:
|
||||||
|
version: '17'
|
||||||
|
|
||||||
|
- name: Cache Qt
|
||||||
|
id: cache-qt
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: "${{ github.workspace }}/Qt/"
|
||||||
|
key: ${{ runner.os }}-${{ matrix.qt_version }}-qt_cache
|
||||||
|
|
||||||
|
- name: Install Qt
|
||||||
|
uses: jurplel/install-qt-action@v2
|
||||||
|
with:
|
||||||
|
version: ${{ matrix.qt_version }}
|
||||||
|
host: ${{ matrix.qt_host }}
|
||||||
|
arch: ${{ matrix.qt_arch }}
|
||||||
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||||
|
dir: "${{ github.workspace }}/Qt/"
|
||||||
|
|
||||||
|
- name: Install Ninja
|
||||||
|
uses: urkle/action-get-ninja@v1
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
run: |
|
||||||
|
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug -G Ninja
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
cmake --install build
|
||||||
|
|
||||||
|
- name: Install OpenSSL libs
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install aqtinstall==2.0.5
|
||||||
|
python -m aqt install-tool -O "${{ github.workspace }}\Qt\" windows desktop tools_openssl_x64
|
||||||
|
copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x64\bin\libssl-1_1-x64.dll" "${{ github.workspace }}\install\"
|
||||||
|
copy "${{ github.workspace }}\Qt\Tools\OpenSSL\Win_x64\bin\libcrypto-1_1-x64.dll" "${{ github.workspace }}\install\"
|
||||||
|
|
||||||
|
- name: chmod binary on macOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
chmod +x "${{ github.workspace }}/install/PolyMC.app/Contents/MacOS/polymc"
|
||||||
|
|
||||||
|
- name: tar bundle on macOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
cd install
|
||||||
|
tar -czf ../polymc.tar.gz *
|
||||||
|
|
||||||
|
- name: Upload package for Linux and Windows
|
||||||
|
if: runner.os != 'macOS'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: polymc-${{ matrix.os }}-portable
|
||||||
|
path: install/**
|
||||||
|
|
||||||
|
- name: Upload package for macOS
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: polymc-${{ matrix.os }}-portable
|
||||||
|
path: polymc.tar.gz
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -40,13 +40,5 @@ run/
|
|||||||
|
|
||||||
.cache/
|
.cache/
|
||||||
|
|
||||||
# Flatpak builds
|
|
||||||
.flatpak-builder
|
|
||||||
flatbuild
|
|
||||||
builddir
|
|
||||||
# Deb
|
|
||||||
packages/debian/polymc/usr/
|
|
||||||
packages/debian/polymc.deb
|
|
||||||
packages/debian/polymc/DEBIAN/control
|
|
||||||
# Nix/NixOS
|
# Nix/NixOS
|
||||||
result/
|
result/
|
||||||
|
13
BUILD.md
13
BUILD.md
@ -25,7 +25,6 @@ The rest of the documentation assumes you have already cloned the repository.
|
|||||||
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.
|
- 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)
|
- Qt Development tools 5.6 or newer (`qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5` on Debian-based system)
|
||||||
- cmake 3.1 or newer (`cmake` on Debian-based system)
|
- cmake 3.1 or newer (`cmake` on Debian-based system)
|
||||||
@ -256,8 +255,8 @@ zlib1.dll
|
|||||||
|
|
||||||
- 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://adoptium.net/releases.html?variant=openjdk8&jvmVariant=hotspot)
|
||||||
- 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/) or higher (tested) (https://www.qt.io/download-qt-installer?utm_referrer=https%3A%2F%2Fwww.qt.io%2Fdownload-open-source)
|
||||||
|
|
||||||
You can use `homebrew` to simplify the installation of build dependencies
|
You can use `homebrew` to simplify the installation of build dependencies
|
||||||
|
|
||||||
@ -271,7 +270,7 @@ xcode-select --install
|
|||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
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 `PolyMC.app` will be constructed when you run `make install`. Supply it as the `CMAKE_INSTALL_PREFIX` argument during CMake configuration. By default, it's in the dist folder under PolyMC
|
||||||
|
|
||||||
```
|
```
|
||||||
mkdir build
|
mkdir build
|
||||||
@ -281,15 +280,15 @@ cmake \
|
|||||||
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
|
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX:PATH="$(dirname $PWD)/dist/" \
|
-DCMAKE_INSTALL_PREFIX:PATH="$(dirname $PWD)/dist/" \
|
||||||
-DCMAKE_PREFIX_PATH="/path/to/Qt5.6/" \
|
-DCMAKE_PREFIX_PATH="/path/to/Qt/" \
|
||||||
-DQt5_DIR="/path/to/Qt5.6/" \
|
-DQt5_DIR="/path/to/Qt/" \
|
||||||
-DLauncher_LAYOUT=mac-bundle \
|
-DLauncher_LAYOUT=mac-bundle \
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 \
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 \
|
||||||
..
|
..
|
||||||
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.
|
Remember to replace `/path/to/Qt/` 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 -`.
|
||||||
|
20
README.md
20
README.md
@ -10,6 +10,8 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The Poly
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
- All 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/
|
||||||
|
|
||||||
## 🐧 Linux
|
## 🐧 Linux
|
||||||
|
|
||||||
@ -20,13 +22,11 @@ This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The Poly
|
|||||||
<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 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>
|
||||||
|
|
||||||
- [AppImage SHA256](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage.sha256)
|
- [AppImage SHA256](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage.sha256)
|
||||||
- All 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/
|
|
||||||
- [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
|
|
||||||
|
|
||||||
### <img src="https://www.vectorlogo.zone/logos/archlinux/archlinux-icon.svg" height="20"/> Arch Linux
|
### <img src="https://www.vectorlogo.zone/logos/archlinux/archlinux-icon.svg" height="20"/> Arch Linux
|
||||||
|
|
||||||
There are several AUR packages available:
|
There are several AUR packages available:
|
||||||
|
|
||||||
[![polymc](https://img.shields.io/badge/aur-polymc-blue)](https://aur.archlinux.org/packages/polymc/)
|
[![polymc](https://img.shields.io/badge/aur-polymc-blue)](https://aur.archlinux.org/packages/polymc/)
|
||||||
[![polymc-bin](https://img.shields.io/badge/aur-polymc--bin-blue)](https://aur.archlinux.org/packages/polymc-bin/)
|
[![polymc-bin](https://img.shields.io/badge/aur-polymc--bin-blue)](https://aur.archlinux.org/packages/polymc-bin/)
|
||||||
[![polymc-git](https://img.shields.io/badge/aur-polymc--git-blue)](https://aur.archlinux.org/packages/polymc-git/)
|
[![polymc-git](https://img.shields.io/badge/aur-polymc--git-blue)](https://aur.archlinux.org/packages/polymc-git/)
|
||||||
@ -69,7 +69,7 @@ A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds)
|
|||||||
```sh
|
```sh
|
||||||
# as root:
|
# as root:
|
||||||
emerge --oneshot eselect-repository
|
emerge --oneshot eselect-repository
|
||||||
eselect-repository enable swirl
|
eselect repository enable swirl
|
||||||
emaint sync -r swirl
|
emaint sync -r swirl
|
||||||
emerge polymc
|
emerge polymc
|
||||||
# to use latest git version:
|
# to use latest git version:
|
||||||
@ -78,7 +78,14 @@ sudo tee -a /etc/portage/package.accept_keywords <<< "=games-action/polymc-9999
|
|||||||
|
|
||||||
### <img src="https://www.vectorlogo.zone/logos/getfedora/getfedora-icon.svg" height="20"> Fedora
|
### <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/)
|
An RPM package is available on [COPR](https://copr.fedorainfracloud.org/coprs/polymc/polymc/).
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo dnf copr enable polymc/polymc
|
||||||
|
sudo dnf install polymc
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, a COPR maintained by a PolyMC user (instead of Jenkins' automated builds) is available [here](https://copr.fedorainfracloud.org/coprs/sentry/polymc).
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo dnf copr enable sentry/polymc
|
sudo dnf copr enable sentry/polymc
|
||||||
@ -91,7 +98,7 @@ sudo dnf install polymc
|
|||||||
|
|
||||||
## <img src="https://www.vectorlogo.zone/logos/apple/apple-tile.svg" height="20" /> MacOS
|
## <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.
|
MacOS currently does not have any packages. We are still working on setting up MacOS packaging. Meanwhile, you can [build](https://github.com/PolyMC/PolyMC/blob/develop/BUILD.md#macos) it for yourself.
|
||||||
|
|
||||||
# Help & Support
|
# Help & Support
|
||||||
|
|
||||||
@ -119,7 +126,6 @@ If you want to contribute to PolyMC you might find it useful to join our Discord
|
|||||||
If you want to build PolyMC yourself, check [BUILD.md](BUILD.md) for build instructions.
|
If you want to build PolyMC yourself, check [BUILD.md](BUILD.md) for build instructions.
|
||||||
|
|
||||||
## Code formatting
|
## Code formatting
|
||||||
|
|
||||||
Just follow the existing formatting.
|
Just follow the existing formatting.
|
||||||
|
|
||||||
In general, in order of importance:
|
In general, in order of importance:
|
||||||
|
1532
changelog.md
1532
changelog.md
File diff suppressed because it is too large
Load Diff
12
flake.lock
12
flake.lock
@ -18,11 +18,11 @@
|
|||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1638122382,
|
"lastModified": 1642700792,
|
||||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -49,11 +49,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641887635,
|
"lastModified": 1643169865,
|
||||||
"narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
|
"narHash": "sha256-+KIpNRazbc8Gac9jdWCKQkFv9bjceaLaLhlwqUEYu8c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
|
"rev": "945ec499041db73043f745fad3b2a3a01e826081",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -32,8 +32,14 @@ QString getCreditsHtml()
|
|||||||
QTextStream stream(&output);
|
QTextStream stream(&output);
|
||||||
stream.setCodec(QTextCodec::codecForName("UTF-8"));
|
stream.setCodec(QTextCodec::codecForName("UTF-8"));
|
||||||
stream << "<center>\n";
|
stream << "<center>\n";
|
||||||
|
|
||||||
|
stream << "<h3>" << QObject::tr("PolyMC Developers", "About Credits") << "</h3>\n";
|
||||||
|
stream << "<p>swirl <<a href='mailto:swurl@swurl.xyz'>swurl@swurl.xyz </a>></p>\n";
|
||||||
|
stream << "<p>LennyMcLennington <<a href='mailto:lenny@sneed.church'>lenny@sneed.church</a>></p>\n";
|
||||||
|
stream << "<br />\n";
|
||||||
|
|
||||||
// TODO: possibly retrieve from git history at build time?
|
// TODO: possibly retrieve from git history at build time?
|
||||||
stream << "<h3>" << QObject::tr("Developers", "About Credits") << "</h3>\n";
|
stream << "<h3>" << QObject::tr("MultiMC Developers", "About Credits") << "</h3>\n";
|
||||||
stream << "<p>Andrew Okin <<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>></p>\n";
|
stream << "<p>Andrew Okin <<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>></p>\n";
|
||||||
stream << "<p>Petr Mrázek <<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>></p>\n";
|
stream << "<p>Petr Mrázek <<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>></p>\n";
|
||||||
stream << "<p>Sky Welch <<a href='mailto:multimc@bunnies.io'>multimc@bunnies.io</a>></p>\n";
|
stream << "<p>Sky Welch <<a href='mailto:multimc@bunnies.io'>multimc@bunnies.io</a>></p>\n";
|
||||||
@ -47,6 +53,7 @@ QString getCreditsHtml()
|
|||||||
stream << "<p>Kilobyte <<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>></p>\n";
|
stream << "<p>Kilobyte <<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>></p>\n";
|
||||||
stream << "<p>Rootbear75 <<a href='https://twitter.com/rootbear75'>@rootbear75</a>></p>\n";
|
stream << "<p>Rootbear75 <<a href='https://twitter.com/rootbear75'>@rootbear75</a>></p>\n";
|
||||||
stream << "<p>Zeker Zhayard <<a href='https://twitter.com/zeker_zhayard'>@Zeker_Zhayard</a>></p>\n";
|
stream << "<p>Zeker Zhayard <<a href='https://twitter.com/zeker_zhayard'>@Zeker_Zhayard</a>></p>\n";
|
||||||
|
stream << "<p>Everyone else who <a href='https://github.com/PolyMC/PolyMC/graphs/contributors'>contributed</a>!</p>\n";
|
||||||
stream << "<br />\n";
|
stream << "<br />\n";
|
||||||
|
|
||||||
stream << "</center>\n";
|
stream << "</center>\n";
|
||||||
@ -83,8 +90,12 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
|
|||||||
ui->icon->setPixmap(APPLICATION->getThemedIcon("logo").pixmap(64));
|
ui->icon->setPixmap(APPLICATION->getThemedIcon("logo").pixmap(64));
|
||||||
ui->title->setText(launcherName);
|
ui->title->setText(launcherName);
|
||||||
|
|
||||||
ui->versionLabel->setText(tr("Version") +": " + BuildConfig.printableVersionString());
|
ui->versionLabel->setText(BuildConfig.printableVersionString());
|
||||||
|
|
||||||
|
if (!BuildConfig.BUILD_PLATFORM.isEmpty())
|
||||||
ui->platformLabel->setText(tr("Platform") +": " + BuildConfig.BUILD_PLATFORM);
|
ui->platformLabel->setText(tr("Platform") +": " + BuildConfig.BUILD_PLATFORM);
|
||||||
|
else
|
||||||
|
ui->platformLabel->setVisible(false);
|
||||||
|
|
||||||
if (BuildConfig.VERSION_BUILD >= 0)
|
if (BuildConfig.VERSION_BUILD >= 0)
|
||||||
ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD));
|
ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD));
|
||||||
|
@ -86,6 +86,13 @@
|
|||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="versionLabel">
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
@ -151,16 +158,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="versionLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Version:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="platformLabel">
|
<widget class="QLabel" name="platformLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -250,6 +250,12 @@ bool ScreenshotsPage::eventFilter(QObject *obj, QEvent *evt)
|
|||||||
return QWidget::eventFilter(obj, evt);
|
return QWidget::eventFilter(obj, evt);
|
||||||
}
|
}
|
||||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(evt);
|
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(evt);
|
||||||
|
|
||||||
|
if (keyEvent->matches(QKeySequence::Copy)) {
|
||||||
|
on_actionCopy_File_s_triggered();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
switch (keyEvent->key())
|
switch (keyEvent->key())
|
||||||
{
|
{
|
||||||
case Qt::Key_Delete:
|
case Qt::Key_Delete:
|
||||||
@ -272,6 +278,11 @@ ScreenshotsPage::~ScreenshotsPage()
|
|||||||
void ScreenshotsPage::ShowContextMenu(const QPoint& pos)
|
void ScreenshotsPage::ShowContextMenu(const QPoint& pos)
|
||||||
{
|
{
|
||||||
auto menu = ui->toolBar->createContextMenu(this, tr("Context menu"));
|
auto menu = ui->toolBar->createContextMenu(this, tr("Context menu"));
|
||||||
|
|
||||||
|
if (ui->listView->selectionModel()->selectedRows().size() > 1) {
|
||||||
|
menu->removeAction( ui->actionCopy_Image );
|
||||||
|
}
|
||||||
|
|
||||||
menu->exec(ui->listView->mapToGlobal(pos));
|
menu->exec(ui->listView->mapToGlobal(pos));
|
||||||
delete menu;
|
delete menu;
|
||||||
}
|
}
|
||||||
@ -377,6 +388,42 @@ void ScreenshotsPage::on_actionUpload_triggered()
|
|||||||
m_uploadActive = false;
|
m_uploadActive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScreenshotsPage::on_actionCopy_Image_triggered()
|
||||||
|
{
|
||||||
|
auto selection = ui->listView->selectionModel()->selectedRows();
|
||||||
|
if(selection.size() < 1)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// You can only copy one image to the clipboard. In the case of multiple selected files, only the first one gets copied.
|
||||||
|
auto item = selection[0];
|
||||||
|
auto info = m_model->fileInfo(item);
|
||||||
|
QImage image(info.absoluteFilePath());
|
||||||
|
Q_ASSERT(!image.isNull());
|
||||||
|
QApplication::clipboard()->setImage(image, QClipboard::Clipboard);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScreenshotsPage::on_actionCopy_File_s_triggered()
|
||||||
|
{
|
||||||
|
auto selection = ui->listView->selectionModel()->selectedRows();
|
||||||
|
if(selection.size() < 1)
|
||||||
|
{
|
||||||
|
// Don't do anything so we don't empty the users clipboard
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString buf = "";
|
||||||
|
for (auto item : selection)
|
||||||
|
{
|
||||||
|
auto info = m_model->fileInfo(item);
|
||||||
|
buf += "file:///" + info.absoluteFilePath() + "\r\n";
|
||||||
|
}
|
||||||
|
QMimeData* mimeData = new QMimeData();
|
||||||
|
mimeData->setData("text/uri-list", buf.toLocal8Bit());
|
||||||
|
QApplication::clipboard()->setMimeData(mimeData);
|
||||||
|
}
|
||||||
|
|
||||||
void ScreenshotsPage::on_actionDelete_triggered()
|
void ScreenshotsPage::on_actionDelete_triggered()
|
||||||
{
|
{
|
||||||
auto mbox = CustomMessageBox::selectable(
|
auto mbox = CustomMessageBox::selectable(
|
||||||
|
@ -73,6 +73,8 @@ protected:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_actionUpload_triggered();
|
void on_actionUpload_triggered();
|
||||||
|
void on_actionCopy_Image_triggered();
|
||||||
|
void on_actionCopy_File_s_triggered();
|
||||||
void on_actionDelete_triggered();
|
void on_actionDelete_triggered();
|
||||||
void on_actionRename_triggered();
|
void on_actionRename_triggered();
|
||||||
void on_actionView_Folder_triggered();
|
void on_actionView_Folder_triggered();
|
||||||
|
@ -50,6 +50,8 @@
|
|||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="actionUpload"/>
|
<addaction name="actionUpload"/>
|
||||||
|
<addaction name="actionCopy_Image"/>
|
||||||
|
<addaction name="actionCopy_File_s"/>
|
||||||
<addaction name="actionDelete"/>
|
<addaction name="actionDelete"/>
|
||||||
<addaction name="actionRename"/>
|
<addaction name="actionRename"/>
|
||||||
<addaction name="actionView_Folder"/>
|
<addaction name="actionView_Folder"/>
|
||||||
@ -74,6 +76,22 @@
|
|||||||
<string>View Folder</string>
|
<string>View Folder</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionCopy_Image">
|
||||||
|
<property name="text">
|
||||||
|
<string>Copy Image</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Copy Image</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionCopy_File_s">
|
||||||
|
<property name="text">
|
||||||
|
<string>Copy File(s)</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Copy File(s)</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
mkdir builddir
|
|
||||||
cd builddir
|
|
||||||
cmake -DLauncher_LAYOUT=lin-system -DCMAKE_INSTALL_PREFIX=../polymc/usr ../../../
|
|
||||||
make -j$(nproc) install
|
|
||||||
cd ..
|
|
||||||
VERSION_PLACEHOLDER=$(git describe --tags | sed 's/-.*//')
|
|
||||||
cp polymc/DEBIAN/control.template polymc/DEBIAN/control
|
|
||||||
sed -i "2s/.*/Version: $VERSION_PLACEHOLDER/" polymc/DEBIAN/control
|
|
||||||
dpkg-deb --build polymc
|
|
@ -1,9 +0,0 @@
|
|||||||
Package: polymc
|
|
||||||
Version:
|
|
||||||
Section: games
|
|
||||||
Priority: optional
|
|
||||||
Architecture: amd64
|
|
||||||
Depends: libqt5core5a, libqt5network5, libqt5gui5
|
|
||||||
Maintainer: PolyMC Team
|
|
||||||
Description: PolyMC
|
|
||||||
A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once
|
|
@ -1,7 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeDesktopItem
|
|
||||||
, cmake
|
, cmake
|
||||||
, ninja
|
, ninja
|
||||||
, jdk8
|
, jdk8
|
||||||
@ -73,27 +72,11 @@ mkDerivation rec {
|
|||||||
"-DLauncher_LAYOUT=lin-system"
|
"-DLauncher_LAYOUT=lin-system"
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
|
||||||
name = "polymc";
|
|
||||||
exec = "polymc";
|
|
||||||
icon = "polymc";
|
|
||||||
desktopName = "PolyMC";
|
|
||||||
genericName = "Minecraft Launcher";
|
|
||||||
comment = "A custom launcher for Minecraft";
|
|
||||||
categories = "Game;";
|
|
||||||
extraEntries = ''
|
|
||||||
Keywords=game;Minecraft;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
install -Dm644 ../launcher/resources/multimc/scalable/launcher.svg $out/share/pixmaps/polymc.svg
|
|
||||||
install -Dm644 ${desktopItem}/share/applications/polymc.desktop $out/share/applications/org.polymc.polymc.desktop
|
|
||||||
|
|
||||||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
wrapProgram $out/bin/polymc \
|
wrapProgram $out/bin/polymc \
|
||||||
"''${qtWrapperArgs[@]}" \
|
"''${qtWrapperArgs[@]}" \
|
||||||
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr jdk ]}
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -1,142 +0,0 @@
|
|||||||
|
|
||||||
%global libnbtplusplus_commit dc72a20b7efd304d12af2025223fad07b4b78464
|
|
||||||
%global libnbtplusplus_shortcommit %(c=%{libnbtplusplus_commit}; echo ${c:0:7})
|
|
||||||
%global quazip_commit c9ef32de19bceb58d236f5c22382698deaec69fd
|
|
||||||
%global quazip_shortcommit %(c=%{quazip_commit}; echo ${c:0:7})
|
|
||||||
|
|
||||||
Name: polymc
|
|
||||||
Version: 1.0.5
|
|
||||||
Release: 2%{?dist}
|
|
||||||
Summary: Minecraft launcher with ability to manage multiple instances
|
|
||||||
|
|
||||||
#
|
|
||||||
# CC-BY-SA
|
|
||||||
# ---------------------------------------
|
|
||||||
# launcher/resources/multimc/
|
|
||||||
#
|
|
||||||
# BSD 3-clause "New" or "Revised" License
|
|
||||||
# ---------------------------------------
|
|
||||||
# application/
|
|
||||||
# libraries/LocalPeer/
|
|
||||||
# libraries/ganalytics/
|
|
||||||
#
|
|
||||||
# Boost Software License (v1.0)
|
|
||||||
# ---------------------------------------
|
|
||||||
# cmake/
|
|
||||||
#
|
|
||||||
# Expat License
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/systeminfo/
|
|
||||||
#
|
|
||||||
# GNU Lesser General Public License (v2 or later)
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/rainbow
|
|
||||||
#
|
|
||||||
# GNU Lesser General Public License (v2.1 or later)
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/iconfix/
|
|
||||||
# libraries/quazip/
|
|
||||||
#
|
|
||||||
# GNU Lesser General Public License (v3 or later)
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/libnbtplusplus/
|
|
||||||
#
|
|
||||||
# GPL (v2)
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/pack200/
|
|
||||||
#
|
|
||||||
# ISC License
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/hoedown/
|
|
||||||
#
|
|
||||||
# zlib/libpng license
|
|
||||||
# ---------------------------------------
|
|
||||||
# libraries/quazip/quazip/unzip.h
|
|
||||||
# libraries/quazip/quazip/zip.h
|
|
||||||
#
|
|
||||||
|
|
||||||
License: CC-BY-SA and ASL 2.0 and BSD and Boost and LGPLv2 and LGPLv2+ and LGPLv3+ and GPLv2 and GPLv2+ and GPLv3 and ISC and zlib
|
|
||||||
URL: https://polymc.org
|
|
||||||
Source0: https://github.com/PolyMC/PolyMC/archive/%{version}/%{name}-%{version}.tar.gz
|
|
||||||
Source1: https://github.com/MultiMC/libnbtplusplus/archive/%{libnbtplusplus_commit}/libnbtplusplus-%{libnbtplusplus_shortcommit}.tar.gz
|
|
||||||
Source2: https://github.com/PolyMC/quazip/archive/%{quazip_commit}/quazip-%{quazip_shortcommit}.tar.gz
|
|
||||||
|
|
||||||
BuildRequires: cmake
|
|
||||||
BuildRequires: desktop-file-utils
|
|
||||||
BuildRequires: gcc-c++
|
|
||||||
|
|
||||||
BuildRequires: java-devel
|
|
||||||
BuildRequires: %{?suse_version:lib}qt5-qtbase-devel
|
|
||||||
BuildRequires: zlib-devel
|
|
||||||
|
|
||||||
# Minecraft < 1.17
|
|
||||||
Recommends: java-1.8.0-openjdk-headless
|
|
||||||
# Minecraft >= 1.17
|
|
||||||
Recommends: java-17-openjdk-headless
|
|
||||||
|
|
||||||
%description
|
|
||||||
PolyMC is a free, open source launcher for Minecraft. It allows you to have
|
|
||||||
multiple, separate instances of Minecraft (each with their own mods, texture
|
|
||||||
packs, saves, etc) and helps you manage them and their associated options with
|
|
||||||
a simple interface.
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -p1 -n PolyMC-%{version}
|
|
||||||
|
|
||||||
tar -xvf %{SOURCE1} -C libraries
|
|
||||||
tar -xvf %{SOURCE2} -C libraries
|
|
||||||
rmdir libraries/libnbtplusplus libraries/quazip
|
|
||||||
mv -f libraries/quazip-%{quazip_commit} libraries/quazip
|
|
||||||
mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
|
||||||
%cmake \
|
|
||||||
-DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
|
|
||||||
-DLauncher_LAYOUT:STRING="lin-system" \
|
|
||||||
-DLauncher_LIBRARY_DEST_DIR:STRING="%{_libdir}/%{name}" \
|
|
||||||
-DLauncher_UPDATER_BASE:STRING=""
|
|
||||||
|
|
||||||
%cmake_build
|
|
||||||
|
|
||||||
%install
|
|
||||||
%cmake_install
|
|
||||||
|
|
||||||
# Proper library linking
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/
|
|
||||||
echo "%{_libdir}/%{name}" > "%{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf"
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
|
||||||
# skip tests on systems that aren't officially supported
|
|
||||||
%if ! 0%{?suse_version}
|
|
||||||
%ctest
|
|
||||||
desktop-file-validate %{buildroot}%{_datadir}/applications/org.polymc.polymc.desktop
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%files
|
|
||||||
%license COPYING.md
|
|
||||||
%doc README.md changelog.md
|
|
||||||
%{_bindir}/%{name}
|
|
||||||
%{_libdir}/%{name}/*
|
|
||||||
%{_datadir}/%{name}/*
|
|
||||||
%{_datadir}/metainfo/org.polymc.PolyMC.metainfo.xml
|
|
||||||
%{_datadir}/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg
|
|
||||||
%{_datadir}/applications/org.polymc.polymc.desktop
|
|
||||||
%config %{_sysconfdir}/ld.so.conf.d/*
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Mon Jan 24 2022 Jan Drögehoff <sentrycraft123@gmail.com> - 1.0.5-2
|
|
||||||
- remove explicit dependencies, correct dependencies to work on OpenSuse
|
|
||||||
|
|
||||||
* Sun Jan 09 2022 Jan Drögehoff <sentrycraft123@gmail.com> - 1.0.5-1
|
|
||||||
- Update to 1.0.5
|
|
||||||
|
|
||||||
* Sun Jan 09 2022 Jan Drögehoff <sentrycraft123@gmail.com> - 1.0.4-2
|
|
||||||
- rework spec
|
|
||||||
|
|
||||||
* Fri Jan 7 2022 getchoo <getchoo at tuta dot io> - 1.0.4-1
|
|
||||||
- Initial polymc spec
|
|
@ -1,6 +1,6 @@
|
|||||||
set(Launcher_CommonName "PolyMC")
|
set(Launcher_CommonName "PolyMC")
|
||||||
|
|
||||||
set(Launcher_Copyright "PolyMC Contributors" PARENT_SCOPE)
|
set(Launcher_Copyright "PolyMC Contributors\\n© 2012-2021 MultiMC Contributors" PARENT_SCOPE)
|
||||||
set(Launcher_Domain "polymc.org" PARENT_SCOPE)
|
set(Launcher_Domain "polymc.org" PARENT_SCOPE)
|
||||||
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
|
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
|
||||||
set(Launcher_DisplayName "${Launcher_CommonName}" PARENT_SCOPE)
|
set(Launcher_DisplayName "${Launcher_CommonName}" PARENT_SCOPE)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||||
<assemblyIdentity name="PolyMC.Application.5" type="win32" version="5.0.0.0" />
|
<assemblyIdentity name="PolyMC.Application.1" type="win32" version="1.0.0.0" />
|
||||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<security>
|
<security>
|
||||||
<requestedPrivileges>
|
<requestedPrivileges>
|
||||||
|
@ -16,10 +16,10 @@ BEGIN
|
|||||||
BLOCK "000004b0"
|
BLOCK "000004b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "MultiMC & PolyMC Contributors"
|
VALUE "CompanyName", "MultiMC & PolyMC Contributors"
|
||||||
VALUE "FileDescription", "A Minecraft Launcher"
|
VALUE "FileDescription", "PolyMC"
|
||||||
VALUE "FileVersion", "1.0.0.0"
|
VALUE "FileVersion", "1.0.0.0"
|
||||||
VALUE "ProductName", "PolyMC"
|
VALUE "ProductName", "PolyMC"
|
||||||
VALUE "ProductVersion", "5"
|
VALUE "ProductVersion", "1"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
Loading…
Reference in New Issue
Block a user