aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml58
-rw-r--r--.github/workflows/trigger_release.yml18
-rw-r--r--CMakeLists.txt10
-rw-r--r--COPYING.md39
-rw-r--r--buildconfig/BuildConfig.cpp.in27
-rw-r--r--buildconfig/BuildConfig.h6
-rw-r--r--cmake/GetGitRevisionDescription.cmake246
-rw-r--r--cmake/GetGitRevisionDescription.cmake.in34
-rw-r--r--flake.lock16
-rw-r--r--flake.nix2
-rw-r--r--launcher/Application.cpp31
-rw-r--r--launcher/Application.h12
-rw-r--r--launcher/CMakeLists.txt20
-rw-r--r--launcher/JavaCommon.cpp2
-rw-r--r--launcher/MMCZip.cpp30
-rw-r--r--launcher/MMCZip.h2
-rw-r--r--launcher/ModDownloadTask.cpp14
-rw-r--r--launcher/ModDownloadTask.h7
-rw-r--r--launcher/java/JavaUtils.cpp24
-rw-r--r--launcher/minecraft/MinecraftInstance.cpp24
-rw-r--r--launcher/minecraft/MinecraftInstance.h2
-rw-r--r--launcher/minecraft/mod/MetadataHandler.h22
-rw-r--r--launcher/minecraft/mod/Mod.cpp39
-rw-r--r--launcher/minecraft/mod/Mod.h12
-rw-r--r--launcher/minecraft/mod/ModFolderModel.cpp124
-rw-r--r--launcher/minecraft/mod/ModFolderModel.h18
-rw-r--r--launcher/minecraft/mod/tasks/LocalModParseTask.cpp9
-rw-r--r--launcher/minecraft/mod/tasks/LocalModUpdateTask.cpp17
-rw-r--r--launcher/minecraft/mod/tasks/LocalModUpdateTask.h3
-rw-r--r--launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp33
-rw-r--r--launcher/minecraft/mod/tasks/ModFolderLoadTask.h2
-rw-r--r--launcher/modplatform/CheckUpdateTask.h51
-rw-r--r--launcher/modplatform/EnsureMetadataTask.cpp534
-rw-r--r--launcher/modplatform/EnsureMetadataTask.h54
-rw-r--r--launcher/modplatform/ModAPI.h4
-rw-r--r--launcher/modplatform/ModIndex.h8
-rw-r--r--launcher/modplatform/flame/FlameAPI.cpp148
-rw-r--r--launcher/modplatform/flame/FlameAPI.h8
-rw-r--r--launcher/modplatform/flame/FlameCheckUpdate.cpp179
-rw-r--r--launcher/modplatform/flame/FlameCheckUpdate.h25
-rw-r--r--launcher/modplatform/flame/FlameModIndex.cpp18
-rw-r--r--launcher/modplatform/flame/FlameModIndex.h2
-rw-r--r--launcher/modplatform/helpers/NetworkModAPI.cpp29
-rw-r--r--launcher/modplatform/helpers/NetworkModAPI.h2
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.cpp108
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.h28
-rw-r--r--launcher/modplatform/modrinth/ModrinthCheckUpdate.cpp174
-rw-r--r--launcher/modplatform/modrinth/ModrinthCheckUpdate.h23
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackIndex.cpp41
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackIndex.h2
-rw-r--r--launcher/modplatform/packwiz/Packwiz.cpp69
-rw-r--r--launcher/modplatform/packwiz/Packwiz.h23
-rw-r--r--launcher/modplatform/packwiz/Packwiz_test.cpp7
-rw-r--r--launcher/net/Download.cpp5
-rw-r--r--launcher/net/Download.h1
-rw-r--r--launcher/net/Upload.cpp53
-rw-r--r--launcher/net/Upload.h38
-rw-r--r--launcher/tasks/MultipleOptionsTask.cpp48
-rw-r--r--launcher/tasks/MultipleOptionsTask.h19
-rw-r--r--launcher/tasks/SequentialTask.cpp20
-rw-r--r--launcher/tasks/SequentialTask.h16
-rw-r--r--launcher/ui/dialogs/ChooseProviderDialog.cpp96
-rw-r--r--launcher/ui/dialogs/ChooseProviderDialog.h56
-rw-r--r--launcher/ui/dialogs/ChooseProviderDialog.ui89
-rw-r--r--launcher/ui/dialogs/ModDownloadDialog.cpp33
-rw-r--r--launcher/ui/dialogs/ModDownloadDialog.h21
-rw-r--r--launcher/ui/dialogs/ModUpdateDialog.cpp409
-rw-r--r--launcher/ui/dialogs/ModUpdateDialog.h62
-rw-r--r--launcher/ui/dialogs/NewInstanceDialog.cpp27
-rw-r--r--launcher/ui/dialogs/NewInstanceDialog.h41
-rw-r--r--launcher/ui/dialogs/ProgressDialog.cpp34
-rw-r--r--launcher/ui/dialogs/ReviewMessageBox.cpp2
-rw-r--r--launcher/ui/dialogs/ScrollMessageBox.ui2
-rw-r--r--launcher/ui/dialogs/SkinUploadDialog.cpp90
-rw-r--r--launcher/ui/dialogs/SkinUploadDialog.ui6
-rw-r--r--launcher/ui/pages/global/APIPage.cpp16
-rw-r--r--launcher/ui/pages/global/APIPage.ui6
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp2
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.ui11
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp83
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.h1
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp2
-rw-r--r--launcher/ui/themes/DarkTheme.cpp1
-rw-r--r--launcher/ui/widgets/WideBar.cpp49
-rw-r--r--launcher/ui/widgets/WideBar.h31
-rw-r--r--libraries/README.md6
-rw-r--r--libraries/murmur2/CMakeLists.txt12
-rw-r--r--libraries/murmur2/src/MurmurHash2.cpp86
-rw-r--r--libraries/murmur2/src/MurmurHash2.h30
-rw-r--r--nix/default.nix6
-rw-r--r--program_info/CMakeLists.txt23
-rw-r--r--program_info/polymc.6.scd61
-rw-r--r--program_info/polymc.6.txt64
94 files changed, 3542 insertions, 558 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fbbc1417..0599c1d9 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,11 +23,11 @@ jobs:
qt_ver: 5
- os: ubuntu-20.04
- appimage: true
qt_ver: 6
qt_host: linux
- qt_version: '6.3.1'
+ qt_version: '6.2.4'
qt_modules: 'qt5compat qtimageformats'
+ qt_path: /home/runner/work/PolyMC/Qt
- os: windows-2022
name: "Windows-Legacy"
@@ -45,6 +45,7 @@ jobs:
qt_host: mac
qt_version: '6.3.1'
qt_modules: 'qt5compat qtimageformats'
+ qt_path: /Users/runner/work/PolyMC/Qt
runs-on: ${{ matrix.os }}
@@ -90,7 +91,7 @@ jobs:
if: runner.os != 'Windows' && inputs.build_type == 'Debug'
uses: hendrikmuhs/ccache-action@v1.2.1
with:
- key: ${{ matrix.os }}-${{ matrix.appimage }}
+ key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
- name: Setup ccache (Windows)
if: runner.os == 'Windows' && inputs.build_type == 'Debug'
@@ -113,9 +114,9 @@ jobs:
uses: actions/cache@v3.0.2
with:
path: '${{ github.workspace }}\.ccache'
- key: ${{ matrix.os }}-${{ matrix.msystem }}
+ key: ${{ matrix.os }}-qt${{ matrix.qt_ver }}
restore-keys: |
- ${{ matrix.os }}-${{ matrix.msystem }}
+ ${{ matrix.os }}-qt${{ matrix.qt_ver }}
- name: Set short version
shell: bash
@@ -127,7 +128,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get -y update
- sudo apt-get -y install ninja-build extra-cmake-modules
+ sudo apt-get -y install ninja-build extra-cmake-modules scdoc
- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
@@ -136,9 +137,17 @@ jobs:
brew install ninja extra-cmake-modules
- name: Install Qt (Linux)
- if: runner.os == 'Linux' && matrix.appimage != true
+ if: runner.os == 'Linux' && matrix.qt_ver != 6
run: |
- sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5 qt5-image-formats-plugins
+ sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
+
+ - name: Cache Qt (macOS and AppImage)
+ id: cache-qt
+ if: matrix.qt_ver == 6 && runner.os != 'Windows'
+ uses: actions/cache@v3
+ with:
+ path: '${{ matrix.qt_path }}/${{ matrix.qt_version }}'
+ key: ${{ matrix.qt_host }}-${{ matrix.qt_version }}-"${{ matrix.qt_modules }}"-qt_cache
- name: Install Qt (macOS and AppImage)
if: matrix.qt_ver == 6 && runner.os != 'Windows'
@@ -148,10 +157,11 @@ jobs:
host: ${{ matrix.qt_host }}
target: 'desktop'
modules: ${{ matrix.qt_modules }}
+ cached: ${{ steps.cache-qt.outputs.cache-hit }}
aqtversion: ==2.1.*
- name: Prepare AppImage (Linux)
- if: runner.os == 'Linux' && matrix.appimage == true
+ if: runner.os == 'Linux' && matrix.qt_ver != 5
run: |
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
@@ -270,7 +280,7 @@ jobs:
makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi"
- name: Package (Linux)
- if: runner.os == 'Linux' && matrix.appimage != true
+ if: runner.os == 'Linux'
run: |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}
@@ -278,7 +288,7 @@ jobs:
tar --owner root --group root -czf ../PolyMC.tar.gz *
- name: Package (Linux, portable)
- if: runner.os == 'Linux' && matrix.appimage != true
+ if: runner.os == 'Linux'
run: |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }}
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
@@ -287,7 +297,7 @@ jobs:
tar -czf ../PolyMC-portable.tar.gz *
- name: Package AppImage (Linux)
- if: runner.os == 'Linux' && matrix.appimage == true
+ if: runner.os == 'Linux' && matrix.qt_ver != 5
shell: bash
run: |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr
@@ -346,22 +356,36 @@ jobs:
name: PolyMC-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC-Setup.exe
- - name: Upload binary tarball (Linux)
- if: runner.os == 'Linux' && matrix.appimage != true
+ - name: Upload binary tarball (Linux, Qt 5)
+ if: runner.os == 'Linux' && matrix.qt_ver != 6
uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC.tar.gz
- - name: Upload binary tarball (Linux, portable)
- if: runner.os == 'Linux' && matrix.appimage != true
+ - name: Upload binary tarball (Linux, portable, Qt 5)
+ if: runner.os == 'Linux' && matrix.qt_ver != 6
uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
path: PolyMC-portable.tar.gz
+ - name: Upload binary tarball (Linux, Qt 6)
+ if: runner.os == 'Linux' && matrix.qt_ver !=5
+ uses: actions/upload-artifact@v3
+ with:
+ name: PolyMC-${{ runner.os }}-Qt6-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PolyMC.tar.gz
+
+ - name: Upload binary tarball (Linux, portable, Qt 6)
+ if: runner.os == 'Linux' && matrix.qt_ver != 5
+ uses: actions/upload-artifact@v3
+ with:
+ name: PolyMC-${{ runner.os }}-Qt6-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PolyMC-portable.tar.gz
+
- name: Upload AppImage (Linux)
- if: runner.os == 'Linux' && matrix.appimage == true
+ if: runner.os == 'Linux' && matrix.qt_ver != 5
uses: actions/upload-artifact@v3
with:
name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml
index 2dbd5cd4..45ef7281 100644
--- a/.github/workflows/trigger_release.yml
+++ b/.github/workflows/trigger_release.yml
@@ -12,6 +12,8 @@ jobs:
uses: ./.github/workflows/build.yml
with:
build_type: Release
+ secrets:
+ SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
create_release:
needs: build_release
@@ -33,6 +35,8 @@ jobs:
- name: Package artifacts properly
run: |
mv ${{ github.workspace }}/PolyMC-source PolyMC-${{ env.VERSION }}
+ mv PolyMC-Linux-Qt6-Portable*/PolyMC-portable.tar.gz PolyMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
+ mv PolyMC-Linux-Qt6*/PolyMC.tar.gz PolyMC-Linux-Qt6-${{ env.VERSION }}.tar.gz
mv PolyMC-Linux-Portable*/PolyMC-portable.tar.gz PolyMC-Linux-Portable-${{ env.VERSION }}.tar.gz
mv PolyMC-Linux*/PolyMC.tar.gz PolyMC-Linux-${{ env.VERSION }}.tar.gz
mv PolyMC-*.AppImage/PolyMC-*.AppImage PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
@@ -67,11 +71,13 @@ jobs:
PolyMC-Linux-${{ env.VERSION }}.tar.gz
PolyMC-Linux-Portable-${{ env.VERSION }}.tar.gz
PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
- PolyMC-Windows-i686-${{ env.VERSION }}.zip
- PolyMC-Windows-i686-Portable-${{ env.VERSION }}.zip
- PolyMC-Windows-i686-Setup-${{ env.VERSION }}.exe
- PolyMC-Windows-x86_64-${{ env.VERSION }}.zip
- PolyMC-Windows-x86_64-Portable-${{ env.VERSION }}.zip
- PolyMC-Windows-x86_64-Setup-${{ env.VERSION }}.exe
+ PolyMC-Windows-Legacy-${{ env.VERSION }}.zip
+ PolyMC-Linux-Qt6-${{ env.VERSION }}.tar.gz
+ PolyMC-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
+ PolyMC-Windows-Legacy-Portable-${{ env.VERSION }}.zip
+ PolyMC-Windows-Legacy-Setup-${{ env.VERSION }}.exe
+ PolyMC-Windows-${{ env.VERSION }}.zip
+ PolyMC-Windows-Portable-${{ env.VERSION }}.zip
+ PolyMC-Windows-Setup-${{ env.VERSION }}.exe
PolyMC-macOS-${{ env.VERSION }}.tar.gz
PolyMC-${{ env.VERSION }}.tar.gz
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc9cdd31..33c53b82 100644
--- a/CMakeLists.txt
+++ b/CMakeLi