aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/codeql/codeql-config.yml3
-rw-r--r--.github/workflows/build.yml88
-rw-r--r--.github/workflows/trigger_release.yml54
-rw-r--r--.github/workflows/winget.yml4
-rw-r--r--.gitmodules9
-rw-r--r--BUILD.md52
-rw-r--r--CMakeLists.txt49
-rw-r--r--CODE_OF_CONDUCT.md2
-rw-r--r--COPYING.md102
-rw-r--r--README.md97
-rw-r--r--buildconfig/BuildConfig.h4
-rw-r--r--flake.lock16
-rw-r--r--flake.nix8
-rw-r--r--launcher/Application.cpp16
-rw-r--r--launcher/BaseInstance.cpp7
-rw-r--r--launcher/BaseInstance.h8
-rw-r--r--launcher/CMakeLists.txt5
-rw-r--r--launcher/FileSystem.cpp33
-rw-r--r--launcher/LaunchController.cpp6
-rw-r--r--launcher/NullInstance.h39
-rw-r--r--launcher/RuntimeContext.h88
-rw-r--r--launcher/UpdateController.cpp6
-rw-r--r--launcher/java/JavaUtils.cpp4
-rw-r--r--launcher/launch/steps/CheckJava.cpp20
-rw-r--r--launcher/main.cpp2
-rw-r--r--launcher/minecraft/Component.cpp37
-rw-r--r--launcher/minecraft/LaunchProfile.cpp24
-rw-r--r--launcher/minecraft/LaunchProfile.h8
-rw-r--r--launcher/minecraft/Library.cpp84
-rw-r--r--launcher/minecraft/Library.h68
-rw-r--r--launcher/minecraft/MinecraftInstance.cpp30
-rw-r--r--launcher/minecraft/MinecraftInstance.h37
-rw-r--r--launcher/minecraft/MojangVersionFormat.cpp11
-rw-r--r--launcher/minecraft/OpSys.cpp46
-rw-r--r--launcher/minecraft/OpSys.h38
-rw-r--r--launcher/minecraft/PackProfile.cpp7
-rw-r--r--launcher/minecraft/PackProfile.h43
-rw-r--r--launcher/minecraft/Rule.cpp46
-rw-r--r--launcher/minecraft/Rule.h60
-rw-r--r--launcher/minecraft/VersionFile.cpp8
-rw-r--r--launcher/minecraft/VersionFile.h33
-rw-r--r--launcher/minecraft/auth/AccountList.h2
-rw-r--r--launcher/minecraft/auth/MinecraftAccount.h2
-rw-r--r--launcher/minecraft/launch/LauncherPartLaunch.cpp2
-rw-r--r--launcher/minecraft/launch/MinecraftServerTarget.cpp2
-rw-r--r--launcher/minecraft/launch/ModMinecraftJar.cpp43
-rw-r--r--launcher/minecraft/launch/ScanModFolders.cpp41
-rw-r--r--launcher/minecraft/update/FoldersTask.cpp35
-rw-r--r--launcher/minecraft/update/LibrariesTask.cpp2
-rw-r--r--launcher/modplatform/flame/FileResolvingTask.cpp5
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.cpp41
-rw-r--r--launcher/modplatform/modpacksch/FTBPackInstallTask.cpp151
-rw-r--r--launcher/modplatform/modpacksch/FTBPackInstallTask.h7
-rw-r--r--launcher/net/HttpMetaCache.cpp12
-rw-r--r--launcher/net/HttpMetaCache.h1
-rw-r--r--launcher/resources/OSX/scalable/launcher.svg66
-rw-r--r--launcher/resources/flat/scalable/launcher.svg66
-rw-r--r--launcher/resources/iOS/scalable/launcher.svg66
-rw-r--r--launcher/resources/multimc/multimc.qrc2
-rw-r--r--launcher/resources/multimc/scalable/instances/polymc.svg21
-rw-r--r--launcher/resources/multimc/scalable/instances/prismlauncher.svg18
-rw-r--r--launcher/resources/multimc/scalable/launcher.svg66
-rw-r--r--launcher/resources/pe_blue/scalable/launcher.svg66
-rw-r--r--launcher/resources/pe_colored/scalable/launcher.svg66
-rw-r--r--launcher/resources/pe_dark/scalable/launcher.svg66
-rw-r--r--launcher/resources/pe_light/scalable/launcher.svg66
-rw-r--r--launcher/settings/INISettingsObject.cpp25
-rw-r--r--launcher/settings/INISettingsObject.h5
-rw-r--r--launcher/settings/Setting.h2
-rw-r--r--launcher/ui/MainWindow.cpp171
-rw-r--r--launcher/ui/MainWindow.h14
-rw-r--r--launcher/ui/dialogs/AboutDialog.cpp29
-rw-r--r--launcher/ui/dialogs/NewInstanceDialog.cpp8
-rw-r--r--launcher/ui/dialogs/ProgressDialog.cpp5
-rw-r--r--launcher/ui/dialogs/UpdateDialog.cpp8
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp2
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp2
-rw-r--r--launcher/ui/pages/global/LauncherPage.ui2
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.cpp4
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp3
-rw-r--r--launcher/ui/pages/instance/LogPage.cpp6
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp4
-rw-r--r--launcher/ui/pages/modplatform/ImportPage.ui2
-rw-r--r--launcher/ui/pages/modplatform/ModModel.cpp2
-rw-r--r--launcher/ui/pages/modplatform/ModPage.cpp4
-rw-r--r--launcher/ui/pages/modplatform/ModPage.h1
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.cpp5
-rw-r--r--launcher/ui/pages/modplatform/flame/FlameModPage.h1
-rw-r--r--launcher/ui/pages/modplatform/flame/FlamePage.ui2
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbListModel.cpp11
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbListModel.h6
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.cpp8
-rw-r--r--launcher/ui/pages/modplatform/ftb/FtbPage.h1
-rw-r--r--launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp2
-rw-r--r--launcher/ui/setupwizard/LanguageWizardPage.cpp2
-rw-r--r--launcher/ui/setupwizard/SetupWizard.cpp2
-rw-r--r--launcher/ui/themes/BrightTheme.cpp26
-rw-r--r--launcher/ui/themes/DarkTheme.cpp14
-rw-r--r--launcher/ui/widgets/JavaSettingsWidget.cpp2
-rw-r--r--launcher/updater/DownloadTask.h2
-rw-r--r--launcher/updater/GoUpdate.cpp2
-rw-r--r--lgtm.yml2
-rw-r--r--libraries/README.md16
-rw-r--r--libraries/classparser/CMakeLists.txt42
-rw-r--r--libraries/classparser/include/classparser.h27
-rw-r--r--libraries/classparser/include/classparser_config.h22
-rw-r--r--libraries/classparser/src/annotations.cpp85
-rw-r--r--libraries/classparser/src/annotations.h278
-rw-r--r--libraries/classparser/src/classfile.h156
-rw-r--r--libraries/classparser/src/classparser.cpp83
-rw-r--r--libraries/classparser/src/constants.h232
-rw-r--r--libraries/classparser/src/errors.h8
-rw-r--r--libraries/classparser/src/javaendian.h59
-rw-r--r--libraries/classparser/src/membuffer.h63
m---------libraries/filesystem0
-rw-r--r--libraries/katabasis/README.md2
-rw-r--r--libraries/launcher/CMakeLists.txt20
-rw-r--r--libraries/launcher/org/prismlauncher/EntryPoint.java (renamed from libraries/launcher/org/polymc/EntryPoint.java)6
-rw-r--r--libraries/launcher/org/prismlauncher/Launcher.java (renamed from libraries/launcher/org/polymc/Launcher.java)2
-rw-r--r--libraries/launcher/org/prismlauncher/LauncherFactory.java (renamed from libraries/launcher/org/polymc/LauncherFactory.java)6
-rw-r--r--libraries/launcher/org/prismlauncher/applet/LegacyFrame.java (renamed from libraries/launcher/org/polymc/applet/LegacyFrame.java)2
-rw-r--r--libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java (renamed from libraries/launcher/org/polymc/exception/ParameterNotFoundException.java)2
-rw-r--r--libraries/launcher/org/prismlauncher/exception/ParseException.java (renamed from libraries/launcher/org/polymc/exception/ParseException.java)2
-rw-r--r--libraries/launcher/org/prismlauncher/impl/OneSixLauncher.java (renamed from libraries/launcher/org/polymc/impl/OneSixLauncher.java)10
-rw-r--r--libraries/launcher/org/prismlauncher/utils/Parameters.java (renamed from libraries/launcher/org/polymc/utils/Parameters.java)4
-rw-r--r--libraries/launcher/org/prismlauncher/utils/Utils.java (renamed from libraries/launcher/org/polymc/utils/Utils.java)2
-rw-r--r--libraries/systeminfo/include/sys.h4
-rw-r--r--libraries/systeminfo/src/sys_apple.cpp12
-rw-r--r--libraries/systeminfo/src/sys_unix.cpp11
-rw-r--r--libraries/systeminfo/src/sys_win32.cpp22
-rw-r--r--libraries/xz-embedded/CMakeLists.txt26
-rw-r--r--libraries/xz-embedded/include/xz.h321
-rw-r--r--libraries/xz-embedded/src/xz_config.h119
-rw-r--r--libraries/xz-embedded/src/xz_crc32.c61
-rw-r--r--libraries/xz-embedded/src/xz_crc64.c52
-rw-r--r--libraries/xz-embedded/src/xz_dec_bcj.c588
-rw-r--r--libraries/xz-embedded/src/xz_dec_lzma2.c1231
-rw-r--r--libraries/xz-embedded/src/xz_dec_stream.c860
-rw-r--r--libraries/xz-embedded/src/xz_lzma2.h204
-rw-r--r--libraries/xz-embedded/src/xz_private.h150
-rw-r--r--libraries/xz-embedded/src/xz_stream.h62
-rw-r--r--libraries/xz-embedded/xzminidec.c144
-rw-r--r--nix/NIX.md16
-rw-r--r--nix/default.nix17
-rw-r--r--program_info/CMakeLists.txt44
-rw-r--r--program_info/README.md4
-rwxr-xr-xprogram_info/genicons.sh48
-rw-r--r--program_info/org.polymc.PolyMC.Source.svg261
-rw-r--r--program_info/org.polymc.PolyMC.bigsur.svg174
-rw-r--r--program_info/org.polymc.PolyMC.svg21
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.Social.svg60
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.Source.svg203
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.bigsur.svg272
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.desktop.in (renamed from program_info/org.polymc.PolyMC.desktop.in)6
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.logo-darkmode.svg212
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.logo.source.svg256
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.logo.svg72
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in (renamed from program_info/org.polymc.PolyMC.metainfo.xml.in)30
-rw-r--r--program_info/org.prismlauncher.PrismLauncher.svg57
-rw-r--r--program_info/polymc-header-black.svg23
-rw-r--r--program_info/polymc-header.Source.svg139
-rw-r--r--program_info/polymc-header.svg23
-rw-r--r--program_info/polymc.icnsbin518794 -> 0 bytes
-rw-r--r--program_info/polymc.icobin102134 -> 0 bytes
-rw-r--r--program_info/prismlauncher-monochrome.Source.svg207
-rw-r--r--program_info/prismlauncher.6.scd (renamed from program_info/polymc.6.scd)22
-rw-r--r--program_info/prismlauncher.icnsbin0 -> 400974 bytes
-rw-r--r--program_info/prismlauncher.icobin0 -> 102134 bytes
-rw-r--r--program_info/prismlauncher.manifest.in (renamed from program_info/polymc.manifest.in)2
-rw-r--r--program_info/prismlauncher.qrc (renamed from program_info/polymc.qrc)2
-rw-r--r--program_info/prismlauncher.rc.in (renamed from program_info/polymc.rc.in)10
-rw-r--r--tests/FileSystem_test.cpp36
-rw-r--r--tests/Library_test.cpp121
-rw-r--r--tests/testdata/FileSystem/test_folder/.secret_folder/.secret_file.txt1
174 files changed, 3204 insertions, 6735 deletions
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 00000000..70acfdfd
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,3 @@
+query-filters:
+ - exclude:
+ id: cpp/fixme-comment
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ae8947ab..04c34754 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -39,12 +39,21 @@ jobs:
qt_ver: 6
- os: macos-12
+ name: macOS
macosx_deployment_target: 10.15
qt_ver: 6
qt_host: mac
qt_version: '6.3.0'
qt_modules: 'qt5compat qtimageformats'
+ - os: macos-12
+ name: macOS-Legacy
+ macosx_deployment_target: 10.13
+ qt_ver: 5
+ qt_host: mac
+ qt_version: '5.15.2'
+ qt_modules: ''
+
runs-on: ${{ matrix.os }}
env:
@@ -64,6 +73,14 @@ jobs:
with:
submodules: 'true'
+ - name: Initialize CodeQL
+ if: runner.os == 'Linux' && matrix.qt_ver == 6
+ uses: github/codeql-action/init@v2
+ with:
+ config-file: ./.github/codeql/codeql-config.yml
+ queries: security-and-quality
+ languages: cpp, java
+
- name: 'Setup MSYS2'
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
@@ -140,7 +157,7 @@ jobs:
sudo apt-get -y install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5
- name: Install Qt (macOS and AppImage)
- if: matrix.qt_ver == 6 && runner.os != 'Windows'
+ if: runner.os == 'Linux' && matrix.qt_ver == 6 || runner.os == 'macOS'
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
@@ -164,9 +181,14 @@ jobs:
##
- name: Configure CMake (macOS)
- if: runner.os == 'macOS'
+ if: runner.os == 'macOS' && matrix.qt_ver == 6
run: |
- cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DLauncher_BUILD_PLATFORM=macOS -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -G Ninja
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -G Ninja
+
+ - name: Configure CMake (macOS-Legacy)
+ if: runner.os == 'macOS' && matrix.qt_ver == 5
+ run: |
+ cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DLauncher_QT_VERSION_MAJOR=${{ matrix.qt_ver }} -DMACOSX_SPARKLE_UPDATE_PUBLIC_KEY="" -DMACOSX_SPARKLE_UPDATE_FEED_URL="" -G Ninja
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
@@ -210,6 +232,14 @@ jobs:
ctest --test-dir build --output-on-failure
##
+ # CODE SCAN
+ ##
+
+ - name: Perform CodeQL Analysis
+ if: runner.os == 'Linux' && matrix.qt_ver == 6
+ uses: github/codeql-action/analyze@v2
+
+ ##
# PACKAGE BUILDS
##
@@ -219,17 +249,17 @@ jobs:
cmake --install ${{ env.BUILD_DIR }}
cd ${{ env.INSTALL_DIR }}
- chmod +x "PolyMC.app/Contents/MacOS/polymc"
- sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PolyMC.app/Contents/MacOS/polymc"
- tar -czf ../PolyMC.tar.gz *
+ chmod +x "PrismLauncher.app/Contents/MacOS/prismlauncher"
+ sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PrismLauncher.app/Contents/MacOS/prismlauncher"
+ tar -czf ../PrismLauncher.tar.gz *
- name: Make Sparkle signature (macOS)
- if: runner.os == 'macOS'
+ if: matrix.name == 'macOS'
run: |
if [ '${{ secrets.SPARKLE_ED25519_KEY }}' != '' ]; then
brew install openssl@3
echo '${{ secrets.SPARKLE_ED25519_KEY }}' > ed25519-priv.pem
- signature=$(/usr/local/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PolyMC.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
+ signature=$(/usr/local/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PrismLauncher.tar.gz -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
rm ed25519-priv.pem
cat >> $GITHUB_STEP_SUMMARY << EOF
### Artifact Information :information_source:
@@ -273,7 +303,7 @@ jobs:
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }}
cd ${{ env.INSTALL_DIR }}
- tar --owner root --group root -czf ../PolyMC.tar.gz *
+ tar --owner root --group root -czf ../PrismLauncher.tar.gz *
- name: Package (Linux, portable)
if: runner.os == 'Linux'
@@ -282,7 +312,7 @@ jobs:
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable
cd ${{ env.INSTALL_PORTABLE_DIR }}
- tar -czf ../PolyMC-portable.tar.gz *
+ tar -czf ../PrismLauncher-portable.tar.gz *
- name: Package AppImage (Linux)
if: runner.os == 'Linux' && matrix.qt_ver != 5
@@ -290,7 +320,7 @@ jobs:
run: |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr
- export OUTPUT="PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
+ export OUTPUT="PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage"
chmod +x linuxdeploy-*.AppImage
@@ -301,7 +331,7 @@ jobs:
cp -r ${{ github.workspace }}/JREs/jre17/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk
- cp -r /home/runner/work/PolyMC/Qt/${{ matrix.qt_version }}/gcc_64/plugins/iconengines/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
+ cp -r /home/runner/work/PrismLauncher/Qt/${{ matrix.qt_version }}/gcc_64/plugins/iconengines/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/plugins/iconengines
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}//usr/lib/
@@ -313,7 +343,7 @@ jobs:
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib/jvm/java-17-openjdk/lib"
export LD_LIBRARY_PATH
- ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_APPIMAGE_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_APPIMAGE_DIR }}/usr/share/icons/hicolor/scalable/apps/org.polymc.PolyMC.svg
+ ./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_APPIMAGE_DIR }} --output appimage --plugin qt -i ${{ env.INSTALL_APPIMAGE_DIR }}/usr/share/icons/hicolor/scalable/apps/org.prismlauncher.PrismLauncher.svg
##
# UPLOAD BUILDS
@@ -323,63 +353,63 @@ jobs:
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
- name: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
- path: PolyMC.tar.gz
+ name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher.tar.gz
- name: Upload binary zip (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
- name: PolyMC-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
+ name: PrismLauncher-${{ matrix.name }}-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_DIR }}/**
- name: Upload binary zip (Windows, portable)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
- name: PolyMC-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
+ name: PrismLauncher-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_PORTABLE_DIR }}/**
- name: Upload installer (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
- name: PolyMC-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
- path: PolyMC-Setup.exe
+ name: PrismLauncher-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher-Setup.exe
- 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: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher.tar.gz
- 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: PrismLauncher-${{ runner.os }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher-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: PrismLauncher-${{ runner.os }}-Qt6-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher.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: PrismLauncher-${{ runner.os }}-Qt6-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
+ path: PrismLauncher-portable.tar.gz
- name: Upload AppImage (Linux)
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
- path: PolyMC-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
+ name: PrismLauncher-${{ runner.os }}-${{ env.VERSION }}-${{ inputs.build_type }}-x86_64.AppImage
+ path: PrismLauncher-${{ 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 45ef7281..476280df 100644
--- a/.github/workflows/trigger_release.yml
+++ b/.github/workflows/trigger_release.yml
@@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: 'true'
- path: 'PolyMC-source'
+ path: 'PrismLauncher-source'
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Grab and store version
@@ -34,25 +34,26 @@ jobs:
echo "VERSION=$tag_name" >> $GITHUB_ENV
- 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
- mv PolyMC-macOS*/PolyMC.tar.gz PolyMC-macOS-${{ env.VERSION }}.tar.gz
+ mv ${{ github.workspace }}/PrismLauncher-source PrismLauncher-${{ env.VERSION }}
+ mv PrismLauncher-Linux-Qt6-Portable*/PrismLauncher-portable.tar.gz PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
+ mv PrismLauncher-Linux-Qt6*/PrismLauncher.tar.gz PrismLauncher-Linux-Qt6-${{ env.VERSION }}.tar.gz
+ mv PrismLauncher-Linux-Portable*/PrismLauncher-portable.tar.gz PrismLauncher-Linux-Portable-${{ env.VERSION }}.tar.gz
+ mv PrismLauncher-Linux*/PrismLauncher.tar.gz PrismLauncher-Linux-${{ env.VERSION }}.tar.gz
+ mv PrismLauncher-*.AppImage/PrismLauncher-*.AppImage PrismLauncher-Linux-${{ env.VERSION }}-x86_64.AppImage
+ mv PrismLauncher-macOS-Legacy*/PrismLauncher.tar.gz PrismLauncher-macOS-Legacy-${{ env.VERSION }}.tar.gz
+ mv PrismLauncher-macOS*/PrismLauncher.tar.gz PrismLauncher-macOS-${{ env.VERSION }}.tar.gz
- tar -czf PolyMC-${{ env.VERSION }}.tar.gz PolyMC-${{ env.VERSION }}
+ tar -czf PrismLauncher-${{ env.VERSION }}.tar.gz PrismLauncher-${{ env.VERSION }}
- for d in PolyMC-Windows-*; do
+ for d in PrismLauncher-Windows-*; do
cd "${d}" || continue
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
- NAME="PolyMC-Windows"
+ NAME="PrismLauncher-Windows"
test -z "${LEGACY}" || NAME="${NAME}-Legacy"
test -z "${PORT}" || NAME="${NAME}-Portable"
- test -z "${INST}" || mv PolyMC-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
+ test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe
test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" *
cd ..
done
@@ -64,20 +65,21 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
- name: PolyMC ${{ env.VERSION }}
+ name: PrismLauncher ${{ env.VERSION }}
draft: true
prerelease: false
files: |
- PolyMC-Linux-${{ env.VERSION }}.tar.gz
- PolyMC-Linux-Portable-${{ env.VERSION }}.tar.gz
- PolyMC-Linux-${{ env.VERSION }}-x86_64.AppImage
- 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
+ PrismLauncher-Linux-${{ env.VERSION }}.tar.gz
+ PrismLauncher-Linux-Portable-${{ env.VERSION }}.tar.gz
+ PrismLauncher-Linux-${{ env.VERSION }}-x86_64.AppImage
+ PrismLauncher-Windows-Legacy-${{ env.VERSION }}.zip
+ PrismLauncher-Linux-Qt6-${{ env.VERSION }}.tar.gz
+ PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz
+ PrismLauncher-Windows-Legacy-Portable-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-Legacy-Setup-${{ env.VERSION }}.exe
+ PrismLauncher-Windows-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-Portable-${{ env.VERSION }}.zip
+ PrismLauncher-Windows-Setup-${{ env.VERSION }}.exe
+ PrismLauncher-macOS-${{ env.VERSION }}.tar.gz
+ PrismLauncher-macOS-Legacy-${{ env.VERSION }}.tar.gz
+ PrismLauncher-${{ env.VERSION }}.tar.gz
diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml
index d3f787b6..5c34040f 100644
--- a/.github/workflows/winget.yml
+++ b/.github/workflows/winget.yml
@@ -9,7 +9,7 @@ jobs:
steps:
- uses: vedantmgoyal2009/winget-releaser@v1
with:
- identifier: PolyMC.PolyMC
+ identifier: PrismLauncher.PrismLauncher
version: ${{ github.event.release.tag_name }}
- installers-regex: 'PolyMC-Windows-Setup-.+\.exe$'
+ installers-regex: 'PrismLauncher-Windows-Setup-.+\.exe$'
token: ${{ secrets.WINGET_TOKEN }}
diff --git a/.gitmodules b/.gitmodules
index 534ffd37..8d034354 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +1,12 @@
-[submodule "depends/libnbtplusplus"]
- path = libraries/libnbtplusplus
- url = https://github.com/PolyMC/libnbtplusplus.git
[submodule "libraries/quazip"]
path = libraries/quazip
url = https://github.com/stachenov/quazip.git
[submodule "libraries/tomlplusplus"]
path = libraries/tomlplusplus
url = https://github.com/marzer/tomlplusplus.git
+[submodule "libraries/filesystem"]
+ path = libraries/filesystem
+ url = https://github.com/gulrak/filesystem
+[submodule "libraries/libnbtplusplus"]
+ path = libraries/libnbtplusplus
+ url = https://github.com/PrismLauncher/libnbtplusplus.git
diff --git a/BUILD.md b/BUILD.md
index 8a76b68b..2443ac56 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -1,5 +1,53 @@
# Build Instructions
-Build instructions are available on [the website](https://polymc.org/wiki/development/build-instructions/).
+Full build instructions will be available on [the website](https://prismlauncher.org/wiki/development/build-instructions/).
+
+If you would like to contribute or fix an issue with the Build instructions you will be able to do so [here](https://github.com/PrismLauncher/website/blob/master/src/wiki/development/build-instructions.md).
+
+## Getting the source
+
+Clone the source code using git, and grab all the submodules. This is generic for all platforms you want to build on.
+```
+git clone --recursive https://github.com/PrismLauncher/PrismLauncher
+cd PrismLauncher
+```
+
+## Linux
+
+This guide will mostly mention dependant packages by their Debian naming and commands are done by a user in the sudoers file.
+### Dependencies
+
+- A C++ compiler capable of building C++17 code (can be found in the package `build-essential`).
+- Qt Development tools 5.12 or newer (on Debian 11 or Debian-based distributions, `qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5`).
+- `cmake` 3.15 or newer.
+- `extra-cmake-modules`.
+- zlib (`zlib1g-dev` on Debian 11 or Debian-based distributions).
+- Java Development Kit (Java JDK) (`openjdk-17-jdk` on Debian 11 or Debian-based distributions).
+- Mesa GL headers (`libgl1-mesa-dev` on Debian 11 or Debian-based distributions).
+- (Optional) `scdoc` to generate man pages.
+
+In conclusion, to check if all you need is installed (including optional):
+
+```
+sudo apt install build-essential qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5 cmake extra-cmake-modules zlib1g-dev openjdk-17-jdk libgl1-mesa-dev scdoc
+```
+
+### Compiling
+#### Building and installing on the system
+This is usually the suggested way to build the client.
+
+```
+cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr" -DENABLE_LTO=ON
+cmake --build build -j$(nproc)
+sudo cmake --install build
+```
+
+#### Building a portable binary
+
+```
+cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install
+cmake --build build -j$(nproc)
+cmake --install build
+cmake --install build --component portable
+```
-If you would like to contribute or fix an issue with the Build instructions you can do so [here](https://github.com/PolyMC/polymc.github.io/blob/master/src/wiki/development/build-instructions.md).
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 46192414..a3b74a73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,9 +33,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD 11)
include(GenerateExportHeader)
set(CMAKE_CXX_FLAGS "-Wall -pedantic -fstack-protector-strong --param=ssp-buffer-size=4 ${CMAKE_CXX_FLAGS}")
-if(UNIX AND APPLE)
- set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
-endif()
# Fix build with Qt 5.13
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_DEPRECATED_WARNINGS=Y")
@@ -74,9 +71,9 @@ endif()
##################################### Set Application options #####################################
######## Set URLs ########
-set(Launcher_NEWS_RSS_URL "https://polymc.org/feed/feed.xml" CACHE STRING "URL to fetch PolyMC's news RSS feed from.")
-set(Launcher_NEWS_OPEN_URL "https://polymc.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'")
-set(Launcher_HELP_URL "https://polymc.org/wiki/help-pages/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help")
+set(Launcher_NEWS_RSS_URL "https://prismlauncher.org/feed/feed.xml" CACHE STRING "URL to fetch PrismLauncher's news RSS feed from.")
+set(Launcher_NEWS_OPEN_URL "https://prismlauncher.org/news" CACHE STRING "URL that gets opened when the user clicks 'More News'")
+set(Launcher_HELP_URL "https://prismlauncher.org/wiki/help-pages/%1" CACHE STRING "URL (with arg %1 to be substituted with page-id) that gets opened when the user requests help")
######## Set version numbers ########
set(Launcher_VERSION_MAJOR 5)
@@ -93,25 +90,25 @@ set(Launcher_BUILD_PLATFORM "" CACHE STRING "A short string identifying the plat
set(Launcher_UPDATER_BASE "" CACHE STRING "Base URL for the updater.")
# The metadata server
-set(Launcher_META_URL "https://meta.polymc.org/v1/" CACHE STRING "URL to fetch Launcher's meta files from.")
+set(Launcher_META_URL "https://meta.prismlauncher.org/v1/" CACHE STRING "URL to fetch Launcher's meta files from.")
# Imgur API Client ID
set(Launcher_IMGUR_CLIENT_ID "5b97b0713fba4a3" CACHE STRING "Client ID you can get from Imgur when you register an application")
# Bug tracker URL
-set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STRING "URL for the bug tracker.")
+set(Launcher_BUG_TRACKER_URL "https://github.com/PrismLauncher/PrismLauncher/issues" CACHE STRING "URL for the bug tracker.")
# Translations Platform URL
-set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.")
+set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/prismlauncher/launcher/" CACHE STRING "URL for the translations platform.")
# Matrix Space
-set(Launcher_MATRIX_URL "https://matrix.to/#/#polymc:matrix.org" CACHE STRING "URL to the Matrix Space")
+set(Launcher_MATRIX_URL "https://matrix.to/#/#prismlauncher:matrix.org" CACHE STRING "URL to the Matrix Space")
# Discord URL
-set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.")
+set(Launcher_DISCORD_URL "https://discord.gg/prismlauncher" CACHE STRING "URL for the Discord guild.")
# Subreddit URL
-set(Launcher_SUBREDDIT_URL "https://www.reddit.com/r/PolyMCLauncher/" CACHE STRING "URL for the subreddit.")
+set(Launcher_SUBREDDIT_URL "https://www.reddit.com/r/PrismLauncher/" CACHE STRING "URL for the subreddit.")
# Builds
set(Launcher_FORCE_BUNDLED_LIBS OFF CACHE BOOL "Prevent using system libraries, if they are available as submodules")
@@ -126,12 +123,13 @@ set(Launcher_QT_VERSION_MAJOR "5" CACHE STRING "Major Qt version to build agains
# By using this key in your builds you accept the terms of use laid down in
# https://docs.microsoft.com/en-us/legal/microsoft-identity-platform/terms-of-use
-set(Launcher_MSA_CLIENT_ID "549033b2-1532-4d4e-ae77-1bbaa46f9d74" CACHE STRING "Client ID you can get from Microsoft Identity Platform when you register an application")
+set(Launcher_MSA_CLIENT_ID "c36a9fb6-4f2a-41ff-90bd-ae7cc92031eb" CACHE STRING "Client ID you can get from Microsoft Identity Platform when you register an application")
# By using this key in your builds you accept the terms and conditions laid down in
# https://support.curseforge.com/en/support/solutions/articles/9000207405-curse-forge-3rd-party-api-terms-and-conditions
# NOTE: CurseForge requires you to change this if you make any kind of derivative work.
-set(Launcher_CURSEFORGE_API_KEY "$2a$10$1Oqr2MX3O4n/ilhFGc597u8tfI3L2Hyr9/rtWDAMRjghSQV2QUuxq" CACHE STRING "API key for the CurseForge platform")
+# This key was issued specifically for Prism Launcher
+set(Launcher_CURSEFORGE_API_KEY "$2a$10$wuAJuNZuted3NORVmpgUC.m8sI.pv1tOPKZyBgLFGjxFp/br0lZCC" CACHE STRING "API key for the CurseForge platform")
#### Check the current Git commit and branch
@@ -192,14 +190,17 @@ if (Qt5_POSITION_INDEPENDENT_CODE)
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
-# Find toml++
if(NOT Launcher_FORCE_BUNDLED_LIBS)
+ # Find toml++
find_package(tomlplusplus 3.2.0 QUIET)
+
+ # Find ghc_filesystem
+ find_package(ghc_filesystem QUIET)
endif()
####################################### Program Info #######################################
-set(Launcher_APP_BINARY_NAME "polymc" CACHE STRING "Name of the Launcher binary")
+set(Launcher_APP_BINARY_NAME "prismlauncher" CACHE STRING "Name of the Launcher binary")
add_subdirectory(program_info)
####################################### Install layout #######################################
@@ -223,14 +224,14 @@ if(UNIX AND APPLE)
# Mac bundle settings
set(MACOSX_BUNDLE_BUNDLE_NAME "${Launcher_Name}")
set(MACOSX_BUNDLE_INFO_STRING "${Launcher_Name}: A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.")
- set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.polymc.${Launcher_Name}")
+ set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.prismlauncher.${Launcher_Name}")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${Launcher_VERSION_NAME}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${Launcher_VERSION_NAME}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${Launcher_VERSION_NAME}")
set(MACOSX_BUNDLE_ICON_FILE ${Launcher_Name}.icns)
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2021-2022 ${Launcher_Copyright}")
- set(MACOSX_SPARKLE_UPDATE_PUBLIC_KEY "idALcUIazingvKSSsEa9U7coDVxZVx/ORpOEE/QtJfg=")
- set(MACOSX_SPARKLE_UPDATE_FEED_URL "https://polymc.org/feed/appcast.xml")
+ set(MACOSX_SPARKLE_UPDATE_PUBLIC_KEY "v55ZWWD6QlPoXGV6VLzOTZxZUggWeE51X8cRQyQh6vA=")
+ set(MACOSX_SPARKLE_UPDATE_FEED_URL "https://prismlauncher.org/feed/appcast.xml")
set(MACOSX_SPARKLE_DOWNLOAD_URL "https://github.com/sparkle-project/Sparkle/releases/download/2.1.0/Sparkle-2.1.0.tar.xz" CACHE STRING "URL to Sparkle release archive")
set(MACOSX_SPARKLE_SHA256 "bf6ac1caa9f8d321d5784859c88da874f28412f37fb327bc21b7b14c5d61ef94" CACHE STRING "SHA256 checksum for Sparkle release archive")
@@ -305,7 +306,6 @@ add_subdirectory(libraries/systeminfo) # system information library
add_subdirectory(libraries/hoedown) # markdown parser
add_subdirectory(libraries/launcher) # java based launcher part for Minecraft
add_subdirectory(libraries/javacheck) # java compatibility checker
-add_subdirectory(libraries/xz-embedded) # xz compression
if (FORCE_BUNDLED_QUAZIP)
message(STATUS "Using bundled QuaZip")
set(BUILD_SHARED_LIBS 0) # link statically to avoid conflicts.
@@ -316,7 +316,6 @@ else()
endif()
add_subdirectory(libraries/rainbow) # Qt extension for colors
add_subdirectory(libraries/LocalPeer) # fork of a library from Qt solutions
-add_subdirectory(libraries/classparser) # class parser library
if(NOT tomlplusplus_FOUND)
message(STATUS "Using bundled tomlplusplus")
add_subdirectory(libraries/tomlplusplus) # toml parser
@@ -326,6 +325,14 @@ endif()
add_subdirectory(libraries/katabasis) # An OAuth2 library that tried to do too much
add_subdirectory(libraries/gamemode)
add_subdirectory(libraries/murmur2) # Hash for usage with the CurseForge API
+if (NOT ghc_filesystem_FOUND)
+ message(STATUS "Using bundled ghc_filesystem")
+ set(GHC_FILESYSTEM_WITH_INSTALL OFF) # Workaround ghc::filesystem bug
+ add_subdirectory(libraries/filesystem) # Implementation of std::filesystem for old C++, for usage in old macOS
+ add_library(ghcFilesystem::ghc_filesystem ALIAS ghc_filesystem)
+else()
+ message(STATUS "Using system ghc_filesystem")
+endif()
############################### Built Artifacts ###############################
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 7bbd01da..defa2170 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -63,7 +63,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement via email at
-[polymc-enforcement@scrumplex.net](mailto:polymc-enforcement@scrumplex.net) (Email
+[coc@scrumplex.net](mailto:coc@scrumplex.net) (Email
address subject to change).
All complaints will be reviewed and investigated promptly and fairly.
diff --git a/COPYING.md b/COPYING.md
index 11c1fc3a..3e35c579 100644
--- a/COPYING.md
+++ b/COPYING.md
@@ -1,3 +1,37 @@
+## Prism Launcher
+
+ Prism Launcher - Minecraft Launcher
+ Copyright (C) 2022 Prism Launcher Contributors
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 3.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+ This file incorporates work covered by the following copyright and
+ permission notice:
+
+ Copyright 2013-2021 MultiMC Contributors
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
## PolyMC
PolyMC - Minecraft Launcher
@@ -191,52 +225,6 @@
See COPYING file for the full LGPL text.
-## xz-minidec
-
- XZ decompressor
-
- Authors: Lasse Collin <lasse.collin@tukaani.org>
- Igor Pavlov <http://7-zip.org/>
-
- This file has been put into the public domain.
- You can do whatever you want with this file.
-
-## ColumnResizer
-
- Copyright (c) 2011-2016 Aurélien Gâteau and contributors.
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted (subject to the limitations in the
- disclaimer below) provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the
- distribution.
-
- * The name of the contributors may not be used to endorse or
- promote products derived from this software without specific prior
- written permission.
-
- NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
- GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
- HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
## launcher (`libraries/launcher`)
PolyMC - Minecraft Launcher
@@ -388,3 +376,25 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
+
+## gulrak/filesystem
+
+ Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com>
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
diff --git a/README.md b/README.md
index 6ff868e0..47fbcc62 100644
--- a/README.md
+++ b/README.md
@@ -1,100 +1,29 @@
<p align="center">
-<img src="./program_info/polymc-header-black.svg#gh-light-mode-only" alt="PolyMC logo" width="50%"/>
-<img src="./program_info/polymc-header.svg#gh-dark-mode-only" alt="PolyMC logo" width="50%"/>
+<img src="./program_info/org.prismlauncher.PrismLauncher.logo.svg#gh-light-mode-only" alt="Prism Launcher logo" width="50%"/>
+<img src="./program_info/org.prismlauncher.PrismLauncher.logo-darkmode.svg#gh-dark-mode-only" alt="Prism Launcher logo" width="50%"/>
</p>
-PolyMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.
+Prism Launcher is a custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
-This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC.
-If you want to read about why this fork was created, check out [our FAQ page](https://polymc.org/wiki/overview/faq/).
-<br>
+We are working on a website and other media, for more info we have a [Discord server](https://discord.gg/prismlauncher).
-# Installation
+## Installation
-- All downloads and instructions for PolyMC can be found [here](https://polymc.org/download/)
-- Last build status: <https://github.com/PolyMC/PolyMC/actions>
+- All downloads and instructions for Prism Launcher will soon be available.
+- Last build status can be found [here](https://github.com/PrismLauncher/PrismLauncher/actions).
-## Development Builds
+### Development Builds
-There are per-commit development builds available [here](https://github.com/PolyMC/PolyMC/actions). These have debug information in the binaries, so their file sizes are relatively larger.
-Portable builds are provided for AppImage on Linux, Windows, and macOS.
-
-For Debian and Arch, you can use these packages for the latest development versions:
-[![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/mpr-polymc--git-orange)](https://mpr.makedeb.org/packages/polymc-git)
-For flatpak, you can use [flathub-beta](https://discourse.flathub.org/t/how-to-use-flathub-beta/2111)
-
-# Help & Support
-
-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)
-
-For people who don't want to use Discord, we have a Matrix Space which is bridged to the Discord server:
-
-[![PolyMC Space](https://img.shields.io/matrix/polymc:matrix.org?label=PolyMC%20space)](https://matrix.to/#/#polymc:matrix.org)
-
-If there are any issues with the space or you are using a client that does not support the feature here are the individual rooms:
-
-[![Development](https://img.shields.io/matrix/polymc-development:matrix.org?label=PolyMC%20Development)](https://matrix.to/#/#polymc-development:matrix.org)
-[![Discussion](https://img.shields.io/matrix/polymc-discussion:matrix.org?label=PolyMC%20Discussion)](https://matrix.to/#/#polymc-discussion:matrix.org)
-[![Github](https://img.shields.io/matrix/polymc-github:matrix.org?label=PolyMC%20Github)](https://matrix.to/#/#polymc-github:matrix.org)
-[![Maintainers](https://img.shields.io/matrix/polymc-maintainers:matrix.org?label=PolyMC%20Maintainers)](https://matrix.to/#/#polymc-maintainers:matrix.org)
-[![News](https://img.shields.io/matrix/polymc-news:matrix.org?label=PolyMC%20News)](https://matrix.to/#/#polymc-news:matrix.org)
-[![Offtopic](https://img.shields.io/matrix/polymc-offtopic:matrix.org?label=PolyMC%20Offtopic)](https://matrix.to/#/#polymc-offtopic:matrix.org)
-[![Support](https://img.shields.io/matrix/polymc-support:matrix.org?label=PolyMC%20Support)](https://matrix.to/#/#polymc-support:matrix.org)
-[![Voice](https://img.shields.io/matrix/polymc-voice:matrix.org?label=PolyMC%20Voice)](https://matrix.to/#/#polymc-voice:matrix.org)
-
-We also have a subreddit you can post your issues and suggestions on:
-
-[r/PolyMCLauncher](https://www.reddit.com/r/PolyMCLauncher/)
-
-# Development
-
-If you want to contribute to PolyMC you might find it useful to join our Discord Server or Matrix Space.
-
-## Building
+There are development builds available [here](https://github.com/PrismLauncher/PrismLauncher/actions). These have debug information in the binaries, so their file sizes are relatively larger.
-If you want to build PolyMC yourself, check [Build Instructions](https://polymc.org/wiki/development/build-instructions/) for build instructions.
-
-## Translations
-
-The translation effort for PolyMC is hosted on [Weblate](https://hosted.weblate.org/projects/polymc/polymc/) and information about translating PolyMC is available at <https://github.com/PolyMC/Translations>
-
-## Download information
-
-To modify download information or change packaging information send a pull request or issue to the website [here](https://github.com/PolyMC/polymc.github.io/tree/master/src/download).
-
-## Forking/Redistributing/Custom builds policy
-
-We don't care what you do with your fork/custom build as long as you follow the terms of the [license](LICENSE) (this is a legal responsibility), and if you made code changes rather than just packaging a custom build, please do the following as a basic courtesy:
+Portable builds are provided for AppImage on Linux, Windows, and macOS.
-- Make it clear that your fork is not PolyMC and is not endorsed by or affiliated with the PolyMC project (<https://polymc.org>).
-- Go through [CMakeLists.txt](CMakeLists.txt) and change PolyMC's API keys to your own or set them to empty strings (`""`) to disable them (this way the program will still compile but the functionality requiring those keys will be disabled).
+## Help & Support
-If you have any questions or want any clarification on the above conditions please make an issue and ask us.
-Be aware that if you build this software without removing the provided API keys in [CMakeLists.txt](CMakeLists.txt) you are accepting the following terms and conditions:
+[![Join the Discord Server](https://discordapp.com/api/guilds/1031648380885147709/widget.png?style=banner3)](https://discord.gg/hX4g537UNE)
-- [Microsoft Identity Platform Terms of Use](https://docs.microsoft.com/en-us/legal/microsoft-identity-platform/terms-of-use)
-- [CurseForge 3rd Party API Terms and Conditions](https://support.curseforge.com/en/support/solutions/articles/9000207405-curse-forge-3rd-party-api-terms-and-conditions)
-If you do not agree with these terms and conditions, then remove the associated API keys from the [CMakeLists.txt](CMakeLists.txt) file by setting them to an empty string (`""`).
+## License
All launcher code is available under the GPL-3.0-only license.
-
-The logo and related assets are under the CC BY-SA 4.0 license.
-
-## Sponsors
-
-Thank you to all our generous backers over at Open Collective! Support PolyMC by [becoming a backer](https://opencollective.com/polymc).
-
-[![OpenCollective Backers](https://opencollective.com/polymc/backers.svg?width=890&limit=1000)](https://opencollective.com/polymc#backers)
-
-Also, thanks to JetBrains for providing us a few licenses for all their products, as part of their [Open Source program](https://www.jetbrains.com/opensource/).
-
-[![JetBrains](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/opensource/)
-
-Additionally, thanks to the awesome people over at [MacStadium](https://www.macstadium.com/), for providing M1-Macs for development purposes!
-
-<a href="https://www.macstadium.com"><img src="https://uploads-ssl.webflow.com/5ac3c046c82724970fc60918/5c019d917bba312af7553b49_MacStadium-developerlogo.png" alt="Powered by MacStadium" width="300"></a>
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index de66cec4..ef384ed2 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -140,8 +140,8 @@ class Config {
QString LIBRARY_BASE = "https://libraries.minecraft.net/";
QString AUTH_BASE = "https://authserver.mojang.com/";
QString IMGUR_BASE_URL = "https://api.imgur.com/3/";
- QString FMLLIBS_BASE_URL = "https://files.polymc.org/fmllibs/";
- QString TRANSLATIONS_BASE_URL = "https://i18n.polymc.org/";
+ QString FMLLIBS_BASE_URL = "https://files.prismlauncher.org/fmllibs/"; // FIXME: move into CMakeLists
+ QString TRANSLATIONS_BASE_URL = "https://i18n.prismlauncher.org/"; // FIXME: move into CMakeLists
QString MODPACKSCH_API_BASE_URL = "https://api.modpacks.ch/";
diff --git a/flake.lock b/flake.lock
index a72286bb..7c0bb2f8 100644
--- a/flake.lock
+++ b/flake.lock
@@ -21,24 +21,24 @@
"locked": {
"lastModified": 1650031308,
"narHash": "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=",
- "owner": "PolyMC",
+ "owner": "PrismLauncher",
"repo": "libnbtplusplus",
"rev": "2203af7eeb48c45398139b583615134efd8d407f",
"type": "github"
},
"original": {
- "owner": "PolyMC",
+ "owner": "PrismLauncher",
"repo": "libnbtplusplus",
"type": "github"
}
},
"nixpkgs": {
"locked": {
- "lastModified": 1658119717,
- "narHash": "sha256-4upOZIQQ7Bc4CprqnHsKnqYfw+arJeAuU+QcpjYBXW0=",
+ "lastModified": 1666057921,
+ "narHash": "sha256-VpQqtXdj6G7cH//SvoprjR7XT3KS7p+tCVebGK1N6tE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "9eb60f25aff0d2218c848dd4574a0ab5e296cabe",
+ "rev": "88eab1e431cabd0ed621428d8b40d425a07af39f",
"type": "github"
},
"original": {
@@ -59,11 +59,11 @@
"tomlplusplus": {
"flake": false,
"locked": {
- "lastModified": 1664034574,
- "narHash": "sha256-EFMAl6tsTvkgK0DWC/pZfOIq06b2e5SnxJa1ngGRIQA=",
+ "lastModified": 1666091090,
+ "narHash": "sha256-djpMCFPvkJcfynV8WnsYdtwLq+J7jpV1iM4C6TojiyM=",
"owner": "marzer",
"repo": "tomlplusplus",
- "rev": "8aa5c8b2a4ff2c440d4630addf64fa4f62146170",
+ "rev": "1e4a3833d013aee08f58c5b31c69f709afc69f73",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index 93192725..d4a25338 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
- libnbtplusplus = { url = "github:PolyMC/libnbtplusplus"; flake = false; };
+ libnbtplusplus = { url = "github:PrismLauncher/libnbtplusplus"; flake = false; };
tomlplusplus = { url = "github:marzer/tomlplusplus"; flake = false; };
};
@@ -23,14 +23,14 @@
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
packagesFn = pkgs: rec {
- polymc = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
- polymc-qt6 = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
+ prismlauncher = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
+ prismlauncher-qt6 = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
};
in
{
packages = forAllSystems (system:
let packages = packagesFn pkgs.${system}; in
- packages // { default = packages.polymc; }
+ packages // { default = packages.prismlauncher; }
);
overlay = final: packagesFn;
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 64adc6e9..6ffec1ae 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -237,7 +237,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Commandline parsing
QCommandLineParser parser;
- parser.setApplicationDescription(BuildConfig.LAUNCHER_NAME);
+ parser.setApplicationDescription(BuildConfig.LAUNCHER_DISPLAYNAME);
parser.addOptions({
{{"d", "dir"}, "Use a custom path as application root (use '.' for current directory)", "directory"},
@@ -301,6 +301,12 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
dataPath = foo.absolutePath();
adjustedBy = "Persistent data path";
+ QDir polymcData(FS::PathCombine(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation), "PolyMC"));
+ if (polymcData.exists()) {
+ dataPath = polymcData.absolutePath();
+ adjustedBy = "PolyMC data path";
+ }
+
#ifdef Q_OS_LINUX
// TODO: this should be removed in a future version
// TODO: provide a migration path similar to macOS migration
@@ -482,7 +488,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// Initialize application settings
{
- m_settings.reset(new INISettingsObject(BuildConfig.LAUNCHER_CONFIGFILE, this));
+ // Provide a fallback for migration from PolyMC
+ m_settings.reset(new INISettingsObject({ BuildConfig.LAUNCHER_CONFIGFILE, "polymc.cfg", "multimc.cfg" }, this));
// Updates
// Multiple channels are separated by spaces
m_settings->registerSetting("UpdateChannel", BuildConfig.VERSION_CHANNEL);
@@ -860,12 +867,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << "<> Application theme set.";
}
+ updateCapabilities();
+
if(createSetupWizard())
{
return;
}
- updateCapabilities();
performMainStartupAction();
}
@@ -1157,7 +1165,7 @@ void Application::setIconTheme(const QString& name)
QIcon Application::getThemedIcon(const QString& name)
{
if(name == "logo") {
- return QIcon(":/org.polymc.PolyMC.svg");
+ return QIcon(":/org.prismlauncher.PrismLauncher.svg"); // FIXME: Make this a BuildConfig variable
}
return QIcon::fromTheme(name);
}
diff --git a/launcher/BaseInstance.cpp b/launcher/BaseInstance.cpp
index 2995df6f..8680361c 100644
--- a/launcher/BaseInstance.cpp
+++ b/launcher/BaseInstance.cpp
@@ -355,7 +355,7 @@ QString BaseInstance::name() const
QString BaseInstance::windowTitle() const
{
- return BuildConfig.LAUNCHER_NAME + ": " + name().replace(QRegularExpression("\\s+"), " ");
+ return BuildConfig.LAUNCHER_DISPLAYNAME + ": " + name().replace(QRegularExpression("\\s+"), " ");
}
// FIXME: why is this here? move it to MinecraftInstance!!!
@@ -368,3 +368,8 @@ shared_qobject_ptr<LaunchTask> BaseInstance::getLaunchTask()
{
return m_launchProcess;
}
+
+void BaseInstance::updateRuntimeContext()
+{
+ // NOOP
+}
diff --git a/launcher/BaseInstance.h b/launcher/BaseInstance.h
index 21cc3413..307240e0 100644
--- a/launcher/BaseInstance.h
+++ b/launcher/BaseInstance.h
@@ -54,6 +54,7 @@
#include "net/Mode.h"
#include "minecraft/launch/MinecraftServerTarget.h"
+#include "RuntimeContext.h"
class QDir;
class Task;
@@ -220,6 +221,12 @@ public:
virtual QString typeName() const = 0;
+ void updateRuntimeContext();
+ RuntimeContext runtimeContext() const
+ {
+ return m_runtimeContext;
+ }
+
bool hasVersionBroken() const
{
return m_hasBrokenVersion;
@@ -305,6 +312,7 @@ protected: /* data */
bool m_isRunning = false;
shared_qobject_ptr<LaunchTask> m_launchProcess;
QDateTime m_timeStarted;
+ RuntimeContext m_runtimeContext;
private: /* data */
Status m_status = Status::Present;
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 044160a4..79ac49c7 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -26,6 +26,7 @@ set(CORE_SOURCES
MMCZip.cpp
MMCStrings.h
MMCStrings.cpp
+ RuntimeContext.h
# Basic instance manipulation tasks (derived from InstanceTask)
InstanceCreationTask.h
@@ -288,8 +289,6 @@ set(MINECRAFT_SOURCES
minecraft/Rule.h
minecraft/OneSixVersionFormat.cpp
minecraft/OneSixVersionFormat.h
- minecraft/OpSys.cpp
- minecraft/OpSys.h
minecraft/ParseUtils.cpp
minecraft/ParseUtils.h
minecraft/ProfileUtils.cpp
@@ -973,7 +972,6 @@ add_library(Launcher_logic STATIC ${LOGIC_SOURCES} ${LAUNCHER_SOURCES} ${LAUNCHE
target_include_directories(Launcher_logic PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(Launcher_logic
systeminfo
- Launcher_classparser
Launcher_murmur2
nbt++
${ZLIB_LIBRARIES}
@@ -981,6 +979,7 @@ target_link_libraries(Launcher_logic
BuildConfig
Katabasis
Qt${QT_VERSION_MAJOR}::Widgets
+ ghcFilesystem::ghc_filesystem
)
if (UNIX AND NOT CYGWIN AND NOT APPLE)
diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp
index 5d179641..39e68c20 100644
--- a/launcher/FileSystem.cpp
+++ b/launcher/FileSystem.cpp
@@ -59,7 +59,24 @@
#include <utime.h>
#endif
+// Snippet from https://github.com/gulrak/filesystem#using-it-as-single-file-header
+
+#ifdef __APPLE__
+#include <Availability.h> // for deployment target to support pre-catalina targets without std::fs
+#endif // __APPLE__
+
+#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || (defined(__cplusplus) && __cplusplus >= 201703L)) && defined(__has_include)
+#if __has_include(<filesystem>) && (!defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+#define GHC_USE_STD_FS
#include <filesystem>
+namespace fs = std::filesystem;
+#endif // MacOS min version check
+#endif // Other OSes version check
+
+#ifndef GHC_USE_STD_FS
+#include <ghc/filesystem.hpp>
+namespace fs = ghc::filesystem;
+#endif
#if defined Q_OS_WIN32
@@ -147,7 +164,7 @@ bool ensureFolderPathExists(QString foldernamepath)
bool copy::operator()(const QString& offset)
{
- using copy_opts = std::filesystem::copy_options;
+ using copy_opts = fs::copy_options;
// NOTE always deep copy on windows. the alternatives are too messy.
#if defined Q_OS_WIN32
@@ -159,7 +176,7 @@ bool copy::operator()(const QString& offset)
std::error_code err;
- std::filesystem::copy_options opt = copy_opts::none;
+ fs::copy_options opt = copy_opts::none;
// The default behavior is to follow symlinks
if (!m_followSymlinks)
@@ -170,7 +187,7 @@ bool copy::operator()(const QString& offset)
// blacklisted paths, so we iterate over the source directory, and if there's no blacklist
// match, we copy the file.
QDir src_dir(src);
- QDirIterator source_it(src, QDir::Filter::Files, QDirIterator::Subdirectories);
+ QDirIterator source_it(src, QDir::Filter::Files | QDir::Filter::Hidden, QDirIterator::Subdirectories);
while (source_it.hasNext()) {
auto src_path = source_it.next();
@@ -182,7 +199,7 @@ bool copy::operator()(const QString& offset)
auto dst_path = PathCombine(dst, relative_path);
ensureFilePathExists(dst_path);
- std::filesystem::copy(toStdString(src_path), toStdString(dst_path), opt, err);
+ fs::copy(toStdString(src_path), toStdString(dst_path), opt, err);
if (err) {
qWarning() << "Failed to copy files:" << QString::fromStdString(err.message());
qDebug() << "Source file:" << src_path;
@@ -197,7 +214,7 @@ bool deletePath(QString path)
{
std::error_code err;
- std::filesystem::remove_all(toStdString(path), err);
+ fs::remove_all(toStdString(path), err);
if (err) {
qWarning() << "Failed to remove files:" << QString::fromStdString(err.message());
@@ -376,15 +393,15 @@ bool createShortCut(QString location, QString dest, QStringList args, QString na
bool overrideFolder(QString overwritten_path, QString override_path)
{
- using copy_opts = std::filesystem::copy_options;
+ using copy_opts = fs::copy_options;
if (!FS::ensureFolderPathExists(overwritten_path))
return false;
std::error_code err;
- std::filesystem::copy_options opt = copy_opts::recursive | copy_opts::overwrite_existing;
+ fs::copy_options opt = copy_opts::recursive | copy_opts::overwrite_existing;
- std::filesystem::copy(toStdString(override_path), toStdString(overwritten_path), opt, err);
+ fs::copy(toStdString(override_path), toStdString(overwritten_path), opt, err);
if (err) {
qCritical() << QString("Failed to apply override from %1 to %2").arg(override_path, overwritten_path);
diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp
index 830fcf82..11e3de15 100644
--- a/launcher/LaunchController.cpp
+++ b/launcher/LaunchController.cpp
@@ -93,8 +93,8 @@ void LaunchController::decideAccount()
auto reply = CustomMessageBox::selectable(
m_parentWidget,
tr("No Accounts"),
- tr("In order to play Minecraft, you must have at least one Mojang or Microsoft "
- "account logged in. "
+ tr("In order to play Minecraft, you must have at least one Microsoft or Mojang "
+ "account logged in. Mojang accounts can only be used offline. "
"Would you like to open the account manager to add an account now?"),
QMessageBox::Information,
QMessageBox::Yes | QMessageBox::No
@@ -382,7 +382,7 @@ void LaunchController::launchInstance()
m_launcher->prependStep(new TextPrint(m_launcher.get(), "Launched instance in " + online_mode + " mode\n", MessageLevel::Launcher));
// Prepend Version
- m_launcher->prependStep(new TextPrint(m_launcher.get(), BuildConfig.LAUNCHER_NAME + " version: " + BuildConfig.printableVersionString() + "\n\n", MessageLevel::Launcher));
+ m_launcher->prependStep(new TextPrint(m_launcher.get(), BuildConfig.LAUNCHER_DISPLAYNAME + " version: " + BuildConfig.printableVersionString() + "\n\n", MessageLevel::Launcher));
m_launcher->start();
}
diff --git a/launcher/NullInstance.h b/launcher/NullInstance.h
index 53e64a05..53edfa0b 100644
--- a/launcher/NullInstance.h
+++ b/launcher/NullInstance.h
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#pragma once
#include "BaseInstance.h"
#include "launch/LaunchTask.h"
@@ -84,4 +119,8 @@ public:
QString modsRoot() const override {
return QString();
}
+ void updateRuntimeContext()
+ {
+ // NOOP
+ }
};
diff --git a/launcher/RuntimeContext.h b/launcher/RuntimeContext.h
new file mode 100644
index 00000000..70e7d0d1
--- /dev/null
+++ b/launcher/RuntimeContext.h
@@ -0,0 +1,88 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <QSet>
+#include <QString>
+#include "settings/SettingsObject.h"
+
+struct RuntimeContext {
+ QString javaArchitecture;
+ QString javaRealArchitecture;
+ QString javaPath;
+ QString system;
+
+ QString mappedJavaRealArchitecture() const
+ {
+ if (javaRealArchitecture == "amd64")
+ return "x86_64";
+ if (javaRealArchitecture == "i386" || javaRealArchitecture == "i686")
+ return "x86";
+ if (javaRealArchitecture == "aarch64")
+ return "arm64";
+ if (javaRealArchitecture == "arm" || javaRealArchitecture == "armhf")
+ return "arm32";
+ return javaRealArchitecture;
+ }
+
+ void updateFromInstanceSettings(SettingsObjectPtr instanceSettings)
+ {
+ javaArchitecture = instanceSettings->get("JavaArchitecture").toString();
+ javaRealArchitecture = instanceSettings->get("JavaRealArchitecture").toString();
+ javaPath = instanceSettings->get("JavaPath").toString();
+ system = currentSystem();
+ }
+
+ QString getClassifier() const { return system + "-" + mappedJavaRealArchitecture(); }
+
+ // "Legacy" refers to the fact that Mojang assumed that these are the only two architectures
+ bool isLegacyArch() const
+ {
+ const QString mapped = mappedJavaRealArchitecture();
+ return mapped == "x86_64" || mapped == "x86";
+ }
+
+ bool classifierMatches(QString target) const
+ {
+ // try to match precise classifier "[os]-[arch]"
+ bool x = target == getClassifier();
+ // try to match imprecise classifier on legacy architectures "[os]"
+ if (!x && isLegacyArch())
+ x = target == system;
+
+ return x;
+ }
+
+ static QString currentSystem()
+ {
+#if defined(Q_OS_LINUX)
+ return "linux";
+#elif defined(Q_OS_MACOS)
+ return "osx";
+#elif defined(Q_OS_WINDOWS)
+ return "windows";
+#elif defined(Q_OS_FREEBSD)
+ return "freebsd";
+#elif defined(Q_OS_OPENBSD)
+ return "openbsd";
+#else
+ return "unknown";
+#endif
+ }
+};
diff --git a/launcher/UpdateController.cpp b/launcher/UpdateController.cpp
index 646f8e57..9ff44854 100644
--- a/launcher/UpdateController.cpp
+++ b/launcher/UpdateController.cpp
@@ -358,7 +358,7 @@ void UpdateController::fail()
msg = QObject::tr(
"Couldn't replace file %1. Changes will be reverted.\n"
"See the %2 log file for details."
- ).arg(m_failedFile, BuildConfig.LAUNCHER_NAME);
+ ).arg(m_failedFile, BuildConfig.LAUNCHER_DISPLAYNAME);
doRollback = true;
QMessageBox::critical(m_parent, failTitle, msg);
break;
@@ -368,7 +368,7 @@ void UpdateController::fail()
msg = QObject::tr(
"Couldn't remove file %1. Changes will be reverted.\n"
"See the %2 log file for details."
- ).arg(m_failedFile, BuildConfig.LAUNCHER_NAME);
+ ).arg(m_failedFile, BuildConfig.LAUNCHER_DISPLAYNAME);
doRollback = true;
QMessageBox::critical(m_parent, failTitle, msg);
break;
@@ -399,7 +399,7 @@ void UpdateController::fail()
{
msg = QObject::tr("The rollback failed too.\n"
"You will have to repair %1 manually.\n"
- "Please let us know why and how this happened.").arg(BuildConfig.LAUNCHER_NAME);
+ "Please let us know why and how this happened.").arg(BuildConfig.LAUNCHER_DISPLAYNAME);
QMessageBox::critical(m_parent, rollFailTitle, msg);
qApp->quit();
}
diff --git a/launcher/java/JavaUtils.cpp b/launcher/java/JavaUtils.cpp
index 2f91605b..040fe821 100644
--- a/launcher/java/JavaUtils.cpp
+++ b/launcher/java/JavaUtils.cpp
@@ -174,7 +174,7 @@ JavaInstallPtr JavaUtils::GetDefaultJava()
QStringList addJavasFromEnv(QList<QString> javas)
{
- auto env = qEnvironmentVariable("POLYMC_JAVA_PATHS");
+ auto env = qEnvironmentVariable("PRISMLAUNCHER_JAVA_PATHS"); // FIXME: use launcher name from buildconfig
#if defined(Q_OS_WIN32)
QList<QString> javaPaths = env.replace("\\", "/").split(QLatin1String(";"));
@@ -441,7 +441,7 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDir("/usr/lib/jvm");
scanJavaDir("/usr/lib64/jvm");
scanJavaDir("/usr/lib32/jvm");
- // javas stored in PolyMC's folder
+ // javas stored in Prism Launcher's folder
scanJavaDir("java");
// manually installed JDKs in /opt
scanJavaDir("/opt/jdk");
diff --git a/launcher/launch/steps/CheckJava.cpp b/launcher/launch/steps/CheckJava.cpp
index db56b652..7aeb61bf 100644
--- a/launcher/launch/steps/CheckJava.cpp
+++ b/launcher/launch/steps/CheckJava.cpp
@@ -121,7 +121,6 @@ void CheckJava::checkJavaFinished(JavaCheckResult result)
emit logLine(QString("Could not start java:"), MessageLevel::Error);
emit logLines(result.errorLog.split('\n'), MessageLevel::Error);
emit logLine(QString("\nCheck your Java settings."), MessageLevel::Launcher);
- printSystemInfo(false, false);
emitFailed(QString("Could not start java!"));
return;
}
@@ -130,7 +129,6 @@ void CheckJava::checkJavaFinished(JavaCheckResult result)
emit logLine(QString("Java checker returned some invalid data we don't understand:"), MessageLevel::Error);
emit logLines(result.outLog.split('\n'), MessageLevel::Warning);
emit logLine("\nMinecraft might not start properly.", MessageLevel::Launcher);
- printSystemInfo(false, false);
emitSucceeded();
return;
}
@@ -138,7 +136,6 @@ void CheckJava::checkJavaFinished(JavaCheckResult result)
{
auto instance = m_parent->instance();
printJavaInfo(result.javaVersion.toString(), result.mojangPlatform, result.realPlatform, result.javaVendor);
- printSystemInfo(true, result.is_64bit);
instance->settings()->set("JavaVersion", result.javaVersion.toString());
instance->settings()->set("JavaArchitecture", result.mojangPlatform);
instance->settings()->set("JavaRealArchitecture", result.realPlatform);
@@ -155,20 +152,3 @@ void CheckJava::printJavaInfo(const QString& version, const QString& architectur
emit logLine(QString("Java is version %1, using %2 (%3) architecture, from %4.\n\n")
.arg(version, architecture, realArchitecture, vendor), MessageLevel::Launcher);
}
-
-void CheckJava::printSystemInfo(bool javaIsKnown, bool javaIs64bit)
-{
- auto cpu64 = Sys::isCPU64bit();
- auto system64 = Sys::isSystem64bit();
- if(cpu64 != system64)
- {
- emit logLine(QString("Your CPU architecture is not matching your system architecture. You might want to install a 64bit Operating System.\n\n"), MessageLevel::Error);
- }
- if(javaIsKnown)
- {
- if(javaIs64bit != system64)
- {
- emit logLine(QString("Your Java architecture is not matching your system architecture. You might want to install a 64bit Java version.\n\n"), MessageLevel::Error);
- }
- }
-}
diff --git a/launcher/main.cpp b/launcher/main.cpp
index 85fe1260..c6a7614c 100644
--- a/launcher/main.cpp
+++ b/launcher/main.cpp
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(multimc);
Q_INIT_RESOURCE(backgrounds);
Q_INIT_RESOURCE(documents);
- Q_INIT_RESOURCE(polymc);
+ Q_INIT_RESOURCE(prismlauncher);
Q_INIT_RESOURCE(pe_dark);
Q_INIT_RESOURCE(pe_light);
diff --git a/launcher/minecraft/Component.cpp b/launcher/minecraft/Component.cpp
index c7dd5e36..7e5b6058 100644
--- a/launcher/minecraft/Component.cpp
+++ b/launcher/minecraft/Component.cpp
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include <meta/VersionList.h>
#include <meta/Index.h>
#include "Component.h"
@@ -60,7 +95,7 @@ void Component::applyTo(LaunchProfile* profile)
auto vfile = getVersionFile();
if(vfile)
{
- vfile->applyTo(profile);
+ vfile->applyTo(profile, m_parent->runtimeContext());
}
else
{
diff --git a/launcher/minecraft/LaunchProfile.cpp b/launcher/minecraft/LaunchProfile.cpp
index 39a342ca..9a6cea11 100644
--- a/launcher/minecraft/LaunchProfile.cpp
+++ b/launcher/minecraft/LaunchProfile.cpp
@@ -173,9 +173,9 @@ void LaunchProfile::applyCompatibleJavaMajors(QList<int>& javaMajor)
m_compatibleJavaMajors.append(javaMajor);
}
-void LaunchProfile::applyLibrary(LibraryPtr library)
+void LaunchProfile::applyLibrary(LibraryPtr library, const RuntimeContext & runtimeContext)
{
- if(!library->isActive())
+ if(!library->isActive(runtimeContext))
{
return;
}
@@ -205,9 +205,9 @@ void LaunchProfile::applyLibrary(LibraryPtr library)
}
}
-void LaunchProfile::applyMavenFile(LibraryPtr mavenFile)
+void LaunchProfile::applyMavenFile(LibraryPtr mavenFile, const RuntimeContext & runtimeContext)
{
- if(!mavenFile->isActive())
+ if(!mavenFile->isActive(runtimeContext))
{
return;
}
@@ -221,10 +221,10 @@ void LaunchProfile::applyMavenFile(LibraryPtr mavenFile)
m_mavenFiles.append(Library::limitedCopy(mavenFile));
}
-void LaunchProfile::applyAgent(AgentPtr agent)
+void LaunchProfile::applyAgent(AgentPtr agent, const RuntimeContext & runtimeContext)
{
auto lib = agent->library();
- if(!lib->isActive())
+ if(!lib->isActive(runtimeContext))
{
return;
}
@@ -354,7 +354,7 @@ const QList<int> & LaunchProfile::getCompatibleJavaMajors() const
}
void LaunchProfile::getLibraryFiles(
- const QString& architecture,
+ const RuntimeContext & runtimeContext,
QStringList& jars,
QStringList& nativeJars,
const QString& overridePath,
@@ -366,7 +366,7 @@ void LaunchProfile::getLibraryFiles(
nativeJars.clear();
for (auto lib : getLibraries())
{
- lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath);
+ lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath);
}
// NOTE: order is important here, add main jar last to the lists
if(m_mainJar)
@@ -379,18 +379,18 @@ void LaunchProfile::getLibraryFiles(
}
else
{
- m_mainJar->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath);
+ m_mainJar->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath);
}
}
for (auto lib : getNativeLibraries())
{
- lib->getApplicableFiles(currentSystem, jars, nativeJars, native32, native64, overridePath);
+ lib->getApplicableFiles(runtimeContext, jars, nativeJars, native32, native64, overridePath);
}
- if(architecture == "32")
+ if(runtimeContext.javaArchitecture == "32")
{
nativeJars.append(native32);
}
- else if(architecture == "64")
+ else if(runtimeContext.javaArchitecture == "64")
{
nativeJars.append(native64);
}
diff --git a/launcher/minecraft/LaunchProfile.h b/launcher/minecraft/LaunchProfile.h
index b55cf661..49c1217d 100644
--- a/launcher/minecraft/LaunchProfile.h
+++ b/launcher/minecraft/LaunchProfile.h
@@ -56,9 +56,9 @@ public: /* application of profile variables from patches */
void applyTweakers(const QStringList &tweakers);
void applyJarMods(const QList<LibraryPtr> &jarMods);
void applyMods(const QList<LibraryPtr> &jarMods);
- void applyLibrary(LibraryPtr library);
- void applyMavenFile(LibraryPtr library);
- void applyAgent(AgentPtr agent);
+ void applyLibrary(LibraryPtr library, const RuntimeContext & runtimeContext);
+ void applyMavenFile(LibraryPtr library, const RuntimeContext & runtimeContext);
+ void applyAgent(AgentPtr agent, const RuntimeContext & runtimeContext);
void applyCompatibleJavaMajors(QList<int>& javaMajor);
void applyMainJar(LibraryPtr jar);
void applyProblemSeverity(ProblemSeverity severity);
@@ -83,7 +83,7 @@ public: /* getters for profile variables */
const QList<int> & getCompatibleJavaMajors() const;
const LibraryPtr getMainJar() const;
void getLibraryFiles(
- const QString & architecture,
+ const RuntimeContext & runtimeContext,
QStringList & jars,
QStringList & nativeJars,
const QString & overridePath,
diff --git a/launcher/minecraft/Library.cpp b/launcher/minecraft/Library.cpp
index ba7aed4b..cb2b5254 100644
--- a/launcher/minecraft/Library.cpp
+++ b/launcher/minecraft/Library.cpp
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "Library.h"
#include "MinecraftInstance.h"
@@ -7,7 +42,7 @@
#include <BuildConfig.h>
-void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& native, QStringList& native32,
+void Library::getApplicableFiles(const RuntimeContext & runtimeContext, QStringList& jar, QStringList& native, QStringList& native32,
QStringList& native64, const QString &overridePath) const
{
bool local = isLocal();
@@ -21,7 +56,7 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
}
return out.absoluteFilePath();
};
- QString raw_storage = storageSuffix(system);
+ QString raw_storage = storageSuffix(runtimeContext);
if(isNative())
{
if (raw_storage.contains("${arch}"))
@@ -45,7 +80,7 @@ void Library::getApplicableFiles(OpSys system, QStringList& jar, QStringList& na
}
QList<NetAction::Ptr> Library::getDownloads(
- OpSys system,
+ const RuntimeContext & runtimeContext,
class HttpMetaCache* cache,
QStringList& failedLocalFiles,
const QString & overridePath
@@ -107,14 +142,14 @@ QList<NetAction::Ptr> Library::getDownloads(
return true;
};
- QString raw_storage = storageSuffix(system);
+ QString raw_storage = storageSuffix(runtimeContext);
if(m_mojangDownloads)
{
if(isNative())
{
- if(m_nativeClassifiers.contains(system))
+ auto nativeClassifier = getCompatibleNative(runtimeContext);
+ if(!nativeClassifier.isNull())
{
- auto nativeClassifier = m_nativeClassifiers[system];
if(nativeClassifier.contains("${arch}"))
{
auto nat32Classifier = nativeClassifier;
@@ -203,7 +238,7 @@ QList<NetAction::Ptr> Library::getDownloads(
return out;
}
-bool Library::isActive() const
+bool Library::isActive(const RuntimeContext & runtimeContext) const
{
bool result = true;
if (m_rules.empty())
@@ -215,7 +250,7 @@ bool Library::isActive() const
RuleAction ruleResult = Disallow;
for (auto rule : m_rules)
{
- RuleAction temp = rule->apply(this);
+ RuleAction temp = rule->apply(this, runtimeContext);
if (temp != Defer)
ruleResult = temp;
}
@@ -223,7 +258,7 @@ bool Library::isActive() const
}
if (isNative())
{
- result = result && m_nativeClassifiers.contains(currentSystem);
+ result = result && !getCompatibleNative(runtimeContext).isNull();
}
return result;
}
@@ -238,6 +273,19 @@ bool Library::isAlwaysStale() const
return m_hint == "always-stale";
}
+QString Library::getCompatibleNative(const RuntimeContext & runtimeContext) const {
+ // try to match precise classifier "[os]-[arch]"
+ auto entry = m_nativeClassifiers.constFind(runtimeContext.getClassifier());
+ // try to match imprecise classifier on legacy architectures "[os]"
+ if (entry == m_nativeClassifiers.constEnd() && runtimeContext.isLegacyArch())
+ entry = m_nativeClassifiers.constFind(runtimeContext.system);
+
+ if (entry == m_nativeClassifiers.constEnd())
+ return QString();
+
+ return entry.value();
+}
+
void Library::setStoragePrefix(QString prefix)
{
m_storagePrefix = prefix;
@@ -257,7 +305,7 @@ QString Library::storagePrefix() const
return m_storagePrefix;
}
-QString Library::filename(OpSys system) const
+QString Library::filename(const RuntimeContext & runtimeContext) const
{
if(!m_filename.isEmpty())
{
@@ -271,9 +319,10 @@ QString Library::filename(OpSys system) const
// otherwise native, override classifiers. Mojang HACK!
GradleSpecifier nativeSpec = m_name;
- if (m_nativeClassifiers.contains(system))
+ QString nativeClassifier = getCompatibleNative(runtimeContext);
+ if (!nativeClassifier.isNull())
{
- nativeSpec.setClassifier(m_nativeClassifiers[system]);
+ nativeSpec.setClassifier(nativeClassifier);
}
else
{
@@ -282,14 +331,14 @@ QString Library::filename(OpSys system) const
return nativeSpec.getFileName();
}
-QString Library::displayName(OpSys system) const
+QString Library::displayName(const RuntimeContext & runtimeContext) const
{
if(!m_displayname.isEmpty())
return m_displayname;
- return filename(system);
+ return filename(runtimeContext);
}
-QString Library::storageSuffix(OpSys system) const
+QString Library::storageSuffix(const RuntimeContext & runtimeContext) const
{
// non-native? use only the gradle specifier
if (!isNative())
@@ -299,9 +348,10 @@ QString Library::storageSuffix(OpSys system) const
// otherwise native, override classifiers. Mojang HACK!
GradleSpecifier nativeSpec = m_name;
- if (m_nativeClassifiers.contains(system))
+ QString nativeClassifier = getCompatibleNative(runtimeContext);
+ if (!nativeClassifier.isNull())
{
- nativeSpec.setClassifier(m_nativeClassifiers[system]);
+ nativeSpec.setClassifier(nativeClassifier);
}
else
{
diff --git a/launcher/minecraft/Library.h b/launcher/minecraft/Library.h
index 0740a7ca..26dbf962 100644
--- a/launcher/minecraft/Library.h
+++ b/launcher/minecraft/Library.h
@@ -1,8 +1,44 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#pragma once
#include <QString>
#include <net/NetAction.h>
#include <QPair>
#include <QList>
+#include <QString>
#include <QStringList>
#include <QMap>
#include <QDir>
@@ -10,9 +46,9 @@
#include <memory>
#include "Rule.h"
-#include "minecraft/OpSys.h"
#include "GradleSpecifier.h"
#include "MojangDownloadInfo.h"
+#include "RuntimeContext.h"
class Library;
class MinecraftInstance;
@@ -98,7 +134,7 @@ public: /* methods */
m_repositoryURL = base_url;
}
- void getApplicableFiles(OpSys system, QStringList & jar, QStringList & native,
+ void getApplicableFiles(const RuntimeContext & runtimeContext, QStringList & jar, QStringList & native,
QStringList & native32, QStringList & native64, const QString & overridePath) const;
void setAbsoluteUrl(const QString &absolute_url)
@@ -112,7 +148,7 @@ public: /* methods */
}
/// Get the file name of the library
- QString filename(OpSys system) const;
+ QString filename(const RuntimeContext & runtimeContext) const;
// DEPRECATED: set a display name, used by jar mods only
void setDisplayName(const QString & displayName)
@@ -121,7 +157,7 @@ public: /* methods */
}
/// Get the file name of the library
- QString displayName(OpSys system) const;
+ QString displayName(const RuntimeContext & runtimeContext) const;
void setMojangDownloadInfo(MojangLibraryDownloadInfo::Ptr info)
{
@@ -140,7 +176,7 @@ public: /* methods */
}
/// Returns true if the library should be loaded (or extracted, in case of natives)
- bool isActive() const;
+ bool isActive(const RuntimeContext & runtimeContext) const;
/// Returns true if the library is contained in an instance and false if it is shared
bool isLocal() const;
@@ -152,18 +188,20 @@ public: /* methods */
bool isForge() const;
// Get a list of downloads for this library
- QList<NetAction::Ptr> getDownloads(OpSys system, class HttpMetaCache * cache,
+ QList<NetAction::Ptr> getDownloads(const RuntimeContext & runtimeContext, class HttpMetaCache * cache,
QStringList & failedLocalFiles, const QString & overridePath) const;
+ QString getCompatibleNative(const RuntimeContext & runtimeContext) const;
+
private: /* methods */
- /// the default storage prefix used by PolyMC
+ /// the default storage prefix used by Prism Launcher
static QString defaultStoragePrefix();
/// Get the prefix - root of the storage to be used
QString storagePrefix() const;
/// Get the relative file path where the library should be saved
- QString storageSuffix(OpSys system) const;
+ QString storageSuffix(const RuntimeContext & runtimeContext) const;
QString hint() const
{
@@ -177,23 +215,23 @@ protected: /* data */
/// DEPRECATED URL prefix of the maven repo where the file can be downloaded
QString m_repositoryURL;
- /// DEPRECATED: PolyMC-specific absolute URL. takes precedence over the implicit maven repo URL, if defined
+ /// DEPRECATED: Prism Launcher-specific absolute URL. takes precedence over the implicit maven repo URL, if defined
QString m_absoluteURL;
- /// PolyMC extension - filename override
+ /// Prism Launcher extension - filename override
QString m_filename;
- /// DEPRECATED PolyMC extension - display name
+ /// DEPRECATED Prism Launcher extension - display name
QString m_displayname;
/**
- * PolyMC-specific type hint - modifies how the library is treated
+ * Prism Launcher-specific type hint - modifies how the library is treated
*/
QString m_hint;
/**
- * storage - by default the local libraries folder in polymc, but could be elsewhere
- * PolyMC specific, because of FTB.
+ * storage - by default the local libraries folder in Prism Launcher, but could be elsewhere
+ * Prism Launcher specific, because of FTB.
*/
QString m_storagePrefix;
@@ -204,7 +242,7 @@ protected: /* data */
QStringList m_extractExcludes;
/// native suffixes per OS
- QMap<OpSys, QString> m_nativeClassifiers;
+ QMap<QString, QString> m_nativeClassifiers;
/// true if the library had a rules section (even empty)
bool applyRules = false;
diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp
index 62540c75..3a820951 100644
--- a/launcher/minecraft/MinecraftInstance.cpp
+++ b/launcher/minecraft/MinecraftInstance.cpp
@@ -147,6 +147,7 @@ void MinecraftInstance::loadSpecificSettings()
m_settings->registerPassthrough(global_settings->getSetting("JavaTimestamp"), javaOrLocation);
m_settings->registerPassthrough(global_settings->getSetting("JavaVersion"), javaOrLocation);
m_settings->registerPassthrough(global_settings->getSetting("JavaArchitecture"), javaOrLocation);
+ m_settings->registerPassthrough(global_settings->getSetting("JavaRealArchitecture"), javaOrLocation);
// Window Size
auto windowSetting = m_settings->registerSetting("OverrideWindow", false);
@@ -190,6 +191,13 @@ void MinecraftInstance::loadSpecificSettings()
qDebug() << "Instance-type specific settings were loaded!";
setSpecificSettingsLoaded(true);
+
+ updateRuntimeContext();
+}
+
+void MinecraftInstance::updateRuntimeContext()
+{
+ m_runtimeContext.updateFromInstanceSettings(m_settings);
}
QString MinecraftInstance::typeName() const
@@ -327,9 +335,8 @@ QDir MinecraftInstance::versionsPath() const
QStringList MinecraftInstance::getClassPath()
{
QStringList jars, nativeJars;
- auto javaArchitecture = settings()->get("JavaArchitecture").toString();
auto profile = m_components->getProfile();
- profile->getLibraryFiles(javaArchitecture, jars, nativeJars, getLocalLibraryPath(), binRoot());
+ profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
return jars;
}
@@ -342,9 +349,8 @@ QString MinecraftInstance::getMainClass() const
QStringList MinecraftInstance::getNativeJars()
{
QStringList jars, nativeJars;
- auto javaArchitecture = settings()->get("JavaArchitecture").toString();
auto profile = m_components->getProfile();
- profile->getLibraryFiles(javaArchitecture, jars, nativeJars, getLocalLibraryPath(), binRoot());
+ profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
return nativeJars;
}
@@ -368,7 +374,7 @@ QStringList MinecraftInstance::extraArguments()
for (auto agent : agents)
{
QStringList jar, temp1, temp2, temp3;
- agent->library()->getApplicableFiles(currentSystem, jar, temp1, temp2, temp3, getLocalLibraryPath());
+ agent->library()->getApplicableFiles(runtimeContext(), jar, temp1, temp2, temp3, getLocalLibraryPath());
list.append("-javaagent:"+jar[0]+(agent->argument().isEmpty() ? "" : "="+agent->argument()));
}
return list;
@@ -625,8 +631,7 @@ QString MinecraftInstance::createLaunchScript(AuthSessionPtr session, MinecraftS
// libraries and class path.
{
QStringList jars, nativeJars;
- auto javaArchitecture = settings()->get("JavaArchitecture").toString();
- profile->getLibraryFiles(javaArchitecture, jars, nativeJars, getLocalLibraryPath(), binRoot());
+ profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
for(auto file: jars)
{
launchScript += "cp " + file + "\n";
@@ -682,8 +687,7 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
{
out << "Libraries:";
QStringList jars, nativeJars;
- auto javaArchitecture = settings->get("JavaArchitecture").toString();
- profile->getLibraryFiles(javaArchitecture, jars, nativeJars, getLocalLibraryPath(), binRoot());
+ profile->getLibraryFiles(runtimeContext(), jars, nativeJars, getLocalLibraryPath(), binRoot());
auto printLibFile = [&](const QString & path)
{
QFileInfo info(path);
@@ -748,8 +752,8 @@ QStringList MinecraftInstance::verboseDescription(AuthSessionPtr session, Minecr
out << "Jar Mods:";
for(auto & jarmod: jarMods)
{
- auto displayname = jarmod->displayName(currentSystem);
- auto realname = jarmod->filename(currentSystem);
+ auto displayname = jarmod->displayName(runtimeContext());
+ auto realname = jarmod->filename(runtimeContext());
if(displayname != realname)
{
out << " " + displayname + " (" + realname + ")";
@@ -911,6 +915,7 @@ QString MinecraftInstance::getStatusbarDescription()
Task::Ptr MinecraftInstance::createUpdateTask(Net::Mode mode)
{
+ updateRuntimeContext();
switch (mode)
{
case Net::Mode::Offline:
@@ -927,6 +932,7 @@ Task::Ptr MinecraftInstance::createUpdateTask(Net::Mode mode)
shared_qobject_ptr<LaunchTask> MinecraftInstance::createLaunchTask(AuthSessionPtr session, MinecraftServerTargetPtr serverToJoin)
{
+ updateRuntimeContext();
// FIXME: get rid of shared_from_this ...
auto process = LaunchTask::create(std::dynamic_pointer_cast<MinecraftInstance>(shared_from_this()));
auto pptr = process.get();
@@ -1157,7 +1163,7 @@ QList<Mod*> MinecraftInstance::getJarMods() const
for (auto jarmod : profile->getJarMods())
{
QStringList jar, temp1, temp2, temp3;
- jarmod->getApplicableFiles(currentSystem, jar, temp1, temp2, temp3, jarmodsPath().absolutePath());
+ jarmod->getApplicableFiles(runtimeContext(), jar, temp1, temp2, temp3, jarmodsPath().absolutePath());
// QString filePath = jarmodsPath().absoluteFilePath(jarmod->filename(currentSystem));
mods.push_back(new Mod(QFileInfo(jar[0])));
}
diff --git a/launcher/minecraft/MinecraftInstance.h b/launcher/minecraft/MinecraftInstance.h
index fe39674a..1895d187 100644
--- a/launcher/minecraft/MinecraftInstance.h
+++ b/launcher/minecraft/MinecraftInstance.h
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#pragma once
#include "BaseInstance.h"
#include <java/JavaVersion.h>
@@ -72,6 +107,8 @@ public:
/** Returns whether the instance, with its version, has support for demo mode. */
[[nodiscard]] bool supportsDemo() const;
+ void updateRuntimeContext();
+
////// Profile management //////
std::shared_ptr<PackProfile> getPackProfile() const;
diff --git a/launcher/minecraft/MojangVersionFormat.cpp b/launcher/minecraft/MojangVersionFormat.cpp
index 94c58676..9bbb4ada 100644
--- a/launcher/minecraft/MojangVersionFormat.cpp
+++ b/launcher/minecraft/MojangVersionFormat.cpp
@@ -214,7 +214,7 @@ void MojangVersionFormat::readVersionProperties(const QJsonObject &in, VersionFi
QObject::tr("The 'minimumLauncherVersion' value of this version (%1) is higher than supported by %3 (%2). It might not work properly!")
.arg(out->minimumLauncherVersion)
.arg(CURRENT_MINIMUM_LAUNCHER_VERSION)
- .arg(BuildConfig.LAUNCHER_NAME)
+ .arg(BuildConfig.LAUNCHER_DISPLAYNAME)
);
}
}
@@ -362,11 +362,8 @@ LibraryPtr MojangVersionFormat::libraryFromJson(ProblemContainer & problems, con
{
qWarning() << filename << "contains an invalid native (skipping)";
}
- OpSys opSys = OpSys_fromString(it.key());
- if (opSys != Os_Other)
- {
- out->m_nativeClassifiers[opSys] = it.value().toString();
- }
+ // FIXME: Skip unknown platforms
+ out->m_nativeClassifiers[it.key()] = it.value().toString();
}
}
if (libObj.contains("rules"))
@@ -395,7 +392,7 @@ QJsonObject MojangVersionFormat::libraryToJson(Library *library)
auto iter = library->m_nativeClassifiers.begin();
while (iter != library->m_nativeClassifiers.end())
{
- nativeList.insert(OpSys_toString(iter.key()), iter.value());
+ nativeList.insert(iter.key(), iter.value());
iter++;
}
libRoot.insert("natives", nativeList);
diff --git a/launcher/minecraft/OpSys.cpp b/launcher/minecraft/OpSys.cpp
deleted file mode 100644
index 093ec419..00000000
--- a/launcher/minecraft/OpSys.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright 2013-2021 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "OpSys.h"
-
-OpSys OpSys_fromString(QString name)
-{
- if (name == "freebsd")
- return Os_FreeBSD;
- if (name == "linux")
- return Os_Linux;
- if (name == "windows")
- return Os_Windows;
- if (name == "osx")
- return Os_OSX;
- return Os_Other;
-}
-
-QString OpSys_toString(OpSys name)
-{
- switch (name)
- {
- case Os_FreeBSD:
- return "freebsd";
- case Os_Linux:
- return "linux";
- case Os_OSX:
- return "osx";
- case Os_Windows:
- return "windows";
- default:
- return "other";
- }
-} \ No newline at end of file
diff --git a/launcher/minecraft/OpSys.h b/launcher/minecraft/OpSys.h
deleted file mode 100644
index 0936f817..00000000
--- a/launcher/minecraft/OpSys.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright 2013-2021 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#pragma once
-#include <QString>
-enum OpSys
-{
- Os_Windows,
- Os_FreeBSD,
- Os_Linux,
- Os_OSX,
- Os_Other
-};
-
-OpSys OpSys_fromString(QString);
-QString OpSys_toString(OpSys);
-
-#ifdef Q_OS_WIN32
- #define currentSystem Os_Windows
-#elif defined Q_OS_MAC
- #define currentSystem Os_OSX
-#elif defined Q_OS_FREEBSD
- #define currentSystem Os_FreeBSD
-#else
- #define currentSystem Os_Linux
-#endif
diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp
index 5e76b892..1618458f 100644
--- a/launcher/minecraft/PackProfile.cpp
+++ b/launcher/minecraft/PackProfile.cpp
@@ -273,6 +273,11 @@ void PackProfile::scheduleSave()
d->m_saveTimer.start();
}
+RuntimeContext PackProfile::runtimeContext()
+{
+ return d->m_instance->runtimeContext();
+}
+
QString PackProfile::componentsFilePath() const
{
return FS::PathCombine(d->m_instance->instanceRoot(), "mmc-pack.json");
@@ -784,7 +789,7 @@ bool PackProfile::removeComponent_internal(ComponentPtr patch)
return true;
}
QStringList jar, temp1, temp2, temp3;
- jarMod->getApplicableFiles(currentSystem, jar, temp1, temp2, temp3, d->m_instance->jarmodsPath().absolutePath());
+ jarMod->getApplicableFiles(d->m_instance->runtimeContext(), jar, temp1, temp2, temp3, d->m_instance->jarmodsPath().absolutePath());
QFileInfo finfo (jar[0]);
if(finfo.exists())
{
diff --git a/launcher/minecraft/PackProfile.h b/launcher/minecraft/PackProfile.h
index 918e7f7a..807511a2 100644
--- a/launcher/minecraft/PackProfile.h
+++ b/launcher/minecraft/PackProfile.h
@@ -1,16 +1,36 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#pragma once
@@ -104,6 +124,9 @@ public:
/// if there is a save scheduled, do it now.
void saveNow();
+ /// helper method, returns RuntimeContext of instance
+ RuntimeContext runtimeContext();
+
signals:
void minecraftChanged();
diff --git a/launcher/minecraft/Rule.cpp b/launcher/minecraft/Rule.cpp
index af2861e3..ff3d75f2 100644
--- a/launcher/minecraft/Rule.cpp
+++ b/launcher/minecraft/Rule.cpp
@@ -1,16 +1,36 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include <QJsonObject>
@@ -60,10 +80,10 @@ QList<std::shared_ptr<Rule>> rulesFromJsonV4(const QJsonObject &objectWithRules)
auto osNameVal = osObj.value("name");
if (!osNameVal.isString())
continue;
- OpSys requiredOs = OpSys_fromString(osNameVal.toString());
+ QString osName = osNameVal.toString();
QString versionRegex = osObj.value("version").toString();
// add a new OS rule
- rules.append(OsRule::create(action, requiredOs, versionRegex));
+ rules.append(OsRule::create(action, osName, versionRegex));
}
return rules;
}
@@ -81,7 +101,7 @@ QJsonObject OsRule::toJson()
ruleObj.insert("action", m_result == Allow ? QString("allow") : QString("disallow"));
QJsonObject osObj;
{
- osObj.insert("name", OpSys_toString(m_system));
+ osObj.insert("name", m_system);
if(!m_version_regexp.isEmpty())
{
osObj.insert("version", m_version_regexp);
diff --git a/launcher/minecraft/Rule.h b/launcher/minecraft/Rule.h
index 7aa34d96..236f9a87 100644
--- a/launcher/minecraft/Rule.h
+++ b/launcher/minecraft/Rule.h
@@ -1,16 +1,36 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#pragma once
@@ -19,7 +39,7 @@
#include <QList>
#include <QJsonObject>
#include <memory>
-#include "OpSys.h"
+#include "RuntimeContext.h"
class Library;
class Rule;
@@ -37,7 +57,7 @@ class Rule
{
protected:
RuleAction m_result;
- virtual bool applies(const Library *parent) = 0;
+ virtual bool applies(const Library *parent, const RuntimeContext & runtimeContext) = 0;
public:
Rule(RuleAction result) : m_result(result)
@@ -45,9 +65,9 @@ public:
}
virtual ~Rule() {};
virtual QJsonObject toJson() = 0;
- RuleAction apply(const Library *parent)
+ RuleAction apply(const Library *parent, const RuntimeContext & runtimeContext)
{
- if (applies(parent))
+ if (applies(parent, runtimeContext))
return m_result;
else
return Defer;
@@ -58,23 +78,23 @@ class OsRule : public Rule
{
private:
// the OS
- OpSys m_system;
+ QString m_system;
// the OS version regexp
QString m_version_regexp;
protected:
- virtual bool applies(const Library *)
+ virtual bool applies(const Library *, const RuntimeContext & runtimeContext)
{
- return (m_system == currentSystem);
+ return runtimeContext.classifierMatches(m_system);
}
- OsRule(RuleAction result, OpSys system, QString version_regexp)
+ OsRule(RuleAction result, QString system, QString version_regexp)
: Rule(result), m_system(system), m_version_regexp(version_regexp)
{
}
public:
virtual QJsonObject toJson();
- static std::shared_ptr<OsRule> create(RuleAction result, OpSys system,
+ static std::shared_ptr<OsRule> create(RuleAction result, QString system,
QString version_regexp)
{
return std::shared_ptr<OsRule>(new OsRule(result, system, version_regexp));
@@ -84,7 +104,7 @@ public:
class ImplicitRule : public Rule
{
protected:
- virtual bool applies(const Library *)
+ virtual bool applies(const Library *, const RuntimeContext & runtimeContext)
{
return true;
}
diff --git a/launcher/minecraft/VersionFile.cpp b/launcher/minecraft/VersionFile.cpp
index a9a0f7f4..76f41600 100644
--- a/launcher/minecraft/VersionFile.cpp
+++ b/launcher/minecraft/VersionFile.cpp
@@ -51,7 +51,7 @@ static bool isMinecraftVersion(const QString &uid)
return uid == "net.minecraft";
}
-void VersionFile::applyTo(LaunchProfile *profile)
+void VersionFile::applyTo(LaunchProfile *profile, const RuntimeContext & runtimeContext)
{
// Only real Minecraft can set those. Don't let anything override them.
if (isMinecraftVersion(uid))
@@ -77,15 +77,15 @@ void VersionFile::applyTo(LaunchProfile *profile)
for (auto library : libraries)
{
- profile->applyLibrary(library);
+ profile->applyLibrary(library, runtimeContext);
}
for (auto mavenFile : mavenFiles)
{
- profile->applyMavenFile(mavenFile);
+ profile->applyMavenFile(mavenFile, runtimeContext);
}
for (auto agent : agents)
{
- profile->applyAgent(agent);
+ profile->applyAgent(agent, runtimeContext);
}
profile->applyProblemSeverity(getProblemSeverity());
}
diff --git a/launcher/minecraft/VersionFile.h b/launcher/minecraft/VersionFile.h
index d4b29719..11c5a3af 100644
--- a/launcher/minecraft/VersionFile.h
+++ b/launcher/minecraft/VersionFile.h
@@ -41,7 +41,6 @@
#include <QSet>
#include <memory>
-#include "minecraft/OpSys.h"
#include "minecraft/Rule.h"
#include "ProblemProvider.h"
#include "Library.h"
@@ -60,22 +59,22 @@ class VersionFile : public ProblemContainer
friend class MojangVersionFormat;
friend class OneSixVersionFormat;
public: /* methods */
- void applyTo(LaunchProfile* profile);
+ void applyTo(LaunchProfile* profile, const RuntimeContext & runtimeContext);
public: /* data */
- /// PolyMC: order hint for this version file if no explicit order is set
+ /// Prism Launcher: order hint for this version file if no explicit order is set
int order = 0;
- /// PolyMC: human readable name of this package
+ /// Prism Launcher: human readable name of this package
QString name;
- /// PolyMC: package ID of this package
+ /// Prism Launcher: package ID of this package
QString uid;
- /// PolyMC: version of this package
+ /// Prism Launcher: version of this package
QString version;
- /// PolyMC: DEPRECATED dependency on a Minecraft version
+ /// Prism Launcher: DEPRECATED dependency on a Minecraft version
QString dependsOnMinecraftVersion;
/// Mojang: DEPRECATED used to version the Mojang version format
@@ -87,13 +86,13 @@ public: /* data */
/// Mojang: class to launch Minecraft with
QString mainClass;
- /// PolyMC: class to launch legacy Minecraft with (embed in a custom window)
+ /// Prism Launcher: class to launch legacy Minecraft with (embed in a custom window)
QString appletClass;
/// Mojang: Minecraft launch arguments (may contain placeholders for variable substitution)
QString minecraftArguments;
- /// PolyMC: Additional JVM launch arguments
+ /// Prism Launcher: Additional JVM launch arguments
QStringList addnJvmArguments;
/// Mojang: list of compatible java majors
@@ -111,38 +110,38 @@ public: /* data */
/// Mojang: DEPRECATED asset group to be used with Minecraft
QString assets;
- /// PolyMC: list of tweaker mod arguments for launchwrapper
+ /// Prism Launcher: list of tweaker mod arguments for launchwrapper
QStringList addTweakers;
/// Mojang: list of libraries to add to the version
QList<LibraryPtr> libraries;
- /// PolyMC: list of maven files to put in the libraries folder, but not in classpath
+ /// Prism Launcher: list of maven files to put in the libraries folder, but not in classpath
QList<LibraryPtr> mavenFiles;
- /// PolyMC: list of agents to add to JVM arguments
+ /// Prism Launcher: list of agents to add to JVM arguments
QList<AgentPtr> agents;
/// The main jar (Minecraft version library, normally)
LibraryPtr mainJar;
- /// PolyMC: list of attached traits of this version file - used to enable features
+ /// Prism Launcher: list of attached traits of this version file - used to enable features
QSet<QString> traits;
- /// PolyMC: list of jar mods added to this version
+ /// Prism Launcher: list of jar mods added to this version
QList<LibraryPtr> jarMods;
- /// PolyMC: list of mods added to this version
+ /// Prism Launcher: list of mods added to this version
QList<LibraryPtr> mods;
/**
- * PolyMC: set of packages this depends on
+ * Prism Launcher: set of packages this depends on
* NOTE: this is shared with the meta format!!!
*/
Meta::RequireSet requires;
/**
- * PolyMC: set of packages this conflicts with
+ * Prism Launcher: set of packages this conflicts with
* NOTE: this is shared with the meta format!!!
*/
Meta::RequireSet conflicts;
diff --git a/launcher/minecraft/auth/AccountList.h b/launcher/minecraft/auth/AccountList.h
index 8136a92e..a8c3529a 100644
--- a/launcher/minecraft/auth/AccountList.h
+++ b/launcher/minecraft/auth/AccountList.h
@@ -44,7 +44,7 @@
/*!
* List of available Mojang accounts.
- * This should be loaded in the background by PolyMC on startup.
+ * This should be loaded in the background by Prism Launcher on startup.
*/
class AccountList : public QAbstractListModel
{
diff --git a/launcher/minecraft/auth/MinecraftAccount.h b/launcher/minecraft/auth/MinecraftAccount.h
index 7777f846..0dcaeb53 100644
--- a/launcher/minecraft/auth/MinecraftAccount.h
+++ b/launcher/minecraft/auth/MinecraftAccount.h
@@ -61,7 +61,7 @@ Q_DECLARE_METATYPE(MinecraftAccountPtr)
* A profile within someone's Mojang account.
*
* Currently, the profile system has not been implemented by Mojang yet,
- * but we might as well add some things for it in PolyMC right now so
+ * but we might as well add some things for it in Prism Launcher right now so
* we don't have to rip the code to pieces to add it later.
*/
struct AccountProfile
diff --git a/launcher/minecraft/launch/LauncherPartLaunch.cpp b/launcher/minecraft/launch/LauncherPartLaunch.cpp
index ce477ad7..1d8d7083 100644
--- a/launcher/minecraft/launch/LauncherPartLaunch.cpp
+++ b/launcher/minecraft/launch/LauncherPartLaunch.cpp
@@ -154,7 +154,7 @@ void LauncherPartLaunch::executeTask()
#else
args << classPath.join(':');
#endif
- args << "org.polymc.EntryPoint";
+ args << "org.prismlauncher.EntryPoint";
qDebug() << args.join(' ');
diff --git a/launcher/minecraft/launch/MinecraftServerTarget.cpp b/launcher/minecraft/launch/MinecraftServerTarget.cpp
index 78a33359..a3383ec0 100644
--- a/launcher/minecraft/launch/MinecraftServerTarget.cpp
+++ b/launcher/minecraft/launch/MinecraftServerTarget.cpp
@@ -23,7 +23,7 @@ MinecraftServerTarget MinecraftServerTarget::parse(const QString &fullAddress) {
// The logic below replicates the exact logic minecraft uses for parsing server addresses.
// While the conversion is not lossless and eats errors, it ensures the same behavior
- // within Minecraft and PolyMC when entering server addresses.
+ // within Minecraft and Prism Launcher when entering server addresses.
if (fullAddress.startsWith("["))
{
int bracket = fullAddress.indexOf("]");
diff --git a/launcher/minecraft/launch/ModMinecraftJar.cpp b/launcher/minecraft/launch/ModMinecraftJar.cpp
index 93de9d59..1d6eecf2 100644
--- a/launcher/minecraft/launch/ModMinecraftJar.cpp
+++ b/launcher/minecraft/launch/ModMinecraftJar.cpp
@@ -1,22 +1,41 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include "ModMinecraftJar.h"
#include "launch/LaunchTask.h"
#include "MMCZip.h"
-#include "minecraft/OpSys.h"
#include "FileSystem.h"
#include "minecraft/MinecraftInstance.h"
#include "minecraft/PackProfile.h"
@@ -50,7 +69,7 @@ void ModMinecraftJar::executeTask()
{
auto mainJar = profile->getMainJar();
QStringList jars, temp1, temp2, temp3, temp4;
- mainJar->getApplicableFiles(currentSystem, jars, temp1, temp2, temp3, m_inst->getLocalLibraryPath());
+ mainJar->getApplicableFiles(m_inst->runtimeContext(), jars, temp1, temp2, temp3, m_inst->getLocalLibraryPath());
auto sourceJarPath = jars[0];
if(!MMCZip::createModdedJar(sourceJarPath, finalJarPath, jarMods))
{
diff --git a/launcher/minecraft/launch/ScanModFolders.cpp b/launcher/minecraft/launch/ScanModFolders.cpp
index 2a0e21b3..bdffeadd 100644
--- a/launcher/minecraft/launch/ScanModFolders.cpp
+++ b/launcher/minecraft/launch/ScanModFolders.cpp
@@ -1,22 +1,41 @@
-/* Copyright 2013-2021 MultiMC Contributors
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
#include "ScanModFolders.h"
#include "launch/LaunchTask.h"
#include "MMCZip.h"
-#include "minecraft/OpSys.h"
#include "FileSystem.h"
#include "minecraft/MinecraftInstance.h"
#include "minecraft/mod/ModFolderModel.h"
diff --git a/launcher/minecraft/update/FoldersTask.cpp b/launcher/minecraft/update/FoldersTask.cpp
index 22768bd9..b9ee9d98 100644
--- a/launcher/minecraft/update/FoldersTask.cpp
+++ b/launcher/minecraft/update/FoldersTask.cpp
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "FoldersTask.h"
#include "minecraft/MinecraftInstance.h"
#include <QDir>
diff --git a/launcher/minecraft/update/LibrariesTask.cpp b/launcher/minecraft/update/LibrariesTask.cpp
index aa2bf407..3b129fe1 100644
--- a/launcher/minecraft/update/LibrariesTask.cpp
+++ b/launcher/minecraft/update/LibrariesTask.cpp
@@ -34,7 +34,7 @@ void LibrariesTask::executeTask()
emitFailed(tr("Null jar is specified in the metadata, aborting."));
return false;
}
- auto dls = lib->getDownloads(currentSystem, metacache.get(), errors, localPath);
+ auto dls = lib->getDownloads(inst->runtimeContext(), metacache.get(), errors, localPath);
for(auto dl : dls)
{
downloadJob->addNetAction(dl);
diff --git a/launcher/modplatform/flame/FileResolvingTask.cpp b/launcher/modplatform/flame/FileResolvingTask.cpp
index 058d2471..1e7f5559 100644
--- a/launcher/modplatform/flame/FileResolvingTask.cpp
+++ b/launcher/modplatform/flame/FileResolvingTask.cpp
@@ -9,9 +9,10 @@ Flame::FileResolvingTask::FileResolvingTask(const shared_qobject_ptr<QNetworkAcc
bool Flame::FileResolvingTask::abort()
{
+ bool aborted = true;
if (m_dljob)
- return m_dljob->abort();
- return true;
+ aborted &= m_dljob->abort();
+ return aborted ? Task::abort() : false;
}
void Flame::FileResolvingTask::executeTask()
diff --git a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
index 209ad884..06b3788b 100644
--- a/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
+++ b/launcher/modplatform/legacy_ftb/PackInstallTask.cpp
@@ -65,48 +65,42 @@ void PackInstallTask::executeTask()
void PackInstallTask::downloadPack()
{
setStatus(tr("Downloading zip for %1").arg(m_pack.name));
+ setAbortable(false);
- auto packoffset = QString("%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
- auto entry = APPLICATION->metacache()->resolveEntry("FTBPacks", packoffset);
- netJobContainer = new NetJob("Download FTB Pack", m_network);
+ archivePath = QString("%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
- entry->setStale(true);
+ netJobContainer = new NetJob("Download FTB Pack", m_network);
QString url;
- if(m_pack.type == PackType::Private)
- {
- url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "privatepacks/%1").arg(packoffset);
+ if (m_pack.type == PackType::Private) {
+ url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "privatepacks/%1").arg(archivePath);
+ } else {
+ url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "modpacks/%1").arg(archivePath);
}
- else
- {
- url = QString(BuildConfig.LEGACY_FTB_CDN_BASE_URL + "modpacks/%1").arg(packoffset);
- }
- netJobContainer->addNetAction(Net::Download::makeCached(url, entry));
- archivePath = entry->getFullPath();
+ netJobContainer->addNetAction(Net::Download::makeFile(url, archivePath));
connect(netJobContainer.get(), &NetJob::succeeded, this, &PackInstallTask::onDownloadSucceeded);
connect(netJobContainer.get(), &NetJob::failed, this, &PackInstallTask::onDownloadFailed);
connect(netJobContainer.get(), &NetJob::progress, this, &PackInstallTask::onDownloadProgress);
connect(netJobContainer.get(), &NetJob::aborted, this, &PackInstallTask::onDownloadAborted);
+
netJobContainer->start();
+ setAbortable(true);
progress(1, 4);
}
void PackInstallTask::onDownloadSucceeded()
{
- abortable = false;
unzip();
}
void PackInstallTask::onDownloadFailed(QString reason)
{
- abortable = false;
emitFailed(reason);
}
void PackInstallTask::onDownloadProgress(qint64 current, qint64 total)
{
- abortable = true;
progress(current, total * 4);
setStatus(tr("Downloading zip for %1 (%2%)").arg(m_pack.name).arg(current / 10));
}
@@ -118,8 +112,10 @@ void PackInstallTask::onDownloadAborted()
void PackInstallTask::unzip()
{
- progress(2, 4);
setStatus(tr("Extracting modpack"));
+ setAbortable(false);
+ progress(2, 4);
+
QDir extractDir(m_stagingPath);
m_packZip.reset(new QuaZip(archivePath));
@@ -151,8 +147,8 @@ void PackInstallTask::onUnzipCanceled()
void PackInstallTask::install()
{
- progress(3, 4);
setStatus(tr("Installing modpack"));
+ progress(3, 4);
QDir unzipMcDir(m_stagingPath + "/unzip/minecraft");
if(unzipMcDir.exists())
{
@@ -247,11 +243,12 @@ void PackInstallTask::install()
bool PackInstallTask::abort()
{
- if(abortable)
- {
- return netJobContainer->abort();
+ if (!canAbort()) {
+ return false;
}
- return false;
+
+ netJobContainer->abort();
+ return InstanceTask::abort();
}
}
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
index 97ce1dc6..7b112d8f 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.cpp
@@ -58,6 +58,9 @@ PackInstallTask::PackInstallTask(Modpack pack, QString version, QWidget* parent)
bool PackInstallTask::abort()
{
+ if (!canAbort())
+ return false;
+
bool aborted = true;
if (m_net_job)
@@ -65,15 +68,13 @@ bool PackInstallTask::abort()
if (m_mod_id_resolver_task)
aborted &= m_mod_id_resolver_task->abort();
- if (aborted)
- emitAborted();
-
- return aborted;
+ return aborted ? InstanceTask::abort() : false;
}
void PackInstallTask::executeTask()
{
setStatus(tr("Getting the manifest..."));
+ setAbortable(false);
// Find pack version
auto version_it = std::find_if(m_pack.versions.constBegin(), m_pack.versions.constEnd(),
@@ -93,10 +94,12 @@ void PackInstallTask::executeTask()
QObject::connect(netJob, &NetJob::succeeded, this, &PackInstallTask::onManifestDownloadSucceeded);
QObject::connect(netJob, &NetJob::failed, this, &PackInstallTask::onManifestDownloadFailed);
+ QObject::connect(netJob, &NetJob::aborted, this, &PackInstallTask::abort);
QObject::connect(netJob, &NetJob::progress, this, &PackInstallTask::setProgress);
m_net_job = netJob;
+ setAbortable(true);
netJob->start();
}
@@ -130,6 +133,7 @@ void PackInstallTask::onManifestDownloadSucceeded()
void PackInstallTask::resolveMods()
{
setStatus(tr("Resolving mods..."));
+ setAbortable(false);
setProgress(0, 100);
m_file_id_map.clear();
@@ -162,15 +166,16 @@ void PackInstallTask::resolveMods()
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::succeeded, this, &PackInstallTask::onResolveModsSucceeded);
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::failed, this, &PackInstallTask::onResolveModsFailed);
+ connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::aborted, this, &PackInstallTask::abort);
connect(m_mod_id_resolver_task.get(), &Flame::FileResolvingTask::progress, this, &PackInstallTask::setProgress);
+ setAbortable(true);
+
m_mod_id_resolver_task->start();
}
void PackInstallTask::onResolveModsSucceeded()
{
- m_abortable = false;
-
QString text;
QList<QUrl> urls;
auto anyBlocked = false;
@@ -209,94 +214,23 @@ void PackInstallTask::onResolveModsSucceeded()
urls);
if (message_dialog->exec() == QDialog::Accepted)
- downloadPack();
+ createInstance();
else
abort();
} else {
- downloadPack();
+ createInstance();
}
}
-void PackInstallTask::downloadPack()
+void PackInstallTask::createInstance()
{
- setStatus(tr("Downloading mods..."));
+ setAbortable(false);
- auto* jobPtr = new NetJob(tr("Mod download"), APPLICATION->network());
- for (auto const& file : m_version.files) {
- if (file.serverOnly || file.url.isEmpty())
- continue;
-
- QFileInfo file_info(file.name);
- auto cacheName = file_info.completeBaseName() + "-" + file.sha1 + "." + file_info.suffix();
-
- auto entry = APPLICATION->metacache()->resolveEntry("ModpacksCHPacks", cacheName);
- entry->setStale(true);
-
- auto relpath = FS::PathCombine("minecraft", file.path, file.name);
- auto path = FS::PathCombine(m_stagingPath, relpath);
-
- if (m_files_to_copy.contains(path)) {
- qWarning() << "Ignoring" << file.url << "as a file of that path is already downloading.";
- continue;
- }
-
- qDebug() << "Will download" << file.url << "to" << path;
- m_files_to_copy[path] = entry->getFullPath();
-
- auto dl = Net::Download::makeCached(file.url, entry);
- if (!file.sha1.isEmpty()) {
- auto rawSha1 = QByteArray::fromHex(file.sha1.toLatin1());
- dl->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, rawSha1));
- }
-
- jobPtr->addNetAction(dl);
- }
-
- connect(jobPtr, &NetJob::succeeded, this, &PackInstallTask::onModDownloadSucceeded);
- connect(jobPtr, &NetJob::failed, this, &PackInstallTask::onModDownloadFailed);
- connect(jobPtr, &NetJob::progress, this, &PackInstallTask::setProgress);
-
- m_net_job = jobPtr;
- jobPtr->start();
-
- m_abortable = true;
-}
-
-void PackInstallTask::onModDownloadSucceeded()
-{
- m_net_job.reset();
- install();
-}
-
-void PackInstallTask::install()
-{
- setStatus(tr("Copying modpack files..."));
- setProgress(0, m_files_to_copy.size());
- QCoreApplication::processEvents();
-
- m_abortable = false;
-
- int i = 0;
- for (auto iter = m_files_to_copy.constBegin(); iter != m_files_to_copy.constEnd(); iter++) {
- auto& to = iter.key();
- auto& from = iter.value();
- FS::copy fileCopyOperation(from, to);
- if (!fileCopyOperation()) {
- qWarning() << "Failed to copy" << from << "to" << to;
- emitFailed(tr("Failed to copy files"));
- return;
- }
-
- setProgress(i++, m_files_to_copy.size());
- QCoreApplication::processEvents();
- }
-
- setStatus(tr("Installing modpack..."));
+ setStatus(tr("Creating the instance..."));
QCoreApplication::processEvents();
auto instanceConfigPath = FS::PathCombine(m_stagingPath, "instance.cfg");
auto instanceSettings = std::make_shared<INISettingsObject>(instanceConfigPath);
- instanceSettings->suspendSave();
MinecraftInstance instance(m_globalSettings, instanceSettings, m_stagingPath);
auto components = instance.getPackProfile();
@@ -337,8 +271,55 @@ void PackInstallTask::install()
instance.setName(name());
instance.setIconKey(m_instIcon);
instance.setManagedPack("modpacksch", QString::number(m_pack.id), m_pack.name, QString::number(m_version.id), m_version.name);
- instanceSettings->resumeSave();
+ instance.saveNow();
+
+ onCreateInstanceSucceeded();
+}
+
+void PackInstallTask::onCreateInstanceSucceeded()
+{
+ downloadPack();
+}
+
+void PackInstallTask::downloadPack()
+{
+ setStatus(tr("Downloading mods..."));
+ setAbortable(false);
+
+ auto* jobPtr = new NetJob(tr("Mod download"), APPLICATION->network());
+ for (auto const& file : m_version.files) {
+ if (file.serverOnly || file.url.isEmpty())
+ continue;
+
+ auto path = FS::PathCombine(m_stagingPath, ".minecraft", file.path, file.name);
+ qDebug() << "Will try to download" << file.url << "to" << path;
+
+ QFileInfo file_info(file.name);
+
+ auto dl = Net::Download::makeFile(file.url, path);
+ if (!file.sha1.isEmpty()) {
+ auto rawSha1 = QByteArray::fromHex(file.sha1.toLatin1());
+ dl->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, rawSha1));
+ }
+
+ jobPtr->addNetAction(dl);
+ }
+
+ connect(jobPtr, &NetJob::succeeded, this, &PackInstallTask::onModDownloadSucceeded);
+ connect(jobPtr, &NetJob::failed, this, &PackInstallTask::onModDownloadFailed);
+ connect(jobPtr, &NetJob::aborted, this, &PackInstallTask::abort);
+ connect(jobPtr, &NetJob::progress, this, &PackInstallTask::setProgress);
+
+ m_net_job = jobPtr;
+
+ setAbortable(true);
+ jobPtr->start();
+}
+
+void PackInstallTask::onModDownloadSucceeded()
+{
+ m_net_job.reset();
emitSucceeded();
}
@@ -352,6 +333,10 @@ void PackInstallTask::onResolveModsFailed(QString reason)
m_net_job.reset();
emitFailed(reason);
}
+void PackInstallTask::onCreateInstanceFailed(QString reason)
+{
+ emitFailed(reason);
+}
void PackInstallTask::onModDownloadFailed(QString reason)
{
m_net_job.reset();
diff --git a/launcher/modplatform/modpacksch/FTBPackInstallTask.h b/launcher/modplatform/modpacksch/FTBPackInstallTask.h
index e63ca0df..7c6fbeb9 100644
--- a/launcher/modplatform/modpacksch/FTBPackInstallTask.h
+++ b/launcher/modplatform/modpacksch/FTBPackInstallTask.h
@@ -56,7 +56,6 @@ public:
explicit PackInstallTask(Modpack pack, QString version, QWidget* parent = nullptr);
~PackInstallTask() override = default;
- bool canAbort() const override { return m_abortable; }
bool abort() override;
protected:
@@ -65,20 +64,20 @@ protected:
private slots:
void onManifestDownloadSucceeded();
void onResolveModsSucceeded();
+ void onCreateInstanceSucceeded();
void onModDownloadSucceeded();
void onManifestDownloadFailed(QString reason);
void onResolveModsFailed(QString reason);
+ void onCreateInstanceFailed(QString reason);
void onModDownloadFailed(QString reason);
private:
void resolveMods();
+ void createInstance();
void downloadPack();
- void install();
private:
- bool m_abortable = true;
-
NetJob::Ptr m_net_job = nullptr;
shared_qobject_ptr<Flame::FileResolvingTask> m_mod_id_resolver_task = nullptr;
diff --git a/launcher/net/HttpMetaCache.cpp b/launcher/net/HttpMetaCache.cpp
index 9606ddb6..42198b71 100644
--- a/launcher/net/HttpMetaCache.cpp
+++ b/launcher/net/HttpMetaCache.cpp
@@ -162,6 +162,18 @@ auto HttpMetaCache::evictEntry(MetaEntryPtr entry) -> bool
return true;
}
+void HttpMetaCache::evictAll()
+{
+ for (QString& base : m_entries.keys()) {
+ EntryMap& map = m_entries[base];
+ qDebug() << "Evicting base" << base;
+ for (MetaEntryPtr entry : map.entry_list) {
+ if (!evictEntry(entry))
+ qWarning() << "Unexpected missing cache entry" << entry->basePath;
+ }
+ }
+}
+
auto HttpMetaCache::staleEntry(QString base, QString resource_path) -> MetaEntryPtr
{
auto foo = new MetaEntry();
diff --git a/launcher/net/HttpMetaCache.h b/launcher/net/HttpMetaCache.h
index c0b12318..2a07d65a 100644
--- a/launcher/net/HttpMetaCache.h
+++ b/launcher/net/HttpMetaCache.h
@@ -113,6 +113,7 @@ class HttpMetaCache : public QObject {
// evict selected entry from cache
auto evictEntry(MetaEntryPtr entry) -> bool;
+ void evictAll();
void addBase(QString base, QString base_root);
diff --git a/launcher/resources/OSX/scalable/launcher.svg b/launcher/resources/OSX/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/OSX/scalable/launcher.svg
+++ b/launcher/resources/OSX/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/flat/scalable/launcher.svg b/launcher/resources/flat/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/flat/scalable/launcher.svg
+++ b/launcher/resources/flat/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/iOS/scalable/launcher.svg b/launcher/resources/iOS/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/iOS/scalable/launcher.svg
+++ b/launcher/resources/iOS/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc
index 2337acd6..3f3d22fc 100644
--- a/launcher/resources/multimc/multimc.qrc
+++ b/launcher/resources/multimc/multimc.qrc
@@ -311,6 +311,6 @@
<file>scalable/instances/fox.svg</file>
<file>scalable/instances/bee.svg</file>
- <file>scalable/instances/polymc.svg</file>
+ <file>scalable/instances/prismlauncher.svg</file>
</qresource>
</RCC>
diff --git a/launcher/resources/multimc/scalable/instances/polymc.svg b/launcher/resources/multimc/scalable/instances/polymc.svg
deleted file mode 100644
index c192d503..00000000
--- a/launcher/resources/multimc/scalable/instances/polymc.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
- </g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
-</svg>
diff --git a/launcher/resources/multimc/scalable/instances/prismlauncher.svg b/launcher/resources/multimc/scalable/instances/prismlauncher.svg
new file mode 100644
index 00000000..93493aab
--- /dev/null
+++ b/launcher/resources/multimc/scalable/instances/prismlauncher.svg
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg width="512" height="512" version="1.1" viewBox="0 0 135.47 135.47" xmlns="http://www.w3.org/2000/svg">
+ <g transform="matrix(1.3386 0 0 1.3386 16.155 10.174)">
+ <path d="m18.78 50.126c0 1.342 0.356 2.6345 1.0008 3.758l-18.279 10.617c-0.96723-1.6842-1.5023-3.6252-1.5023-5.6404v-31.721c0-2.0152 0.53511-3.9517 1.5001-5.6382l18.281 10.614c-0.6448 1.1235-1.0008 2.416-1.0008 3.7602z" fill="#7a573b"/>
+ <path d="m77.065 27.139v15.861h-18.78v-7.1243c0-1.342-0.3559-2.6367-1.003-3.7602l18.279-10.614c0.9694 1.6843 1.5023 3.6252 1.5023 5.6404z" fill="#f3db6c"/>
+ <path d="m77.065 43v15.861c0 2.0152-0.5351 3.9562-1.5023 5.6404l-17.278-10.031-1.003-0.5832c0.6471-1.1236 1.003-2.4183 1.003-3.7603v-7.1265z" fill="#7ab392"/>
+ <path d="m75.563 64.501c-0.9695 1.6843-2.3711 3.1208-4.1062 4.1296l-13.658 7.9303-9.3924-16.356 6.1392-3.5644c1.1553-0.6733 2.089-1.628 2.736-2.7516l18.279 10.614z" fill="#4b7cbc"/>
+ <path d="m57.799 76.559-13.658 7.9303c-1.7352 1.0065-3.6719 1.5109-5.6086 1.5109v-21.226c1.2896 0 2.5792-0.3355 3.739-1.0088l6.1348-3.5644 9.3924 16.356z" fill="#6f488c"/>
+ <path d="m57.799 9.4412-9.3924 16.356-6.1348-3.5644c-1.1598-0.6732-2.4494-1.0065-3.739-1.0065v-21.226c1.9367 0 3.8734 0.50437 5.6086 1.5109z" fill="#df6277"/>
+ <path d="m38.532 0v21.226c-1.2896 0-2.5793 0.3333-3.7391 1.0065l-12.274 7.1288c-1.1576 0.671-2.0912 1.6279-2.7383 2.7538l-18.281-10.614c0.96947-1.6865 2.3733-3.1208 4.1085-4.1295l27.315-15.861c1.7352-1.0065 3.6719-1.5109 5.6086-1.5109z" fill="#99cd61"/>
+ <path d="m75.563 21.501-18.279 10.614c-0.647-1.1236-1.5807-2.0806-2.736-2.7516l-6.1392-3.5644 9.3924-16.356 13.658 7.9303c1.7352 1.0065 3.1368 2.4431 4.1062 4.1296z" fill="#fb9168"/>
+ <path d="m38.532 64.776v21.226c-1.9367 0-3.8733-0.5044-5.6085-1.5109l-27.315-15.863c-1.7352-1.0087-3.1368-2.443-4.1062-4.1295l18.279-10.614c0.647 1.1236 1.5807 2.0783 2.736 2.7516l12.274 7.1287c1.1598 0.6733 2.4495 1.0088 3.7391 1.0088z" fill="#4d3f33"/>
+ <path d="m58.285 35.876v14.251c0 2.6885-1.424 5.1698-3.7391 6.5118l-12.274 7.1288c-1.1597 0.6732-2.4494 1.0087-3.739 1.0087-1.2897 0-2.5793-0.3355-3.7391-1.0087l-12.274-7.1288c-2.3151-1.342-3.7391-3.8233-3.7391-6.5118v-14.251c0-2.6884 1.424-5.1698 3.7391-6.5118l12.274-7.1287c1.1598-0.6733 2.4494-1.0065 3.7391-1.0065 1.2896 0 2.5793 0.3355 3.739 1.0065l6.1348 3.5643 6.1392 3.5644c1.1553 0.6733 2.089 1.628 2.736 2.7516 0.6471 1.1235 1.0031 2.4182 1.0031 3.7602z" fill="#fff"/>
+ <path d="m58.285 35.876v14.251c0 1.342-0.356 2.6367-1.0031 3.7603s-1.5807 2.0783-2.736 2.7515l-6.1392 3.5644-6.1348 3.5644c-1.1598 0.6732-2.4494 1.0087-3.739 1.0087v-21.774l14.728-8.5495 4.0234-2.335c0.6471 1.1236 1.0031 2.4183 1.0031 3.7603z" fill="#dfdfdf"/>
+ <path d="m38.532 43v21.774c-1.2897 0-2.5793-0.3355-3.7391-1.0088l-12.274-7.1287c-1.1553-0.6733-2.089-1.628-2.7361-2.7516-0.647-1.1235-1.003-2.4182-1.003-3.7602v-14.251c0-1.342 0.356-2.6367 1.003-3.7603l18.751 10.884z" fill="#d6d2d2"/>
+ </g>
+</svg>
diff --git a/launcher/resources/multimc/scalable/launcher.svg b/launcher/resources/multimc/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/multimc/scalable/launcher.svg
+++ b/launcher/resources/multimc/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/pe_blue/scalable/launcher.svg b/launcher/resources/pe_blue/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/pe_blue/scalable/launcher.svg
+++ b/launcher/resources/pe_blue/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/pe_colored/scalable/launcher.svg b/launcher/resources/pe_colored/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/pe_colored/scalable/launcher.svg
+++ b/launcher/resources/pe_colored/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/pe_dark/scalable/launcher.svg b/launcher/resources/pe_dark/scalable/launcher.svg
index c192d503..69dd84b1 100644
--- a/launcher/resources/pe_dark/scalable/launcher.svg
+++ b/launcher/resources/pe_dark/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/resources/pe_light/scalable/launcher.svg b/launcher/resources/pe_light/scalable/launcher.svg
index a9dfe87a..69dd84b1 100644
--- a/launcher/resources/pe_light/scalable/launcher.svg
+++ b/launcher/resources/pe_light/scalable/launcher.svg
@@ -1,21 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#dedede" offset="0"/>
- <stop stop-color="#d2d2d2" offset=".5"/>
- <stop stop-color="#c0c0c0" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#8f8f8f"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#c2c2c2"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#7c7c7c"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#d3d3d3"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#bcbcbc"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#dedede"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
</g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>CC BY-SA 4.0</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
</svg>
diff --git a/launcher/settings/INISettingsObject.cpp b/launcher/settings/INISettingsObject.cpp
index 12513403..da962ee9 100644
--- a/launcher/settings/INISettingsObject.cpp
+++ b/launcher/settings/INISettingsObject.cpp
@@ -16,7 +16,30 @@
#include "INISettingsObject.h"
#include "Setting.h"
-INISettingsObject::INISettingsObject(const QString &path, QObject *parent)
+#include <QDebug>
+#include <QFile>
+
+INISettingsObject::INISettingsObject(QStringList paths, QObject *parent)
+ : SettingsObject(parent)
+{
+ auto first_path = paths.constFirst();
+ for (auto path : paths) {
+ if (!QFile::exists(path))
+ continue;
+
+ if (path != first_path && QFile::exists(path)) {
+ // Copy the fallback to the preferred path.
+ QFile::copy(path, first_path);
+ qDebug() << "Copied settings from" << path << "to" << first_path;
+ break;
+ }
+ }
+
+ m_filePath = first_path;
+ m_ini.loadFile(first_path);
+}
+
+INISettingsObject::INISettingsObject(QString path, QObject* parent)
: SettingsObject(parent)
{
m_filePath = path;
diff --git a/launcher/settings/INISettingsObject.h b/launcher/settings/INISettingsObject.h
index 26cc32e5..d2f448a9 100644
--- a/launcher/settings/INISettingsObject.h
+++ b/launcher/settings/INISettingsObject.h
@@ -28,7 +28,10 @@ class INISettingsObject : public SettingsObject
{
Q_OBJECT
public:
- explicit INISettingsObject(const QString &path, QObject *parent = 0);
+ /** 'paths' is a list of INI files to try, in order, for fallback support. */
+ explicit INISettingsObject(QStringList paths, QObject* parent = nullptr);
+
+ explicit INISettingsObject(QString path, QObject* parent = nullptr);
/*!
* \brief Gets the path to the INI file.
diff --git a/launcher/settings/Setting.h b/launcher/settings/Setting.h
index 9a5b8210..86007c13 100644
--- a/launcher/settings/Setting.h
+++ b/launcher/settings/Setting.h
@@ -33,7 +33,7 @@ public:
* Construct a Setting
*
* Synonyms are all the possible names used in the settings object, in order of preference.
- * First synonym is the ID, which identifies the setting in PolyMC.
+ * First synonym is the ID, which identifies the setting in Prism Launcher.
*
* defVal is the default value that will be returned when the settings object
* doesn't have any value for this setting.
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 5729b44d..0fab0202 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -161,7 +161,7 @@ public:
QString result;
result = QApplication::translate("MainWindow", m_text);
if(result.contains("%1")) {
- result = result.arg(BuildConfig.LAUNCHER_NAME);
+ result = result.arg(BuildConfig.LAUNCHER_DISPLAYNAME);
}
m_contained->setText(result);
}
@@ -170,7 +170,7 @@ public:
QString result;
result = QApplication::translate("MainWindow", m_tooltip);
if(result.contains("%1")) {
- result = result.arg(BuildConfig.LAUNCHER_NAME);
+ result = result.arg(BuildConfig.LAUNCHER_DISPLAYNAME);
}
m_contained->setToolTip(result);
}
@@ -229,19 +229,13 @@ public:
TranslatedAction actionRenameInstance;
TranslatedAction actionChangeInstGroup;
TranslatedAction actionChangeInstIcon;
- TranslatedAction actionEditInstNotes;
TranslatedAction actionEditInstance;
- TranslatedAction actionWorlds;
- TranslatedAction actionMods;
TranslatedAction actionViewSelectedInstFolder;
- TranslatedAction actionViewSelectedMCFolder;
TranslatedAction actionDeleteInstance;
- TranslatedAction actionConfig_Folder;
TranslatedAction actionCAT;
TranslatedAction actionCopyInstance;
TranslatedAction actionLaunchInstanceOffline;
TranslatedAction actionLaunchInstanceDemo;
- TranslatedAction actionScreenshots;
TranslatedAction actionExportInstance;
QVector<TranslatedAction *> all_actions;
@@ -258,6 +252,7 @@ public:
QMenu * helpMenu = nullptr;
TranslatedToolButton helpMenuButton;
+ TranslatedAction actionClearMetadata;
TranslatedAction actionReportBug;
TranslatedAction actionDISCORD;
TranslatedAction actionMATRIX;
@@ -347,6 +342,13 @@ public:
actionUndoTrashInstance->setShortcut(QKeySequence("Ctrl+Z"));
all_actions.append(&actionUndoTrashInstance);
+ actionClearMetadata = TranslatedAction(MainWindow);
+ actionClearMetadata->setObjectName(QStringLiteral("actionClearMetadata"));
+ actionClearMetadata->setIcon(APPLICATION->getThemedIcon("refresh"));
+ actionClearMetadata.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Clear Metadata Cache"));
+ actionClearMetadata.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Clear cached metadata"));
+ all_actions.append(&actionClearMetadata);
+
if (!BuildConfig.BUG_TRACKER_URL.isEmpty()) {
actionReportBug = TranslatedAction(MainWindow);
actionReportBug->setObjectName(QStringLiteral("actionReportBug"));
@@ -445,6 +447,8 @@ public:
helpMenu = new QMenu(MainWindow);
helpMenu->setToolTipsVisible(true);
+ helpMenu->addAction(actionClearMetadata);
+
if (!BuildConfig.BUG_TRACKER_URL.isEmpty()) {
helpMenu->addAction(actionReportBug);
}
@@ -505,16 +509,8 @@ public:
fileMenu->addAction(actionCloseWindow);
fileMenu->addSeparator();
fileMenu->addAction(actionEditInstance);
- fileMenu->addAction(actionEditInstNotes);
- fileMenu->addAction(actionMods);
- fileMenu->addAction(actionWorlds);
- fileMenu->addAction(actionScreenshots);
fileMenu->addAction(actionChangeInstGroup);
- fileMenu->addSeparator();
- fileMenu->addAction(actionViewSelectedMCFolder);
- fileMenu->addAction(actionConfig_Folder);
fileMenu->addAction(actionViewSelectedInstFolder);
- fileMenu->addSeparator();
fileMenu->addAction(actionExportInstance);
fileMenu->addAction(actionDeleteInstance);
fileMenu->addAction(actionCopyInstance);
@@ -537,6 +533,8 @@ public:
helpMenu = menuBar->addMenu(tr("&Help"));
helpMenu->setSeparatorsCollapsible(false);
+ helpMenu->addAction(actionClearMetadata);
+ helpMenu->addSeparator();
helpMenu->addAction(actionAbout);
helpMenu->addAction(actionOpenWiki);
helpMenu->addAction(actionNewsMenuBar);
@@ -586,13 +584,7 @@ public:
void setInstanceActionsEnabled(bool enabled)
{
actionEditInstance->setEnabled(enabled);
- actionEditInstNotes->setEnabled(enabled);
- actionMods->setEnabled(enabled);
- actionWorlds->setEnabled(enabled);
- actionScreenshots->setEnabled(enabled);
actionChangeInstGroup->setEnabled(enabled);
- actionViewSelectedMCFolder->setEnabled(enabled);
- actionConfig_Folder->setEnabled(enabled);
actionViewSelectedInstFolder->setEnabled(enabled);
actionExportInstance->setEnabled(enabled);
actionDeleteInstance->setEnabled(enabled);
@@ -687,35 +679,11 @@ public:
actionEditInstance = TranslatedAction(MainWindow);
actionEditInstance->setObjectName(QStringLiteral("actionEditInstance"));
- actionEditInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Edit Inst&ance..."));
+ actionEditInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Edit..."));
actionEditInstance.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Change the instance settings, mods and versions."));
actionEditInstance->setShortcut(QKeySequence(tr("Ctrl+I")));
all_actions.append(&actionEditInstance);
- actionEditInstNotes = TranslatedAction(MainWindow);
- actionEditInstNotes->setObjectName(QStringLiteral("actionEditInstNotes"));
- actionEditInstNotes.setTextId(QT_TRANSLATE_NOOP("MainWindow", "E&dit Notes..."));
- actionEditInstNotes.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Edit the notes for the selected instance."));
- all_actions.append(&actionEditInstNotes);
-
- actionMods = TranslatedAction(MainWindow);
- actionMods->setObjectName(QStringLiteral("actionMods"));
- actionMods.setTextId(QT_TRANSLATE_NOOP("MainWindow", "View &Mods"));
- actionMods.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "View the mods of this instance."));
- all_actions.append(&actionMods);
-
- actionWorlds = TranslatedAction(MainWindow);
- actionWorlds->setObjectName(QStringLiteral("actionWorlds"));
- actionWorlds.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&View Worlds"));
- actionWorlds.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "View the worlds of this instance."));
- all_actions.append(&actionWorlds);
-
- actionScreenshots = TranslatedAction(MainWindow);
- actionScreenshots->setObjectName(QStringLiteral("actionScreenshots"));
- actionScreenshots.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Manage &Screenshots"));
- actionScreenshots.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "View and upload screenshots for this instance."));
- all_actions.append(&actionScreenshots);
-
actionChangeInstGroup = TranslatedAction(MainWindow);
actionChangeInstGroup->setObjectName(QStringLiteral("actionChangeInstGroup"));
actionChangeInstGroup.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Change Group..."));
@@ -723,38 +691,22 @@ public:
actionChangeInstGroup->setShortcut(QKeySequence(tr("Ctrl+G")));
all_actions.append(&actionChangeInstGroup);
- actionViewSelectedMCFolder = TranslatedAction(MainWindow);
- actionViewSelectedMCFolder->setObjectName(QStringLiteral("actionViewSelectedMCFolder"));
- actionViewSelectedMCFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Minec&raft Folder"));
- actionViewSelectedMCFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the selected instance's Minecraft folder in a file browser."));
- actionViewSelectedMCFolder->setShortcut(QKeySequence(tr("Ctrl+M")));
- all_actions.append(&actionViewSelectedMCFolder);
-
- actionConfig_Folder = TranslatedAction(MainWindow);
- actionConfig_Folder->setObjectName(QStringLiteral("actionConfig_Folder"));
- actionConfig_Folder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Confi&g Folder"));
- actionConfig_Folder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the instance's config folder."));
- // Qt on macOS is "smart" and will eat up this action when added to the menu bar because it starts with the word "config"...
- // Docs: https://doc.qt.io/qt-5/qmenubar.html#qmenubar-as-a-global-menu-bar
- actionConfig_Folder->setMenuRole(QAction::NoRole);
- all_actions.append(&actionConfig_Folder);
-
actionViewSelectedInstFolder = TranslatedAction(MainWindow);
actionViewSelectedInstFolder->setObjectName(QStringLiteral("actionViewSelectedInstFolder"));
- actionViewSelectedInstFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Instance Folder"));
+ actionViewSelectedInstFolder.setTextId(QT_TRANSLATE_NOOP("MainWindow", "&Folder"));
actionViewSelectedInstFolder.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open the selected instance's root folder in a file browser."));
all_actions.append(&actionViewSelectedInstFolder);
actionExportInstance = TranslatedAction(MainWindow);
actionExportInstance->setObjectName(QStringLiteral("actionExportInstance"));
- actionExportInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "E&xport Instance..."));
+ actionExportInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "E&xport..."));
actionExportInstance.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Export the selected instance as a zip file."));
actionExportInstance->setShortcut(QKeySequence(tr("Ctrl+E")));
all_actions.append(&actionExportInstance);
actionDeleteInstance = TranslatedAction(MainWindow);
actionDeleteInstance->setObjectName(QStringLiteral("actionDeleteInstance"));
- actionDeleteInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Dele&te Instance"));
+ actionDeleteInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Dele&te"));
actionDeleteInstance.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Delete the selected instance."));
actionDeleteInstance->setShortcuts({QKeySequence(tr("Backspace")), QKeySequence::Delete});
actionDeleteInstance->setAutoRepeat(false);
@@ -763,7 +715,7 @@ public:
actionCopyInstance = TranslatedAction(MainWindow);
actionCopyInstance->setObjectName(QStringLiteral("actionCopyInstance"));
actionCopyInstance->setIcon(APPLICATION->getThemedIcon("copy"));
- actionCopyInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Cop&y Instance..."));
+ actionCopyInstance.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Cop&y..."));
actionCopyInstance.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Copy the selected instance."));
actionCopyInstance->setShortcut(QKeySequence(tr("Ctrl+D")));
all_actions.append(&actionCopyInstance);
@@ -792,26 +744,15 @@ public:
instanceToolBar->addSeparator();
instanceToolBar->addAction(actionLaunchInstance);
- instanceToolBar->addAction(actionLaunchInstanceOffline);
instanceToolBar->addAction(actionKillInstance);
instanceToolBar->addSeparator();
instanceToolBar->addAction(actionEditInstance);
- instanceToolBar->addAction(actionEditInstNotes);
- instanceToolBar->addAction(actionMods);
- instanceToolBar->addAction(actionWorlds);
- instanceToolBar->addAction(actionScreenshots);
instanceToolBar->addAction(actionChangeInstGroup);
- instanceToolBar->addSeparator();
-
- instanceToolBar->addAction(actionViewSelectedMCFolder);
- instanceToolBar->addAction(actionConfig_Folder);
instanceToolBar->addAction(actionViewSelectedInstFolder);
- instanceToolBar->addSeparator();
-
instanceToolBar->addAction(actionExportInstance);
instanceToolBar->addAction(actionDeleteInstance);
instanceToolBar->addAction(actionCopyInstance);
@@ -830,7 +771,7 @@ public:
MainWindow->setWindowIcon(APPLICATION->getThemedIcon("logo"));
MainWindow->setWindowTitle(APPLICATION->applicationDisplayName());
#ifndef QT_NO_ACCESSIBILITY
- MainWindow->setAccessibleName(BuildConfig.LAUNCHER_NAME);
+ MainWindow->setAccessibleName(BuildConfig.LAUNCHER_DISPLAYNAME);
#endif
createMainToolbarActions(MainWindow);
@@ -1147,7 +1088,7 @@ void MainWindow::showInstanceContextMenu(const QPoint &pos)
{
auto group = view->groupNameAt(pos);
- QAction *actionVoid = new QAction(BuildConfig.LAUNCHER_NAME, this);
+ QAction *actionVoid = new QAction(BuildConfig.LAUNCHER_DISPLAYNAME, this);
actionVoid->setEnabled(false);
QAction *actionCreateInstance = new QAction(tr("Create instance"), this);
@@ -1197,7 +1138,6 @@ void MainWindow::updateMainToolBar()
void MainWindow::updateToolsMenu()
{
QToolButton *launchButton = dynamic_cast<QToolButton*>(ui->instanceToolBar->widgetForAction(ui->actionLaunchInstance));
- QToolButton *launchOfflineButton = dynamic_cast<QToolButton*>(ui->instanceToolBar->widgetForAction(ui->actionLaunchInstanceOffline));
bool currentInstanceRunning = m_selectedInstance && m_selectedInstance->isRunning();
@@ -1206,9 +1146,7 @@ void MainWindow::updateToolsMenu()
ui->actionLaunchInstanceDemo->setDisabled(!m_selectedInstance || currentInstanceRunning);
QMenu *launchMenu = ui->actionLaunchInstance->menu();
- QMenu *launchOfflineMenu = ui->actionLaunchInstanceOffline->menu();
launchButton->setPopupMode(QToolButton::MenuButtonPopup);
- launchOfflineButton->setPopupMode(QToolButton::MenuButtonPopup);
if (launchMenu)
{
launchMenu->clear();
@@ -1217,19 +1155,12 @@ void MainWindow::updateToolsMenu()
{
launchMenu = new QMenu(this);
}
- if (launchOfflineMenu) {
- launchOfflineMenu->clear();
- }
- else
- {
- launchOfflineMenu = new QMenu(this);
- }
QAction *normalLaunch = launchMenu->addAction(tr("Launch"));
normalLaunch->setShortcut(QKeySequence::Open);
- QAction *normalLaunchOffline = launchOfflineMenu->addAction(tr("Launch Offline"));
+ QAction *normalLaunchOffline = launchMenu->addAction(tr("Launch Offline"));
normalLaunchOffline->setShortcut(QKeySequence(tr("Ctrl+Shift+O")));
- QAction *normalLaunchDemo = launchOfflineMenu->addAction(tr("Launch Demo"));
+ QAction *normalLaunchDemo = launchMenu->addAction(tr("Launch Demo"));
normalLaunchDemo->setShortcut(QKeySequence(tr("Ctrl+Alt+O")));
if (m_selectedInstance)
{
@@ -1262,11 +1193,10 @@ void MainWindow::updateToolsMenu()
QString profilersTitle = tr("Profilers");
launchMenu->addSeparator()->setText(profilersTitle);
- launchOfflineMenu->addSeparator()->setText(profilersTitle);
for (auto profiler : APPLICATION->profilers().values())
{
QAction *profilerAction = launchMenu->addAction(profiler->name());
- QAction *profilerOfflineAction = launchOfflineMenu->addAction(profiler->name());
+ QAction *profilerOfflineAction = launchMenu->addAction(tr("%1 Offline").arg(profiler->name()));
QString error;
if (!profiler->check(&error))
{
@@ -1297,7 +1227,6 @@ void MainWindow::updateToolsMenu()
}
}
ui->actionLaunchInstance->setMenu(launchMenu);
- ui->actionLaunchInstanceOffline->setMenu(launchOfflineMenu);
}
void MainWindow::repopulateAccountsMenu()
@@ -1903,15 +1832,6 @@ void MainWindow::on_actionViewCentralModsFolder_triggered()
DesktopServices::openDirectory(APPLICATION->settings()->get("CentralModsDir").toString(), true);
}
-void MainWindow::on_actionConfig_Folder_triggered()
-{
- if (m_selectedInstance)
- {
- QString str = m_selectedInstance->instanceConfigFolder();
- DesktopServices::openDirectory(QDir(str).absolutePath());
- }
-}
-
void MainWindow::checkForUpdates()
{
if(BuildConfig.UPDATER_ENABLED)
@@ -1940,36 +1860,16 @@ void MainWindow::globalSettingsClosed()
updateToolsMenu();
updateStatusCenter();
// This needs to be done to prevent UI elements disappearing in the event the config is changed
- // but PolyMC exits abnormally, causing the window state to never be saved:
+ // but Prism Launcher exits abnormally, causing the window state to never be saved:
APPLICATION->settings()->set("MainWindowState", saveState().toBase64());
update();
}
-void MainWindow::on_actionEditInstNotes_triggered()
-{
- APPLICATION->showInstanceWindow(m_selectedInstance, "notes");
-}
-
-void MainWindow::on_actionWorlds_triggered()
-{
- APPLICATION->showInstanceWindow(m_selectedInstance, "worlds");
-}
-
-void MainWindow::on_actionMods_triggered()
-{
- APPLICATION->showInstanceWindow(m_selectedInstance, "mods");
-}
-
void MainWindow::on_actionEditInstance_triggered()
{
APPLICATION->showInstanceWindow(m_selectedInstance);
}
-void MainWindow::on_actionScreenshots_triggered()
-{
- APPLICATION->showInstanceWindow(m_selectedInstance, "screenshots");
-}
-
void MainWindow::on_actionManageAccounts_triggered()
{
APPLICATION->ShowGlobalSettings(this, "accounts");
@@ -1980,6 +1880,11 @@ void MainWindow::on_actionReportBug_triggered()
DesktopServices::openUrl(QUrl(BuildConfig.BUG_TRACKER_URL));
}
+void MainWindow::on_actionClearMetadata_triggered()
+{
+ APPLICATION->metacache()->evictAll();
+}
+
void MainWindow::on_actionOpenWiki_triggered()
{
DesktopServices::openUrl(QUrl(BuildConfig.HELP_URL.arg("")));
@@ -2058,20 +1963,6 @@ void MainWindow::on_actionViewSelectedInstFolder_triggered()
}
}
-void MainWindow::on_actionViewSelectedMCFolder_triggered()
-{
- if (m_selectedInstance)
- {
- QString str = m_selectedInstance->gameRoot();
- if (!FS::ensureFilePathExists(str))
- {
- // TODO: report error
- return;
- }
- DesktopServices::openDirectory(QDir(str).absolutePath());
- }
-}
-
void MainWindow::closeEvent(QCloseEvent *event)
{
// Save the window state and geometry.
@@ -2252,7 +2143,7 @@ void MainWindow::checkInstancePathForProblems()
"You have now two options: <br/>"
" - change the instance folder in the settings <br/>"
" - move this installation of %1 to a different folder"
- ).arg(BuildConfig.LAUNCHER_NAME)
+ ).arg(BuildConfig.LAUNCHER_DISPLAYNAME)
);
warning.setDefaultButton(QMessageBox::Ok);
warning.exec();
diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h
index 8b41bf94..cb8cb4aa 100644
--- a/launcher/ui/MainWindow.h
+++ b/launcher/ui/MainWindow.h
@@ -112,12 +112,8 @@ private slots:
void on_actionViewInstanceFolder_triggered();
- void on_actionConfig_Folder_triggered();
-
void on_actionViewSelectedInstFolder_triggered();
- void on_actionViewSelectedMCFolder_triggered();
-
void refreshInstances();
void on_actionViewCentralModsFolder_triggered();
@@ -130,6 +126,8 @@ private slots:
void on_actionReportBug_triggered();
+ void on_actionClearMetadata_triggered();
+
void on_actionOpenWiki_triggered();
void on_actionMoreNews_triggered();
@@ -159,14 +157,6 @@ private slots:
void on_actionEditInstance_triggered();
- void on_actionEditInstNotes_triggered();
-
- void on_actionMods_triggered();
-
- void on_actionWorlds_triggered();
-
- void on_actionScreenshots_triggered();
-
void taskEnd();
/**
diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp
index 743c34f1..2970d47d 100644
--- a/launcher/ui/dialogs/AboutDialog.cpp
+++ b/launcher/ui/dialogs/AboutDialog.cpp
@@ -69,9 +69,8 @@ QString getCreditsHtml()
#endif
stream << "<center>\n";
- //: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Developers"
- stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_NAME) << "</h3>\n";
- stream << QString("<p>LennyMcLennington %1</p>\n") .arg(getGitHub("LennyMcLennington"));
+ //: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Developers"
+ stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n";
stream << QString("<p>Sefa Eyeoglu (Scrumplex) %1</p>\n") .arg(getWebsite("https://scrumplex.net"));
stream << QString("<p>dada513 %1</p>\n") .arg(getGitHub("dada513"));
stream << QString("<p>txtsd %1</p>\n") .arg(getGitHub("txtsd"));
@@ -80,15 +79,15 @@ QString getCreditsHtml()
stream << QString("<p>cozyGalvinism %1</p>\n") .arg(getGitHub("cozyGalvinism"));
stream << "<br />\n";
- //: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Contributors"
- stream << "<h3>" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_NAME) << "</h3>\n";
- stream << QString("<p>DioEgizio %1</p>\n") .arg(getGitHub("DioEgizio"));
- stream << QString("<p>flowln %1</p>\n") .arg(getGitHub("flowln"));
- stream << QString("<p>swirl %1</p>\n") .arg(getWebsite("https://swurl.xyz/"));
+ //: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Contributors"
+ stream << "<h3>" << QObject::tr("%1 Contributors", "About Credits").arg(BuildConfig.LAUNCHER_DISPLAYNAME) << "</h3>\n";
+ stream << QString("<p>DioEgizio %1</p>\n") .arg(getGitHub("DioEgizio"));
+ stream << QString("<p>flowln %1</p>\n") .arg(getGitHub("flowln"));
+ stream << QString("<p>swirl %1</p>\n") .arg(getWebsite("https://swurl.xyz/"));
stream << "<br />\n";
// TODO: possibly retrieve from git history at build time?
- //: %1 is the name of the launcher, determined at build time, e.g. "PolyMC Developers"
+ //: %1 is the name of the launcher, determined at build time, e.g. "Prism Launcher Developers"
stream << "<h3>" << QObject::tr("%1 Developers", "About Credits").arg("MultiMC") << "</h3>\n";
stream << "<p>Andrew Okin &lt;<a href='mailto:forkk@forkk.net'>forkk@forkk.net</a>&gt;</p>\n";
stream << QString("<p>Petr Mrázek &lt;<a href='mailto:peterix@gmail.com'>peterix@gmail.com</a>&gt;</p>\n");
@@ -98,12 +97,20 @@ QString getCreditsHtml()
stream << "<br />\n";
stream << "<h3>" << QObject::tr("With thanks to", "About Credits") << "</h3>\n";
+ stream << QString("<p>Boba %1</p>\n") .arg(getWebsite("https://cmdplusv.neocities.org/"));
+ stream << QString("<p>Davi Rafael %1</p>\n") .arg(getWebsite("https://auti.one/"));
+ stream << QString("<p>Fulmine %1</p>\n") .arg(getWebsite("https://www.fulmine.xyz/"));
+ stream << QString("<p>ely %1</p>\n") .arg(getGitHub("elyrodso"));
+ stream << QString("<p>gon sawa %1</p>\n") .arg(getGitHub("gonsawa"));
+ stream << QString("<p>Pankakes</p>\n");
+ stream << QString("<p>tobimori %1</p>\n") .arg(getGitHub("tobimori"));
stream << "<p>Orochimarufan &lt;<a href='mailto:orochimarufan.x3@gmail.com'>orochimarufan.x3@gmail.com</a>&gt;</p>\n";
stream << "<p>TakSuyu &lt;<a href='mailto:taksuyu@gmail.com'>taksuyu@gmail.com</a>&gt;</p>\n";
stream << "<p>Kilobyte &lt;<a href='mailto:stiepen22@gmx.de'>stiepen22@gmx.de</a>&gt;</p>\n";
stream << "<p>Rootbear75 &lt;<a href='https://twitter.com/rootbear75'>@rootbear75</a>&gt;</p>\n";
stream << "<p>Zeker Zhayard &lt;<a href='https://twitter.com/zeker_zhayard'>@Zeker_Zhayard</a>&gt;</p>\n";
- stream << "<p>Everyone else who <a href='https://github.com/PolyMC/PolyMC/graphs/contributors'>contributed</a>!</p>\n";
+ stream << "<p>Everyone who helped establish our branding!</p>\n";
+ stream << "<p>And everyone else who <a href='https://github.com/PrismLauncher/PrismLauncher/graphs/contributors'>contributed</a>!</p>\n";
stream << "<br />\n";
stream << "</center>\n";
@@ -125,7 +132,7 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
{
ui->setupUi(this);
- QString launcherName = BuildConfig.LAUNCHER_NAME;
+ QString launcherName = BuildConfig.LAUNCHER_DISPLAYNAME;
setWindowTitle(tr("About %1").arg(launcherName));
diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp
index d203795a..df182f09 100644
--- a/launcher/ui/dialogs/NewInstanceDialog.cpp
+++ b/launcher/ui/dialogs/NewInstanceDialog.cpp
@@ -139,6 +139,10 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString
void NewInstanceDialog::reject()
{
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
+
+ // This is just so that the pages get the close() call and can react to it, if needed.
+ m_container->prepareToClose();
+
QDialog::reject();
}
@@ -146,6 +150,10 @@ void NewInstanceDialog::accept()
{
APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64());
importIconNow();
+
+ // This is just so that the pages get the close() call and can react to it, if needed.
+ m_container->prepareToClose();
+
QDialog::accept();
}
diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp
index 258a32e4..68dd4d17 100644
--- a/launcher/ui/dialogs/ProgressDialog.cpp
+++ b/launcher/ui/dialogs/ProgressDialog.cpp
@@ -25,6 +25,7 @@ ProgressDialog::ProgressDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Pr
{
ui->setupUi(this);
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
+ setAttribute(Qt::WidgetAttribute::WA_QuitOnClose, true);
setSkipButton(false);
changeProgress(0, 100);
}
@@ -67,7 +68,7 @@ int ProgressDialog::execWithTask(Task* task)
return QDialog::DialogCode::Accepted;
}
- QDialog::DialogCode result;
+ QDialog::DialogCode result {};
if (handleImmediateResult(result)) {
return result;
}
@@ -80,7 +81,7 @@ int ProgressDialog::execWithTask(Task* task)
connect(task, &Task::stepStatus, this, &ProgressDialog::changeStatus);
connect(task, &Task::progress, this, &ProgressDialog::changeProgress);
- connect(task, &Task::aborted, [this] { QDialog::reject(); });
+ connect(task, &Task::aborted, this, &ProgressDialog::hide);
connect(task, &Task::abortStatusChanged, ui->skipButton, &QPushButton::setEnabled);
m_is_multi_step = task->isMultiStep();
diff --git a/launcher/ui/dialogs/UpdateDialog.cpp b/launcher/ui/dialogs/UpdateDialog.cpp
index e0c5a495..9e82531a 100644
--- a/launcher/ui/dialogs/UpdateDialog.cpp
+++ b/launcher/ui/dialogs/UpdateDialog.cpp
@@ -73,12 +73,12 @@ void UpdateDialog::loadChangelog()
QString url;
if(channel == "stable")
{
- url = QString("https://raw.githubusercontent.com/PolyMC/PolyMC/%1/changelog.md").arg(channel);
+ url = QString("https://raw.githubusercontent.com/PrismLauncher/PrismLauncher/%1/changelog.md").arg(channel);
m_changelogType = CHANGELOG_MARKDOWN;
}
else
{
- url = QString("https://api.github.com/repos/PolyMC/PolyMC/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel);
+ url = QString("https://api.github.com/repos/PrismLauncher/PrismLauncher/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel);
m_changelogType = CHANGELOG_COMMITS;
}
dljob->addNetAction(Net::Download::makeByteArray(QUrl(url), &changelogData));
@@ -93,7 +93,7 @@ QString reprocessMarkdown(QByteArray markdown)
QString output = hoedown.process(markdown);
// HACK: easier than customizing hoedown
- output.replace(QRegularExpression("GH-([0-9]+)"), "<a href=\"https://github.com/PolyMC/PolyMC/issues/\\1\">GH-\\1</a>");
+ output.replace(QRegularExpression("GH-([0-9]+)"), "<a href=\"https://github.com/PrismLauncher/PrismLauncher/issues/\\1\">GH-\\1</a>");
qDebug() << output;
return output;
}
@@ -135,7 +135,7 @@ QString reprocessCommits(QByteArray json)
result += "<tr><td>";
if(issuenr.length())
{
- result += QString("<a href=\"https://github.com/PolyMC/PolyMC/issues/%1\">GH-%2</a>").arg(issuenr, issuenr);
+ result += QString("<a href=\"https://github.com/PrismLauncher/PrismLauncher/issues/%1\">GH-%2</a>").arg(issuenr, issuenr);
}
else if(prefix.length())
{
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index a4f4dfb9..278f45c4 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -167,7 +167,7 @@ void AccountListPage::on_actionAddMicrosoft_triggered()
tr(
"Microsoft accounts are only usable on macOS 10.13 or newer, with fully updated %1.\n\n"
"Please update both your operating system and %1."
- ).arg(BuildConfig.LAUNCHER_NAME),
+ ).arg(BuildConfig.LAUNCHER_DISPLAYNAME),
QMessageBox::Warning
)->exec();
return;
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 73ef0024..1e5df5b2 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -151,7 +151,7 @@ void LauncherPage::on_instDirBrowseBtn_clicked()
"This is known to cause problems. "
"After a restart the launcher might break, "
"because it will no longer have access to that directory.\n\n"
- "Granting PolyMC access to it via Flatseal is recommended."));
+ "Granting %1 access to it via Flatseal is recommended.").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
warning.setInformativeText(
tr("Do you want to proceed anyway?"));
warning.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 645f7ef6..0d14f147 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -176,7 +176,7 @@
<item>
<widget class="QLabel" name="metadataWarningLabel">
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; color:#f5c211;&quot;&gt;Warning&lt;/span&gt;&lt;span style=&quot; color:#f5c211;&quot;&gt;: Disabling mod metadata may also disable some upcoming QoL features, such as mod updating!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; color:#f5c211;&quot;&gt;Warning&lt;/span&gt;&lt;span style=&quot; color:#f5c211;&quot;&gt;: Disabling mod metadata may also disable some QoL features, such as mod updating!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>
diff --git a/launcher/ui/pages/instance/ExternalResourcesPage.cpp b/launcher/ui/pages/instance/ExternalResourcesPage.cpp
index f31e8325..b6c873cc 100644
--- a/launcher/ui/pages/instance/ExternalResourcesPage.cpp
+++ b/launcher/ui/pages/instance/ExternalResourcesPage.cpp
@@ -103,10 +103,6 @@ void ExternalResourcesPage::runningStateChanged(bool running)
return;
m_controlsEnabled = !running;
- ui->actionAddItem->setEnabled(m_controlsEnabled);
- ui->actionDisableItem->setEnabled(m_controlsEnabled);
- ui->actionEnableItem->setEnabled(m_controlsEnabled);
- ui->actionRemoveItem->setEnabled(m_controlsEnabled);
}
bool ExternalResourcesPage::shouldDisplay() const
diff --git a/launcher/ui/pages/instance/InstanceSettingsPage.cpp b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
index 03910745..5da7f19f 100644
--- a/launcher/ui/pages/instance/InstanceSettingsPage.cpp
+++ b/launcher/ui/pages/instance/InstanceSettingsPage.cpp
@@ -274,6 +274,9 @@ void InstanceSettingsPage::applySettings()
{
m_settings->reset("JoinServerOnLaunchAddress");
}
+
+ // FIXME: This should probably be called by a signal instead
+ m_instance->updateRuntimeContext();
}
void InstanceSettingsPage::loadSettings()
diff --git a/launcher/ui/pages/instance/LogPage.cpp b/launcher/ui/pages/instance/LogPage.cpp
index 3d9fb025..31c3e925 100644
--- a/launcher/ui/pages/instance/LogPage.cpp
+++ b/launcher/ui/pages/instance/LogPage.cpp
@@ -279,7 +279,7 @@ void LogPage::on_btnPaste_clicked()
MessageLevel::Launcher,
QString("%2: Log upload triggered at: %1").arg(
QDateTime::currentDateTime().toString(Qt::RFC2822Date),
- BuildConfig.LAUNCHER_NAME
+ BuildConfig.LAUNCHER_DISPLAYNAME
)
);
auto url = GuiUtil::uploadPaste(m_model->toPlainText(), this);
@@ -289,7 +289,7 @@ void LogPage::on_btnPaste_clicked()
MessageLevel::Launcher,
QString("%2: Log uploaded to: %1").arg(
url,
- BuildConfig.LAUNCHER_NAME
+ BuildConfig.LAUNCHER_DISPLAYNAME
)
);
}
@@ -297,7 +297,7 @@ void LogPage::on_btnPaste_clicked()
{
m_model->append(
MessageLevel::Error,
- QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_NAME)
+ QString("%1: Log upload failed!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)
);
}
}
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index 28a874c2..f0106066 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -117,6 +117,10 @@ void ModFolderPage::runningStateChanged(bool running)
ExternalResourcesPage::runningStateChanged(running);
ui->actionDownloadItem->setEnabled(!running);
ui->actionUpdateItem->setEnabled(!running);
+ ui->actionAddItem->setEnabled(!running);
+ ui->actionEnableItem->setEnabled(!running);
+ ui->actionDisableItem->setEnabled(!running);
+ ui->actionRemoveItem->setEnabled(!running);
}
bool ModFolderPage::shouldDisplay() const
diff --git a/launcher/ui/pages/modplatform/ImportPage.ui b/launcher/ui/pages/modplatform/ImportPage.ui
index 0a50e871..3583cf90 100644
--- a/launcher/ui/pages/modplatform/ImportPage.ui
+++ b/launcher/ui/pages/modplatform/ImportPage.ui
@@ -60,7 +60,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
- <string>- PolyMC / MultiMC exported instances (ZIP)</string>
+ <string>- Prism Launcher, PolyMC or MultiMC exported instances (ZIP)</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
diff --git a/launcher/ui/pages/modplatform/ModModel.cpp b/launcher/ui/pages/modplatform/ModModel.cpp
index 8961fadd..49766fa6 100644
--- a/launcher/ui/pages/modplatform/ModModel.cpp
+++ b/launcher/ui/pages/modplatform/ModModel.cpp
@@ -265,7 +265,7 @@ void ListModel::searchRequestFailed(QString reason)
//: %1 refers to the launcher itself
QString("%1 %2")
.arg(m_parent->displayName())
- .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME)));
+ .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)));
}
jobPtr.reset();
diff --git a/launcher/ui/pages/modplatform/ModPage.cpp b/launcher/ui/pages/modplatform/ModPage.cpp
index 153bb049..f2c1746f 100644
--- a/launcher/ui/pages/modplatform/ModPage.cpp
+++ b/launcher/ui/pages/modplatform/ModPage.cpp
@@ -265,7 +265,9 @@ void ModPage::updateModVersions(int prev_count)
break;
}
}
- if(valid || m_filter->versions.size() == 0)
+
+ // Only add the version if it's valid or using the 'Any' filter, but never if the version is opted out
+ if ((valid || m_filter->versions.empty()) && !optedOut(version))
ui->versionSelectionBox->addItem(version.version, QVariant(i));
}
if (ui->versionSelectionBox->count() == 0 && prev_count != 0) {
diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h
index 3f31651c..ae3d7e77 100644
--- a/launcher/ui/pages/modplatform/ModPage.h
+++ b/launcher/ui/pages/modplatform/ModPage.h
@@ -51,6 +51,7 @@ class ModPage : public QWidget, public BasePage {
auto shouldDisplay() const -> bool override = 0;
virtual auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders = ModAPI::Unspecified) const -> bool = 0;
+ virtual bool optedOut(ModPlatform::IndexedVersion& ver) const { return false; };
auto apiProvider() -> ModAPI* { return api.get(); };
auto getFilter() const -> const std::shared_ptr<ModFilterWidget::Filter> { return m_filter; }
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
index b497d1fe..fd6e32ff 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.cpp
@@ -69,6 +69,11 @@ auto FlameModPage::validateVersion(ModPlatform::IndexedVersion& ver, QString min
return ver.mcVersion.contains(mineVer) && !ver.downloadUrl.isEmpty();
}
+bool FlameModPage::optedOut(ModPlatform::IndexedVersion& ver) const
+{
+ return ver.downloadUrl.isEmpty();
+}
+
// I don't know why, but doing this on the parent class makes it so that
// other mod providers start loading before being selected, at least with
// my Qt, so we need to implement this in every derived class...
diff --git a/launcher/ui/pages/modplatform/flame/FlameModPage.h b/launcher/ui/pages/modplatform/flame/FlameModPage.h
index 2cd484cb..50dedd6f 100644
--- a/launcher/ui/pages/modplatform/flame/FlameModPage.h
+++ b/launcher/ui/pages/modplatform/flame/FlameModPage.h
@@ -61,6 +61,7 @@ class FlameModPage : public ModPage {
inline auto metaEntryBase() const -> QString override { return "FlameMods"; };
auto validateVersion(ModPlatform::IndexedVersion& ver, QString mineVer, ModAPI::ModLoaderTypes loaders = ModAPI::Unspecified) const -> bool override;
+ bool optedOut(ModPlatform::IndexedVersion& ver) const override;
auto shouldDisplay() const -> bool override;
};
diff --git a/launcher/ui/pages/modplatform/flame/FlamePage.ui b/launcher/ui/pages/modplatform/flame/FlamePage.ui
index aab16421..1a3d0225 100644
--- a/launcher/ui/pages/modplatform/flame/FlamePage.ui
+++ b/launcher/ui/pages/modplatform/flame/FlamePage.ui
@@ -19,7 +19,7 @@
</font>
</property>
<property name="text">
- <string>Note: CurseForge allows creators to block access to third-party tools like PolyMC. As such, you may need to manually download some mods to be able to install a modpack.</string>
+ <string>Note: CurseForge allows creators to block access to third-party tools like Prism Launcher. As such, you may need to manually download some mods to be able to install a modpack.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
diff --git a/launcher/ui/pages/modplatform/ftb/FtbListModel.cpp b/launcher/ui/pages/modplatform/ftb/FtbListModel.cpp
index ad15b6e6..3a149944 100644
--- a/launcher/ui/pages/modplatform/ftb/FtbListModel.cpp
+++ b/launcher/ui/pages/modplatform/ftb/FtbListModel.cpp
@@ -103,6 +103,8 @@ void ListModel::getLogo(const QString &logo, const QString &logoUrl, LogoCallbac
void ListModel::request()
{
+ m_aborted = false;
+
beginResetModel();
modpacks.clear();
endResetModel();
@@ -117,6 +119,12 @@ void ListModel::request()
QObject::connect(netJob, &NetJob::failed, this, &ListModel::requestFailed);
}
+void ListModel::abortRequest()
+{
+ m_aborted = jobPtr->abort();
+ jobPtr.reset();
+}
+
void ListModel::requestFinished()
{
jobPtr.reset();
@@ -162,6 +170,9 @@ void ListModel::requestPack()
void ListModel::packRequestFinished()
{
+ if (!jobPtr || m_aborted)
+ return;
+
jobPtr.reset();
remainingPacks.removeOne(currentPack);
diff --git a/launcher/ui/pages/modplatform/ftb/FtbListModel.h b/launcher/ui/pages/modplatform/ftb/FtbListModel.h
index 314cb789..d7a120f0 100644
--- a/launcher/ui/pages/modplatform/ftb/FtbListModel.h
+++ b/launcher/ui/pages/modplatform/ftb/FtbListModel.h
@@ -47,9 +47,13 @@ public:
QVariant data(const QModelIndex &index, int role) const override;
void request();
+ void abortRequest();
void getLogo(const QString &logo, const QString &logoUrl, LogoCallback callback);
+ [[nodiscard]] bool isMakingRequest() const { return jobPtr.get(); }
+ [[nodiscard]] bool wasAborted() const { return m_aborted; }
+
private slots:
void requestFinished();
void requestFailed(QString reason);
@@ -65,6 +69,8 @@ private:
void requestLogo(QString file, QString url);
private:
+ bool m_aborted = false;
+
QList<ModpacksCH::Modpack> modpacks;
LogoMap m_logoMap;
diff --git a/launcher/ui/pages/modplatform/ftb/FtbPage.cpp b/launcher/ui/pages/modplatform/ftb/FtbPage.cpp
index 34734eaf..b08f3bc4 100644
--- a/launcher/ui/pages/modplatform/ftb/FtbPage.cpp
+++ b/launcher/ui/pages/modplatform/ftb/FtbPage.cpp
@@ -107,7 +107,7 @@ void FtbPage::retranslate()
void FtbPage::openedImpl()
{
- if(!initialised)
+ if(!initialised || listModel->wasAborted())
{
listModel->request();
initialised = true;
@@ -116,6 +116,12 @@ void FtbPage::openedImpl()
suggestCurrent();
}
+void FtbPage::closedImpl()
+{
+ if (listModel->isMakingRequest())
+ listModel->abortRequest();
+}
+
void FtbPage::suggestCurrent()
{
if(!isOpened)
diff --git a/launcher/ui/pages/modplatform/ftb/FtbPage.h b/launcher/ui/pages/modplatform/ftb/FtbPage.h
index 90c8e7fd..631ae7f5 100644
--- a/launcher/ui/pages/modplatform/ftb/FtbPage.h
+++ b/launcher/ui/pages/modplatform/ftb/FtbPage.h
@@ -78,6 +78,7 @@ public:
void retranslate() override;
void openedImpl() override;
+ void closedImpl() override;
bool eventFilter(QObject * watched, QEvent * event) override;
diff --git a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
index a0e9ab19..e6704eef 100644
--- a/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
+++ b/launcher/ui/pages/modplatform/modrinth/ModrinthModel.cpp
@@ -321,7 +321,7 @@ void ModpackListModel::searchRequestFailed(QString reason)
//: %1 refers to the launcher itself
QString("%1 %2")
.arg(m_parent->displayName())
- .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_NAME)));
+ .arg(tr("API version too old!\nPlease update %1!").arg(BuildConfig.LAUNCHER_DISPLAYNAME)));
}
jobPtr.reset();
diff --git a/launcher/ui/setupwizard/LanguageWizardPage.cpp b/launcher/ui/setupwizard/LanguageWizardPage.cpp
index 072df10d..6bd19b6f 100644
--- a/launcher/ui/setupwizard/LanguageWizardPage.cpp
+++ b/launcher/ui/setupwizard/LanguageWizardPage.cpp
@@ -44,6 +44,6 @@ bool LanguageWizardPage::validatePage()
void LanguageWizardPage::retranslate()
{
setTitle(tr("Language"));
- setSubTitle(tr("Select the language to use in %1").arg(BuildConfig.LAUNCHER_NAME));
+ setSubTitle(tr("Select the language to use in %1").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
mainWidget->retranslate();
}
diff --git a/launcher/ui/setupwizard/SetupWizard.cpp b/launcher/ui/setupwizard/SetupWizard.cpp
index 22eab60e..3c8b5d39 100644
--- a/launcher/ui/setupwizard/SetupWizard.cpp
+++ b/launcher/ui/setupwizard/SetupWizard.cpp
@@ -29,7 +29,7 @@ void SetupWizard::retranslate()
setButtonText(QWizard::BackButton, tr("< &Back"));
setButtonText(QWizard::FinishButton, tr("&Finish"));
setButtonText(QWizard::CustomButton1, tr("&Refresh"));
- setWindowTitle(tr("%1 Quick Setup").arg(BuildConfig.LAUNCHER_NAME));
+ setWindowTitle(tr("%1 Quick Setup").arg(BuildConfig.LAUNCHER_DISPLAYNAME));
}
BaseWizardPage * SetupWizard::getBasePage(int id)
diff --git a/launcher/ui/themes/BrightTheme.cpp b/launcher/ui/themes/BrightTheme.cpp
index 7469edfc..696ffdfb 100644
--- a/launcher/ui/themes/BrightTheme.cpp
+++ b/launcher/ui/themes/BrightTheme.cpp
@@ -20,19 +20,19 @@ bool BrightTheme::hasColorScheme()
QPalette BrightTheme::colorScheme()
{
QPalette brightPalette;
- brightPalette.setColor(QPalette::Window, QColor(239,240,241));
- brightPalette.setColor(QPalette::WindowText, QColor(49,54,59));
- brightPalette.setColor(QPalette::Base, QColor(252,252,252));
- brightPalette.setColor(QPalette::AlternateBase, QColor(239,240,241));
- brightPalette.setColor(QPalette::ToolTipBase, QColor(49,54,59));
- brightPalette.setColor(QPalette::ToolTipText, QColor(239,240,241));
- brightPalette.setColor(QPalette::Text, QColor(49,54,59));
- brightPalette.setColor(QPalette::Button, QColor(239,240,241));
- brightPalette.setColor(QPalette::ButtonText, QColor(49,54,59));
+ brightPalette.setColor(QPalette::Window, QColor(255,255,255));
+ brightPalette.setColor(QPalette::WindowText, QColor(17,17,17));
+ brightPalette.setColor(QPalette::Base, QColor(250,250,250));
+ brightPalette.setColor(QPalette::AlternateBase, QColor(240,240,240));
+ brightPalette.setColor(QPalette::ToolTipBase, QColor(17,17,17));
+ brightPalette.setColor(QPalette::ToolTipText, QColor(255,255,255));
+ brightPalette.setColor(QPalette::Text, Qt::black);
+ brightPalette.setColor(QPalette::Button, QColor(249,249,249));
+ brightPalette.setColor(QPalette::ButtonText, Qt::black);
brightPalette.setColor(QPalette::BrightText, Qt::red);
- brightPalette.setColor(QPalette::Link, QColor(41, 128, 185));
- brightPalette.setColor(QPalette::Highlight, QColor(61, 174, 233));
- brightPalette.setColor(QPalette::HighlightedText, QColor(239,240,241));
+ brightPalette.setColor(QPalette::Link, QColor(37,137,164));
+ brightPalette.setColor(QPalette::Highlight, QColor(137,207,84));
+ brightPalette.setColor(QPalette::HighlightedText, Qt::black);
return fadeInactive(brightPalette, fadeAmount(), fadeColor());
}
@@ -43,7 +43,7 @@ double BrightTheme::fadeAmount()
QColor BrightTheme::fadeColor()
{
- return QColor(239,240,241);
+ return QColor(255,255,255);
}
bool BrightTheme::hasStyleSheet()
diff --git a/launcher/ui/themes/DarkTheme.cpp b/launcher/ui/themes/DarkTheme.cpp
index c2a6a8df..07a2efd2 100644
--- a/launcher/ui/themes/DarkTheme.cpp
+++ b/launcher/ui/themes/DarkTheme.cpp
@@ -20,18 +20,18 @@ bool DarkTheme::hasColorScheme()
QPalette DarkTheme::colorScheme()
{
QPalette darkPalette;
- darkPalette.setColor(QPalette::Window, QColor(49,54,59));
+ darkPalette.setColor(QPalette::Window, QColor(49,49,49));
darkPalette.setColor(QPalette::WindowText, Qt::white);
- darkPalette.setColor(QPalette::Base, QColor(35,38,41));
- darkPalette.setColor(QPalette::AlternateBase, QColor(49,54,59));
+ darkPalette.setColor(QPalette::Base, QColor(34,34,34));
+ darkPalette.setColor(QPalette::AlternateBase, QColor(42,42,42));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);
- darkPalette.setColor(QPalette::Button, QColor(49,54,59));
+ darkPalette.setColor(QPalette::Button, QColor(48,48,48));
darkPalette.setColor(QPalette::ButtonText, Qt::white);
darkPalette.setColor(QPalette::BrightText, Qt::red);
- darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
- darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218));
+ darkPalette.setColor(QPalette::Link, QColor(47,163,198));
+ darkPalette.setColor(QPalette::Highlight, QColor(145,205,92));
darkPalette.setColor(QPalette::HighlightedText, Qt::black);
darkPalette.setColor(QPalette::PlaceholderText, Qt::darkGray);
return fadeInactive(darkPalette, fadeAmount(), fadeColor());
@@ -44,7 +44,7 @@ double DarkTheme::fadeAmount()
QColor DarkTheme::fadeColor()
{
- return QColor(49,54,59);
+ return QColor(49,49,49);
}
bool DarkTheme::hasStyleSheet()
diff --git a/launcher/ui/widgets/JavaSettingsWidget.cpp b/launcher/ui/widgets/JavaSettingsWidget.cpp
index f0765909..314a126e 100644
--- a/launcher/ui/widgets/JavaSettingsWidget.cpp
+++ b/launcher/ui/widgets/JavaSettingsWidget.cpp
@@ -159,7 +159,7 @@ JavaSettingsWidget::ValidationStatus JavaSettingsWidget::validate()
"Do you wish to proceed without any Java?"
"\n\n"
"You can change the Java version in the settings later.\n"
- ).arg(BuildConfig.LAUNCHER_NAME),
+ ).arg(BuildConfig.LAUNCHER_DISPLAYNAME),
QMessageBox::Warning,
QMessageBox::Yes | QMessageBox::No,
QMessageBox::NoButton
diff --git a/launcher/updater/DownloadTask.h b/launcher/updater/DownloadTask.h
index f47a3048..19a6265c 100644
--- a/launcher/updater/DownloadTask.h
+++ b/launcher/updater/DownloadTask.h
@@ -54,7 +54,7 @@ protected:
/*!
* Downloads the version info files from the repository.
* The files for both the current build, and the build that we're updating to need to be downloaded.
- * If the current version's info file can't be found, PolyMC will not delete files that
+ * If the current version's info file can't be found, Prism Launcher will not delete files that
* were removed between versions. It will still replace files that have changed, however.
* Note that although the repository URL for the current version is not given to the update task,
* the task will attempt to look it up in the UpdateChecker's channel list.
diff --git a/launcher/updater/GoUpdate.cpp b/launcher/updater/GoUpdate.cpp
index 91f30b5d..4bc7dfa9 100644
--- a/launcher/updater/GoUpdate.cpp
+++ b/launcher/updater/GoUpdate.cpp
@@ -104,7 +104,7 @@ bool processFileLists
}
}
- // Next, check each file in PolyMC's folder and see if we need to update them.
+ // Next, check each file in Prism Launcher's folder and see if we need to update them.
for (VersionFileEntry entry : newVersion)
{
// TODO: Let's not MD5sum a ton of files on the GUI thread. We should probably find a
diff --git a/lgtm.yml b/lgtm.yml
deleted file mode 100644
index 39cd3036..00000000
--- a/lgtm.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-queries:
- - exclude: "cpp/fixme-comment" # We like to use FIXME
diff --git a/libraries/README.md b/libraries/README.md
index 6297cd9b..dc38477b 100644
--- a/libraries/README.md
+++ b/libraries/README.md
@@ -2,13 +2,13 @@
This folder has third-party or otherwise external libraries needed for other parts to work.
-## classparser
+## filesystem
-A simplistic parser for Java class files.
+Gulrak's implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
-This library has served as a base for some (much more full-featured and advanced) work under NDA for AVG. It, however, should NOT be confused with that work.
+See [github repo](https://github.com/gulrak/filesystem).
-Copyright belongs to Petr Mrázek, unless explicitly stated otherwise in the source files. Available under the Apache 2.0 license.
+MIT licensed.
## gamemode
@@ -173,7 +173,7 @@ Available either under LGPL version 2.1 or later.
## systeminfo
-A PolyMC-specific library for probing system information.
+A Prism Launcher-specific library for probing system information.
Apache 2.0
@@ -184,9 +184,3 @@ A TOML language parser. Used by Forge 1.14+ to store mod metadata.
See [github repo](https://github.com/marzer/tomlplusplus).
Licenced under the MIT licence.
-
-## xz-embedded
-
-Tiny implementation of LZMA2 de/compression. This format was only used by Forge to save bandwidth.
-
-Public domain.
diff --git a/libraries/classparser/CMakeLists.txt b/libraries/classparser/CMakeLists.txt
deleted file mode 100644
index 05412c30..00000000
--- a/libraries/classparser/CMakeLists.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-project(classparser)
-
-set(CMAKE_AUTOMOC ON)
-
-######## Check endianness ########
-include(TestBigEndian)
-test_big_endian(BIGENDIAN)
-if(${BIGENDIAN})
- add_definitions(-DMULTIMC_BIG_ENDIAN)
-endif(${BIGENDIAN})
-
-# Find Qt
-if(QT_VERSION_MAJOR EQUAL 5)
- find_package(Qt5 COMPONENTS Core REQUIRED)
-elseif(Launcher_QT_VERSION_MAJOR EQUAL 6)
- find_package(Qt6 COMPONENTS Core REQUIRED)
-endif()
-
-set(CLASSPARSER_HEADERS
-# Public headers
-include/classparser_config.h
-include/classparser.h
-
-# Private headers
-src/annotations.h
-src/classfile.h
-src/constants.h
-src/errors.h
-src/javaendian.h
-src/membuffer.h
-)
-
-set(CLASSPARSER_SOURCES
-src/classparser.cpp
-src/annotations.cpp
-)
-
-add_definitions(-DCLASSPARSER_LIBRARY)
-
-add_library(Launcher_classparser STATIC ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS})
-target_include_directories(Launcher_classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
-target_link_libraries(Launcher_classparser QuaZip::QuaZip Qt${QT_VERSION_MAJOR}::Core)
diff --git a/libraries/classparser/include/classparser.h b/libraries/classparser/include/classparser.h
deleted file mode 100644
index 3660026b..00000000
--- a/libraries/classparser/include/classparser.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2013-2021 MultiMC Contributors
- *
- * Authors: Orochimarufan <orochimarufan.x3@gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#pragma once
-#include <QString>
-#include "classparser_config.h"
-
-namespace classparser
-{
-/**
- * @brief Get the version from a minecraft.jar by parsing its class files. Expensive!
- */
-QString GetMinecraftJarVersion(QString jar);
-}
diff --git a/libraries/classparser/include/classparser_config.h b/libraries/classparser/include/classparser_config.h
deleted file mode 100644
index 7bfae7cc..00000000
--- a/libraries/classparser/include/classparser_config.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2013-2021 MultiMC Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <QtCore/QtGlobal>
-
-#ifdef CLASSPARSER_LIBRARY
-#define CLASSPARSER_EXPORT Q_DECL_EXPORT
-#else
-#define CLASSPARSER_EXPORT Q_DECL_IMPORT
-#endif
diff --git a/libraries/classparser/src/annotations.cpp b/libraries/classparser/src/annotations.cpp
deleted file mode 100644
index 89b201bc..00000000
--- a/libraries/classparser/src/annotations.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "classfile.h"
-#include "annotations.h"
-#include <sstream>
-
-namespace java
-{
-std::string annotation::toString()
-{
- std::ostringstream ss;
- ss << "Annotation type : " << type_index << " - " << pool[type_index].str_data << std::endl;
- ss << "Contains " << name_val_pairs.size() << " pairs:" << std::endl;
- for (unsigned i = 0; i < name_val_pairs.size(); i++)
- {
- std::pair<uint16_t, element_value *> &val = name_val_pairs[i];
- auto name_idx = val.first;
- ss << pool[name_idx].str_data << "(" << name_idx << ")"
- << " = " << val.second->toString() << std::endl;
- }
- return ss.str();
-}
-
-annotation *annotation::read(util::membuffer &input, constant_pool &pool)
-{
- uint16_t type_index = 0;
- input.read_be(type_index);
- annotation *ann = new annotation(type_index, pool);
-
- uint16_t num_pairs = 0;
- input.read_be(num_pairs);
- while (num_pairs)
- {
- uint16_t name_idx = 0;
- // read name index
- input.read_be(name_idx);
- auto elem = element_value::readElementValue(input, pool);
- // read value
- ann->add_pair(name_idx, elem);
- num_pairs--;
- }
- return ann;
-}
-
-element_value *element_value::readElementValue(util::membuffer &input,
- java::constant_pool &pool)
-{
- element_value_type type = INVALID;
- input.read(type);
- uint16_t index = 0;
- uint16_t index2 = 0;
- std::vector<element_value *> vals;
- switch (type)
- {
- case PRIMITIVE_BYTE:
- case PRIMITIVE_CHAR:
- case PRIMITIVE_DOUBLE:
- case PRIMITIVE_FLOAT:
- case PRIMITIVE_INT:
- case PRIMITIVE_LONG:
- case PRIMITIVE_SHORT:
- case PRIMITIVE_BOOLEAN:
- case STRING:
- input.read_be(index);
- return new element_value_simple(type, index, pool);
- case ENUM_CONSTANT:
- input.read_be(index);
- input.read_be(index2);
- return new element_value_enum(type, index, index2, pool);
- case CLASS: // Class
- input.read_be(index);
- return new element_value_class(type, index, pool);
- case ANNOTATION: // Annotation
- // FIXME: runtime visibility info needs to be passed from parent
- return new element_value_annotation(ANNOTATION, annotation::read(input, pool), pool);
- case ARRAY: // Array
- input.read_be(index);
- for (int i = 0; i < index; i++)
- {
- vals.push_back(element_value::readElementValue(input, pool));
- }
- return new element_value_array(ARRAY, vals, pool);
- default:
- throw java::classfile_exception();
- }
-}
-}
diff --git a/libraries/classparser/src/annotations.h b/libraries/classparser/src/annotations.h
deleted file mode 100644
index 15bf05a4..00000000
--- a/libraries/classparser/src/annotations.h
+++ /dev/null
@@ -1,278 +0,0 @@
-#pragma once
-#include "classfile.h"
-#include <map>
-#include <vector>
-
-namespace java
-{
-enum element_value_type : uint8_t
-{
- INVALID = 0,
- STRING = 's',
- ENUM_CONSTANT = 'e',
- CLASS = 'c',
- ANNOTATION = '@',
- ARRAY = '[', // one array dimension
- PRIMITIVE_INT = 'I', // integer
- PRIMITIVE_BYTE = 'B', // signed byte
- PRIMITIVE_CHAR = 'C', // Unicode character code point in the Basic Multilingual Plane,
- // encoded with UTF-16
- PRIMITIVE_DOUBLE = 'D', // double-precision floating-point value
- PRIMITIVE_FLOAT = 'F', // single-precision floating-point value
- PRIMITIVE_LONG = 'J', // long integer
- PRIMITIVE_SHORT = 'S', // signed short
- PRIMITIVE_BOOLEAN = 'Z' // true or false
-};
-/**
- * The element_value structure is a discriminated union representing the value of an
- *element-value pair.
- * It is used to represent element values in all attributes that describe annotations
- * - RuntimeVisibleAnnotations
- * - RuntimeInvisibleAnnotations
- * - RuntimeVisibleParameterAnnotations
- * - RuntimeInvisibleParameterAnnotations).
- *
- * The element_value structure has the following format:
- */
-class element_value
-{
-protected:
- element_value_type type;
- constant_pool &pool;
-
-public:
- element_value(element_value_type type, constant_pool &pool) : type(type), pool(pool) {};
- virtual ~element_value() {}
-
- element_value_type getElementValueType()
- {
- return type;
- }
-
- virtual std::string toString() = 0;
-
- static element_value *readElementValue(util::membuffer &input, constant_pool &pool);
-};
-
-/**
- * Each value of the annotations table represents a single runtime-visible annotation on a
- * program element.
- * The annotation structure has the following format:
- */
-class annotation
-{
-public:
- typedef std::vector<std::pair<uint16_t, element_value *>> value_list;
-
-protected:
- /**
- * The value of the type_index item must be a valid index into the constant_pool table.
- * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure
- * representing a field descriptor representing the annotation type corresponding
- * to the annotation represented by this annotation structure.
- */
- uint16_t type_index;
- /**
- * map between element_name_index and value.
- *
- * The value of the element_name_index item must be a valid index into the constant_pool
- *table.
- * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure
- *representing
- * a valid field descriptor (§4.3.2) that denotes the name of the annotation type element
- *represented
- * by this element_value_pairs entry.
- */
- value_list name_val_pairs;
- /**
- * Reference to the parent constant pool
- */
- constant_pool &pool;
-
-public:
- annotation(uint16_t type_index, constant_pool &pool)
- : type_index(type_index), pool(pool) {};
- ~annotation()
- {
- for (unsigned i = 0; i < name_val_pairs.size(); i++)
- {
- delete name_val_pairs[i].second;
- }
- }
- void add_pair(uint16_t key, element_value *value)
- {
- name_val_pairs.push_back(std::make_pair(key, value));
- }
- ;
- value_list::const_iterator begin()
- {
- return name_val_pairs.cbegin();
- }
- value_list::const_iterator end()
- {
- return name_val_pairs.cend();
- }
- std::string toString();
- static annotation *read(util::membuffer &input, constant_pool &pool);
-};
-typedef std::vector<annotation *> annotation_table;
-
-/// type for simple value annotation elements
-class element_value_simple : public element_value
-{
-protected:
- /// index of the constant in the constant pool
- uint16_t index;
-
-public:
- element_value_simple(element_value_type type, uint16_t index, constant_pool &pool)
- : element_value(type, pool), index(index) {
- // TODO: verify consistency
- };
- uint16_t getIndex()
- {
- return index;
- }
- virtual std::string toString()
- {
- return pool[index].toString();
- }
- ;
-};
-/// The enum_const_value item is used if the tag item is 'e'.
-class element_value_enum : public element_value
-{
-protected:
- /**
- * The value of the type_name_index item must be a valid index into the constant_pool table.
- * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure
- * representing a valid field descriptor (§4.3.2) that denotes the internal form of the
- * binary
- * name (§4.2.1) of the type of the enum constant represented by this element_value
- * structure.
- */
- uint16_t typeIndex;
- /**
- * The value of the const_name_index item must be a valid index into the constant_pool
- * table.
- * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure
- * representing the simple name of the enum constant represented by this element_value
- * structure.
- */
- uint16_t valueIndex;
-
-public:
- element_value_enum(element_value_type type, uint16_t typeIndex, uint16_t valueIndex,
- constant_pool &pool)
- : element_value(type, pool), typeIndex(typeIndex), valueIndex(valueIndex)
- {
- // TODO: verify consistency
- }
- uint16_t getValueIndex()
- {
- return valueIndex;
- }
- uint16_t getTypeIndex()
- {
- return typeIndex;
- }
- virtual std::string toString()
- {
- return "enum value";
- }
- ;
-};
-
-class element_value_class : public element_value
-{
-protected:
- /**
- * The class_info_index item must be a valid index into the constant_pool table.
- * The constant_pool entry at that index must be a CONSTANT_Utf8_info (§4.4.7) structure
- * representing the return descriptor (§4.3.3) of the type that is reified by the class
- * represented by this element_value structure.
- *
- * For example, 'V' for Void.class, 'Ljava/lang/Object;' for Object, etc.
- *
- * Or in plain english, you can store type information in annotations. Yay.
- */
- uint16_t classIndex;
-
-public:
- element_value_class(element_value_type type, uint16_t classIndex, constant_pool &pool)
- : element_value(type, pool), classIndex(classIndex)
- {
- // TODO: verify consistency
- }
- uint16_t getIndex()
- {
- return classIndex;
- }
- virtual std::string toString()
- {
- return "class";
- }
- ;
-};
-
-/// nested annotations... yay
-class element_value_annotation : public element_value
-{
-private:
- annotation *nestedAnnotation;
-
-public:
- element_value_annotation(element_value_type type, annotation *nestedAnnotation,
- constant_pool &pool)
- : element_value(type, pool), nestedAnnotation(nestedAnnotation) {};
- ~element_value_annotation()
- {
- if (nestedAnnotation)
- {
- delete nestedAnnotation;
- nestedAnnotation = nullptr;
- }
- }
- virtual std::string toString()
- {
- return "nested annotation";
- }
- ;
-};
-
-/// and arrays!
-class element_value_array : public element_value
-{
-public:
- typedef std::vector<element_value *> elem_vec;
-
-protected:
- elem_vec values;
-
-public:
- element_value_array(element_value_type type, std::vector<element_value *> &values,
- constant_pool &pool)
- : element_value(type, pool), values(values) {};
- ~element_value_array()
- {
- for (unsigned i = 0; i < values.size(); i++)
- {
- delete values[i];
- }
- }
- ;
- elem_vec::const_iterator begin()
- {
- return values.cbegin();
- }
- elem_vec::const_iterator end()
- {
- return values.cend();
- }
- virtual std::string toString()
- {
- return "array";
- }
- ;
-};
-} \ No newline at end of file
diff --git a/libraries/classparser/src/classfile.h b/libraries/classparser/src/classfile.h
deleted file mode 100644
index d629dde1..00000000
--- a/libraries/classparser/src/classfile.h
+++ /dev/null
@@ -1,156 +0,0 @@
-#pragma once
-#include "membuffer.h"
-#include "constants.h"
-#include "annotations.h"
-#include <map>
-namespace java
-{
-/**
- * Class representing a Java .class file
- */
-class classfile : public util::membuffer
-{
-public:
- classfile(char *data, std::size_t size) : membuffer(data, size)
- {
- valid = false;
- is_synthetic = false;
- read_be(magic);
- if (magic != 0xCAFEBABE)
- throw classfile_exception();
- read_be(minor_version);
- read_be(major_version);
- constants.load(*this);
- read_be(access_flags);
- read_be(this_class);
- read_be(super_class);
-
- // Interfaces
- uint16_t iface_count = 0;
- read_be(iface_count);
- while (iface_count)
- {
- uint16_t iface;
- read_be(iface);
- interfaces.push_back(iface);
- iface_count--;
- }
-
- // Fields
- // read fields (and attributes from inside fields) (and possible inner classes. yay for
- // recursion!)
- // for now though, we will ignore all attributes
- /*
- * field_info
- * {
- * u2 access_flags;
- * u2 name_index;
- * u2 descriptor_index;
- * u2 attributes_count;
- * attribute_info attributes[attributes_count];
- * }
- */
- uint16_t field_count = 0;
- read_be(field_count);
- while (field_count)
- {
- // skip field stuff
- skip(6);
- // and skip field attributes
- uint16_t attr_count = 0;
- read_be(attr_count);
- while (attr_count)
- {
- skip(2);
- uint32_t attr_length = 0;
- read_be(attr_length);
- skip(attr_length);
- attr_count--;
- }
- field_count--;
- }
-
- // class methods
- /*
- * method_info
- * {
- * u2 access_flags;
- * u2 name_index;
- * u2 descriptor_index;
- * u2 attributes_count;
- * attribute_info attributes[attributes_count];
- * }
- */
- uint16_t method_count = 0;
- read_be(method_count);
- while (method_count)
- {
- skip(6);
- // and skip method attributes
- uint16_t attr_count = 0;
- read_be(attr_count);
- while (attr_count)
- {
- skip(2);
- uint32_t attr_length = 0;
- read_be(attr_length);
- skip(attr_length);
- attr_count--;
- }
- method_count--;
- }
-
- // class attributes
- // there are many kinds of attributes. this is just the generic wrapper structure.
- // type is decided by attribute name. extensions to the standard are *possible*
- // class annotations are one kind of a attribute (one per class)
- /*
- * attribute_info
- * {
- * u2 attribute_name_index;
- * u4 attribute_length;
- * u1 info[attribute_length];
- * }
- */
- uint16_t class_attr_count = 0;
- read_be(class_attr_count);
- while (class_attr_count)
- {
- uint16_t name_idx = 0;
- read_be(name_idx);
- uint32_t attr_length = 0;
- read_be(attr_length);
-
- auto name = constants[name_idx];
- if (name.str_data == "RuntimeVisibleAnnotations")
- {
- uint16_t num_annotations = 0;
- read_be(num_annotations);
- while (num_annotations)
- {
- visible_class_annotations.push_back(annotation::read(*this, constants));
- num_annotations--;
- }
- }
- else
- skip(attr_length);
- class_attr_count--;
- }
- valid = true;
- }
- ;
- bool valid;
- bool is_synthetic;
- uint32_t magic;
- uint16_t minor_version;
- uint16_t major_version;
- constant_pool constants;
- uint16_t access_flags;
- uint16_t this_class;
- uint16_t super_class;
- // interfaces this class implements ? must be. investigate.
- std::vector<uint16_t> interfaces;
- // FIXME: doesn't free up memory on delete
- java::annotation_table visible_class_annotations;
-};
-}
diff --git a/libraries/classparser/src/classparser.cpp b/libraries/classparser/src/classparser.cpp
deleted file mode 100644
index 601521f6..00000000
--- a/libraries/classparser/src/classparser.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Copyright 2013-2021 MultiMC Contributors
- *
- * Authors: Orochimarufan <orochimarufan.x3@gmail.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "classfile.h"
-#include "classparser.h"
-
-#include <QFile>
-#include <quazip/quazipfile.h>
-#include <QDebug>
-
-namespace classparser
-{
-
-QString GetMinecraftJarVersion(QString jarName)
-{
- QString version;
-
- // check if minecraft.jar exists
- QFile jar(jarName);
- if (!jar.exists())
- return version;
-
- // open minecraft.jar
- QuaZip zip(&jar);
- if (!zip.open(QuaZip::mdUnzip))
- return version;
-
- // open Minecraft.class
- zip.setCurrentFile("net/minecraft/client/Minecraft.class", QuaZip::csSensitive);
- QuaZipFile Minecraft(&zip);
- if (!Minecraft.open(QuaZipFile::ReadOnly))
- return version;
-
- // read Minecraft.class
- qint64 size = Minecraft.size();
- char *classfile = new char[size];
- Minecraft.read(classfile, size);
-
- // parse Minecraft.class
- try
- {
- char *temp = classfile;
- java::classfile MinecraftClass(temp, size);
- java::constant_pool constants = MinecraftClass.constants;
- for (java::constant_pool::container_type::const_iterator iter = constants.begin();
- iter != constants.end(); iter++)
- {
- const java::constant &constant = *iter;
- if (constant.type != java::constant_type_t::j_string_data)
- continue;
- const std::string &str = constant.str_data;
- qDebug() << QString::fromStdString(str);
- if (str.compare(0, 20, "Minecraft Minecraft ") == 0)
- {
- version = str.substr(20).data();
- break;
- }
- }
- }
- catch (const java::classfile_exception &) { }
-
- // clean up
- delete[] classfile;
- Minecraft.close();
- zip.close();
- jar.close();
-
- return version;
-}
-}
diff --git a/libraries/classparser/src/constants.h b/libraries/classparser/src/constants.h
deleted file mode 100644
index 47b325b9..00000000
--- a/libraries/classparser/src/constants.h
+++ /dev/null
@@ -1,232 +0,0 @@
-#pragma once
-#include "errors.h"
-#include "membuffer.h"
-#include <sstream>
-
-namespace java
-{
-enum class constant_type_t : uint8_t
-{
- j_hole = 0, // HACK: this is a hole in the array, because java is crazy
- j_string_data = 1,
- j_int = 3,
- j_float = 4,
- j_long = 5,
- j_double = 6,
- j_class = 7,
- j_string = 8,
- j_fieldref = 9,
- j_methodref = 10,
- j_interface_methodref = 11,
- j_nameandtype = 12
- // FIXME: missing some constant types, see https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4
-};
-
-struct ref_type_t
-{
- /**
- * Class reference:
- * an index within the constant pool to a UTF-8 string containing
- * the fully qualified class name (in internal format)
- * Used for j_class, j_fieldref, j_methodref and j_interface_methodref
- */
- uint16_t class_idx;
- // used for j_fieldref, j_methodref and j_interface_methodref
- uint16_t name_and_type_idx;
-};
-
-struct name_and_type_t
-{
- uint16_t name_index;
- uint16_t descriptor_index;
-};
-
-class constant
-{
-public:
- constant_type_t type = constant_type_t::j_hole;
-
- constant(util::membuffer &buf)
- {
- buf.read(type);
-
- // load data depending on type
- switch (type)
- {
- case constant_type_t::j_float:
- buf.read_be(data.int_data);
- break;
- case constant_type_t::j_int:
- buf.read_be(data.int_data); // same as float data really
- break;
- case constant_type_t::j_double:
- buf.read_be(data.long_data);
- break;
- case constant_type_t::j_long:
- buf.read_be(data.long_data); // same as double
- break;
- case constant_type_t::j_class:
- buf.read_be(data.ref_type.class_idx);
- break;
- case constant_type_t::j_fieldref:
- case constant_type_t::j_methodref:
- case constant_type_t::j_interface_methodref:
- buf.read_be(data.ref_type.class_idx);
- buf.read_be(data.ref_type.name_and_type_idx);
- break;
- case constant_type_t::j_string:
- buf.read_be(data.index);
- break;
- case constant_type_t::j_string_data:
- // HACK HACK: for now, we call these UTF-8 and do no further processing.
- // Later, we should do some decoding. It's really modified UTF-8
- // * U+0000 is represented as 0xC0,0x80 invalid character
- // * any single zero byte ends the string
- // * characters above U+10000 are encoded like in CESU-8
- buf.read_jstr(str_data);
- break;
- case constant_type_t::j_nameandtype:
- buf.read_be(data.name_and_type.name_index);
- buf.read_be(data.name_and_type.descriptor_index);
- break;
- default:
- // invalid constant type!
- throw classfile_exception();
- }
- }
- constant(int)
- {
- }
-
- std::string toString()
- {
- std::ostringstream ss;
- switch (type)
- {
- case constant_type_t::j_hole:
- ss << "Fake legacy entry";
- break;
- case constant_type_t::j_float:
- ss << "Float: " << data.float_data;
- break;
- case constant_type_t::j_double:
- ss << "Double: " << data.double_data;
- break;
- case constant_type_t::j_int:
- ss << "Int: " << data.int_data;
- break;
- case constant_type_t::j_long:
- ss << "Long: " << data.long_data;
- break;
- case constant_type_t::j_string_data:
- ss << "StrData: " << str_data;
- break;
- case constant_type_t::j_string:
- ss << "Str: " << data.index;
- break;
- case constant_type_t::j_fieldref:
- ss << "FieldRef: " << data.ref_type.class_idx << " " << data.ref_type.name_and_type_idx;
- break;
- case constant_type_t::j_methodref:
- ss << "MethodRef: " << data.ref_type.class_idx << " " << data.ref_type.name_and_type_idx;
- break;
- case constant_type_t::j_interface_methodref:
- ss << "IfMethodRef: " << data.ref_type.class_idx << " " << data.ref_type.name_and_type_idx;
- break;
- case constant_type_t::j_class:
- ss << "Class: " << data.ref_type.class_idx;
- break;
- case constant_type_t::j_nameandtype:
- ss << "NameAndType: " << data.name_and_type.name_index << " "
- << data.name_and_type.descriptor_index;
- break;
- default:
- ss << "Invalid entry (" << int(type) << ")";
- break;
- }
- return ss.str();
- }
-
- std::string str_data; /** String data in 'modified utf-8'.*/
-
- // store everything here.
- union
- {
- int32_t int_data;
- int64_t long_data;
- float float_data;
- double double_data;
- uint16_t index;
- ref_type_t ref_type;
- name_and_type_t name_and_type;
- } data = {0};
-};
-
-/**
- * A helper class that represents the custom container used in Java class file for storage of
- * constants
- */
-class constant_pool
-{
-public:
- /**
- * Create a pool of constants
- */
- constant_pool()
- {
- }
- /**
- * Load a java constant pool
- */
- void load(util::membuffer &buf)
- {
- // FIXME: @SANITY this should check for the end of buffer.
- uint16_t length = 0;
- buf.read_be(length);
- length--;
- const constant *last_constant = nullptr;
- while (length)
- {
- const constant &cnst = constant(buf);
- constants.push_back(cnst);
- last_constant = &constants[constants.size() - 1];
- if (last_constant->type == constant_type_t::j_double ||
- last_constant->type == constant_type_t::j_long)
- {
- // push in a fake constant to preserve indexing
- constants.push_back(constant(0));
- length -= 2;
- }
- else
- {
- length--;
- }
- }
- }
- typedef std::vector<java::constant> container_type;
- /**
- * Access constants based on jar file index numbers (index of the first element is 1)
- */
- java::constant &operator[](std::size_t constant_index)
- {
- if (constant_index == 0 || constant_index > constants.size())
- {
- throw classfile_exception();
- }
- return constants[constant_index - 1];
- }
- ;
- container_type::const_iterator begin() const
- {
- return constants.begin();
- }
- ;
- container_type::const_iterator end() const
- {
- return constants.end();
- }
-
-private:
- container_type constants;
-};
-}
diff --git a/libraries/classparser/src/errors.h b/libraries/classparser/src/errors.h
deleted file mode 100644
index ddbbd828..00000000
--- a/libraries/classparser/src/errors.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-#include <exception>
-namespace java
-{
-class classfile_exception : public std::exception
-{
-};
-}
diff --git a/libraries/classparser/src/javaendian.h b/libraries/classparser/src/javaendian.h
deleted file mode 100644
index 5a6e107b..00000000
--- a/libraries/classparser/src/javaendian.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#pragma once
-#include <stdint.h>
-
-/**
- * Swap bytes between big endian and local number representation
- */
-namespace util
-{
-#ifdef MULTIMC_BIG_ENDIAN
-inline uint64_t bigswap(uint64_t x)
-{
- return x;
-}
-
-inline uint32_t bigswap(uint32_t x)
-{
- return x;
-}
-
-inline uint16_t bigswap(uint16_t x)
-{
- return x;
-}
-
-#else
-inline uint64_t bigswap(uint64_t x)
-{
- return (x >> 56) | ((x << 40) & 0x00FF000000000000) | ((x << 24) & 0x0000FF0000000000) |
- ((x << 8) & 0x000000FF00000000) | ((x >> 8) & 0x00000000FF000000) |
- ((x >> 24) & 0x0000000000FF0000) | ((x >> 40) & 0x000000000000FF00) | (x << 56);
-}
-
-inline uint32_t bigswap(uint32_t x)
-{
- return (x >> 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x << 24);
-}
-
-inline uint16_t bigswap(uint16_t x)
-{
- return (x >> 8) | (x << 8);
-}
-
-#endif
-
-inline int64_t bigswap(int64_t x)
-{
- return static_cast<int64_t>(bigswap(static_cast<uint64_t>(x)));
-}
-
-inline int32_t bigswap(int32_t x)
-{
- return static_cast<int32_t>(bigswap(static_cast<uint32_t>(x)));
-}
-
-inline int16_t bigswap(int16_t x)
-{
- return static_cast<int16_t>(bigswap(static_cast<uint16_t>(x)));
-}
-}
diff --git a/libraries/classparser/src/membuffer.h b/libraries/classparser/src/membuffer.h
deleted file mode 100644
index f81c9705..00000000
--- a/libraries/classparser/src/membuffer.h
+++ /dev/null
@@ -1,63 +0,0 @@
-#pragma once
-#include <stdint.h>
-#include <string>
-#include <vector>
-#include <exception>
-#include "javaendian.h"
-
-namespace util
-{
-class membuffer
-{
-public:
- membuffer(char *buffer, std::size_t size)
- {
- current = start = buffer;
- end = start + size;
- }
- ~membuffer()
- {
- // maybe? possibly? left out to avoid confusion. for now.
- // delete start;
- }
- /**
- * Read some value. That's all ;)
- */
- template <class T> void read(T &val)
- {
- val = *(T *)current;
- current += sizeof(T);
- }
- /**
- * Read a big-endian number
- * valid for 2-byte, 4-byte and 8-byte variables
- */
- template <class T> void read_be(T &val)
- {
- val = util::bigswap(*(T *)current);
- current += sizeof(T);
- }
- /**
- * Read a string in the format:
- * 2B length (big endian, unsigned)
- * length bytes data
- */
- void read_jstr(std::string &str)
- {
- uint16_t length = 0;
- read_be(length);
- str.append(current, length);
- current += length;
- }
- /**
- * Skip N bytes
- */
- void skip(std::size_t N)
- {
- current += N;
- }
-
-private:
- char *start, *end, *current;
-};
-}
diff --git a/libraries/filesystem b/libraries/filesystem
new file mode 160000
+Subproject cd6805e94dd5d6346be1b75a54cdc27787319dd
diff --git a/libraries/katabasis/README.md b/libraries/katabasis/README.md
index 621446e1..fe6dd4ac 100644
--- a/libraries/katabasis/README.md
+++ b/libraries/katabasis/README.md
@@ -10,7 +10,7 @@ Notes to contributors:
* Please follow the coding style of the existing source, where reasonable
* Code contributions are released under Simplified BSD License, as specified in LICENSE. Do not contribute if this license does not suit your code
-* If you are interested in working on this, come to the PolyMC Discord server and talk first
+* If you are interested in working on this, come to the Prism Launcher Discord server and talk first
## Installation
diff --git a/libraries/launcher/CMakeLists.txt b/libraries/launcher/CMakeLists.txt
index c4dfa5b7..df25414f 100644
--- a/libraries/launcher/CMakeLists.txt
+++ b/libraries/launcher/CMakeLists.txt
@@ -3,19 +3,19 @@ project(launcher Java)
find_package(Java 1.7 REQUIRED COMPONENTS Development)
include(UseJava)
-set(CMAKE_JAVA_JAR_ENTRY_POINT org.polymc.EntryPoint)
+set(CMAKE_JAVA_JAR_ENTRY_POINT org.prismlauncher.EntryPoint)
set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7 -Xlint:deprecation -Xlint:unchecked)
set(SRC
- org/polymc/EntryPoint.java
- org/polymc/Launcher.java
- org/polymc/LauncherFactory.java
- org/polymc/impl/OneSixLauncher.java
- org/polymc/applet/LegacyFrame.java
- org/polymc/exception/ParameterNotFoundException.java
- org/polymc/exception/ParseException.java
- org/polymc/utils/Parameters.java
- org/polymc/utils/Utils.java
+ org/prismlauncher/EntryPoint.java
+ org/prismlauncher/Launcher.java
+ org/prismlauncher/LauncherFactory.java
+ org/prismlauncher/impl/OneSixLauncher.java
+ org/prismlauncher/applet/LegacyFrame.java
+ org/prismlauncher/exception/ParameterNotFoundException.java
+ org/prismlauncher/exception/ParseException.java
+ org/prismlauncher/utils/Parameters.java
+ org/prismlauncher/utils/Utils.java
net/minecraft/Launcher.java
)
add_jar(NewLaunch ${SRC})
diff --git a/libraries/launcher/org/polymc/EntryPoint.java b/libraries/launcher/org/prismlauncher/EntryPoint.java
index 20f418eb..9144e1f1 100644
--- a/libraries/launcher/org/polymc/EntryPoint.java
+++ b/libraries/launcher/org/prismlauncher/EntryPoint.java
@@ -50,10 +50,10 @@
* limitations under the License.
*/
-package org.polymc;
+package org.prismlauncher;
-import org.polymc.exception.ParseException;
-import org.polymc.utils.Parameters;
+import org.prismlauncher.exception.ParseException;
+import org.prismlauncher.utils.Parameters;
import java.io.BufferedReader;
import java.io.IOException;
diff --git a/libraries/launcher/org/polymc/Launcher.java b/libraries/launcher/org/prismlauncher/Launcher.java
index 5bff123e..7f25717b 100644
--- a/libraries/launcher/org/polymc/Launcher.java
+++ b/libraries/launcher/org/prismlauncher/Launcher.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.polymc;
+package org.prismlauncher;
public interface Launcher {
diff --git a/libraries/launcher/org/polymc/LauncherFactory.java b/libraries/launcher/org/prismlauncher/LauncherFactory.java
index 86862929..98f2bbba 100644
--- a/libraries/launcher/org/polymc/LauncherFactory.java
+++ b/libraries/launcher/org/prismlauncher/LauncherFactory.java
@@ -33,10 +33,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-package org.polymc;
+package org.prismlauncher;
-import org.polymc.impl.OneSixLauncher;
-import org.polymc.utils.Parameters;
+import org.prismlauncher.impl.OneSixLauncher;
+import org.prismlauncher.utils.Parameters;
import java.util.HashMap;
import java.util.Map;
diff --git a/libraries/launcher/org/polymc/applet/LegacyFrame.java b/libraries/launcher/org/prismlauncher/applet/LegacyFrame.java
index 7ae56e60..4413efa8 100644
--- a/libraries/launcher/org/polymc/applet/LegacyFrame.java
+++ b/libraries/launcher/org/prismlauncher/applet/LegacyFrame.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.polymc.applet;
+package org.prismlauncher.applet;
import net.minecraft.Launcher;
diff --git a/libraries/launcher/org/polymc/exception/ParameterNotFoundException.java b/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java
index 2044814e..641e0c99 100644
--- a/libraries/launcher/org/polymc/exception/ParameterNotFoundException.java
+++ b/libraries/launcher/org/prismlauncher/exception/ParameterNotFoundException.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.polymc.exception;
+package org.prismlauncher.exception;
public final class ParameterNotFoundException extends IllegalArgumentException {
diff --git a/libraries/launcher/org/polymc/exception/ParseException.java b/libraries/launcher/org/prismlauncher/exception/ParseException.java
index 2f2f8294..51d25a62 100644
--- a/libraries/launcher/org/polymc/exception/ParseException.java
+++ b/libraries/launcher/org/prismlauncher/exception/ParseException.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.polymc.exception;
+package org.prismlauncher.exception;
public final class ParseException extends IllegalArgumentException {
diff --git a/libraries/launcher/org/polymc/impl/OneSixLauncher.java b/libraries/launcher/org/prismlauncher/impl/OneSixLauncher.java
index d43101eb..d6443826 100644
--- a/libraries/launcher/org/polymc/impl/OneSixLauncher.java
+++ b/libraries/launcher/org/prismlauncher/impl/OneSixLauncher.java
@@ -13,12 +13,12 @@
* limitations under the License.
*/
-package org.polymc.impl;
+package org.prismlauncher.impl;
-import org.polymc.Launcher;
-import org.polymc.applet.LegacyFrame;
-import org.polymc.utils.Parameters;
-import org.polymc.utils.Utils;
+import org.prismlauncher.Launcher;
+import org.prismlauncher.applet.LegacyFrame;
+import org.prismlauncher.utils.Parameters;
+import org.prismlauncher.utils.Utils;
import java.applet.Applet;
import java.io.File;
diff --git a/libraries/launcher/org/polymc/utils/Parameters.java b/libraries/launcher/org/prismlauncher/utils/Parameters.java
index 864d3cd2..98a40c28 100644
--- a/libraries/launcher/org/polymc/utils/Parameters.java
+++ b/libraries/launcher/org/prismlauncher/utils/Parameters.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package org.polymc.utils;
+package org.prismlauncher.utils;
-import org.polymc.exception.ParameterNotFoundException;
+import org.prismlauncher.exception.ParameterNotFoundException;
import java.util.ArrayList;
import java.util.HashMap;
diff --git a/libraries/launcher/org/polymc/utils/Utils.java b/libraries/launcher/org/prismlauncher/utils/Utils.java
index 12d6e1aa..ae9a4de2 100644
--- a/libraries/launcher/org/polymc/utils/Utils.java
+++ b/libraries/launcher/org/prismlauncher/utils/Utils.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package org.polymc.utils;
+package org.prismlauncher.utils;
import java.io.File;
import java.lang.reflect.Field;
diff --git a/libraries/systeminfo/include/sys.h b/libraries/systeminfo/include/sys.h
index bd6e2486..6a6a7c82 100644
--- a/libraries/systeminfo/include/sys.h
+++ b/libraries/systeminfo/include/sys.h
@@ -56,8 +56,4 @@ struct DistributionInfo
DistributionInfo getDistributionInfo();
uint64_t getSystemRam();
-
-bool isSystem64bit();
-
-bool isCPU64bit();
}
diff --git a/libraries/systeminfo/src/sys_apple.cpp b/libraries/systeminfo/src/sys_apple.cpp
index 6353b747..b6d62c1a 100644
--- a/libraries/systeminfo/src/sys_apple.cpp
+++ b/libraries/systeminfo/src/sys_apple.cpp
@@ -55,18 +55,6 @@ uint64_t Sys::getSystemRam()
}
}
-bool Sys::isCPU64bit()
-{
- // not even going to pretend I'm going to support anything else
- return true;
-}
-
-bool Sys::isSystem64bit()
-{
- // yep. maybe when we have 128bit CPUs on consumer devices.
- return true;
-}
-
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo result;
diff --git a/libraries/systeminfo/src/sys_unix.cpp b/libraries/systeminfo/src/sys_unix.cpp
index b3098522..3c63e73a 100644
--- a/libraries/systeminfo/src/sys_unix.cpp
+++ b/libraries/systeminfo/src/sys_unix.cpp
@@ -82,17 +82,6 @@ uint64_t Sys::getSystemRam()
return 0; // nothing found
}
-bool Sys::isCPU64bit()
-{
- return isSystem64bit();
-}
-
-bool Sys::isSystem64bit()
-{
- // kernel build arch on linux
- return QSysInfo::currentCpuArchitecture() == "x86_64";
-}
-
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo systemd_info = read_os_release();
diff --git a/libraries/systeminfo/src/sys_win32.cpp b/libraries/systeminfo/src/sys_win32.cpp
index 430b87e4..5bf510cf 100644
--- a/libraries/systeminfo/src/sys_win32.cpp
+++ b/libraries/systeminfo/src/sys_win32.cpp
@@ -27,28 +27,6 @@ uint64_t Sys::getSystemRam()
return (uint64_t)status.ullTotalPhys;
}
-bool Sys::isSystem64bit()
-{
-#if defined(_WIN64)
- return true;
-#elif defined(_WIN32)
- BOOL f64 = false;
- return IsWow64Process(GetCurrentProcess(), &f64) && f64;
-#else
- // it's some other kind of system...
- return false;
-#endif
-}
-
-bool Sys::isCPU64bit()
-{
- SYSTEM_INFO info;
- ZeroMemory(&info, sizeof(SYSTEM_INFO));
- GetNativeSystemInfo(&info);
- auto arch = info.wProcessorArchitecture;
- return arch == PROCESSOR_ARCHITECTURE_AMD64 || arch == PROCESSOR_ARCHITECTURE_IA64;
-}
-
Sys::DistributionInfo Sys::getDistributionInfo()
{
DistributionInfo result;
diff --git a/libraries/xz-embedded/CMakeLists.txt b/libraries/xz-embedded/CMakeLists.txt
deleted file mode 100644
index 4ce46102..00000000
--- a/libraries/xz-embedded/CMakeLists.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-cmake_minimum_required(VERSION 3.9.4)
-project(xz-embedded LANGUAGES C)
-
-option(XZ_BUILD_BCJ "Build xz-embedded with BCJ support (native binary optimization)" OFF)
-option(XZ_BUILD_CRC64 "Build xz-embedded with CRC64 checksum support" ON)
-option(XZ_BUILD_MINIDEC "Build a tiny utility that decompresses xz streams" OFF)
-
-# See include/xz.h for manual feature configuration
-# tweak this list and xz.h to fit your needs
-
-set(XZ_SOURCES
- src/xz_crc32.c
- src/xz_crc64.c
- src/xz_dec_lzma2.c
- src/xz_dec_stream.c
-# src/xz_dec_bcj.c
-)
-add_library(xz-embedded STATIC ${XZ_SOURCES})
-target_include_directories(xz-embedded PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
-set_property(TARGET xz-embedded PROPERTY C_STANDARD 99)
-
-if(${XZ_BUILD_MINIDEC})
- add_executable(xzminidec xzminidec.c)
- target_link_libraries(xzminidec xz-embedded)
- set_property(TARGET xzminidec PROPERTY C_STANDARD 99)
-endif()
diff --git a/libraries/xz-embedded/include/xz.h b/libraries/xz-embedded/include/xz.h
deleted file mode 100644
index 3779124c..00000000
--- a/libraries/xz-embedded/include/xz.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
- * XZ decompressor
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef XZ_H
-#define XZ_H
-
-#ifdef __KERNEL__
-#include <linux/stddef.h>
-#include <linux/types.h>
-#else
-#include <stddef.h>
-#include <stdint.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Definitions that determine available features */
-#define XZ_DEC_ANY_CHECK 1
-#define XZ_USE_CRC64 1
-
-// native machine code compression stuff
-/*
-#define XZ_DEC_X86
-#define XZ_DEC_POWERPC
-#define XZ_DEC_IA64
-#define XZ_DEC_ARM
-#define XZ_DEC_ARMTHUMB
-#define XZ_DEC_SPARC
-*/
-
-/* In Linux, this is used to make extern functions static when needed. */
-#ifndef XZ_EXTERN
-#define XZ_EXTERN extern
-#endif
-
-/**
- * enum xz_mode - Operation mode
- *
- * @XZ_SINGLE: Single-call mode. This uses less RAM than
- * than multi-call modes, because the LZMA2
- * dictionary doesn't need to be allocated as
- * part of the decoder state. All required data
- * structures are allocated at initialization,
- * so xz_dec_run() cannot return XZ_MEM_ERROR.
- * @XZ_PREALLOC: Multi-call mode with preallocated LZMA2
- * dictionary buffer. All data structures are
- * allocated at initialization, so xz_dec_run()
- * cannot return XZ_MEM_ERROR.
- * @XZ_DYNALLOC: Multi-call mode. The LZMA2 dictionary is
- * allocated once the required size has been
- * parsed from the stream headers. If the
- * allocation fails, xz_dec_run() will return
- * XZ_MEM_ERROR.
- *
- * It is possible to enable support only for a subset of the above
- * modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC,
- * or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled
- * with support for all operation modes, but the preboot code may
- * be built with fewer features to minimize code size.
- */
-enum xz_mode
-{
- XZ_SINGLE,
- XZ_PREALLOC,
- XZ_DYNALLOC
-};
-
-/**
- * enum xz_ret - Return codes
- * @XZ_OK: Everything is OK so far. More input or more
- * output space is required to continue. This
- * return code is possible only in multi-call mode
- * (XZ_PREALLOC or XZ_DYNALLOC).
- * @XZ_STREAM_END: Operation finished successfully.
- * @XZ_UNSUPPORTED_CHECK: Integrity check type is not supported. Decoding
- * is still possible in multi-call mode by simply
- * calling xz_dec_run() again.
- * Note that this return value is used only if
- * XZ_DEC_ANY_CHECK was defined at build time,
- * which is not used in the kernel. Unsupported
- * check types return XZ_OPTIONS_ERROR if
- * XZ_DEC_ANY_CHECK was not defined at build time.
- * @XZ_MEM_ERROR: Allocating memory failed. This return code is
- * possible only if the decoder was initialized
- * with XZ_DYNALLOC. The amount of memory that was
- * tried to be allocated was no more than the
- * dict_max argument given to xz_dec_init().
- * @XZ_MEMLIMIT_ERROR: A bigger LZMA2 dictionary would be needed than
- * allowed by the dict_max argument given to
- * xz_dec_init(). This return value is possible
- * only in multi-call mode (XZ_PREALLOC or
- * XZ_DYNALLOC); the single-call mode (XZ_SINGLE)
- * ignores the dict_max argument.
- * @XZ_FORMAT_ERROR: File format was not recognized (wrong magic
- * bytes).
- * @XZ_OPTIONS_ERROR: This implementation doesn't support the requested
- * compression options. In the decoder this means
- * that the header CRC32 matches, but the header
- * itself specifies something that we don't support.
- * @XZ_DATA_ERROR: Compressed data is corrupt.
- * @XZ_BUF_ERROR: Cannot make any progress. Details are slightly
- * different between multi-call and single-call
- * mode; more information below.
- *
- * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls
- * to XZ code cannot consume any input and cannot produce any new output.
- * This happens when there is no new input available, or the output buffer
- * is full while at least one output byte is still pending. Assuming your
- * code is not buggy, you can get this error only when decoding a compressed
- * stream that is truncated or otherwise corrupt.
- *
- * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer
- * is too small or the compressed input is corrupt in a way that makes the
- * decoder produce more output than the caller expected. When it is
- * (relatively) clear that the compressed input is truncated, XZ_DATA_ERROR
- * is used instead of XZ_BUF_ERROR.
- */
-enum xz_ret
-{
- XZ_OK,
- XZ_STREAM_END,
- XZ_UNSUPPORTED_CHECK,
- XZ_MEM_ERROR,
- XZ_MEMLIMIT_ERROR,
- XZ_FORMAT_ERROR,
- XZ_OPTIONS_ERROR,
- XZ_DATA_ERROR,
- XZ_BUF_ERROR
-};
-
-/**
- * struct xz_buf - Passing input and output buffers to XZ code
- * @in: Beginning of the input buffer. This may be NULL if and only
- * if in_pos is equal to in_size.
- * @in_pos: Current position in the input buffer. This must not exceed
- * in_size.
- * @in_size: Size of the input buffer
- * @out: Beginning of the output buffer. This may be NULL if and only
- * if out_pos is equal to out_size.
- * @out_pos: Current position in the output buffer. This must not exceed
- * out_size.
- * @out_size: Size of the output buffer
- *
- * Only the contents of the output buffer from out[out_pos] onward, and
- * the variables in_pos and out_pos are modified by the XZ code.
- */
-struct xz_buf
-{
- const uint8_t *in;
- size_t in_pos;
- size_t in_size;
-
- uint8_t *out;
- size_t out_pos;
- size_t out_size;
-};
-
-/**
- * struct xz_dec - Opaque type to hold the XZ decoder state
- */
-struct xz_dec;
-
-/**
- * xz_dec_init() - Allocate and initialize a XZ decoder state
- * @mode: Operation mode
- * @dict_max: Maximum size of the LZMA2 dictionary (history buffer) for
- * multi-call decoding. This is ignored in single-call mode
- * (mode == XZ_SINGLE). LZMA2 dictionary is always 2^n bytes
- * or 2^n + 2^(n-1) bytes (the latter sizes are less common
- * in practice), so other values for dict_max don't make sense.
- * In the kernel, dictionary sizes of 64 KiB, 128 KiB, 256 KiB,
- * 512 KiB, and 1 MiB are probably the only reasonable values,
- * except for kernel and initramfs images where a bigger
- * dictionary can be fine and useful.
- *
- * Single-call mode (XZ_SINGLE): xz_dec_run() decodes the whole stream at
- * once. The caller must provide enough output space or the decoding will
- * fail. The output space is used as the dictionary buffer, which is why
- * there is no need to allocate the dictionary as part of the decoder's
- * internal state.
- *
- * Because the output buffer is used as the workspace, streams encoded using
- * a big dictionary are not a problem in single-call mode. It is enough that
- * the output buffer is big enough to hold the actual uncompressed data; it
- * can be smaller than the dictionary size stored in the stream headers.
- *
- * Multi-call mode with preallocated dictionary (XZ_PREALLOC): dict_max bytes
- * of memory is preallocated for the LZMA2 dictionary. This way there is no
- * risk that xz_dec_run() could run out of memory, since xz_dec_run() will
- * never allocate any memory. Instead, if the preallocated dictionary is too
- * small for decoding the given input stream, xz_dec_run() will return
- * XZ_MEMLIMIT_ERROR. Thus, it is important to know what kind of data will be
- * decoded to avoid allocating excessive amount of memory for the dictionary.
- *
- * Multi-call mode with dynamically allocated dictionary (XZ_DYNALLOC):
- * dict_max specifies the maximum allowed dictionary size that xz_dec_run()
- * may allocate once it has parsed the dictionary size from the stream
- * headers. This way excessive allocations can be avoided while still
- * limiting the maximum memory usage to a sane value to prevent running the
- * system out of memory when decompressing streams from untrusted sources.
- *
- * On success, xz_dec_init() returns a pointer to struct xz_dec, which is
- * ready to be used with xz_dec_run(). If memory allocation fails,
- * xz_dec_init() returns NULL.
- */
-XZ_EXTERN struct xz_dec *xz_dec_init(enum xz_mode mode, uint32_t dict_max);
-
-/**
- * xz_dec_run() - Run the XZ decoder
- * @s: Decoder state allocated using xz_dec_init()
- * @b: Input and output buffers
- *
- * The possible return values depend on build options and operation mode.
- * See enum xz_ret for details.
- *
- * Note that if an error occurs in single-call mode (return value is not
- * XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the
- * contents of the output buffer from b->out[b->out_pos] onward are
- * undefined. This is true even after XZ_BUF_ERROR, because with some filter
- * chains, there may be a second pass over the output buffer, and this pass
- * cannot be properly done if the output buffer is truncated. Thus, you
- * cannot give the single-call decoder a too small buffer and then expect to
- * get that amount valid data from the beginning of the stream. You must use
- * the multi-call decoder if you don't want to uncompress the whole stream.
- */
-XZ_EXTERN enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b);
-
-/**
- * xz_dec_reset() - Reset an already allocated decoder state
- * @s: Decoder state allocated using xz_dec_init()
- *
- * This function can be used to reset the multi-call decoder state without
- * freeing and reallocating memory with xz_dec_end() and xz_dec_init().
- *
- * In single-call mode, xz_dec_reset() is always called in the beginning of
- * xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in
- * multi-call mode.
- */
-XZ_EXTERN void xz_dec_reset(struct xz_dec *s);
-
-/**
- * xz_dec_end() - Free the memory allocated for the decoder state
- * @s: Decoder state allocated using xz_dec_init(). If s is NULL,
- * this function does nothing.
- */
-XZ_EXTERN void xz_dec_end(struct xz_dec *s);
-
-/*
- * Standalone build (userspace build or in-kernel build for boot time use)
- * needs a CRC32 implementation. For normal in-kernel use, kernel's own
- * CRC32 module is used instead, and users of this module don't need to
- * care about the functions below.
- */
-#ifndef XZ_INTERNAL_CRC32
-#ifdef __KERNEL__
-#define XZ_INTERNAL_CRC32 0
-#else
-#define XZ_INTERNAL_CRC32 1
-#endif
-#endif
-
-/*
- * If CRC64 support has been enabled with XZ_USE_CRC64, a CRC64
- * implementation is needed too.
- */
-#ifndef XZ_USE_CRC64
-#undef XZ_INTERNAL_CRC64
-#define XZ_INTERNAL_CRC64 0
-#endif
-#ifndef XZ_INTERNAL_CRC64
-#ifdef __KERNEL__
-#error Using CRC64 in the kernel has not been implemented.
-#else
-#define XZ_INTERNAL_CRC64 1
-#endif
-#endif
-
-#if XZ_INTERNAL_CRC32
-/*
- * This must be called before any other xz_* function to initialize
- * the CRC32 lookup table.
- */
-XZ_EXTERN void xz_crc32_init(void);
-
-/*
- * Update CRC32 value using the polynomial from IEEE-802.3. To start a new
- * calculation, the third argument must be zero. To continue the calculation,
- * the previously returned value is passed as the third argument.
- */
-XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc);
-#endif
-
-#if XZ_INTERNAL_CRC64
-/*
- * This must be called before any other xz_* function (except xz_crc32_init())
- * to initialize the CRC64 lookup table.
- */
-XZ_EXTERN void xz_crc64_init(void);
-
-/*
- * Update CRC64 value using the polynomial from ECMA-182. To start a new
- * calculation, the third argument must be zero. To continue the calculation,
- * the previously returned value is passed as the third argument.
- */
-XZ_EXTERN uint64_t xz_crc64(const uint8_t *buf, size_t size, uint64_t crc);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/libraries/xz-embedded/src/xz_config.h b/libraries/xz-embedded/src/xz_config.h
deleted file mode 100644
index effdb1bd..00000000
--- a/libraries/xz-embedded/src/xz_config.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Private includes and definitions for userspace use of XZ Embedded
- *
- * Author: Lasse Collin <lasse.collin@tukaani.org>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef XZ_CONFIG_H
-#define XZ_CONFIG_H
-
-/* Uncomment to enable CRC64 support. */
-/* #define XZ_USE_CRC64 */
-
-/* Uncomment as needed to enable BCJ filter decoders. */
-/* #define XZ_DEC_X86 */
-/* #define XZ_DEC_POWERPC */
-/* #define XZ_DEC_IA64 */
-/* #define XZ_DEC_ARM */
-/* #define XZ_DEC_ARMTHUMB */
-/* #define XZ_DEC_SPARC */
-
-/*
- * MSVC doesn't support modern C but XZ Embedded is mostly C89
- * so these are enough.
- */
-#ifdef _MSC_VER
-typedef unsigned char bool;
-#define true 1
-#define false 0
-#define inline __inline
-#else
-#include <stdbool.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "xz.h"
-
-#define kmalloc(size, flags) malloc(size)
-#define kfree(ptr) free(ptr)
-#define vmalloc(size) malloc(size)
-#define vfree(ptr) free(ptr)
-
-#define memeq(a, b, size) (memcmp(a, b, size) == 0)
-#define memzero(buf, size) memset(buf, 0, size)
-
-#ifndef min
-#define min(x, y) ((x) < (y) ? (x) : (y))
-#endif
-#define min_t(type, x, y) min(x, y)
-
-/*
- * Some functions have been marked with __always_inline to keep the
- * performance reasonable even when the compiler is optimizing for
- * small code size. You may be able to save a few bytes by #defining
- * __always_inline to plain inline, but don't complain if the code
- * becomes slow.
- *
- * NOTE: System headers on GNU/Linux may #define this macro already,
- * so if you want to change it, you need to #undef it first.
- */
-#ifndef __always_inline
-#ifdef __GNUC__
-#define __always_inline inline __attribute__((__always_inline__))
-#else
-#define __always_inline inline
-#endif
-#endif
-
-/* Inline functions to access unaligned unsigned 32-bit integers */
-#ifndef get_unaligned_le32
-static inline uint32_t get_unaligned_le32(const uint8_t *buf)
-{
- return (uint32_t)buf[0] | ((uint32_t)buf[1] << 8) | ((uint32_t)buf[2] << 16) |
- ((uint32_t)buf[3] << 24);
-}
-#endif
-
-#ifndef get_unaligned_be32
-static inline uint32_t get_unaligned_be32(const uint8_t *buf)
-{
- return (uint32_t)(buf[0] << 24) | ((uint32_t)buf[1] << 16) | ((uint32_t)buf[2] << 8) |
- (uint32_t)buf[3];
-}
-#endif
-
-#ifndef put_unaligned_le32
-static inline void put_unaligned_le32(uint32_t val, uint8_t *buf)
-{
- buf[0] = (uint8_t)val;
- buf[1] = (uint8_t)(val >> 8);
- buf[2] = (uint8_t)(val >> 16);
- buf[3] = (uint8_t)(val >> 24);
-}
-#endif
-
-#ifndef put_unaligned_be32
-static inline void put_unaligned_be32(uint32_t val, uint8_t *buf)
-{
- buf[0] = (uint8_t)(val >> 24);
- buf[1] = (uint8_t)(val >> 16);
- buf[2] = (uint8_t)(val >> 8);
- buf[3] = (uint8_t)val;
-}
-#endif
-
-/*
- * Use get_unaligned_le32() also for aligned access for simplicity. On
- * little endian systems, #define get_le32(ptr) (*(const uint32_t *)(ptr))
- * could save a few bytes in code size.
- */
-#ifndef get_le32
-#define get_le32 get_unaligned_le32
-#endif
-
-#endif
diff --git a/libraries/xz-embedded/src/xz_crc32.c b/libraries/xz-embedded/src/xz_crc32.c
deleted file mode 100644
index 65d9d5b8..00000000
--- a/libraries/xz-embedded/src/xz_crc32.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * CRC32 using the polynomial from IEEE-802.3
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-/*
- * This is not the fastest implementation, but it is pretty compact.
- * The fastest versions of xz_crc32() on modern CPUs without hardware
- * accelerated CRC instruction are 3-5 times as fast as this version,
- * but they are bigger and use more memory for the lookup table.
- */
-
-#include "xz_private.h"
-
-/*
- * STATIC_RW_DATA is used in the pre-boot environment on some architectures.
- * See <linux/decompress/mm.h> for details.
- */
-#ifndef STATIC_RW_DATA
-#define STATIC_RW_DATA static
-#endif
-
-STATIC_RW_DATA uint32_t xz_crc32_table[256];
-
-XZ_EXTERN void xz_crc32_init(void)
-{
- const uint32_t poly = 0xEDB88320;
-
- uint32_t i;
- uint32_t j;
- uint32_t r;
-
- for (i = 0; i < 256; ++i)
- {
- r = i;
- for (j = 0; j < 8; ++j)
- r = (r >> 1) ^ (poly & ~((r & 1) - 1));
-
- xz_crc32_table[i] = r;
- }
-
- return;
-}
-
-XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc)
-{
- crc = ~crc;
-
- while (size != 0)
- {
- crc = xz_crc32_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
- --size;
- }
-
- return ~crc;
-}
diff --git a/libraries/xz-embedded/src/xz_crc64.c b/libraries/xz-embedded/src/xz_crc64.c
deleted file mode 100644
index 0f711d8d..00000000
--- a/libraries/xz-embedded/src/xz_crc64.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * CRC64 using the polynomial from ECMA-182
- *
- * This file is similar to xz_crc32.c. See the comments there.
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#include "xz_private.h"
-
-#ifndef STATIC_RW_DATA
-#define STATIC_RW_DATA static
-#endif
-
-STATIC_RW_DATA uint64_t xz_crc64_table[256];
-
-XZ_EXTERN void xz_crc64_init(void)
-{
- const uint64_t poly = 0xC96C5795D7870F42;
-
- uint32_t i;
- uint32_t j;
- uint64_t r;
-
- for (i = 0; i < 256; ++i)
- {
- r = i;
- for (j = 0; j < 8; ++j)
- r = (r >> 1) ^ (poly & ~((r & 1) - 1));
-
- xz_crc64_table[i] = r;
- }
-
- return;
-}
-
-XZ_EXTERN uint64_t xz_crc64(const uint8_t *buf, size_t size, uint64_t crc)
-{
- crc = ~crc;
-
- while (size != 0)
- {
- crc = xz_crc64_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
- --size;
- }
-
- return ~crc;
-}
diff --git a/libraries/xz-embedded/src/xz_dec_bcj.c b/libraries/xz-embedded/src/xz_dec_bcj.c
deleted file mode 100644
index a79fa76d..00000000
--- a/libraries/xz-embedded/src/xz_dec_bcj.c
+++ /dev/null
@@ -1,588 +0,0 @@
-/*
- * Branch/Call/Jump (BCJ) filter decoders
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#include "xz_private.h"
-
-/*
- * The rest of the file is inside this ifdef. It makes things a little more
- * convenient when building without support for any BCJ filters.
- */
-#ifdef XZ_DEC_BCJ
-
-struct xz_dec_bcj
-{
- /* Type of the BCJ filter being used */
- enum
- {
- BCJ_X86 = 4, /* x86 or x86-64 */
- BCJ_POWERPC = 5, /* Big endian only */
- BCJ_IA64 = 6, /* Big or little endian */
- BCJ_ARM = 7, /* Little endian only */
- BCJ_ARMTHUMB = 8, /* Little endian only */
- BCJ_SPARC = 9 /* Big or little endian */
- } type;
-
- /*
- * Return value of the next filter in the chain. We need to preserve
- * this information across calls, because we must not call the next
- * filter anymore once it has returned XZ_STREAM_END.
- */
- enum xz_ret ret;
-
- /* True if we are operating in single-call mode. */
- bool single_call;
-
- /*
- * Absolute position relative to the beginning of the uncompressed
- * data (in a single .xz Block). We care only about the lowest 32
- * bits so this doesn't need to be uint64_t even with big files.
- */
- uint32_t pos;
-
- /* x86 filter state */
- uint32_t x86_prev_mask;
-
- /* Temporary space to hold the variables from struct xz_buf */
- uint8_t *out;
- size_t out_pos;
- size_t out_size;
-
- struct
- {
- /* Amount of already filtered data in the beginning of buf */
- size_t filtered;
-
- /* Total amount of data currently stored in buf */
- size_t size;
-
- /*
- * Buffer to hold a mix of filtered and unfiltered data. This
- * needs to be big enough to hold Alignment + 2 * Look-ahead:
- *
- * Type Alignment Look-ahead
- * x86 1 4
- * PowerPC 4 0
- * IA-64 16 0
- * ARM 4 0
- * ARM-Thumb 2 2
- * SPARC 4 0
- */
- uint8_t buf[16];
- } temp;
-};
-
-#ifdef XZ_DEC_X86
-/*
- * This is used to test the most significant byte of a memory address
- * in an x86 instruction.
- */
-static inline int bcj_x86_test_msbyte(uint8_t b)
-{
- return b == 0x00 || b == 0xFF;
-}
-
-static size_t bcj_x86(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- static const bool mask_to_allowed_status[8] = {true, true, true, false,
- true, false, false, false};
-
- static const uint8_t mask_to_bit_num[8] = {0, 1, 2, 2, 3, 3, 3, 3};
-
- size_t i;
- size_t prev_pos = (size_t) - 1;
- uint32_t prev_mask = s->x86_prev_mask;
- uint32_t src;
- uint32_t dest;
- uint32_t j;
- uint8_t b;
-
- if (size <= 4)
- return 0;
-
- size -= 4;
- for (i = 0; i < size; ++i)
- {
- if ((buf[i] & 0xFE) != 0xE8)
- continue;
-
- prev_pos = i - prev_pos;
- if (prev_pos > 3)
- {
- prev_mask = 0;
- }
- else
- {
- prev_mask = (prev_mask << (prev_pos - 1)) & 7;
- if (prev_mask != 0)
- {
- b = buf[i + 4 - mask_to_bit_num[prev_mask]];
- if (!mask_to_allowed_status[prev_mask] || bcj_x86_test_msbyte(b))
- {
- prev_pos = i;
- prev_mask = (prev_mask << 1) | 1;
- continue;
- }
- }
- }
-
- prev_pos = i;
-
- if (bcj_x86_test_msbyte(buf[i + 4]))
- {
- src = get_unaligned_le32(buf + i + 1);
- while (true)
- {
- dest = src - (s->pos + (uint32_t)i + 5);
- if (prev_mask == 0)
- break;
-
- j = mask_to_bit_num[prev_mask] * 8;
- b = (uint8_t)(dest >> (24 - j));
- if (!bcj_x86_test_msbyte(b))
- break;
-
- src = dest ^ (((uint32_t)1 << (32 - j)) - 1);
- }
-
- dest &= 0x01FFFFFF;
- dest |= (uint32_t)0 - (dest & 0x01000000);
- put_unaligned_le32(dest, buf + i + 1);
- i += 4;
- }
- else
- {
- prev_mask = (prev_mask << 1) | 1;
- }
- }
-
- prev_pos = i - prev_pos;
- s->x86_prev_mask = prev_pos > 3 ? 0 : prev_mask << (prev_pos - 1);
- return i;
-}
-#endif
-
-#ifdef XZ_DEC_POWERPC
-static size_t bcj_powerpc(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- size_t i;
- uint32_t instr;
-
- for (i = 0; i + 4 <= size; i += 4)
- {
- instr = get_unaligned_be32(buf + i);
- if ((instr & 0xFC000003) == 0x48000001)
- {
- instr &= 0x03FFFFFC;
- instr -= s->pos + (uint32_t)i;
- instr &= 0x03FFFFFC;
- instr |= 0x48000001;
- put_unaligned_be32(instr, buf + i);
- }
- }
-
- return i;
-}
-#endif
-
-#ifdef XZ_DEC_IA64
-static size_t bcj_ia64(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- static const uint8_t branch_table[32] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 6, 6, 0, 0, 7, 7, 4, 4, 0, 0, 4, 4, 0, 0};
-
- /*
- * The local variables take a little bit stack space, but it's less
- * than what LZMA2 decoder takes, so it doesn't make sense to reduce
- * stack usage here without doing that for the LZMA2 decoder too.
- */
-
- /* Loop counters */
- size_t i;
- size_t j;
-
- /* Instruction slot (0, 1, or 2) in the 128-bit instruction word */
- uint32_t slot;
-
- /* Bitwise offset of the instruction indicated by slot */
- uint32_t bit_pos;
-
- /* bit_pos split into byte and bit parts */
- uint32_t byte_pos;
- uint32_t bit_res;
-
- /* Address part of an instruction */
- uint32_t addr;
-
- /* Mask used to detect which instructions to convert */
- uint32_t mask;
-
- /* 41-bit instruction stored somewhere in the lowest 48 bits */
- uint64_t instr;
-
- /* Instruction normalized with bit_res for easier manipulation */
- uint64_t norm;
-
- for (i = 0; i + 16 <= size; i += 16)
- {
- mask = branch_table[buf[i] & 0x1F];
- for (slot = 0, bit_pos = 5; slot < 3; ++slot, bit_pos += 41)
- {
- if (((mask >> slot) & 1) == 0)
- continue;
-
- byte_pos = bit_pos >> 3;
- bit_res = bit_pos & 7;
- instr = 0;
- for (j = 0; j < 6; ++j)
- instr |= (uint64_t)(buf[i + j + byte_pos]) << (8 * j);
-
- norm = instr >> bit_res;
-
- if (((norm >> 37) & 0x0F) == 0x05 && ((norm >> 9) & 0x07) == 0)
- {
- addr = (norm >> 13) & 0x0FFFFF;
- addr |= ((uint32_t)(norm >> 36) & 1) << 20;
- addr <<= 4;
- addr -= s->pos + (uint32_t)i;
- addr >>= 4;
-
- norm &= ~((uint64_t)0x8FFFFF << 13);
- norm |= (uint64_t)(addr & 0x0FFFFF) << 13;
- norm |= (uint64_t)(addr & 0x100000) << (36 - 20);
-
- instr &= (1 << bit_res) - 1;
- instr |= norm << bit_res;
-
- for (j = 0; j < 6; j++)
- buf[i + j + byte_pos] = (uint8_t)(instr >> (8 * j));
- }
- }
- }
-
- return i;
-}
-#endif
-
-#ifdef XZ_DEC_ARM
-static size_t bcj_arm(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- size_t i;
- uint32_t addr;
-
- for (i = 0; i + 4 <= size; i += 4)
- {
- if (buf[i + 3] == 0xEB)
- {
- addr =
- (uint32_t)buf[i] | ((uint32_t)buf[i + 1] << 8) | ((uint32_t)buf[i + 2] << 16);
- addr <<= 2;
- addr -= s->pos + (uint32_t)i + 8;
- addr >>= 2;
- buf[i] = (uint8_t)addr;
- buf[i + 1] = (uint8_t)(addr >> 8);
- buf[i + 2] = (uint8_t)(addr >> 16);
- }
- }
-
- return i;
-}
-#endif
-
-#ifdef XZ_DEC_ARMTHUMB
-static size_t bcj_armthumb(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- size_t i;
- uint32_t addr;
-
- for (i = 0; i + 4 <= size; i += 2)
- {
- if ((buf[i + 1] & 0xF8) == 0xF0 && (buf[i + 3] & 0xF8) == 0xF8)
- {
- addr = (((uint32_t)buf[i + 1] & 0x07) << 19) | ((uint32_t)buf[i] << 11) |
- (((uint32_t)buf[i + 3] & 0x07) << 8) | (uint32_t)buf[i + 2];
- addr <<= 1;
- addr -= s->pos + (uint32_t)i + 4;
- addr >>= 1;
- buf[i + 1] = (uint8_t)(0xF0 | ((addr >> 19) & 0x07));
- buf[i] = (uint8_t)(addr >> 11);
- buf[i + 3] = (uint8_t)(0xF8 | ((addr >> 8) & 0x07));
- buf[i + 2] = (uint8_t)addr;
- i += 2;
- }
- }
-
- return i;
-}
-#endif
-
-#ifdef XZ_DEC_SPARC
-static size_t bcj_sparc(struct xz_dec_bcj *s, uint8_t *buf, size_t size)
-{
- size_t i;
- uint32_t instr;
-
- for (i = 0; i + 4 <= size; i += 4)
- {
- instr = get_unaligned_be32(buf + i);
- if ((instr >> 22) == 0x100 || (instr >> 22) == 0x1FF)
- {
- instr <<= 2;
- instr -= s->pos + (uint32_t)i;
- instr >>= 2;
- instr =
- ((uint32_t)0x40000000 - (instr & 0x400000)) | 0x40000000 | (instr & 0x3FFFFF);
- put_unaligned_be32(instr, buf + i);
- }
- }
-
- return i;
-}
-#endif
-
-/*
- * Apply the selected BCJ filter. Update *pos and s->pos to match the amount
- * of data that got filtered.
- *
- * NOTE: This is implemented as a switch statement to avoid using function
- * pointers, which could be problematic in the kernel boot code, which must
- * avoid pointers to static data (at least on x86).
- */
-static void bcj_apply(struct xz_dec_bcj *s, uint8_t *buf, size_t *pos, size_t size)
-{
- size_t filtered;
-
- buf += *pos;
- size -= *pos;
-
- switch (s->type)
- {
-#ifdef XZ_DEC_X86
- case BCJ_X86:
- filtered = bcj_x86(s, buf, size);
- break;
-#endif
-#ifdef XZ_DEC_POWERPC
- case BCJ_POWERPC:
- filtered = bcj_powerpc(s, buf, size);
- break;
-#endif
-#ifdef XZ_DEC_IA64
- case BCJ_IA64:
- filtered = bcj_ia64(s, buf, size);
- break;
-#endif
-#ifdef XZ_DEC_ARM
- case BCJ_ARM:
- filtered = bcj_arm(s, buf, size);
- break;
-#endif
-#ifdef XZ_DEC_ARMTHUMB
- case BCJ_ARMTHUMB:
- filtered = bcj_armthumb(s, buf, size);
- break;
-#endif
-#ifdef XZ_DEC_SPARC
- case BCJ_SPARC:
- filtered = bcj_sparc(s, buf, size);
- break;
-#endif
- default:
- /* Never reached but silence compiler warnings. */
- filtered = 0;
- break;
- }
-
- *pos += filtered;
- s->pos += filtered;
-}
-
-/*
- * Flush pending filtered data from temp to the output buffer.
- * Move the remaining mixture of possibly filtered and unfiltered
- * data to the beginning of temp.
- */
-static void bcj_flush(struct xz_dec_bcj *s, struct xz_buf *b)
-{
- size_t copy_size;
-
- copy_size = min_t(size_t, s->temp.filtered, b->out_size - b->out_pos);
- memcpy(b->out + b->out_pos, s->temp.buf, copy_size);
- b->out_pos += copy_size;
-
- s->temp.filtered -= copy_size;
- s->temp.size -= copy_size;
- memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size);
-}
-
-/*
- * The BCJ filter functions are primitive in sense that they process the
- * data in chunks of 1-16 bytes. To hide this issue, this function does
- * some buffering.
- */
-XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s, struct xz_dec_lzma2 *lzma2,
- struct xz_buf *b)
-{
- size_t out_start;
-
- /*
- * Flush pending already filtered data to the output buffer. Return
- * immediatelly if we couldn't flush everything, or if the next
- * filter in the chain had already returned XZ_STREAM_END.
- */
- if (s->temp.filtered > 0)
- {
- bcj_flush(s, b);
- if (s->temp.filtered > 0)
- return XZ_OK;
-
- if (s->ret == XZ_STREAM_END)
- return XZ_STREAM_END;
- }
-
- /*
- * If we have more output space than what is currently pending in
- * temp, copy the unfiltered data from temp to the output buffer
- * and try to fill the output buffer by decoding more data from the
- * next filter in the chain. Apply the BCJ filter on the new data
- * in the output buffer. If everything cannot be filtered, copy it
- * to temp and rewind the output buffer position accordingly.
- *
- * This needs to be always run when temp.size == 0 to handle a special
- * case where the output buffer is full and the next filter has no
- * more output coming but hasn't returned XZ_STREAM_END yet.
- */
- if (s->temp.size < b->out_size - b->out_pos || s->temp.size == 0)
- {
- out_start = b->out_pos;
- memcpy(b->out + b->out_pos, s->temp.buf, s->temp.size);
- b->out_pos += s->temp.size;
-
- s->ret = xz_dec_lzma2_run(lzma2, b);
- if (s->ret != XZ_STREAM_END && (s->ret != XZ_OK || s->single_call))
- return s->ret;
-
- bcj_apply(s, b->out, &out_start, b->out_pos);
-
- /*
- * As an exception, if the next filter returned XZ_STREAM_END,
- * we can do that too, since the last few bytes that remain
- * unfiltered are meant to remain unfiltered.
- */
- if (s->ret == XZ_STREAM_END)
- return XZ_STREAM_END;
-
- s->temp.size = b->out_pos - out_start;
- b->out_pos -= s->temp.size;
- memcpy(s->temp.buf, b->out + b->out_pos, s->temp.size);
-
- /*
- * If there wasn't enough input to the next filter to fill
- * the output buffer with unfiltered data, there's no point
- * to try decoding more data to temp.
- */
- if (b->out_pos + s->temp.size < b->out_size)
- return XZ_OK;
- }
-
- /*
- * We have unfiltered data in temp. If the output buffer isn't full
- * yet, try to fill the temp buffer by decoding more data from the
- * next filter. Apply the BCJ filter on temp. Then we hopefully can
- * fill the actual output buffer by copying filtered data from temp.
- * A mix of filtered and unfiltered data may be left in temp; it will
- * be taken care on the next call to this function.
- */
- if (b->out_pos < b->out_size)
- {
- /* Make b->out{,_pos,_size} temporarily point to s->temp. */
- s->out = b->out;
- s->out_pos = b->out_pos;
- s->out_size = b->out_size;
- b->out = s->temp.buf;
- b->out_pos = s->temp.size;
- b->out_size = sizeof(s->temp.buf);
-
- s->ret = xz_dec_lzma2_run(lzma2, b);
-
- s->temp.size = b->out_pos;
- b->out = s->out;
- b->out_pos = s->out_pos;
- b->out_size = s->out_size;
-
- if (s->ret != XZ_OK && s->ret != XZ_STREAM_END)
- return s->ret;
-
- bcj_apply(s, s->temp.buf, &s->temp.filtered, s->temp.size);
-
- /*
- * If the next filter returned XZ_STREAM_END, we mark that
- * everything is filtered, since the last unfiltered bytes
- * of the stream are meant to be left as is.
- */
- if (s->ret == XZ_STREAM_END)
- s->temp.filtered = s->temp.size;
-
- bcj_flush(s, b);
- if (s->temp.filtered > 0)
- return XZ_OK;
- }
-
- return s->ret;
-}
-
-XZ_EXTERN struct xz_dec_bcj *xz_dec_bcj_create(bool single_call)
-{
- struct xz_dec_bcj *s = kmalloc(sizeof(*s), GFP_KERNEL);
- if (s != NULL)
- s->single_call = single_call;
-
- return s;
-}
-
-XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id)
-{
- switch (id)
- {
-#ifdef XZ_DEC_X86
- case BCJ_X86:
-#endif
-#ifdef XZ_DEC_POWERPC
- case BCJ_POWERPC:
-#endif
-#ifdef XZ_DEC_IA64
- case BCJ_IA64:
-#endif
-#ifdef XZ_DEC_ARM
- case BCJ_ARM:
-#endif
-#ifdef XZ_DEC_ARMTHUMB
- case BCJ_ARMTHUMB:
-#endif
-#ifdef XZ_DEC_SPARC
- case BCJ_SPARC:
-#endif
- break;
-
- default:
- /* Unsupported Filter ID */
- return XZ_OPTIONS_ERROR;
- }
-
- s->type = id;
- s->ret = XZ_OK;
- s->pos = 0;
- s->x86_prev_mask = 0;
- s->temp.filtered = 0;
- s->temp.size = 0;
-
- return XZ_OK;
-}
-
-#endif
diff --git a/libraries/xz-embedded/src/xz_dec_lzma2.c b/libraries/xz-embedded/src/xz_dec_lzma2.c
deleted file mode 100644
index 365ace2b..00000000
--- a/libraries/xz-embedded/src/xz_dec_lzma2.c
+++ /dev/null
@@ -1,1231 +0,0 @@
-/*
- * LZMA2 decoder
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#include "xz_private.h"
-#include "xz_lzma2.h"
-
-/*
- * Range decoder initialization eats the first five bytes of each LZMA chunk.
- */
-#define RC_INIT_BYTES 5
-
-/*
- * Minimum number of usable input buffer to safely decode one LZMA symbol.
- * The worst case is that we decode 22 bits using probabilities and 26
- * direct bits. This may decode at maximum of 20 bytes of input. However,
- * lzma_main() does an extra normalization before returning, thus we
- * need to put 21 here.
- */
-#define LZMA_IN_REQUIRED 21
-
-/*
- * Dictionary (history buffer)
- *
- * These are always true:
- * start <= pos <= full <= end
- * pos <= limit <= end
- *
- * In multi-call mode, also these are true:
- * end == size
- * size <= size_max
- * allocated <= size
- *
- * Most of these variables are size_t to support single-call mode,
- * in which the dictionary variables address the actual output
- * buffer directly.
- */
-struct dictionary
-{
- /* Beginning of the history buffer */
- uint8_t *buf;
-
- /* Old position in buf (before decoding more data) */
- size_t start;
-
- /* Position in buf */
- size_t pos;
-
- /*
- * How full dictionary is. This is used to detect corrupt input that
- * would read beyond the beginning of the uncompressed stream.
- */
- size_t full;
-
- /* Write limit; we don't write to buf[limit] or later bytes. */
- size_t limit;
-
- /*
- * End of the dictionary buffer. In multi-call mode, this is
- * the same as the dictionary size. In single-call mode, this
- * indicates the size of the output buffer.
- */
- size_t end;
-
- /*
- * Size of the dictionary as specified in Block Header. This is used
- * together with "full" to detect corrupt input that would make us
- * read beyond the beginning of the uncompressed stream.
- */
- uint32_t size;
-
- /*
- * Maximum allowed dictionary size in multi-call mode.
- * This is ignored in single-call mode.
- */
- uint32_t size_max;
-
- /*
- * Amount of memory currently allocated for the dictionary.
- * This is used only with XZ_DYNALLOC. (With XZ_PREALLOC,
- * size_max is always the same as the allocated size.)
- */
- uint32_t allocated;
-
- /* Operation mode */
- enum xz_mode mode;
-};
-
-/* Range decoder */
-struct rc_dec
-{
- uint32_t range;
- uint32_t code;
-
- /*
- * Number of initializing bytes remaining to be read
- * by rc_read_init().
- */
- uint32_t init_bytes_left;
-
- /*
- * Buffer from which we read our input. It can be either
- * temp.buf or the caller-provided input buffer.
- */
- const uint8_t *in;
- size_t in_pos;
- size_t in_limit;
-};
-
-/* Probabilities for a length decoder. */
-struct lzma_len_dec
-{
- /* Probability of match length being at least 10 */
- uint16_t choice;
-
- /* Probability of match length being at least 18 */
- uint16_t choice2;
-
- /* Probabilities for match lengths 2-9 */
- uint16_t low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
-
- /* Probabilities for match lengths 10-17 */
- uint16_t mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
-
- /* Probabilities for match lengths 18-273 */
- uint16_t high[LEN_HIGH_SYMBOLS];
-};
-
-struct lzma_dec
-{
- /* Distances of latest four matches */
- uint32_t rep0;
- uint32_t rep1;
- uint32_t rep2;
- uint32_t rep3;
-
- /* Types of the most recently seen LZMA symbols */
- enum lzma_state state;
-
- /*
- * Length of a match. This is updated so that dict_repeat can
- * be called again to finish repeating the whole match.
- */
- uint32_t len;
-
- /*
- * LZMA properties or related bit masks (number of literal
- * context bits, a mask dervied from the number of literal
- * position bits, and a mask dervied from the number
- * position bits)
- */
- uint32_t lc;
- uint32_t literal_pos_mask; /* (1 << lp) - 1 */
- uint32_t pos_mask; /* (1 << pb) - 1 */
-
- /* If 1, it's a match. Otherwise it's a single 8-bit literal. */
- uint16_t is_match[STATES][POS_STATES_MAX];
-
- /* If 1, it's a repeated match. The distance is one of rep0 .. rep3. */
- uint16_t is_rep[STATES];
-
- /*
- * If 0, distance of a repeated match is rep0.
- * Otherwise check is_rep1.
- */
- uint16_t is_rep0[STATES];
-
- /*
- * If 0, distance of a repeated match is rep1.
- * Otherwise check is_rep2.
- */
- uint16_t is_rep1[STATES];
-
- /* If 0, distance of a repeated match is rep2. Otherwise it is rep3. */
- uint16_t is_rep2[STATES];
-
- /*
- * If 1, the repeated match has length of one byte. Otherwise
- * the length is decoded from rep_len_decoder.
- */
- uint16_t is_rep0_long[STATES][POS_STATES_MAX];
-
- /*
- * Probability tree for the highest two bits of the match
- * distance. There is a separate probability tree for match
- * lengths of 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
- */
- uint16_t dist_slot[DIST_STATES][DIST_SLOTS];
-
- /*
- * Probility trees for additional bits for match distance
- * when the distance is in the range [4, 127].
- */
- uint16_t dist_special[FULL_DISTANCES - DIST_MODEL_END];
-
- /*
- * Probability tree for the lowest four bits of a match
- * distance that is equal to or greater than 128.
- */
- uint16_t dist_align[ALIGN_SIZE];
-
- /* Length of a normal match */
- struct lzma_len_dec match_len_dec;
-
- /* Length of a repeated match */
- struct lzma_len_dec rep_len_dec;
-
- /* Probabilities of literals */
- uint16_t literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
-};
-
-struct lzma2_dec
-{
- /* Position in xz_dec_lzma2_run(). */
- enum lzma2_seq
- {
- SEQ_CONTROL,
- SEQ_UNCOMPRESSED_1,
- SEQ_UNCOMPRESSED_2,
- SEQ_COMPRESSED_0,
- SEQ_COMPRESSED_1,
- SEQ_PROPERTIES,
- SEQ_LZMA_PREPARE,
- SEQ_LZMA_RUN,
- SEQ_COPY
- } sequence;
-
- /* Next position after decoding the compressed size of the chunk. */
- enum lzma2_seq next_sequence;
-
- /* Uncompressed size of LZMA chunk (2 MiB at maximum) */
- uint32_t uncompressed;
-
- /*
- * Compressed size of LZMA chunk or compressed/uncompressed
- * size of uncompressed chunk (64 KiB at maximum)
- */
- uint32_t compressed;
-
- /*
- * True if dictionary reset is needed. This is false before
- * the first chunk (LZMA or uncompressed).
- */
- bool need_dict_reset;
-
- /*
- * True if new LZMA properties are needed. This is false
- * before the first LZMA chunk.
- */
- bool need_props;
-};
-
-struct xz_dec_lzma2
-{
- /*
- * The order below is important on x86 to reduce code size and
- * it shouldn't hurt on other platforms. Everything up to and
- * including lzma.pos_mask are in the first 128 bytes on x86-32,
- * which allows using smaller instructions to access those
- * variables. On x86-64, fewer variables fit into the first 128
- * bytes, but this is still the best order without sacrificing
- * the readability by splitting the structures.
- */
- struct rc_dec rc;
- struct dictionary dict;
- struct lzma2_dec lzma2;
- struct lzma_dec lzma;
-
- /*
- * Temporary buffer which holds small number of input bytes between
- * decoder calls. See lzma2_lzma() for details.
- */
- struct
- {
- uint32_t size;
- uint8_t buf[3 * LZMA_IN_REQUIRED];
- } temp;
-};
-
-/**************
- * Dictionary *
- **************/
-
-/*
- * Reset the dictionary state. When in single-call mode, set up the beginning
- * of the dictionary to point to the actual output buffer.
- */
-static void dict_reset(struct dictionary *dict, struct xz_buf *b)
-{
- if (DEC_IS_SINGLE(dict->mode))
- {
- dict->buf = b->out + b->out_pos;
- dict->end = b->out_size - b->out_pos;
- }
-
- dict->start = 0;
- dict->pos = 0;
- dict->limit = 0;
- dict->full = 0;
-}
-
-/* Set dictionary write limit */
-static void dict_limit(struct dictionary *dict, size_t out_max)
-{
- if (dict->end - dict->pos <= out_max)
- dict->limit = dict->end;
- else
- dict->limit = dict->pos + out_max;
-}
-
-/* Return true if at least one byte can be written into the dictionary. */
-static inline bool dict_has_space(const struct dictionary *dict)
-{
- return dict->pos < dict->limit;
-}
-
-/*
- * Get a byte from the dictionary at the given distance. The distance is
- * assumed to valid, or as a special case, zero when the dictionary is
- * still empty. This special case is needed for single-call decoding to
- * avoid writing a '\0' to the end of the destination buffer.
- */
-static inline uint32_t dict_get(const struct dictionary *dict, uint32_t dist)
-{
- size_t offset = dict->pos - dist - 1;
-
- if (dist >= dict->pos)
- offset += dict->end;
-
- return dict->full > 0 ? dict->buf[offset] : 0;
-}
-
-/*
- * Put one byte into the dictionary. It is assumed that there is space for it.
- */
-static inline void dict_put(struct dictionary *dict, uint8_t byte)
-{
- dict->buf[dict->pos++] = byte;
-
- if (dict->full < dict->pos)
- dict->full = dict->pos;
-}
-
-/*
- * Repeat given number of bytes from the given distance. If the distance is
- * invalid, false is returned. On success, true is returned and *len is
- * updated to indicate how many bytes were left to be repeated.
- */
-static bool dict_repeat(struct dictionary *dict, uint32_t *len, uint32_t dist)
-{
- size_t back;
- uint32_t left;
-
- if (dist >= dict->full || dist >= dict->size)
- return false;
-
- left = min_t(size_t, dict->limit - dict->pos, *len);
- *len -= left;
-
- back = dict->pos - dist - 1;
- if (dist >= dict->pos)
- back += dict->end;
-
- do
- {
- dict->buf[dict->pos++] = dict->buf[back++];
- if (back == dict->end)
- back = 0;
- } while (--left > 0);
-
- if (dict->full < dict->pos)
- dict->full = dict->pos;
-
- return true;
-}
-
-/* Copy uncompressed data as is from input to dictionary and output buffers. */
-static void dict_uncompressed(struct dictionary *dict, struct xz_buf *b, uint32_t *left)
-{
- size_t copy_size;
-
- while (*left > 0 && b->in_pos < b->in_size && b->out_pos < b->out_size)
- {
- copy_size = min(b->in_size - b->in_pos, b->out_size - b->out_pos);
- if (copy_size > dict->end - dict->pos)
- copy_size = dict->end - dict->pos;
- if (copy_size > *left)
- copy_size = *left;
-
- *left -= copy_size;
-
- memcpy(dict->buf + dict->pos, b->in + b->in_pos, copy_size);
- dict->pos += copy_size;
-
- if (dict->full < dict->pos)
- dict->full = dict->pos;
-
- if (DEC_IS_MULTI(dict->mode))
- {
- if (dict->pos == dict->end)
- dict->pos = 0;
-
- memcpy(b->out + b->out_pos, b->in + b->in_pos, copy_size);
- }
-
- dict->start = dict->pos;
-
- b->out_pos += copy_size;
- b->in_pos += copy_size;
- }
-}
-
-/*
- * Flush pending data from dictionary to b->out. It is assumed that there is
- * enough space in b->out. This is guaranteed because caller uses dict_limit()
- * before decoding data into the dictionary.
- */
-static uint32_t dict_flush(struct dictionary *dict, struct xz_buf *b)
-{
- size_t copy_size = dict->pos - dict->start;
-
- if (DEC_IS_MULTI(dict->mode))
- {
- if (dict->pos == dict->end)
- dict->pos = 0;
-
- memcpy(b->out + b->out_pos, dict->buf + dict->start, copy_size);
- }
-
- dict->start = dict->pos;
- b->out_pos += copy_size;
- return copy_size;
-}
-
-/*****************
- * Range decoder *
- *****************/
-
-/* Reset the range decoder. */
-static void rc_reset(struct rc_dec *rc)
-{
- rc->range = (uint32_t) - 1;
- rc->code = 0;
- rc->init_bytes_left = RC_INIT_BYTES;
-}
-
-/*
- * Read the first five initial bytes into rc->code if they haven't been
- * read already. (Yes, the first byte gets completely ignored.)
- */
-static bool rc_read_init(struct rc_dec *rc, struct xz_buf *b)
-{
- while (rc->init_bytes_left > 0)
- {
- if (b->in_pos == b->in_size)
- return false;
-
- rc->code = (rc->code << 8) + b->in[b->in_pos++];
- --rc->init_bytes_left;
- }
-
- return true;
-}
-
-/* Return true if there may not be enough input for the next decoding loop. */
-static inline bool rc_limit_exceeded(const struct rc_dec *rc)
-{
- return rc->in_pos > rc->in_limit;
-}
-
-/*
- * Return true if it is possible (from point of view of range decoder) that
- * we have reached the end of the LZMA chunk.
- */
-static inline bool rc_is_finished(const struct rc_dec *rc)
-{
- return rc->code == 0;
-}
-
-/* Read the next input byte if needed. */
-static __always_inline void rc_normalize(struct rc_dec *rc)
-{
- if (rc->range < RC_TOP_VALUE)
- {
- rc->range <<= RC_SHIFT_BITS;
- rc->code = (rc->code << RC_SHIFT_BITS) + rc->in[rc->in_pos++];
- }
-}
-
-/*
- * Decode one bit. In some versions, this function has been splitted in three
- * functions so that the compiler is supposed to be able to more easily avoid
- * an extra branch. In this particular version of the LZMA decoder, this
- * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3
- * on x86). Using a non-splitted version results in nicer looking code too.
- *
- * NOTE: This must return an int. Do not make it return a bool or the speed
- * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,
- * and it generates 10-20 % faster code than GCC 3.x from this file anyway.)
- */
-static __always_inline int rc_bit(struct rc_dec *rc, uint16_t *prob)
-{
- uint32_t bound;
- int bit;
-
- rc_normalize(rc);
- bound = (rc->range >> RC_BIT_MODEL_TOTAL_BITS) * *prob;
- if (rc->code < bound)
- {
- rc->range = bound;
- *prob += (RC_BIT_MODEL_TOTAL - *prob) >> RC_MOVE_BITS;
- bit = 0;
- }
- else
- {
- rc->range -= bound;
- rc->code -= bound;
- *prob -= *prob >> RC_MOVE_BITS;
- bit = 1;
- }
-
- return bit;
-}
-
-/* Decode a bittree starting from the most significant bit. */
-static __always_inline uint32_t rc_bittree(struct rc_dec *rc, uint16_t *probs, uint32_t limit)
-{
- uint32_t symbol = 1;
-
- do
- {
- if (rc_bit(rc, &probs[symbol]))
- symbol = (symbol << 1) + 1;
- else
- symbol <<= 1;
- } while (symbol < limit);
-
- return symbol;
-}
-
-/* Decode a bittree starting from the least significant bit. */
-static __always_inline void rc_bittree_reverse(struct rc_dec *rc, uint16_t *probs,
- uint32_t *dest, uint32_t limit)
-{
- uint32_t symbol = 1;
- uint32_t i = 0;
-
- do
- {
- if (rc_bit(rc, &probs[symbol]))
- {
- symbol = (symbol << 1) + 1;
- *dest += 1 << i;
- }
- else
- {
- symbol <<= 1;
- }
- } while (++i < limit);
-}
-
-/* Decode direct bits (fixed fifty-fifty probability) */
-static inline void rc_direct(struct rc_dec *rc, uint32_t *dest, uint32_t limit)
-{
- uint32_t mask;
-
- do
- {
- rc_normalize(rc);
- rc->range >>= 1;
- rc->code -= rc->range;
- mask = (uint32_t)0 - (rc->code >> 31);
- rc->code += rc->range & mask;
- *dest = (*dest << 1) + (mask + 1);
- } while (--limit > 0);
-}
-
-/********
- * LZMA *
- ********/
-
-/* Get pointer to literal coder probability array. */
-static uint16_t *lzma_literal_probs(struct xz_dec_lzma2 *s)
-{
- uint32_t prev_byte = dict_get(&s->dict, 0);
- uint32_t low = prev_byte >> (8 - s->lzma.lc);
- uint32_t high = (s->dict.pos & s->lzma.literal_pos_mask) << s->lzma.lc;
- return s->lzma.literal[low + high];
-}
-
-/* Decode a literal (one 8-bit byte) */
-static void lzma_literal(struct xz_dec_lzma2 *s)
-{
- uint16_t *probs;
- uint32_t symbol;
- uint32_t match_byte;
- uint32_t match_bit;
- uint32_t offset;
- uint32_t i;
-
- probs = lzma_literal_probs(s);
-
- if (lzma_state_is_literal(s->lzma.state))
- {
- symbol = rc_bittree(&s->rc, probs, 0x100);
- }
- else
- {
- symbol = 1;
- match_byte = dict_get(&s->dict, s->lzma.rep0) << 1;
- offset = 0x100;
-
- do
- {
- match_bit = match_byte & offset;
- match_byte <<= 1;
- i = offset + match_bit + symbol;
-
- if (rc_bit(&s->rc, &probs[i]))
- {
- symbol = (symbol << 1) + 1;
- offset &= match_bit;
- }
- else
- {
- symbol <<= 1;
- offset &= ~match_bit;
- }
- } while (symbol < 0x100);
- }
-
- dict_put(&s->dict, (uint8_t)symbol);
- lzma_state_literal(&s->lzma.state);
-}
-
-/* Decode the length of the match into s->lzma.len. */
-static void lzma_len(struct xz_dec_lzma2 *s, struct lzma_len_dec *l, uint32_t pos_state)
-{
- uint16_t *probs;
- uint32_t limit;
-
- if (!rc_bit(&s->rc, &l->choice))
- {
- probs = l->low[pos_state];
- limit = LEN_LOW_SYMBOLS;
- s->lzma.len = MATCH_LEN_MIN;
- }
- else
- {
- if (!rc_bit(&s->rc, &l->choice2))
- {
- probs = l->mid[pos_state];
- limit = LEN_MID_SYMBOLS;
- s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS;
- }
- else
- {
- probs = l->high;
- limit = LEN_HIGH_SYMBOLS;
- s->lzma.len = MATCH_LEN_MIN + LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS;
- }
- }
-
- s->lzma.len += rc_bittree(&s->rc, probs, limit) - limit;
-}
-
-/* Decode a match. The distance will be stored in s->lzma.rep0. */
-static void lzma_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
-{
- uint16_t *probs;
- uint32_t dist_slot;
- uint32_t limit;
-
- lzma_state_match(&s->lzma.state);
-
- s->lzma.rep3 = s->lzma.rep2;
- s->lzma.rep2 = s->lzma.rep1;
- s->lzma.rep1 = s->lzma.rep0;
-
- lzma_len(s, &s->lzma.match_len_dec, pos_state);
-
- probs = s->lzma.dist_slot[lzma_get_dist_state(s->lzma.len)];
- dist_slot = rc_bittree(&s->rc, probs, DIST_SLOTS) - DIST_SLOTS;
-
- if (dist_slot < DIST_MODEL_START)
- {
- s->lzma.rep0 = dist_slot;
- }
- else
- {
- limit = (dist_slot >> 1) - 1;
- s->lzma.rep0 = 2 + (dist_slot & 1);
-
- if (dist_slot < DIST_MODEL_END)
- {
- s->lzma.rep0 <<= limit;
- probs = s->lzma.dist_special + s->lzma.rep0 - dist_slot - 1;
- rc_bittree_reverse(&s->rc, probs, &s->lzma.rep0, limit);
- }
- else
- {
- rc_direct(&s->rc, &s->lzma.rep0, limit - ALIGN_BITS);
- s->lzma.rep0 <<= ALIGN_BITS;
- rc_bittree_reverse(&s->rc, s->lzma.dist_align, &s->lzma.rep0, ALIGN_BITS);
- }
- }
-}
-
-/*
- * Decode a repeated match. The distance is one of the four most recently
- * seen matches. The distance will be stored in s->lzma.rep0.
- */
-static void lzma_rep_match(struct xz_dec_lzma2 *s, uint32_t pos_state)
-{
- uint32_t tmp;
-
- if (!rc_bit(&s->rc, &s->lzma.is_rep0[s->lzma.state]))
- {
- if (!rc_bit(&s->rc, &s->lzma.is_rep0_long[s->lzma.state][pos_state]))
- {
- lzma_state_short_rep(&s->lzma.state);
- s->lzma.len = 1;
- return;
- }
- }
- else
- {
- if (!rc_bit(&s->rc, &s->lzma.is_rep1[s->lzma.state]))
- {
- tmp = s->lzma.rep1;
- }
- else
- {
- if (!rc_bit(&s->rc, &s->lzma.is_rep2[s->lzma.state]))
- {
- tmp = s->lzma.rep2;
- }
- else
- {
- tmp = s->lzma.rep3;
- s->lzma.rep3 = s->lzma.rep2;
- }
-
- s->lzma.rep2 = s->lzma.rep1;
- }
-
- s->lzma.rep1 = s->lzma.rep0;
- s->lzma.rep0 = tmp;
- }
-
- lzma_state_long_rep(&s->lzma.state);
- lzma_len(s, &s->lzma.rep_len_dec, pos_state);
-}
-
-/* LZMA decoder core */
-static bool lzma_main(struct xz_dec_lzma2 *s)
-{
- uint32_t pos_state;
-
- /*
- * If the dictionary was reached during the previous call, try to
- * finish the possibly pending repeat in the dictionary.
- */
- if (dict_has_space(&s->dict) && s->lzma.len > 0)
- dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0);
-
- /*
- * Decode more LZMA symbols. One iteration may consume up to
- * LZMA_IN_REQUIRED - 1 bytes.
- */
- while (dict_has_space(&s->dict) && !rc_limit_exceeded(&s->rc))
- {
- pos_state = s->dict.pos & s->lzma.pos_mask;
-
- if (!rc_bit(&s->rc, &s->lzma.is_match[s->lzma.state][pos_state]))
- {
- lzma_literal(s);
- }
- else
- {
- if (rc_bit(&s->rc, &s->lzma.is_rep[s->lzma.state]))
- lzma_rep_match(s, pos_state);
- else
- lzma_match(s, pos_state);
-
- if (!dict_repeat(&s->dict, &s->lzma.len, s->lzma.rep0))
- return false;
- }
- }
-
- /*
- * Having the range decoder always normalized when we are outside
- * this function makes it easier to correctly handle end of the chunk.
- */
- rc_normalize(&s->rc);
-
- return true;
-}
-
-/*
- * Reset the LZMA decoder and range decoder state. Dictionary is nore reset
- * here, because LZMA state may be reset without resetting the dictionary.
- */
-static void lzma_reset(struct xz_dec_lzma2 *s)
-{
- uint16_t *probs;
- size_t i;
-
- s->lzma.state = STATE_LIT_LIT;
- s->lzma.rep0 = 0;
- s->lzma.rep1 = 0;
- s->lzma.rep2 = 0;
- s->lzma.rep3 = 0;
-
- /*
- * All probabilities are initialized to the same value. This hack
- * makes the code smaller by avoiding a separate loop for each
- * probability array.
- *
- * This could be optimized so that only that part of literal
- * probabilities that are actually required. In the common case
- * we would write 12 KiB less.
- */
- probs = s->lzma.is_match[0];
- for (i = 0; i < PROBS_TOTAL; ++i)
- probs[i] = RC_BIT_MODEL_TOTAL / 2;
-
- rc_reset(&s->rc);
-}
-
-/*
- * Decode and validate LZMA properties (lc/lp/pb) and calculate the bit masks
- * from the decoded lp and pb values. On success, the LZMA decoder state is
- * reset and true is returned.
- */
-static bool lzma_props(struct xz_dec_lzma2 *s, uint8_t props)
-{
- if (props > (4 * 5 + 4) * 9 + 8)
- return false;
-
- s->lzma.pos_mask = 0;
- while (props >= 9 * 5)
- {
- props -= 9 * 5;
- ++s->lzma.pos_mask;
- }
-
- s->lzma.pos_mask = (1 << s->lzma.pos_mask) - 1;
-
- s->lzma.literal_pos_mask = 0;
- while (props >= 9)
- {
- props -= 9;
- ++s->lzma.literal_pos_mask;
- }
-
- s->lzma.lc = props;
-
- if (s->lzma.lc + s->lzma.literal_pos_mask > 4)
- return false;
-
- s->lzma.literal_pos_mask = (1 << s->lzma.literal_pos_mask) - 1;
-
- lzma_reset(s);
-
- return true;
-}
-
-/*********
- * LZMA2 *
- *********/
-
-/*
- * The LZMA decoder assumes that if the input limit (s->rc.in_limit) hasn't
- * been exceeded, it is safe to read up to LZMA_IN_REQUIRED bytes. This
- * wrapper function takes care of making the LZMA decoder's assumption safe.
- *
- * As long as there is plenty of input left to be decoded in the current LZMA
- * chunk, we decode directly from the caller-supplied input buffer until
- * there's LZMA_IN_REQUIRED bytes left. Those remaining bytes are copied into
- * s->temp.buf, which (hopefully) gets filled on the next call to this
- * function. We decode a few bytes from the temporary buffer so that we can
- * continue decoding from the caller-supplied input buffer again.
- */
-static bool lzma2_lzma(struct xz_dec_lzma2 *s, struct xz_buf *b)
-{
- size_t in_avail;
- uint32_t tmp;
-
- in_avail = b->in_size - b->in_pos;
- if (s->temp.size > 0 || s->lzma2.compressed == 0)
- {
- tmp = 2 * LZMA_IN_REQUIRED - s->temp.size;
- if (tmp > s->lzma2.compressed - s->temp.size)
- tmp = s->lzma2.compressed - s->temp.size;
- if (tmp > in_avail)
- tmp = in_avail;
-
- memcpy(s->temp.buf + s->temp.size, b->in + b->in_pos, tmp);
-
- if (s->temp.size + tmp == s->lzma2.compressed)
- {
- memzero(s->temp.buf + s->temp.size + tmp, sizeof(s->temp.buf) - s->temp.size - tmp);
- s->rc.in_limit = s->temp.size + tmp;
- }
- else if (s->temp.size + tmp < LZMA_IN_REQUIRED)
- {
- s->temp.size += tmp;
- b->in_pos += tmp;
- return true;
- }
- else
- {
- s->rc.in_limit = s->temp.size + tmp - LZMA_IN_REQUIRED;
- }
-
- s->rc.in = s->temp.buf;
- s->rc.in_pos = 0;
-
- if (!lzma_main(s) || s->rc.in_pos > s->temp.size + tmp)
- return false;
-
- s->lzma2.compressed -= s->rc.in_pos;
-
- if (s->rc.in_pos < s->temp.size)
- {
- s->temp.size -= s->rc.in_pos;
- memmove(s->temp.buf, s->temp.buf + s->rc.in_pos, s->temp.size);
- return true;
- }
-
- b->in_pos += s->rc.in_pos - s->temp.size;
- s->temp.size = 0;
- }
-
- in_avail = b->in_size - b->in_pos;
- if (in_avail >= LZMA_IN_REQUIRED)
- {
- s->rc.in = b->in;
- s->rc.in_pos = b->in_pos;
-
- if (in_avail >= s->lzma2.compressed + LZMA_IN_REQUIRED)
- s->rc.in_limit = b->in_pos + s->lzma2.compressed;
- else
- s->rc.in_limit = b->in_size - LZMA_IN_REQUIRED;
-
- if (!lzma_main(s))
- return false;
-
- in_avail = s->rc.in_pos - b->in_pos;
- if (in_avail > s->lzma2.compressed)
- return false;
-
- s->lzma2.compressed -= in_avail;
- b->in_pos = s->rc.in_pos;
- }
-
- in_avail = b->in_size - b->in_pos;
- if (in_avail < LZMA_IN_REQUIRED)
- {
- if (in_avail > s->lzma2.compressed)
- in_avail = s->lzma2.compressed;
-
- memcpy(s->temp.buf, b->in + b->in_pos, in_avail);
- s->temp.size = in_avail;
- b->in_pos += in_avail;
- }
-
- return true;
-}
-
-/*
- * Take care of the LZMA2 control layer, and forward the job of actual LZMA
- * decoding or copying of uncompressed chunks to other functions.
- */
-XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s, struct xz_buf *b)
-{
- uint32_t tmp;
-
- while (b->in_pos < b->in_size || s->lzma2.sequence == SEQ_LZMA_RUN)
- {
- switch (s->lzma2.sequence)
- {
- case SEQ_CONTROL:
- /*
- * LZMA2 control byte
- *
- * Exact values:
- * 0x00 End marker
- * 0x01 Dictionary reset followed by
- * an uncompressed chunk
- * 0x02 Uncompressed chunk (no dictionary reset)
- *
- * Highest three bits (s->control & 0xE0):
- * 0xE0 Dictionary reset, new properties and state
- * reset, followed by LZMA compressed chunk
- * 0xC0 New properties and state reset, followed
- * by LZMA compressed chunk (no dictionary
- * reset)
- * 0xA0 State reset using old properties,
- * followed by LZMA compressed chunk (no
- * dictionary reset)
- * 0x80 LZMA chunk (no dictionary or state reset)
- *
- * For LZMA compressed chunks, the lowest five bits
- * (s->control & 1F) are the highest bits of the
- * uncompressed size (bits 16-20).
- *
- * A new LZMA2 stream must begin with a dictionary
- * reset. The first LZMA chunk must set new
- * properties and reset the LZMA state.
- *
- * Values that don't match anything described above
- * are invalid and we return XZ_DATA_ERROR.
- */
- tmp = b->in[b->in_pos++];
-
- if (tmp == 0x00)
- return XZ_STREAM_END;
-
- if (tmp >= 0xE0 || tmp == 0x01)
- {
- s->lzma2.need_props = true;
- s->lzma2.need_dict_reset = false;
- dict_reset(&s->dict, b);
- }
- else if (s->lzma2.need_dict_reset)
- {
- return XZ_DATA_ERROR;
- }
-
- if (tmp >= 0x80)
- {
- s->lzma2.uncompressed = (tmp & 0x1F) << 16;
- s->lzma2.sequence = SEQ_UNCOMPRESSED_1;
-
- if (tmp >= 0xC0)
- {
- /*
- * When there are new properties,
- * state reset is done at
- * SEQ_PROPERTIES.
- */
- s->lzma2.need_props = false;
- s->lzma2.next_sequence = SEQ_PROPERTIES;
- }
- else if (s->lzma2.need_props)
- {
- return XZ_DATA_ERROR;
- }
- else
- {
- s->lzma2.next_sequence = SEQ_LZMA_PREPARE;
- if (tmp >= 0xA0)
- lzma_reset(s);
- }
- }
- else
- {
- if (tmp > 0x02)
- return XZ_DATA_ERROR;
-
- s->lzma2.sequence = SEQ_COMPRESSED_0;
- s->lzma2.next_sequence = SEQ_COPY;
- }
-
- break;
-
- case SEQ_UNCOMPRESSED_1:
- s->lzma2.uncompressed += (uint32_t)b->in[b->in_pos++] << 8;
- s->lzma2.sequence = SEQ_UNCOMPRESSED_2;
- break;
-
- case SEQ_UNCOMPRESSED_2:
- s->lzma2.uncompressed += (uint32_t)b->in[b->in_pos++] + 1;
- s->lzma2.sequence = SEQ_COMPRESSED_0;
- break;
-
- case SEQ_COMPRESSED_0:
- s->lzma2.compressed = (uint32_t)b->in[b->in_pos++] << 8;
- s->lzma2.sequence = SEQ_COMPRESSED_1;
- break;
-
- case SEQ_COMPRESSED_1:
- s->lzma2.compressed += (uint32_t)b->in[b->in_pos++] + 1;
- s->lzma2.sequence = s->lzma2.next_sequence;
- break;
-
- case SEQ_PROPERTIES:
- if (!lzma_props(s, b->in[b->in_pos++]))
- return XZ_DATA_ERROR;
-
- s->lzma2.sequence = SEQ_LZMA_PREPARE;
-
- case SEQ_LZMA_PREPARE:
- if (s->lzma2.compressed < RC_INIT_BYTES)
- return XZ_DATA_ERROR;
-
- if (!rc_read_init(&s->rc, b))
- return XZ_OK;
-
- s->lzma2.compressed -= RC_INIT_BYTES;
- s->lzma2.sequence = SEQ_LZMA_RUN;
-
- case SEQ_LZMA_RUN:
- /*
- * Set dictionary limit to indicate how much we want
- * to be encoded at maximum. Decode new data into the
- * dictionary. Flush the new data from dictionary to
- * b->out. Check if we finished decoding this chunk.
- * In case the dictionary got full but we didn't fill
- * the output buffer yet, we may run this loop
- * multiple times without changing s->lzma2.sequence.
- */
- dict_limit(&s->dict,
- min_t(size_t, b->out_size - b->out_pos, s->lzma2.uncompressed));
- if (!lzma2_lzma(s, b))
- return XZ_DATA_ERROR;
-
- s->lzma2.uncompressed -= dict_flush(&s->dict, b);
-
- if (s->lzma2.uncompressed == 0)
- {
- if (s->lzma2.compressed > 0 || s->lzma.len > 0 || !rc_is_finished(&s->rc))
- return XZ_DATA_ERROR;
-
- rc_reset(&s->rc);
- s->lzma2.sequence = SEQ_CONTROL;
- }
- else if (b->out_pos == b->out_size ||
- (b->in_pos == b->in_size && s->temp.size < s->lzma2.compressed))
- {
- return XZ_OK;
- }
-
- break;
-
- case SEQ_COPY:
- dict_uncompressed(&s->dict, b, &s->lzma2.compressed);
- if (s->lzma2.compressed > 0)
- return XZ_OK;
-
- s->lzma2.sequence = SEQ_CONTROL;
- break;
- }
- }
-
- return XZ_OK;
-}
-
-XZ_EXTERN struct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode, uint32_t dict_max)
-{
- struct xz_dec_lzma2 *s = kmalloc(sizeof(*s), GFP_KERNEL);
- if (s == NULL)
- return NULL;
-
- s->dict.mode = mode;
- s->dict.size_max = dict_max;
-
- if (DEC_IS_PREALLOC(mode))
- {
- s->dict.buf = vmalloc(dict_max);
- if (s->dict.buf == NULL)
- {
- kfree(s);
- return NULL;
- }
- }
- else if (DEC_IS_DYNALLOC(mode))
- {
- s->dict.buf = NULL;
- s->dict.allocated = 0;
- }
-
- return s;
-}
-
-XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props)
-{
- /* This limits dictionary size to 3 GiB to keep parsing simpler. */
- if (props > 39)
- return XZ_OPTIONS_ERROR;
-
- s->dict.size = 2 + (props & 1);
- s->dict.size <<= (props >> 1) + 11;
-
- if (DEC_IS_MULTI(s->dict.mode))
- {
- if (s->dict.size > s->dict.size_max)
- return XZ_MEMLIMIT_ERROR;
-
- s->dict.end = s->dict.size;
-
- if (DEC_IS_DYNALLOC(s->dict.mode))
- {
- if (s->dict.allocated < s->dict.size)
- {
- vfree(s->dict.buf);
- s->dict.buf = vmalloc(s->dict.size);
- if (s->dict.buf == NULL)
- {
- s->dict.allocated = 0;
- return XZ_MEM_ERROR;
- }
- }
- }
- }
-
- s->lzma.len = 0;
-
- s->lzma2.sequence = SEQ_CONTROL;
- s->lzma2.need_dict_reset = true;
-
- s->temp.size = 0;
-
- return XZ_OK;
-}
-
-XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s)
-{
- if (DEC_IS_MULTI(s->dict.mode))
- vfree(s->dict.buf);
-
- kfree(s);
-}
diff --git a/libraries/xz-embedded/src/xz_dec_stream.c b/libraries/xz-embedded/src/xz_dec_stream.c
deleted file mode 100644
index f8d7be05..00000000
--- a/libraries/xz-embedded/src/xz_dec_stream.c
+++ /dev/null
@@ -1,860 +0,0 @@
-/*
- * .xz Stream decoder
- *
- * Author: Lasse Collin <lasse.collin@tukaani.org>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#include "xz_private.h"
-#include "xz_stream.h"
-
-#ifdef XZ_USE_CRC64
-#define IS_CRC64(check_type) ((check_type) == XZ_CHECK_CRC64)
-#else
-#define IS_CRC64(check_type) false
-#endif
-
-/* Hash used to validate the Index field */
-struct xz_dec_hash
-{
- vli_type unpadded;
- vli_type uncompressed;
- uint32_t crc32;
-};
-
-struct xz_dec
-{
- /* Position in dec_main() */
- enum
- {
- SEQ_STREAM_HEADER,
- SEQ_BLOCK_START,
- SEQ_BLOCK_HEADER,
- SEQ_BLOCK_UNCOMPRESS,
- SEQ_BLOCK_PADDING,
- SEQ_BLOCK_CHECK,
- SEQ_INDEX,
- SEQ_INDEX_PADDING,
- SEQ_INDEX_CRC32,
- SEQ_STREAM_FOOTER
- } sequence;
-
- /* Position in variable-length integers and Check fields */
- uint32_t pos;
-
- /* Variable-length integer decoded by dec_vli() */
- vli_type vli;
-
- /* Saved in_pos and out_pos */
- size_t in_start;
- size_t out_start;
-
-#ifdef XZ_USE_CRC64
- /* CRC32 or CRC64 value in Block or CRC32 value in Index */
- uint64_t crc;
-#else
- /* CRC32 value in Block or Index */
- uint32_t crc;
-#endif
-
- /* Type of the integrity check calculated from uncompressed data */
- enum xz_check check_type;
-
- /* Operation mode */
- enum xz_mode mode;
-
- /*
- * True if the next call to xz_dec_run() is allowed to return
- * XZ_BUF_ERROR.
- */
- bool allow_buf_error;
-
- /* Information stored in Block Header */
- struct
- {
- /*
- * Value stored in the Compressed Size field, or
- * VLI_UNKNOWN if Compressed Size is not present.
- */
- vli_type compressed;
-
- /*
- * Value stored in the Uncompressed Size field, or
- * VLI_UNKNOWN if Uncompressed Size is not present.
- */
- vli_type uncompressed;
-
- /* Size of the Block Header field */
- uint32_t size;
- } block_header;
-
- /* Information collected when decoding Blocks */
- struct
- {
- /* Observed compressed size of the current Block */
- vli_type compressed;
-
- /* Observed uncompressed size of the current Block */
- vli_type uncompressed;
-
- /* Number of Blocks decoded so far */
- vli_type count;
-
- /*
- * Hash calculated from the Block sizes. This is used to
- * validate the Index field.
- */
- struct xz_dec_hash hash;
- } block;
-
- /* Variables needed when verifying the Index field */
- struct
- {
- /* Position in dec_index() */
- enum
- {
- SEQ_INDEX_COUNT,
- SEQ_INDEX_UNPADDED,
- SEQ_INDEX_UNCOMPRESSED
- } sequence;
-
- /* Size of the Index in bytes */
- vli_type size;
-
- /* Number of Records (matches block.count in valid files) */
- vli_type count;
-
- /*
- * Hash calculated from the Records (matches block.hash in
- * valid files).
- */
- struct xz_dec_hash hash;
- } index;
-
- /*
- * Temporary buffer needed to hold Stream Header, Block Header,
- * and Stream Footer. The Block Header is the biggest (1 KiB)
- * so we reserve space according to that. buf[] has to be aligned
- * to a multiple of four bytes; the size_t variables before it
- * should guarantee this.
- */
- struct
- {
- size_t pos;
- size_t size;
- uint8_t buf[1024];
- } temp;
-
- struct xz_dec_lzma2 *lzma2;
-
-#ifdef XZ_DEC_BCJ
- struct xz_dec_bcj *bcj;
- bool bcj_active;
-#endif
-};
-
-#ifdef XZ_DEC_ANY_CHECK
-/* Sizes of the Check field with different Check IDs */
-static const uint8_t check_sizes[16] = {0, 4, 4, 4, 8, 8, 8, 16,
- 16, 16, 32, 32, 32, 64, 64, 64};
-#endif
-
-/*
- * Fill s->temp by copying data starting from b->in[b->in_pos]. Caller
- * must have set s->temp.pos to indicate how much data we are supposed
- * to copy into s->temp.buf. Return true once s->temp.pos has reached
- * s->temp.size.
- */
-static bool fill_temp(struct xz_dec *s, struct xz_buf *b)
-{
- size_t copy_size = min_t(size_t, b->in_size - b->in_pos, s->temp.size - s->temp.pos);
-
- memcpy(s->temp.buf + s->temp.pos, b->in + b->in_pos, copy_size);
- b->in_pos += copy_size;
- s->temp.pos += copy_size;
-
- if (s->temp.pos == s->temp.size)
- {
- s->temp.pos = 0;
- return true;
- }
-
- return false;
-}
-
-/* Decode a variable-length integer (little-endian base-128 encoding) */
-static enum xz_ret dec_vli(struct xz_dec *s, const uint8_t *in, size_t *in_pos, size_t in_size)
-{
- uint8_t byte;
-
- if (s->pos == 0)
- s->vli = 0;
-
- while (*in_pos < in_size)
- {
- byte = in[*in_pos];
- ++*in_pos;
-
- s->vli |= (vli_type)(byte & 0x7F) << s->pos;
-
- if ((byte & 0x80) == 0)
- {
- /* Don't allow non-minimal encodings. */
- if (byte == 0 && s->pos != 0)
- return XZ_DATA_ERROR;
-
- s->pos = 0;
- return XZ_STREAM_END;
- }
-
- s->pos += 7;
- if (s->pos == 7 * VLI_BYTES_MAX)
- return XZ_DATA_ERROR;
- }
-
- return XZ_OK;
-}
-
-/*
- * Decode the Compressed Data field from a Block. Update and validate
- * the observed compressed and uncompressed sizes of the Block so that
- * they don't exceed the values possibly stored in the Block Header
- * (validation assumes that no integer overflow occurs, since vli_type
- * is normally uint64_t). Update the CRC32 or CRC64 value if presence of
- * the CRC32 or CRC64 field was indicated in Stream Header.
- *
- * Once the decoding is finished, validate that the observed sizes match
- * the sizes possibly stored in the Block Header. Update the hash and
- * Block count, which are later used to validate the Index field.
- */
-static enum xz_ret dec_block(struct xz_dec *s, struct xz_buf *b)
-{
- enum xz_ret ret;
-
- s->in_start = b->in_pos;
- s->out_start = b->out_pos;
-
-#ifdef XZ_DEC_BCJ
- if (s->bcj_active)
- ret = xz_dec_bcj_run(s->bcj, s->lzma2, b);
- else
-#endif
- ret = xz_dec_lzma2_run(s->lzma2, b);
-
- s->block.compressed += b->in_pos - s->in_start;
- s->block.uncompressed += b->out_pos - s->out_start;
-
- /*
- * There is no need to separately check for VLI_UNKNOWN, since
- * the observed sizes are always smaller than VLI_UNKNOWN.
- */
- if (s->block.compressed > s->block_header.compressed ||
- s->block.uncompressed > s->block_header.uncompressed)
- return XZ_DATA_ERROR;
-
- if (s->check_type == XZ_CHECK_CRC32)
- s->crc = xz_crc32(b->out + s->out_start, b->out_pos - s->out_start, s->crc);
-#ifdef XZ_USE_CRC64
- else if (s->check_type == XZ_CHECK_CRC64)
- s->crc = xz_crc64(b->out + s->out_start, b->out_pos - s->out_start, s->crc);
-#endif
-
- if (ret == XZ_STREAM_END)
- {
- if (s->block_header.compressed != VLI_UNKNOWN &&
- s->block_header.compressed != s->block.compressed)
- return XZ_DATA_ERROR;
-
- if (s->block_header.uncompressed != VLI_UNKNOWN &&
- s->block_header.uncompressed != s->block.uncompressed)
- return XZ_DATA_ERROR;
-
- s->block.hash.unpadded += s->block_header.size + s->block.compressed;
-
-#ifdef XZ_DEC_ANY_CHECK
- s->block.hash.unpadded += check_sizes[s->check_type];
-#else
- if (s->check_type == XZ_CHECK_CRC32)
- s->block.hash.unpadded += 4;
- else if (IS_CRC64(s->check_type))
- s->block.hash.unpadded += 8;
-#endif
-
- s->block.hash.uncompressed += s->block.uncompressed;
- s->block.hash.crc32 = xz_crc32((const uint8_t *)&s->block.hash, sizeof(s->block.hash),
- s->block.hash.crc32);
-
- ++s->block.count;
- }
-
- return ret;
-}
-
-/* Update the Index size and the CRC32 value. */
-static void index_update(struct xz_dec *s, const struct xz_buf *b)
-{
- size_t in_used = b->in_pos - s->in_start;
- s->index.size += in_used;
- s->crc = xz_crc32(b->in + s->in_start, in_used, s->crc);
-}
-
-/*
- * Decode the Number of Records, Unpadded Size, and Uncompressed Size
- * fields from the Index field. That is, Index Padding and CRC32 are not
- * decoded by this function.
- *
- * This can return XZ_OK (more input needed), XZ_STREAM_END (everything
- * successfully decoded), or XZ_DATA_ERROR (input is corrupt).
- */
-static enum xz_ret dec_index(struct xz_dec *s, struct xz_buf *b)
-{
- enum xz_ret ret;
-
- do
- {
- ret = dec_vli(s, b->in, &b->in_pos, b->in_size);
- if (ret != XZ_STREAM_END)
- {
- index_update(s, b);
- return ret;
- }
-
- switch (s->index.sequence)
- {
- case SEQ_INDEX_COUNT:
- s->index.count = s->vli;
-
- /*
- * Validate that the Number of Records field
- * indicates the same number of Records as
- * there were Blocks in the Stream.
- */
- if (s->index.count != s->block.count)
- return XZ_DATA_ERROR;
-
- s->index.sequence = SEQ_INDEX_UNPADDED;
- break;
-
- case SEQ_INDEX_UNPADDED:
- s->index.hash.unpadded += s->vli;
- s->index.sequence = SEQ_INDEX_UNCOMPRESSED;
- break;
-
- case SEQ_INDEX_UNCOMPRESSED:
- s->index.hash.uncompressed += s->vli;
- s->index.hash.crc32 = xz_crc32((const uint8_t *)&s->index.hash,
- sizeof(s->index.hash), s->index.hash.crc32);
- --s->index.count;
- s->index.sequence = SEQ_INDEX_UNPADDED;
- break;
- }
- } while (s->index.count > 0);
-
- return XZ_STREAM_END;
-}
-
-/*
- * Validate that the next four or eight input bytes match the value
- * of s->crc. s->pos must be zero when starting to validate the first byte.
- * The "bits" argument allows using the same code for both CRC32 and CRC64.
- */
-static enum xz_ret crc_validate(struct xz_dec *s, struct xz_buf *b, uint32_t bits)
-{
- do
- {
- if (b->in_pos == b->in_size)
- return XZ_OK;
-
- if (((s->crc >> s->pos) & 0xFF) != b->in[b->in_pos++])
- return XZ_DATA_ERROR;
-
- s->pos += 8;
-
- } while (s->pos < bits);
-
- s->crc = 0;
- s->pos = 0;
-
- return XZ_STREAM_END;
-}
-
-#ifdef XZ_DEC_ANY_CHECK
-/*
- * Skip over the Check field when the Check ID is not supported.
- * Returns true once the whole Check field has been skipped over.
- */
-static bool check_skip(struct xz_dec *s, struct xz_buf *b)
-{
- while (s->pos < check_sizes[s->check_type])
- {
- if (b->in_pos == b->in_size)
- return false;
-
- ++b->in_pos;
- ++s->pos;
- }
-
- s->pos = 0;
-
- return true;
-}
-#endif
-
-/* Decode the Stream Header field (the first 12 bytes of the .xz Stream). */
-static enum xz_ret dec_stream_header(struct xz_dec *s)
-{
- if (!memeq(s->temp.buf, HEADER_MAGIC, HEADER_MAGIC_SIZE))
- return XZ_FORMAT_ERROR;
-
- if (xz_crc32(s->temp.buf + HEADER_MAGIC_SIZE, 2, 0) !=
- get_le32(s->temp.buf + HEADER_MAGIC_SIZE + 2))
- return XZ_DATA_ERROR;
-
- if (s->temp.buf[HEADER_MAGIC_SIZE] != 0)
- return XZ_OPTIONS_ERROR;
-
- /*
- * Of integrity checks, we support none (Check ID = 0),
- * CRC32 (Check ID = 1), and optionally CRC64 (Check ID = 4).
- * However, if XZ_DEC_ANY_CHECK is defined, we will accept other
- * check types too, but then the check won't be verified and
- * a warning (XZ_UNSUPPORTED_CHECK) will be given.
- */
- s->check_type = s->temp.buf[HEADER_MAGIC_SIZE + 1];
-
-#ifdef XZ_DEC_ANY_CHECK
- if (s->check_type > XZ_CHECK_MAX)
- return XZ_OPTIONS_ERROR;
-
- if (s->check_type > XZ_CHECK_CRC32 && !IS_CRC64(s->check_type))
- return XZ_UNSUPPORTED_CHECK;
-#else
- if (s->check_type > XZ_CHECK_CRC32 && !IS_CRC64(s->check_type))
- return XZ_OPTIONS_ERROR;
-#endif
-
- return XZ_OK;
-}
-
-/* Decode the Stream Footer field (the last 12 bytes of the .xz Stream) */
-static enum xz_ret dec_stream_footer(struct xz_dec *s)
-{
- if (!memeq(s->temp.buf + 10, FOOTER_MAGIC, FOOTER_MAGIC_SIZE))
- return XZ_DATA_ERROR;
-
- if (xz_crc32(s->temp.buf + 4, 6, 0) != get_le32(s->temp.buf))
- return XZ_DATA_ERROR;
-
- /*
- * Validate Backward Size. Note that we never added the size of the
- * Index CRC32 field to s->index.size, thus we use s->index.size / 4
- * instead of s->index.size / 4 - 1.
- */
- if ((s->index.size >> 2) != get_le32(s->temp.buf + 4))
- return XZ_DATA_ERROR;
-
- if (s->temp.buf[8] != 0 || s->temp.buf[9] != s->check_type)
- return XZ_DATA_ERROR;
-
- /*
- * Use XZ_STREAM_END instead of XZ_OK to be more convenient
- * for the caller.
- */
- return XZ_STREAM_END;
-}
-
-/* Decode the Block Header and initialize the filter chain. */
-static enum xz_ret dec_block_header(struct xz_dec *s)
-{
- enum xz_ret ret;
-
- /*
- * Validate the CRC32. We know that the temp buffer is at least
- * eight bytes so this is safe.
- */
- s->temp.size -= 4;
- if (xz_crc32(s->temp.buf, s->temp.size, 0) != get_le32(s->temp.buf + s->temp.size))
- return XZ_DATA_ERROR;
-
- s->temp.pos = 2;
-
-/*
- * Catch unsupported Block Flags. We support only one or two filters
- * in the chain, so we catch that with the same test.
- */
-#ifdef XZ_DEC_BCJ
- if (s->temp.buf[1] & 0x3E)
-#else
- if (s->temp.buf[1] & 0x3F)
-#endif
- return XZ_OPTIONS_ERROR;
-
- /* Compressed Size */
- if (s->temp.buf[1] & 0x40)
- {
- if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size) != XZ_STREAM_END)
- return XZ_DATA_ERROR;
-
- s->block_header.compressed = s->vli;
- }
- else
- {
- s->block_header.compressed = VLI_UNKNOWN;
- }
-
- /* Uncompressed Size */
- if (s->temp.buf[1] & 0x80)
- {
- if (dec_vli(s, s->temp.buf, &s->temp.pos, s->temp.size) != XZ_STREAM_END)
- return XZ_DATA_ERROR;
-
- s->block_header.uncompressed = s->vli;
- }
- else
- {
- s->block_header.uncompressed = VLI_UNKNOWN;
- }
-
-#ifdef XZ_DEC_BCJ
- /* If there are two filters, the first one must be a BCJ filter. */
- s->bcj_active = s->temp.buf[1] & 0x01;
- if (s->bcj_active)
- {
- if (s->temp.size - s->temp.pos < 2)
- return XZ_OPTIONS_ERROR;
-
- ret = xz_dec_bcj_reset(s->bcj, s->temp.buf[s->temp.pos++]);
- if (ret != XZ_OK)
- return ret;
-
- /*
- * We don't support custom start offset,
- * so Size of Properties must be zero.
- */
- if (s->temp.buf[s->temp.pos++] != 0x00)
- return XZ_OPTIONS_ERROR;
- }
-#endif
-
- /* Valid Filter Flags always take at least two bytes. */
- if (s->temp.size - s->temp.pos < 2)
- return XZ_DATA_ERROR;
-
- /* Filter ID = LZMA2 */
- if (s->temp.buf[s->temp.pos++] != 0x21)
- return XZ_OPTIONS_ERROR;
-
- /* Size of Properties = 1-byte Filter Properties */
- if (s->temp.buf[s->temp.pos++] != 0x01)
- return XZ_OPTIONS_ERROR;
-
- /* Filter Properties contains LZMA2 dictionary size. */
- if (s->temp.size - s->temp.pos < 1)
- return XZ_DATA_ERROR;
-
- ret = xz_dec_lzma2_reset(s->lzma2, s->temp.buf[s->temp.pos++]);
- if (ret != XZ_OK)
- return ret;
-
- /* The rest must be Header Padding. */
- while (s->temp.pos < s->temp.size)
- if (s->temp.buf[s->temp.pos++] != 0x00)
- return XZ_OPTIONS_ERROR;
-
- s->temp.pos = 0;
- s->block.compressed = 0;
- s->block.uncompressed = 0;
-
- return XZ_OK;
-}
-
-static enum xz_ret dec_main(struct xz_dec *s, struct xz_buf *b)
-{
- enum xz_ret ret;
-
- /*
- * Store the start position for the case when we are in the middle
- * of the Index field.
- */
- s->in_start = b->in_pos;
-
- while (true)
- {
- switch (s->sequence)
- {
- case SEQ_STREAM_HEADER:
- /*
- * Stream Header is copied to s->temp, and then
- * decoded from there. This way if the caller
- * gives us only little input at a time, we can
- * still keep the Stream Header decoding code
- * simple. Similar approach is used in many places
- * in this file.
- */
- if (!fill_temp(s, b))
- return XZ_OK;
-
- /*
- * If dec_stream_header() returns
- * XZ_UNSUPPORTED_CHECK, it is still possible
- * to continue decoding if working in multi-call
- * mode. Thus, update s->sequence before calling
- * dec_stream_header().
- */
- s->sequence = SEQ_BLOCK_START;
-
- ret = dec_stream_header(s);
- if (ret != XZ_OK)
- return ret;
-
- case SEQ_BLOCK_START:
- /* We need one byte of input to continue. */
- if (b->in_pos == b->in_size)
- return XZ_OK;
-
- /* See if this is the beginning of the Index field. */
- if (b->in[b->in_pos] == 0)
- {
- s->in_start = b->in_pos++;
- s->sequence = SEQ_INDEX;
- break;
- }
-
- /*
- * Calculate the size of the Block Header and
- * prepare to decode it.
- */
- s->block_header.size = ((uint32_t)b->in[b->in_pos] + 1) * 4;
-
- s->temp.size = s->block_header.size;
- s->temp.pos = 0;
- s->sequence = SEQ_BLOCK_HEADER;
-
- case SEQ_BLOCK_HEADER:
- if (!fill_temp(s, b))
- return XZ_OK;
-
- ret = dec_block_header(s);
- if (ret != XZ_OK)
- return ret;
-
- s->sequence = SEQ_BLOCK_UNCOMPRESS;
-
- case SEQ_BLOCK_UNCOMPRESS:
- ret = dec_block(s, b);
- if (ret != XZ_STREAM_END)
- return ret;
-
- s->sequence = SEQ_BLOCK_PADDING;
-
- case SEQ_BLOCK_PADDING:
- /*
- * Size of Compressed Data + Block Padding
- * must be a multiple of four. We don't need
- * s->block.compressed for anything else
- * anymore, so we use it here to test the size
- * of the Block Padding field.
- */
- while (s->block.compressed & 3)
- {
- if (b->in_pos == b->in_size)
- return XZ_OK;
-
- if (b->in[b->in_pos++] != 0)
- return XZ_DATA_ERROR;
-
- ++s->block.compressed;
- }
-
- s->sequence = SEQ_BLOCK_CHECK;
-
- case SEQ_BLOCK_CHECK:
- if (s->check_type == XZ_CHECK_CRC32)
- {
- ret = crc_validate(s, b, 32);
- if (ret != XZ_STREAM_END)
- return ret;
- }
- else if (IS_CRC64(s->check_type))
- {
- ret = crc_validate(s, b, 64);
- if (ret != XZ_STREAM_END)
- return ret;
- }
-#ifdef XZ_DEC_ANY_CHECK
- else if (!check_skip(s, b))
- {
- return XZ_OK;
- }
-#endif
-
- s->sequence = SEQ_BLOCK_START;
- break;
-
- case SEQ_INDEX:
- ret = dec_index(s, b);
- if (ret != XZ_STREAM_END)
- return ret;
-
- s->sequence = SEQ_INDEX_PADDING;
-
- case SEQ_INDEX_PADDING:
- while ((s->index.size + (b->in_pos - s->in_start)) & 3)
- {
- if (b->in_pos == b->in_size)
- {
- index_update(s, b);
- return XZ_OK;
- }
-
- if (b->in[b->in_pos++] != 0)
- return XZ_DATA_ERROR;
- }
-
- /* Finish the CRC32 value and Index size. */
- index_update(s, b);
-
- /* Compare the hashes to validate the Index field. */
- if (!memeq(&s->block.hash, &s->index.hash, sizeof(s->block.hash)))
- return XZ_DATA_ERROR;
-
- s->sequence = SEQ_INDEX_CRC32;
-
- case SEQ_INDEX_CRC32:
- ret = crc_validate(s, b, 32);
- if (ret != XZ_STREAM_END)
- return ret;
-
- s->temp.size = STREAM_HEADER_SIZE;
- s->sequence = SEQ_STREAM_FOOTER;
-
- case SEQ_STREAM_FOOTER:
- if (!fill_temp(s, b))
- return XZ_OK;
-
- return dec_stream_footer(s);
- }
- }
-
- /* Never reached */
-}
-
-/*
- * xz_dec_run() is a wrapper for dec_main() to handle some special cases in
- * multi-call and single-call decoding.
- *
- * In multi-call mode, we must return XZ_BUF_ERROR when it seems clear that we
- * are not going to make any progress anymore. This is to prevent the caller
- * from calling us infinitely when the input file is truncated or otherwise
- * corrupt. Since zlib-style API allows that the caller fills the input buffer
- * only when the decoder doesn't produce any new output, we have to be careful
- * to avoid returning XZ_BUF_ERROR too easily: XZ_BUF_ERROR is returned only
- * after the second consecutive call to xz_dec_run() that makes no progress.
- *
- * In single-call mode, if we couldn't decode everything and no error
- * occurred, either the input is truncated or the output buffer is too small.
- * Since we know that the last input byte never produces any output, we know
- * that if all the input was consumed and decoding wasn't finished, the file
- * must be corrupt. Otherwise the output buffer has to be too small or the
- * file is corrupt in a way that decoding it produces too big output.
- *
- * If single-call decoding fails, we reset b->in_pos and b->out_pos back to
- * their original values. This is because with some filter chains there won't
- * be any valid uncompressed data in the output buffer unless the decoding
- * actually succeeds (that's the price to pay of using the output buffer as
- * the workspace).
- */
-XZ_EXTERN enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b)
-{
- size_t in_start;
- size_t out_start;
- enum xz_ret ret;
-
- if (DEC_IS_SINGLE(s->mode))
- xz_dec_reset(s);
-
- in_start = b->in_pos;
- out_start = b->out_pos;
- ret = dec_main(s, b);
-
- if (DEC_IS_SINGLE(s->mode))
- {
- if (ret == XZ_OK)
- ret = b->in_pos == b->in_size ? XZ_DATA_ERROR : XZ_BUF_ERROR;
-
- if (ret != XZ_STREAM_END)
- {
- b->in_pos = in_start;
- b->out_pos = out_start;
- }
- }
- else if (ret == XZ_OK && in_start == b->in_pos && out_start == b->out_pos)
- {
- if (s->allow_buf_error)
- ret = XZ_BUF_ERROR;
-
- s->allow_buf_error = true;
- }
- else
- {
- s->allow_buf_error = false;
- }
-
- return ret;
-}
-
-XZ_EXTERN struct xz_dec *xz_dec_init(enum xz_mode mode, uint32_t dict_max)
-{
- struct xz_dec *s = kmalloc(sizeof(*s), GFP_KERNEL);
- if (s == NULL)
- return NULL;
-
- s->mode = mode;
-
-#ifdef XZ_DEC_BCJ
- s->bcj = xz_dec_bcj_create(DEC_IS_SINGLE(mode));
- if (s->bcj == NULL)
- goto error_bcj;
-#endif
-
- s->lzma2 = xz_dec_lzma2_create(mode, dict_max);
- if (s->lzma2 == NULL)
- goto error_lzma2;
-
- xz_dec_reset(s);
- return s;
-
-error_lzma2:
-#ifdef XZ_DEC_BCJ
- xz_dec_bcj_end(s->bcj);
-error_bcj:
-#endif
- kfree(s);
- return NULL;
-}
-
-XZ_EXTERN void xz_dec_reset(struct xz_dec *s)
-{
- s->sequence = SEQ_STREAM_HEADER;
- s->allow_buf_error = false;
- s->pos = 0;
- s->crc = 0;
- memzero(&s->block, sizeof(s->block));
- memzero(&s->index, sizeof(s->index));
- s->temp.pos = 0;
- s->temp.size = STREAM_HEADER_SIZE;
-}
-
-XZ_EXTERN void xz_dec_end(struct xz_dec *s)
-{
- if (s != NULL)
- {
- xz_dec_lzma2_end(s->lzma2);
-#ifdef XZ_DEC_BCJ
- xz_dec_bcj_end(s->bcj);
-#endif
- kfree(s);
- }
-}
diff --git a/libraries/xz-embedded/src/xz_lzma2.h b/libraries/xz-embedded/src/xz_lzma2.h
deleted file mode 100644
index 82a425f2..00000000
--- a/libraries/xz-embedded/src/xz_lzma2.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * LZMA2 definitions
- *
- * Authors: Lasse Collin <lasse.collin@tukaani.org>
- * Igor Pavlov <http://7-zip.org/>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef XZ_LZMA2_H
-#define XZ_LZMA2_H
-
-/* Range coder constants */
-#define RC_SHIFT_BITS 8
-#define RC_TOP_BITS 24
-#define RC_TOP_VALUE (1 << RC_TOP_BITS)
-#define RC_BIT_MODEL_TOTAL_BITS 11
-#define RC_BIT_MODEL_TOTAL (1 << RC_BIT_MODEL_TOTAL_BITS)
-#define RC_MOVE_BITS 5
-
-/*
- * Maximum number of position states. A position state is the lowest pb
- * number of bits of the current uncompressed offset. In some places there
- * are different sets of probabilities for different position states.
- */
-#define POS_STATES_MAX (1 << 4)
-
-/*
- * This enum is used to track which LZMA symbols have occurred most recently
- * and in which order. This information is used to predict the next symbol.
- *
- * Symbols:
- * - Literal: One 8-bit byte
- * - Match: Repeat a chunk of data at some distance
- * - Long repeat: Multi-byte match at a recently seen distance
- * - Short repeat: One-byte repeat at a recently seen distance
- *
- * The symbol names are in from STATE_oldest_older_previous. REP means
- * either short or long repeated match, and NONLIT means any non-literal.
- */
-enum lzma_state
-{
- STATE_LIT_LIT,
- STATE_MATCH_LIT_LIT,
- STATE_REP_LIT_LIT,
- STATE_SHORTREP_LIT_LIT,
- STATE_MATCH_LIT,
- STATE_REP_LIT,
- STATE_SHORTREP_LIT,
- STATE_LIT_MATCH,
- STATE_LIT_LONGREP,
- STATE_LIT_SHORTREP,
- STATE_NONLIT_MATCH,
- STATE_NONLIT_REP
-};
-
-/* Total number of states */
-#define STATES 12
-
-/* The lowest 7 states indicate that the previous state was a literal. */
-#define LIT_STATES 7
-
-/* Indicate that the latest symbol was a literal. */
-static inline void lzma_state_literal(enum lzma_state *state)
-{
- if (*state <= STATE_SHORTREP_LIT_LIT)
- *state = STATE_LIT_LIT;
- else if (*state <= STATE_LIT_SHORTREP)
- *state -= 3;
- else
- *state -= 6;
-}
-
-/* Indicate that the latest symbol was a match. */
-static inline void lzma_state_match(enum lzma_state *state)
-{
- *state = *state < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH;
-}
-
-/* Indicate that the latest state was a long repeated match. */
-static inline void lzma_state_long_rep(enum lzma_state *state)
-{
- *state = *state < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP;
-}
-
-/* Indicate that the latest symbol was a short match. */
-static inline void lzma_state_short_rep(enum lzma_state *state)
-{
- *state = *state < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP;
-}
-
-/* Test if the previous symbol was a literal. */
-static inline bool lzma_state_is_literal(enum lzma_state state)
-{
- return state < LIT_STATES;
-}
-
-/* Each literal coder is divided in three sections:
- * - 0x001-0x0FF: Without match byte
- * - 0x101-0x1FF: With match byte; match bit is 0
- * - 0x201-0x2FF: With match byte; match bit is 1
- *
- * Match byte is used when the previous LZMA symbol was something else than
- * a literal (that is, it was some kind of match).
- */
-#define LITERAL_CODER_SIZE 0x300
-
-/* Maximum number of literal coders */
-#define LITERAL_CODERS_MAX (1 << 4)
-
-/* Minimum length of a match is two bytes. */
-#define MATCH_LEN_MIN 2
-
-/* Match length is encoded with 4, 5, or 10 bits.
- *
- * Length Bits
- * 2-9 4 = Choice=0 + 3 bits
- * 10-17 5 = Choice=1 + Choice2=0 + 3 bits
- * 18-273 10 = Choice=1 + Choice2=1 + 8 bits
- */
-#define LEN_LOW_BITS 3
-#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
-#define LEN_MID_BITS 3
-#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
-#define LEN_HIGH_BITS 8
-#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
-#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
-
-/*
- * Maximum length of a match is 273 which is a result of the encoding
- * described above.
- */
-#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
-
-/*
- * Different sets of probabilities are used for match distances that have
- * very short match length: Lengths of 2, 3, and 4 bytes have a separate
- * set of probabilities for each length. The matches with longer length
- * use a shared set of probabilities.
- */
-#define DIST_STATES 4
-
-/*
- * Get the index of the appropriate probability array for decoding
- * the distance slot.
- */
-static inline uint32_t lzma_get_dist_state(uint32_t len)
-{
- return len < DIST_STATES + MATCH_LEN_MIN ? len - MATCH_LEN_MIN : DIST_STATES - 1;
-}
-
-/*
- * The highest two bits of a 32-bit match distance are encoded using six bits.
- * This six-bit value is called a distance slot. This way encoding a 32-bit
- * value takes 6-36 bits, larger values taking more bits.
- */
-#define DIST_SLOT_BITS 6
-#define DIST_SLOTS (1 << DIST_SLOT_BITS)
-
-/* Match distances up to 127 are fully encoded using probabilities. Since
- * the highest two bits (distance slot) are always encoded using six bits,
- * the distances 0-3 don't need any additional bits to encode, since the
- * distance slot itself is the same as the actual distance. DIST_MODEL_START
- * indicates the first distance slot where at least one additional bit is
- * needed.
- */
-#define DIST_MODEL_START 4
-
-/*
- * Match distances greater than 127 are encoded in three pieces:
- * - distance slot: the highest two bits
- * - direct bits: 2-26 bits below the highest two bits
- * - alignment bits: four lowest bits
- *
- * Direct bits don't use any probabilities.
- *
- * The distance slot value of 14 is for distances 128-191.
- */
-#define DIST_MODEL_END 14
-
-/* Distance slots that indicate a distance <= 127. */
-#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)
-#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
-
-/*
- * For match distances greater than 127, only the highest two bits and the
- * lowest four bits (alignment) is encoded using probabilities.
- */
-#define ALIGN_BITS 4
-#define ALIGN_SIZE (1 << ALIGN_BITS)
-#define ALIGN_MASK (ALIGN_SIZE - 1)
-
-/* Total number of all probability variables */
-#define PROBS_TOTAL (1846 + LITERAL_CODERS_MAX *LITERAL_CODER_SIZE)
-
-/*
- * LZMA remembers the four most recent match distances. Reusing these
- * distances tends to take less space than re-encoding the actual
- * distance value.
- */
-#define REPS 4
-
-#endif
diff --git a/libraries/xz-embedded/src/xz_private.h b/libraries/xz-embedded/src/xz_private.h
deleted file mode 100644
index 1b616430..00000000
--- a/libraries/xz-embedded/src/xz_private.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Private includes and definitions
- *
- * Author: Lasse Collin <lasse.collin@tukaani.org>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef XZ_PRIVATE_H
-#define XZ_PRIVATE_H
-
-#ifdef __KERNEL__
-#include <linux/xz.h>
-#include <linux/kernel.h>
-#include <asm/unaligned.h>
-/* XZ_PREBOOT may be defined only via decompress_unxz.c. */
-#ifndef XZ_PREBOOT
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
-#include <linux/string.h>
-#ifdef CONFIG_XZ_DEC_X86
-#define XZ_DEC_X86
-#endif
-#ifdef CONFIG_XZ_DEC_POWERPC
-#define XZ_DEC_POWERPC
-#endif
-#ifdef CONFIG_XZ_DEC_IA64
-#define XZ_DEC_IA64
-#endif
-#ifdef CONFIG_XZ_DEC_ARM
-#define XZ_DEC_ARM
-#endif
-#ifdef CONFIG_XZ_DEC_ARMTHUMB
-#define XZ_DEC_ARMTHUMB
-#endif
-#ifdef CONFIG_XZ_DEC_SPARC
-#define XZ_DEC_SPARC
-#endif
-#define memeq(a, b, size) (memcmp(a, b, size) == 0)
-#define memzero(buf, size) memset(buf, 0, size)
-#endif
-#define get_le32(p) le32_to_cpup((const uint32_t *)(p))
-#else
-/*
- * For userspace builds, use a separate header to define the required
- * macros and functions. This makes it easier to adapt the code into
- * different environments and avoids clutter in the Linux kernel tree.
- */
-#include "xz_config.h"
-#endif
-
-/* If no specific decoding mode is requested, enable support for all modes. */
-#if !defined(XZ_DEC_SINGLE) && !defined(XZ_DEC_PREALLOC) && !defined(XZ_DEC_DYNALLOC)
-#define XZ_DEC_SINGLE
-#define XZ_DEC_PREALLOC
-#define XZ_DEC_DYNALLOC
-#endif
-
-/*
- * The DEC_IS_foo(mode) macros are used in "if" statements. If only some
- * of the supported modes are enabled, these macros will evaluate to true or
- * false at compile time and thus allow the compiler to omit unneeded code.
- */
-#ifdef XZ_DEC_SINGLE
-#define DEC_IS_SINGLE(mode) ((mode) == XZ_SINGLE)
-#else
-#define DEC_IS_SINGLE(mode) (false)
-#endif
-
-#ifdef XZ_DEC_PREALLOC
-#define DEC_IS_PREALLOC(mode) ((mode) == XZ_PREALLOC)
-#else
-#define DEC_IS_PREALLOC(mode) (false)
-#endif
-
-#ifdef XZ_DEC_DYNALLOC
-#define DEC_IS_DYNALLOC(mode) ((mode) == XZ_DYNALLOC)
-#else
-#define DEC_IS_DYNALLOC(mode) (false)
-#endif
-
-#if !defined(XZ_DEC_SINGLE)
-#define DEC_IS_MULTI(mode) (true)
-#elif defined(XZ_DEC_PREALLOC) || defined(XZ_DEC_DYNALLOC)
-#define DEC_IS_MULTI(mode) ((mode) != XZ_SINGLE)
-#else
-#define DEC_IS_MULTI(mode) (false)
-#endif
-
-/*
- * If any of the BCJ filter decoders are wanted, define XZ_DEC_BCJ.
- * XZ_DEC_BCJ is used to enable generic support for BCJ decoders.
- */
-#ifndef XZ_DEC_BCJ
-#if defined(XZ_DEC_X86) || defined(XZ_DEC_POWERPC) || defined(XZ_DEC_IA64) || \
- defined(XZ_DEC_ARM) || defined(XZ_DEC_ARM) || defined(XZ_DEC_ARMTHUMB) || \
- defined(XZ_DEC_SPARC)
-#define XZ_DEC_BCJ
-#endif
-#endif
-
-/*
- * Allocate memory for LZMA2 decoder. xz_dec_lzma2_reset() must be used
- * before calling xz_dec_lzma2_run().
- */
-XZ_EXTERN struct xz_dec_lzma2 *xz_dec_lzma2_create(enum xz_mode mode, uint32_t dict_max);
-
-/*
- * Decode the LZMA2 properties (one byte) and reset the decoder. Return
- * XZ_OK on success, XZ_MEMLIMIT_ERROR if the preallocated dictionary is not
- * big enough, and XZ_OPTIONS_ERROR if props indicates something that this
- * decoder doesn't support.
- */
-XZ_EXTERN enum xz_ret xz_dec_lzma2_reset(struct xz_dec_lzma2 *s, uint8_t props);
-
-/* Decode raw LZMA2 stream from b->in to b->out. */
-XZ_EXTERN enum xz_ret xz_dec_lzma2_run(struct xz_dec_lzma2 *s, struct xz_buf *b);
-
-/* Free the memory allocated for the LZMA2 decoder. */
-XZ_EXTERN void xz_dec_lzma2_end(struct xz_dec_lzma2 *s);
-
-#ifdef XZ_DEC_BCJ
-/*
- * Allocate memory for BCJ decoders. xz_dec_bcj_reset() must be used before
- * calling xz_dec_bcj_run().
- */
-XZ_EXTERN struct xz_dec_bcj *xz_dec_bcj_create(bool single_call);
-
-/*
- * Decode the Filter ID of a BCJ filter. This implementation doesn't
- * support custom start offsets, so no decoding of Filter Properties
- * is needed. Returns XZ_OK if the given Filter ID is supported.
- * Otherwise XZ_OPTIONS_ERROR is returned.
- */
-XZ_EXTERN enum xz_ret xz_dec_bcj_reset(struct xz_dec_bcj *s, uint8_t id);
-
-/*
- * Decode raw BCJ + LZMA2 stream. This must be used only if there actually is
- * a BCJ filter in the chain. If the chain has only LZMA2, xz_dec_lzma2_run()
- * must be called directly.
- */
-XZ_EXTERN enum xz_ret xz_dec_bcj_run(struct xz_dec_bcj *s, struct xz_dec_lzma2 *lzma2,
- struct xz_buf *b);
-
-/* Free the memory allocated for the BCJ filters. */
-#define xz_dec_bcj_end(s) kfree(s)
-#endif
-
-#endif
diff --git a/libraries/xz-embedded/src/xz_stream.h b/libraries/xz-embedded/src/xz_stream.h
deleted file mode 100644
index b3d2c9fd..00000000
--- a/libraries/xz-embedded/src/xz_stream.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Definitions for handling the .xz file format
- *
- * Author: Lasse Collin <lasse.collin@tukaani.org>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef XZ_STREAM_H
-#define XZ_STREAM_H
-
-#if defined(__KERNEL__) && !XZ_INTERNAL_CRC32
-#include <linux/crc32.h>
-#undef crc32
-#define xz_crc32(buf, size, crc) (~crc32_le(~(uint32_t)(crc), buf, size))
-#endif
-
-/*
- * See the .xz file format specification at
- * http://tukaani.org/xz/xz-file-format.txt
- * to understand the container format.
- */
-
-#define STREAM_HEADER_SIZE 12
-
-#define HEADER_MAGIC "\3757zXZ"
-#define HEADER_MAGIC_SIZE 6
-
-#define FOOTER_MAGIC "YZ"
-#define FOOTER_MAGIC_SIZE 2
-
-/*
- * Variable-length integer can hold a 63-bit unsigned integer or a special
- * value indicating that the value is unknown.
- *
- * Experimental: vli_type can be defined to uint32_t to save a few bytes
- * in code size (no effect on speed). Doing so limits the uncompressed and
- * compressed size of the file to less than 256 MiB and may also weaken
- * error detection slightly.
- */
-typedef uint64_t vli_type;
-
-#define VLI_MAX ((vli_type) - 1 / 2)
-#define VLI_UNKNOWN ((vli_type) - 1)
-
-/* Maximum encoded size of a VLI */
-#define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7)
-
-/* Integrity Check types */
-enum xz_check
-{
- XZ_CHECK_NONE = 0,
- XZ_CHECK_CRC32 = 1,
- XZ_CHECK_CRC64 = 4,
- XZ_CHECK_SHA256 = 10
-};
-
-/* Maximum possible Check ID */
-#define XZ_CHECK_MAX 15
-
-#endif
diff --git a/libraries/xz-embedded/xzminidec.c b/libraries/xz-embedded/xzminidec.c
deleted file mode 100644
index 44f60602..00000000
--- a/libraries/xz-embedded/xzminidec.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Simple XZ decoder command line tool
- *
- * Author: Lasse Collin <lasse.collin@tukaani.org>
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-/*
- * This is really limited: Not all filters from .xz format are supported,
- * only CRC32 is supported as the integrity check, and decoding of
- * concatenated .xz streams is not supported. Thus, you may want to look
- * at xzdec from XZ Utils if a few KiB bigger tool is not a problem.
- */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-#include "xz.h"
-
-static uint8_t in[BUFSIZ];
-static uint8_t out[BUFSIZ];
-
-int main(int argc, char **argv)
-{
- struct xz_buf b;
- struct xz_dec *s;
- enum xz_ret ret;
- const char *msg;
-
- if (argc >= 2 && strcmp(argv[1], "--help") == 0)
- {
- fputs("Uncompress a .xz file from stdin to stdout.\n"
- "Arguments other than `--help' are ignored.\n",
- stdout);
- return 0;
- }
-
- xz_crc32_init();
-#ifdef XZ_USE_CRC64
- xz_crc64_init();
-#endif
-
- /*
- * Support up to 64 MiB dictionary. The actually needed memory
- * is allocated once the headers have been parsed.
- */
- s = xz_dec_init(XZ_DYNALLOC, 1 << 26);
- if (s == NULL)
- {
- msg = "Memory allocation failed\n";
- goto error;
- }
-
- b.in = in;
- b.in_pos = 0;
- b.in_size = 0;
- b.out = out;
- b.out_pos = 0;
- b.out_size = BUFSIZ;
-
- while (true)
- {
- if (b.in_pos == b.in_size)
- {
- b.in_size = fread(in, 1, sizeof(in), stdin);
- b.in_pos = 0;
- }
-
- ret = xz_dec_run(s, &b);
-
- if (b.out_pos == sizeof(out))
- {
- if (fwrite(out, 1, b.out_pos, stdout) != b.out_pos)
- {
- msg = "Write error\n";
- goto error;
- }
-
- b.out_pos = 0;
- }
-
- if (ret == XZ_OK)
- continue;
-
-#ifdef XZ_DEC_ANY_CHECK
- if (ret == XZ_UNSUPPORTED_CHECK)
- {
- fputs(argv[0], stderr);
- fputs(": ", stderr);
- fputs("Unsupported check; not verifying "
- "file integrity\n",
- stderr);
- continue;
- }
-#endif
-
- if (fwrite(out, 1, b.out_pos, stdout) != b.out_pos || fclose(stdout))
- {
- msg = "Write error\n";
- goto error;
- }
-
- switch (ret)
- {
- case XZ_STREAM_END:
- xz_dec_end(s);
- return 0;
-
- case XZ_MEM_ERROR:
- msg = "Memory allocation failed\n";
- goto error;
-
- case XZ_MEMLIMIT_ERROR:
- msg = "Memory usage limit reached\n";
- goto error;
-
- case XZ_FORMAT_ERROR:
- msg = "Not a .xz file\n";
- goto error;
-
- case XZ_OPTIONS_ERROR:
- msg = "Unsupported options in the .xz headers\n";
- goto error;
-
- case XZ_DATA_ERROR:
- case XZ_BUF_ERROR:
- msg = "File is corrupt\n";
- goto error;
-
- default:
- msg = "Bug!\n";
- goto error;
- }
- }
-
-error:
- xz_dec_end(s);
- fputs(argv[0], stderr);
- fputs(": ", stderr);
- fputs(msg, stderr);
- return 1;
-}
diff --git a/nix/NIX.md b/nix/NIX.md
index 047dd82f..e57d5be7 100644
--- a/nix/NIX.md
+++ b/nix/NIX.md
@@ -5,22 +5,22 @@ To import with flakes use
```nix
{
inputs = {
- polymc.url = "github:PolyMC/PolyMC";
+ prismlauncher.url = "github:PrismLauncher/PrismLauncher";
};
...
- nixpkgs.overlays = [ inputs.polymc.overlay ]; ## Within configuration.nix
- environment.systemPackages = with pkgs; [ polymc ]; ##
+ nixpkgs.overlays = [ inputs.prismlauncher.overlay ]; ## Within configuration.nix
+ environment.systemPackages = with pkgs; [ prismlauncher ]; ##
}
```
To import without flakes use channels:
```sh
-nix-channel --add https://github.com/PolyMC/PolyMC/archive/master.tar.gz polymc
-nix-channel --update polymc
-nix-env -iA polymc
+nix-channel --add https://github.com/PrismLauncher/PrismLauncher/archive/master.tar.gz prismlauncher
+nix-channel --update prismlauncher
+nix-env -iA prismlauncher
```
or alternatively you can use
@@ -28,9 +28,9 @@ or alternatively you can use
```nix
{
nixpkgs.overlays = [
- (import (builtins.fetchTarball "https://github.com/PolyMC/PolyMC/archive/develop.tar.gz")).overlay
+ (import (builtins.fetchTarball "https://github.com/PrismLauncher/PrismLauncher/archive/develop.tar.gz")).overlay
];
- environment.systemPackages = with pkgs; [ polymc ];
+ environment.systemPackages = with pkgs; [ prismlauncher ];
}
```
diff --git a/nix/default.nix b/nix/default.nix
index 88b540ab..c8b4f7cc 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -5,6 +5,7 @@
, ninja
, jdk8
, jdk
+, ghc_filesystem
, zlib
, file
, wrapQtAppsHook
@@ -37,19 +38,19 @@ let
libGL
];
- # This variable will be passed to Minecraft by PolyMC
+ # This variable will be passed to Minecraft by Prism Launcher
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
javaPaths = lib.makeSearchPath "bin/java" ([ jdk jdk8 ] ++ extraJDKs);
in
stdenv.mkDerivation rec {
- pname = "polymc";
+ pname = "prismlauncher";
inherit version;
src = lib.cleanSource self;
- nativeBuildInputs = [ cmake extra-cmake-modules ninja jdk file wrapQtAppsHook ];
+ nativeBuildInputs = [ cmake extra-cmake-modules ninja jdk ghc_filesystem file wrapQtAppsHook ];
buildInputs = [ qtbase quazip zlib ];
dontWrapQtApps = true;
@@ -76,17 +77,17 @@ stdenv.mkDerivation rec {
# we have to check if the system is NixOS before adding stdenv.cc.cc.lib (#923)
postInstall = ''
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
- wrapQtApp $out/bin/polymc \
+ wrapQtApp $out/bin/prismlauncher \
--run '[ -f /etc/NIXOS ] && export LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib:$LD_LIBRARY_PATH"' \
--prefix LD_LIBRARY_PATH : ${gameLibraryPath} \
- --prefix POLYMC_JAVA_PATHS : ${javaPaths} \
+ --prefix PRISMLAUNCHER_JAVA_PATHS : ${javaPaths} \
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
'';
meta = with lib; {
- homepage = "https://polymc.org/";
- downloadPage = "https://polymc.org/download/";
- changelog = "https://github.com/PolyMC/PolyMC/releases";
+ homepage = "https://prismlauncher.org/";
+ downloadPage = "https://prismlauncher.org/download/";
+ changelog = "https://github.com/PrismLauncher/PrismLauncher/releases";
description = "A free, open source launcher for Minecraft";
longDescription = ''
Allows you to have multiple, separate instances of Minecraft (each with
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index ac8ea6ce..e46f63a3 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -8,44 +8,44 @@ if(UNIX)
endif()
endif()
-set(Launcher_CommonName "PolyMC")
+set(Launcher_CommonName "PrismLauncher")
-set(Launcher_Copyright "PolyMC Contributors\\n© 2012-2021 MultiMC Contributors")
+set(Launcher_Copyright "Prism Launcher Contributors\\n© 2012-2021 MultiMC Contributors")
set(Launcher_Copyright "${Launcher_Copyright}" PARENT_SCOPE)
-set(Launcher_Domain "polymc.org" PARENT_SCOPE)
+set(Launcher_Domain "prismlauncher.org" PARENT_SCOPE)
set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
-set(Launcher_DisplayName "${Launcher_CommonName}" PARENT_SCOPE)
+set(Launcher_DisplayName "Prism Launcher" PARENT_SCOPE)
set(Launcher_UserAgent "${Launcher_CommonName}/${Launcher_VERSION_NAME}" PARENT_SCOPE)
-set(Launcher_ConfigFile "polymc.cfg" PARENT_SCOPE)
-set(Launcher_Git "https://github.com/PolyMC/PolyMC" PARENT_SCOPE)
-set(Launcher_DesktopFileName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
+set(Launcher_ConfigFile "prismlauncher.cfg" PARENT_SCOPE)
+set(Launcher_Git "https://github.com/PrismLauncher/PrismLauncher" PARENT_SCOPE)
+set(Launcher_DesktopFileName "org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
-set(Launcher_Desktop "program_info/org.polymc.PolyMC.desktop" PARENT_SCOPE)
-set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE)
-set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" PARENT_SCOPE)
-set(Launcher_Branding_ICNS "program_info/polymc.icns" PARENT_SCOPE)
-set(Launcher_Branding_ICO "program_info/polymc.ico")
+set(Launcher_Desktop "program_info/org.prismlauncher.PrismLauncher.desktop" PARENT_SCOPE)
+set(Launcher_MetaInfo "program_info/org.prismlauncher.PrismLauncher.metainfo.xml" PARENT_SCOPE)
+set(Launcher_SVG "program_info/org.prismlauncher.PrismLauncher.svg" PARENT_SCOPE)
+set(Launcher_Branding_ICNS "program_info/prismlauncher.icns" PARENT_SCOPE)
+set(Launcher_Branding_ICO "program_info/prismlauncher.ico")
set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
-set(Launcher_Branding_WindowsRC "program_info/polymc.rc" PARENT_SCOPE)
-set(Launcher_Branding_LogoQRC "program_info/polymc.qrc" PARENT_SCOPE)
+set(Launcher_Branding_WindowsRC "program_info/prismlauncher.rc" PARENT_SCOPE)
+set(Launcher_Branding_LogoQRC "program_info/prismlauncher.qrc" PARENT_SCOPE)
set(Launcher_Portable_File "program_info/portable.txt" PARENT_SCOPE)
-configure_file(org.polymc.PolyMC.desktop.in org.polymc.PolyMC.desktop)
-configure_file(org.polymc.PolyMC.metainfo.xml.in org.polymc.PolyMC.metainfo.xml)
-configure_file(polymc.rc.in polymc.rc @ONLY)
-configure_file(polymc.manifest.in polymc.manifest @ONLY)
-configure_file(polymc.ico polymc.ico COPYONLY)
+configure_file(org.prismlauncher.PrismLauncher.desktop.in org.prismlauncher.PrismLauncher.desktop)
+configure_file(org.prismlauncher.PrismLauncher.metainfo.xml.in org.prismlauncher.PrismLauncher.metainfo.xml)
+configure_file(prismlauncher.rc.in prismlauncher.rc @ONLY)
+configure_file(prismlauncher.manifest.in prismlauncher.manifest @ONLY)
+configure_file(prismlauncher.ico prismlauncher.ico COPYONLY)
configure_file(win_install.nsi.in win_install.nsi @ONLY)
if(SCDOC_FOUND)
- set(in_scd "${CMAKE_CURRENT_SOURCE_DIR}/polymc.6.scd")
- set(out_man "${CMAKE_CURRENT_BINARY_DIR}/polymc.6")
+ set(in_scd "${CMAKE_CURRENT_SOURCE_DIR}/prismlauncher.6.scd")
+ set(out_man "${CMAKE_CURRENT_BINARY_DIR}/prismlauncher.6")
add_custom_command(
DEPENDS "${in_scd}"
OUTPUT "${out_man}"
COMMAND ${SCDOC_SCDOC} < "${in_scd}" > "${out_man}"
)
add_custom_target(man ALL DEPENDS ${out_man})
- set(Launcher_ManPage "program_info/polymc.6" PARENT_SCOPE)
+ set(Launcher_ManPage "program_info/prismlauncher.6" PARENT_SCOPE)
endif()
diff --git a/program_info/README.md b/program_info/README.md
index 421ef1f9..8fc81a19 100644
--- a/program_info/README.md
+++ b/program_info/README.md
@@ -1,6 +1,6 @@
-# PolyMC Program Info
+# PrismLauncher Program Info
-This is PolyMC's program info which contains information about:
+This is PrismLauncher's program info which contains information about:
- Application name and logo (and branding in general)
- Various URLs and API endpoints
diff --git a/program_info/genicons.sh b/program_info/genicons.sh
index 313bdb53..bfe756d8 100755
--- a/program_info/genicons.sh
+++ b/program_info/genicons.sh
@@ -2,38 +2,38 @@
# ICO
-inkscape -w 16 -h 16 -o polymc_16.png org.polymc.PolyMC.svg
-inkscape -w 24 -h 24 -o polymc_24.png org.polymc.PolyMC.svg
-inkscape -w 32 -h 32 -o polymc_32.png org.polymc.PolyMC.svg
-inkscape -w 48 -h 48 -o polymc_48.png org.polymc.PolyMC.svg
-inkscape -w 64 -h 64 -o polymc_64.png org.polymc.PolyMC.svg
-inkscape -w 128 -h 128 -o polymc_128.png org.polymc.PolyMC.svg
+inkscape -w 16 -h 16 -o prismlauncher_16.png org.prismlauncher.PrismLauncher.svg
+inkscape -w 24 -h 24 -o prismlauncher_24.png org.prismlauncher.PrismLauncher.svg
+inkscape -w 32 -h 32 -o prismlauncher_32.png org.prismlauncher.PrismLauncher.svg
+inkscape -w 48 -h 48 -o prismlauncher_48.png org.prismlauncher.PrismLauncher.svg
+inkscape -w 64 -h 64 -o prismlauncher_64.png org.prismlauncher.PrismLauncher.svg
+inkscape -w 128 -h 128 -o prismlauncher_128.png org.prismlauncher.PrismLauncher.svg
-convert polymc_128.png polymc_64.png polymc_48.png polymc_32.png polymc_24.png polymc_16.png polymc.ico
+convert prismlauncher_128.png prismlauncher_64.png prismlauncher_48.png prismlauncher_32.png prismlauncher_24.png prismlauncher_16.png prismlauncher.ico
-rm -f polymc_*.png
+rm -f prismlauncher_*.png
-inkscape -w 1024 -h 1024 -o polymc_1024.png org.polymc.PolyMC.bigsur.svg
+inkscape -w 1024 -h 1024 -o prismlauncher_1024.png org.prismlauncher.PrismLauncher.bigsur.svg
-mkdir polymc.iconset
+mkdir prismlauncher.iconset
-sips -z 16 16 polymc_1024.png --out polymc.iconset/icon_16x16.png
-sips -z 32 32 polymc_1024.png --out polymc.iconset/icon_16x16@2x.png
-sips -z 32 32 polymc_1024.png --out polymc.iconset/icon_32x32.png
-sips -z 64 64 polymc_1024.png --out polymc.iconset/icon_32x32@2x.png
-sips -z 128 128 polymc_1024.png --out polymc.iconset/icon_128x128.png
-sips -z 256 256 polymc_1024.png --out polymc.iconset/icon_128x128@2x.png
-sips -z 256 256 polymc_1024.png --out polymc.iconset/icon_256x256.png
-sips -z 512 512 polymc_1024.png --out polymc.iconset/icon_256x256@2x.png
-sips -z 512 512 polymc_1024.png --out polymc.iconset/icon_512x512.png
-cp polymc_1024.png polymc.iconset/icon_512x512@2x.png
+sips -z 16 16 prismlauncher_1024.png --out prismlauncher.iconset/icon_16x16.png
+sips -z 32 32 prismlauncher_1024.png --out prismlauncher.iconset/icon_16x16@2x.png
+sips -z 32 32 prismlauncher_1024.png --out prismlauncher.iconset/icon_32x32.png
+sips -z 64 64 prismlauncher_1024.png --out prismlauncher.iconset/icon_32x32@2x.png
+sips -z 128 128 prismlauncher_1024.png --out prismlauncher.iconset/icon_128x128.png
+sips -z 256 256 prismlauncher_1024.png --out prismlauncher.iconset/icon_128x128@2x.png
+sips -z 256 256 prismlauncher_1024.png --out prismlauncher.iconset/icon_256x256.png
+sips -z 512 512 prismlauncher_1024.png --out prismlauncher.iconset/icon_256x256@2x.png
+sips -z 512 512 prismlauncher_1024.png --out prismlauncher.iconset/icon_512x512.png
+cp prismlauncher_1024.png prismlauncher.iconset/icon_512x512@2x.png
-iconutil -c icns polymc.iconset
+iconutil -c icns prismlauncher.iconset
-rm -f polymc_*.png
-rm -rf polymc.iconset
+rm -f prismlauncher_*.png
+rm -rf prismlauncher.iconset
for dir in ../launcher/resources/*/scalable
do
- cp -v org.polymc.PolyMC.svg $dir/launcher.svg
+ cp -v org.prismlauncher.PrismLauncher.svg $dir/launcher.svg
done
diff --git a/program_info/org.polymc.PolyMC.Source.svg b/program_info/org.polymc.PolyMC.Source.svg
deleted file mode 100644
index 0614cde2..00000000
--- a/program_info/org.polymc.PolyMC.Source.svg
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- inkscape:export-ydpi="1620.0001"
- inkscape:export-xdpi="1620.0001"
- inkscape:export-filename="/home/z/Pictures/Polymchd.png"
- inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
- sodipodi:docname="org.polymc.PolyMC.Source.svg"
- id="svg5"
- version="1.1"
- viewBox="0 0 16.933333 16.933333"
- height="64"
- width="64"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:svg="http://www.w3.org/2000/svg">
- <sodipodi:namedview
- id="namedview7"
- pagecolor="#505050"
- bordercolor="#eeeeee"
- borderopacity="1"
- inkscape:pageshadow="0"
- inkscape:pageopacity="0"
- inkscape:pagecheckerboard="0"
- inkscape:document-units="mm"
- showgrid="false"
- width="64mm"
- inkscape:object-nodes="true"
- inkscape:snap-intersection-paths="true"
- inkscape:object-paths="false"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-midpoints="true"
- units="px"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:zoom="7.2348066"
- inkscape:cx="26.331042"
- inkscape:cy="25.84727"
- inkscape:window-width="1920"
- inkscape:window-height="1011"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:window-maximized="1"
- inkscape:current-layer="layer1"
- inkscape:snap-center="false"
- inkscape:snap-page="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-text-baseline="true"
- fit-margin-left="4"
- fit-margin-right="4">
- <inkscape:grid
- type="xygrid"
- id="grid56" />
- <sodipodi:guide
- position="3.5610222,0.91765532"
- orientation="1,0"
- id="guide1024" />
- <sodipodi:guide
- position="13.37231,0.91765532"
- orientation="1,0"
- id="guide1028" />
- <sodipodi:guide
- position="8.4666659,3.9526473"
- orientation="1,0"
- id="guide1471" />
- <sodipodi:guide
- position="0.52916673,10.248746"
- orientation="-0.58778528,0.80901698"
- id="guide1629" />
- <sodipodi:guide
- position="8.4666659,16.015677"
- orientation="0.58778537,0.80901691"
- id="guide1892" />
- <sodipodi:guide
- position="8.4666659,4.4818143"
- orientation="0.58778537,0.80901691"
- id="guide2184"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="8.4666659,4.4818143"
- orientation="-0.58778528,0.80901698"
- id="guide2186"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="0.52916788,10.248746"
- orientation="0,-1"
- id="guide2188" />
- <sodipodi:guide
- position="8.8308337,4.2172313"
- orientation="-0.58778528,0.80901698"
- id="guide2190"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="8.4666655,3.9526476"
- orientation="0.58778537,0.80901691"
- id="guide2192"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="9.7726935,4.3858037"
- orientation="-0.58778528,0.80901698"
- id="guide2194"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="7.1606718,4.3857603"
- orientation="0.58778537,0.80901691"
- id="guide2196"
- inkscape:label=""
- inkscape:locked="false"
- inkscape:color="rgb(0,0,255)" />
- </sodipodi:namedview>
- <defs
- id="defs2">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient206240">
- <stop
- style="stop-color:#88b858;stop-opacity:1"
- offset="0"
- id="stop206236" />
- <stop
- style="stop-color:#72b147;stop-opacity:1"
- offset="0.50000006"
- id="stop134589" />
- <stop
- style="stop-color:#5a9a30;stop-opacity:1"
- offset="1"
- id="stop206238" />
- </linearGradient>
- <inkscape:path-effect
- effect="fillet_chamfer"
- id="path-effect28303"
- satellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,1,0,1"
- is_visible="true"
- lpeversion="1"
- unit="px"
- method="auto"
- mode="F"
- radius="0"
- chamfer_steps="1"
- flexible="false"
- use_knot_distance="true"
- apply_no_radius="true"
- apply_with_radius="true"
- only_selected="false"
- hide_knots="false" />
- <inkscape:path-effect
- effect="fillet_chamfer"
- id="path-effect28299"
- satellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,1,0,1"
- is_visible="true"
- lpeversion="1"
- unit="px"
- method="auto"
- mode="F"
- radius="0"
- chamfer_steps="1"
- flexible="false"
- use_knot_distance="true"
- apply_no_radius="true"
- apply_with_radius="true"
- only_selected="false"
- hide_knots="false" />
- <inkscape:path-effect
- effect="fillet_chamfer"
- id="path-effect28255"
- satellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,1,0,1"
- is_visible="true"
- lpeversion="1"
- unit="px"
- method="auto"
- mode="F"
- radius="0"
- chamfer_steps="1"
- flexible="false"
- use_knot_distance="true"
- apply_no_radius="true"
- apply_with_radius="true"
- only_selected="false"
- hide_knots="false" />
- <inkscape:path-effect
- effect="fillet_chamfer"
- id="path-effect10730"
- satellites_param="F,0,0,1,0,1,0,1 @ F,0,0,1,0,1,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,1,0,1"
- is_visible="true"
- lpeversion="1"
- unit="px"
- method="auto"
- mode="F"
- radius="0"
- chamfer_steps="1"
- flexible="false"
- use_knot_distance="true"
- apply_no_radius="true"
- apply_with_radius="true"
- only_selected="false"
- hide_knots="false" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient206240"
- id="linearGradient84726"
- x1="4.4979167"
- y1="3.8011212"
- x2="12.435414"
- y2="9.5680542"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1">
- <path
- style="fill:#765338;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 3.5610223,16.015678 c 0,0 0,-3.564159 4.905644,-3.564159 4.9069307,0 4.9056437,3.564159 4.9056437,3.564159 z"
- id="path90018"
- sodipodi:nodetypes="cccc" />
- <path
- style="fill:#b7835a;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
- d="M 8.466666,12.451519 3.5610223,16.015678 0.52916674,6.6845872 Z"
- id="path62382" />
- <path
- style="fill:#5b422d;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
- d="m 8.466666,12.451519 7.9375,-5.7669323 -3.031856,9.3310913 z"
- id="path100033" />
- <path
- style="fill:#72b147;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 8.8308339,12.716102 8.4666661,12.980686 8.1024982,12.716102 c 0,-0.264583 0.3641681,-0.264583 0.3641681,-0.264583 0,0 0.3641676,0 0.3641676,0.264583 z"
- id="path986606"
- sodipodi:nodetypes="ccccc" />
- <path
- style="fill:#5a9a30;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 8.4666663,12.451519 c 0,0 -2e-7,-5.7669302 7.9374987,-5.7669302 L 16.179097,7.3772762 15.260564,8.5737969 14.342031,8.7119827 13.423498,9.9085036 12.504965,10.046689 11.586433,11.24321 10.6679,11.381396 9.7493669,12.577916 8.830834,12.716102 Z"
- id="path986472"
- sodipodi:nodetypes="cccccccccccc" />
- <path
- style="fill:#88b858;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="M 8.1024983,12.716102 7.1839654,12.577916 6.2654325,11.381396 5.3468996,11.24321 4.4283667,10.046689 3.5098338,9.9085034 2.5913009,8.7119828 1.6727681,8.5737971 0.75423516,7.3772764 0.52916674,6.6845872 c 7.93749966,10e-8 7.93749956,5.7669318 7.93749956,5.7669318 z"
- id="path986404"
- sodipodi:nodetypes="cccccccccccc" />
- <path
- style="fill:url(#linearGradient84726);stroke:none;stroke-width:0.26458333;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
- d="M 0.52916674,6.6845872 8.4666663,12.451519 16.404166,6.6845867 8.4666666,0.91765555 Z"
- id="path5260" />
- <path
- style="fill:#000000;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0"
- d="M 0.75423516,7.3772764 0.529167,6.684588 8.466666,12.451519 16.404165,6.6845883 16.179097,7.3772762 8.466666,12.980686 Z"
- id="path970771" />
- </g>
-</svg>
diff --git a/program_info/org.polymc.PolyMC.bigsur.svg b/program_info/org.polymc.PolyMC.bigsur.svg
deleted file mode 100644
index e9582f5d..00000000
--- a/program_info/org.polymc.PolyMC.bigsur.svg
+++ /dev/null
@@ -1,174 +0,0 @@
-<svg
- width="1024"
- height="1024"
- viewBox="0 0 1024 1024"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
->
- <g filter="url(#filter0_d_102_69)">
- <path
- fill-rule="evenodd"
- clip-rule="evenodd"
- d="M924 354.627C924 344.845 924.004 335.062 923.944 325.279C923.895 317.038 923.8 308.799 923.576 300.562C923.092 282.609 922.033 264.502 918.84 246.749C915.602 228.741 910.314 211.98 901.981 195.617C893.789 179.534 883.088 164.817 870.32 152.058C857.555 139.299 842.834 128.605 826.746 120.418C810.366 112.083 793.587 106.797 775.558 103.56C757.803 100.372 739.691 99.315 721.738 98.83C713.495 98.607 705.253 98.513 697.008 98.462C687.22 98.402 677.432 98.407 667.644 98.407L553.997 98H468.997L357.361 98.407C347.554 98.407 337.747 98.402 327.94 98.462C319.678 98.513 311.42 98.607 303.161 98.83C285.167 99.315 267.014 100.373 249.217 103.565C231.164 106.801 214.36 112.085 197.958 120.414C181.835 128.602 167.083 139.297 154.291 152.058C141.501 164.816 130.78 179.53 122.573 195.61C114.217 211.981 108.919 228.752 105.673 246.77C102.477 264.516 101.418 282.617 100.931 300.562C100.709 308.8 100.613 317.039 100.563 325.279C100.503 335.063 100 347.216 100 356.999L100.003 467.089L100 552.998L100.508 665.427C100.508 675.223 100.504 685.019 100.563 694.815C100.613 703.067 100.709 711.317 100.932 719.566C101.418 737.542 102.479 755.675 105.678 773.452C108.923 791.484 114.22 808.269 122.569 824.653C130.777 840.759 141.5 855.495 154.291 868.272C167.082 881.049 181.83 891.757 197.95 899.956C214.362 908.302 231.174 913.595 249.238 916.836C267.027 920.029 285.174 921.088 303.161 921.573C311.42 921.796 319.679 921.891 327.941 921.941C337.748 922.001 347.554 921.997 357.361 921.997L470.006 922H555.217L667.644 921.996C677.432 921.996 687.22 922.001 697.008 921.941C705.253 921.891 713.495 921.796 721.738 921.573C739.698 921.087 757.816 920.027 775.579 916.832C793.597 913.591 810.368 908.3 826.739 899.959C842.831 891.761 857.554 881.051 870.32 868.272C883.086 855.497 893.786 840.763 901.978 824.66C910.316 808.268 915.604 791.475 918.844 773.431C922.034 755.661 923.092 737.535 923.577 719.566C923.8 711.316 923.895 703.066 923.944 694.815C924.005 685.019 924 675.223 924 665.427C924 665.427 923.994 554.983 923.994 552.998V466.999C923.994 465.533 924 354.627 924 354.627Z"
- fill="url(#paint0_linear_102_69)"
- />
- </g>
- <mask
- id="mask0_102_69"
- style="mask-type: alpha"
- maskUnits="userSpaceOnUse"
- x="100"
- y="98"
- width="824"
- height="824"
- >
- <path
- fill-rule="evenodd"
- clip-rule="evenodd"
- d="M924 354.627C924 344.845 924.004 335.062 923.944 325.279C923.895 317.038 923.8 308.799 923.576 300.562C923.092 282.609 922.033 264.502 918.84 246.749C915.602 228.741 910.314 211.98 901.981 195.617C893.789 179.534 883.088 164.817 870.32 152.058C857.555 139.299 842.834 128.605 826.746 120.418C810.366 112.083 793.587 106.797 775.558 103.56C757.803 100.372 739.691 99.315 721.738 98.83C713.495 98.607 705.253 98.513 697.008 98.462C687.22 98.402 677.432 98.407 667.644 98.407L553.997 98H468.997L357.361 98.407C347.554 98.407 337.747 98.402 327.94 98.462C319.678 98.513 311.42 98.607 303.161 98.83C285.167 99.315 267.014 100.373 249.217 103.565C231.164 106.801 214.36 112.085 197.958 120.414C181.835 128.602 167.083 139.297 154.291 152.058C141.501 164.816 130.78 179.53 122.573 195.61C114.217 211.981 108.919 228.752 105.673 246.77C102.477 264.516 101.418 282.617 100.931 300.562C100.709 308.8 100.613 317.039 100.563 325.279C100.503 335.063 100 347.216 100 356.999L100.003 467.089L100 552.998L100.508 665.427C100.508 675.223 100.504 685.019 100.563 694.815C100.613 703.067 100.709 711.317 100.932 719.566C101.418 737.542 102.479 755.675 105.678 773.452C108.923 791.484 114.22 808.269 122.569 824.653C130.777 840.759 141.5 855.495 154.291 868.272C167.082 881.049 181.83 891.757 197.95 899.956C214.362 908.302 231.174 913.595 249.238 916.836C267.027 920.029 285.174 921.088 303.161 921.573C311.42 921.796 319.679 921.891 327.941 921.941C337.748 922.001 347.554 921.997 357.361 921.997L470.006 922H555.217L667.644 921.996C677.432 921.996 687.22 922.001 697.008 921.941C705.253 921.891 713.495 921.796 721.738 921.573C739.698 921.087 757.816 920.027 775.579 916.832C793.597 913.591 810.368 908.3 826.739 899.959C842.831 891.761 857.554 881.051 870.32 868.272C883.086 855.497 893.786 840.763 901.978 824.66C910.316 808.268 915.604 791.475 918.844 773.431C922.034 755.661 923.092 737.535 923.577 719.566C923.8 711.316 923.895 703.066 923.944 694.815C924.005 685.019 924 675.223 924 665.427C924 665.427 923.994 554.983 923.994 552.998V466.999C923.994 465.533 924 354.627 924 354.627Z"
- fill="white"
- />
- </mask>
- <g mask="url(#mask0_102_69)">
- <rect
- x="42"
- y="36"
- width="914"
- height="914"
- fill="url(#paint1_linear_102_69)"
- />
- <g filter="url(#filter1_b_102_69)">
- <rect
- x="100"
- y="98"
- width="824"
- height="824"
- rx="126"
- fill="black"
- fill-opacity="0.01"
- />
- </g>
- </g>
- <path
- d="M367.15 732.923C367.15 732.923 367.15 627.678 512.003 627.678C656.895 627.678 656.856 732.923 656.856 732.923H367.15Z"
- fill="#765338"
- />
- <path
- d="M512.006 627.684L367.153 732.929L277.626 457.399L512.006 627.684Z"
- fill="#B7835A"
- />
- <path
- d="M512.006 627.684L746.385 457.399L656.859 732.929L512.006 627.684Z"
- fill="#5B422D"
- />
- <path
- d="M522.757 635.48L512.004 643.292L501.25 635.48C501.25 627.667 512.004 627.667 512.004 627.667C512.004 627.667 522.757 627.667 522.757 635.48Z"
- fill="#72B147"
- />
- <path
- d="M512.006 627.684C512.006 627.684 512.006 457.399 746.385 457.399L739.74 477.852L712.617 513.183L685.495 517.263L658.372 552.594L631.25 556.674L604.127 592.005L577.005 596.085L549.882 631.416L522.76 635.496L512.006 627.684Z"
- fill="#5A9A30"
- />
- <path
- d="M501.252 635.48L474.129 631.399L447.007 596.069L419.884 591.988L392.762 556.658L365.639 552.578L338.517 517.247L311.394 513.167L284.272 477.836L277.626 457.382C512.006 457.382 512.006 627.668 512.006 627.668L501.252 635.48Z"
- fill="#88B858"
- />
- <path
- d="M277.625 457.384L512.005 627.67L746.385 457.384L512.005 287.098L277.625 457.384Z"
- fill="url(#paint2_linear_102_69)"
- />
- <defs>
- <filter
- id="filter0_d_102_69"
- x="90"
- y="98"
- width="844"
- height="844"
- filterUnits="userSpaceOnUse"
- color-interpolation-filters="sRGB"
- >
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
- <feColorMatrix
- in="SourceAlpha"
- type="matrix"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
- result="hardAlpha"
- />
- <feOffset dy="10" />
- <feGaussianBlur stdDeviation="5" />
- <feColorMatrix
- type="matrix"
- values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"
- />
- <feBlend
- mode="normal"
- in2="BackgroundImageFix"
- result="effect1_dropShadow_102_69"
- />
- <feBlend
- mode="normal"
- in="SourceGraphic"
- in2="effect1_dropShadow_102_69"
- result="shape"
- />
- </filter>
- <filter
- id="filter1_b_102_69"
- x="89.1269"
- y="87.1269"
- width="845.746"
- height="845.746"
- filterUnits="userSpaceOnUse"
- color-interpolation-filters="sRGB"
- >
- <feFlood flood-opacity="0" result="BackgroundImageFix" />
- <feGaussianBlur in="BackgroundImage" stdDeviation="5.43656" />
- <feComposite
- in2="SourceAlpha"
- operator="in"
- result="effect1_backgroundBlur_102_69"
- />
- <feBlend
- mode="normal"
- in="SourceGraphic"
- in2="effect1_backgroundBlur_102_69"
- result="shape"
- />
- </filter>
- <linearGradient
- id="paint0_linear_102_69"
- x1="-181.14"
- y1="98"
- x2="-181.14"
- y2="1484.28"
- gradientUnits="userSpaceOnUse"
- >
- <stop stop-color="white" />
- <stop offset="0.489516" stop-color="#EFEFEF" />
- <stop offset="1" stop-color="#C0C0C0" />
- </linearGradient>
- <linearGradient
- id="paint1_linear_102_69"
- x1="928.377"
- y1="992.826"
- x2="928.377"
- y2="134.072"
- gradientUnits="userSpaceOnUse"
- >
- <stop stop-color="#F6F3F3" />
- <stop offset="1" stop-color="white" />
- </linearGradient>
- <linearGradient
- id="paint2_linear_102_69"
- x1="394.815"
- y1="372.239"
- x2="629.182"
- y2="542.528"
- gradientUnits="userSpaceOnUse"
- >
- <stop stop-color="#88B858" />
- <stop offset="0.5" stop-color="#72B147" />
- <stop offset="1" stop-color="#5A9A30" />
- </linearGradient>
- </defs>
-</svg>
diff --git a/program_info/org.polymc.PolyMC.svg b/program_info/org.polymc.PolyMC.svg
deleted file mode 100644
index c192d503..00000000
--- a/program_info/org.polymc.PolyMC.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-<svg width="64" height="64" version="1.1" viewBox="0 0 16.933 16.933" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
- <defs>
- <linearGradient id="linearGradient84726" x1="4.4979" x2="12.435" y1="3.8011" y2="9.5681" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <g>
- <path d="m3.561 16.016s0-3.5642 4.9056-3.5642c4.9069 0 4.9056 3.5642 4.9056 3.5642z" fill="#765338"/>
- <path d="m8.4667 12.452-4.9056 3.5642-3.0319-9.3311z" fill="#b7835a"/>
- <path d="m8.4667 12.452 7.9375-5.7669-3.0319 9.3311z" fill="#5b422d"/>
- <path d="m8.8308 12.716-0.36417 0.26458-0.36417-0.26458c0-0.26458 0.36417-0.26458 0.36417-0.26458s0.36417 0 0.36417 0.26458z" fill="#72b147"/>
- <path d="m8.4667 12.452s-2e-7 -5.7669 7.9375-5.7669l-0.22507 0.69269-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819-0.91853 1.1965-0.91853 0.13819z" fill="#5a9a30"/>
- <path d="m8.1025 12.716-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.91853-0.13819-0.91853-1.1965-0.22507-0.69269c7.9375 1e-7 7.9375 5.7669 7.9375 5.7669z" fill="#88b858"/>
- <path d="m0.52917 6.6846 7.9375 5.7669 7.9375-5.7669-7.9375-5.7669z" fill="url(#linearGradient84726)"/>
- </g>
- <path d="m0.75424 7.3773-0.22507-0.69269 7.9375 5.7669 7.9375-5.7669-0.22507 0.69269-7.7124 5.6034z" fill-opacity="0"/>
-</svg>
diff --git a/program_info/org.prismlauncher.PrismLauncher.Social.svg b/program_info/org.prismlauncher.PrismLauncher.Social.svg
new file mode 100644
index 00000000..4a4da230
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.Social.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <rect x="9.5367e-8" y="9.5367e-8" width="12.7" height="12.7" fill="#14191e" stroke-width=".26458"/>
+ <g transform="matrix(.90909 0 0 .90909 .57737 .57727)">
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.07255-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104z" fill="#99cd61"/>
+ </g>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ </g>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Notice"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Attribution"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/org.prismlauncher.PrismLauncher.Source.svg b/program_info/org.prismlauncher.PrismLauncher.Source.svg
new file mode 100644
index 00000000..ee5dc724
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.Source.svg
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ width="48"
+ height="48"
+ viewBox="0 0 12.7 12.7"
+ version="1.1"
+ id="svg3606"
+ sodipodi:docname="org.prismlauncher.PrismLauncher.Source.svg"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <title
+ id="title261">Prism Launcher Logo</title>
+ <sodipodi:namedview
+ id="namedview3608"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ inkscape:document-units="px"
+ showgrid="false"
+ showguides="true"
+ inkscape:zoom="16"
+ inkscape:cx="14.9375"
+ inkscape:cy="13.9375"
+ inkscape:window-width="2560"
+ inkscape:window-height="1377"
+ inkscape:window-x="2552"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer1">
+ <sodipodi:guide
+ position="0.52916688,12.170833"
+ orientation="1,0"
+ id="guide4870"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="12.170833,12.170833"
+ orientation="0,-1"
+ id="guide4872"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="12.170833,0.5291669"
+ orientation="1,0"
+ id="guide4874"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="0.52916688,0.5291666"
+ orientation="0,-1"
+ id="guide4876"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="13.692187,21.332031"
+ orientation="0,-1"
+ id="guide6489"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,12.170833"
+ orientation="1,0"
+ id="guide6491"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,6.3499993"
+ orientation="-0.49999657,-0.86602738"
+ id="guide9375"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,6.3499993"
+ orientation="-0.49999666,0.86602733"
+ id="guide9377"
+ inkscape:locked="false" />
+ </sodipodi:namedview>
+ <defs
+ id="defs3603" />
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g531"
+ transform="matrix(0.1353646,0,0,0.1353646,15.301582,0.52916663)" />
+ <g
+ id="g397">
+ <path
+ style="fill:#99cd61;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.3500002,6.350001 Z"
+ id="path7899" />
+ <path
+ id="path3228"
+ style="fill:#df6277;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35 0.52916667 L 3.8292236 4.8947917 L 6.35 6.35 L 8.8702596 4.8947917 L 8.9798136 1.7952393 C 7.828708 1.1306481 6.6410414 0.52916667 6.35 0.52916667 z " />
+ <path
+ id="path2659"
+ style="fill:#fb9168;fill-opacity:1;stroke-width:0.264583"
+ d="M 8.9798136 1.7952393 L 6.35 6.35 L 8.8702596 7.8052083 L 11.391036 3.4395833 C 11.245515 3.1875341 10.130919 2.4598305 8.9798136 1.7952393 z " />
+ <path
+ id="path2708"
+ style="fill:#f3db6c;fill-opacity:1;stroke-width:0.264583"
+ d="M 11.391036 3.4395833 L 6.35 6.35 L 8.8702596 7.8052083 L 11.609111 6.35 C 11.609111 5.0208177 11.536557 3.6916326 11.391036 3.4395833 z " />
+ <path
+ id="path1737"
+ style="fill:#7ab392;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35 6.35 L 6.35 9.2604167 L 11.391036 9.2604167 C 11.536557 9.0083674 11.60911 7.6791823 11.609111 6.35 L 6.35 6.35 z " />
+ <path
+ id="path2937"
+ style="fill:#4b7cbc;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35 6.35 L 6.35 9.2604167 L 8.9798136 10.904761 C 10.130919 10.24017 11.245515 9.5124659 11.391036 9.2604167 L 6.35 6.35 z " />
+ <path
+ id="path3117"
+ style="fill:#6f488c;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35 6.35 L 3.8292236 7.8052083 L 6.35 12.170833 C 6.6410414 12.170833 7.8287079 11.569352 8.9798136 10.904761 L 6.35 6.35 z " />
+ <path
+ id="path2010"
+ style="fill:#4d3f33;fill-opacity:1;stroke-width:0.264583"
+ d="M 3.8292236 4.8947917 L 1.308964 9.2604167 C 1.6000054 9.7645152 5.7679172 12.170833 6.35 12.170833 L 6.35 6.35 L 3.8292236 4.8947917 z " />
+ <path
+ id="path1744"
+ style="fill:#7a573b;fill-opacity:1;stroke-width:0.264583"
+ d="M 1.308964 3.4395833 C 1.0179226 3.9436818 1.0179227 8.7563182 1.308964 9.2604167 L 6.35 6.35 L 6.35 3.4395833 L 1.308964 3.4395833 z " />
+ <path
+ id="path1739"
+ style="fill:#99cd61;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35 0.52916667 C 5.7679172 0.52916665 1.6000054 2.9354849 1.308964 3.4395833 L 6.35 6.35 L 6.35 0.52916667 z " />
+ <g
+ id="g379">
+ <g
+ id="g1657"
+ transform="matrix(0.87999988,0,0,0.87999988,-10.906495,-1.242093)">
+ <g
+ id="g7651"
+ transform="translate(13.259961,2.2775894)">
+ <path
+ id="path6659"
+ style="fill:#ffffff;stroke-width:0.264583"
+ d="m 6.3498163,2.9393223 c -0.3410461,0 -2.782726,1.4098777 -2.9532491,1.7052323 L 6.3498163,9.7602513 9.3035983,4.6445546 C 9.1330753,4.3492 6.6908624,2.9393223 6.3498163,2.9393223 Z"
+ transform="matrix(0.96974817,0,0,0.96974817,0.19209885,0.19209792)" />
+ </g>
+ <path
+ id="path461"
+ style="fill:#dfdfdf;fill-opacity:1;stroke-width:0.264583"
+ d="m 16.745875,6.9737355 2.863908,4.9609385 c 0.330729,0 2.69906,-1.367226 2.864424,-1.653646 0.165365,-0.2864204 0.165365,-3.0208729 0,-3.3072925 l -2.864424,1.6536459 z" />
+ </g>
+ <path
+ id="path5065"
+ style="fill:#d6d2d2;fill-opacity:1;stroke-width:0.264583"
+ d="m 3.8298625,4.8947933 c -0.1455111,0.2520549 -0.1455304,2.6583729 0,2.9104166 0.1455304,0.2520438 2.2292181,1.4552195 2.5202596,1.4552084 V 6.3500016 Z" />
+ </g>
+ </g>
+ </g>
+ <metadata
+ id="metadata259">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Notice" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Attribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/org.prismlauncher.PrismLauncher.bigsur.svg b/program_info/org.prismlauncher.PrismLauncher.bigsur.svg
new file mode 100644
index 00000000..524cf11a
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.bigsur.svg
@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="1024"
+ height="1024"
+ viewBox="0 0 1024 1024"
+ fill="none"
+ version="1.1"
+ id="svg76"
+ sodipodi:docname="org.prismlauncher.PrismLauncher.bigsur.svg"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <sodipodi:namedview
+ id="namedview78"
+ pagecolor="#ffffff"
+ bordercolor="#999999"
+ borderopacity="1"
+ inkscape:showpageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="0.33974271"
+ inkscape:cx="1215.6258"
+ inkscape:cy="532.75609"
+ inkscape:window-width="1920"
+ inkscape:window-height="1026"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg76" />
+ <g
+ filter="url(#filter0_d_102_69)"
+ id="g4">
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M924 354.627C924 344.845 924.004 335.062 923.944 325.279C923.895 317.038 923.8 308.799 923.576 300.562C923.092 282.609 922.033 264.502 918.84 246.749C915.602 228.741 910.314 211.98 901.981 195.617C893.789 179.534 883.088 164.817 870.32 152.058C857.555 139.299 842.834 128.605 826.746 120.418C810.366 112.083 793.587 106.797 775.558 103.56C757.803 100.372 739.691 99.315 721.738 98.83C713.495 98.607 705.253 98.513 697.008 98.462C687.22 98.402 677.432 98.407 667.644 98.407L553.997 98H468.997L357.361 98.407C347.554 98.407 337.747 98.402 327.94 98.462C319.678 98.513 311.42 98.607 303.161 98.83C285.167 99.315 267.014 100.373 249.217 103.565C231.164 106.801 214.36 112.085 197.958 120.414C181.835 128.602 167.083 139.297 154.291 152.058C141.501 164.816 130.78 179.53 122.573 195.61C114.217 211.981 108.919 228.752 105.673 246.77C102.477 264.516 101.418 282.617 100.931 300.562C100.709 308.8 100.613 317.039 100.563 325.279C100.503 335.063 100 347.216 100 356.999L100.003 467.089L100 552.998L100.508 665.427C100.508 675.223 100.504 685.019 100.563 694.815C100.613 703.067 100.709 711.317 100.932 719.566C101.418 737.542 102.479 755.675 105.678 773.452C108.923 791.484 114.22 808.269 122.569 824.653C130.777 840.759 141.5 855.495 154.291 868.272C167.082 881.049 181.83 891.757 197.95 899.956C214.362 908.302 231.174 913.595 249.238 916.836C267.027 920.029 285.174 921.088 303.161 921.573C311.42 921.796 319.679 921.891 327.941 921.941C337.748 922.001 347.554 921.997 357.361 921.997L470.006 922H555.217L667.644 921.996C677.432 921.996 687.22 922.001 697.008 921.941C705.253 921.891 713.495 921.796 721.738 921.573C739.698 921.087 757.816 920.027 775.579 916.832C793.597 913.591 810.368 908.3 826.739 899.959C842.831 891.761 857.554 881.051 870.32 868.272C883.086 855.497 893.786 840.763 901.978 824.66C910.316 808.268 915.604 791.475 918.844 773.431C922.034 755.661 923.092 737.535 923.577 719.566C923.8 711.316 923.895 703.066 923.944 694.815C924.005 685.019 924 675.223 924 665.427C924 665.427 923.994 554.983 923.994 552.998V466.999C923.994 465.533 924 354.627 924 354.627Z"
+ fill="url(#paint0_linear_102_69)"
+ id="path2" />
+ </g>
+ <mask
+ id="mask0_102_69"
+ style="mask-type: alpha"
+ maskUnits="userSpaceOnUse"
+ x="100"
+ y="98"
+ width="824"
+ height="824">
+ <path
+ fill-rule="evenodd"
+ clip-rule="evenodd"
+ d="M924 354.627C924 344.845 924.004 335.062 923.944 325.279C923.895 317.038 923.8 308.799 923.576 300.562C923.092 282.609 922.033 264.502 918.84 246.749C915.602 228.741 910.314 211.98 901.981 195.617C893.789 179.534 883.088 164.817 870.32 152.058C857.555 139.299 842.834 128.605 826.746 120.418C810.366 112.083 793.587 106.797 775.558 103.56C757.803 100.372 739.691 99.315 721.738 98.83C713.495 98.607 705.253 98.513 697.008 98.462C687.22 98.402 677.432 98.407 667.644 98.407L553.997 98H468.997L357.361 98.407C347.554 98.407 337.747 98.402 327.94 98.462C319.678 98.513 311.42 98.607 303.161 98.83C285.167 99.315 267.014 100.373 249.217 103.565C231.164 106.801 214.36 112.085 197.958 120.414C181.835 128.602 167.083 139.297 154.291 152.058C141.501 164.816 130.78 179.53 122.573 195.61C114.217 211.981 108.919 228.752 105.673 246.77C102.477 264.516 101.418 282.617 100.931 300.562C100.709 308.8 100.613 317.039 100.563 325.279C100.503 335.063 100 347.216 100 356.999L100.003 467.089L100 552.998L100.508 665.427C100.508 675.223 100.504 685.019 100.563 694.815C100.613 703.067 100.709 711.317 100.932 719.566C101.418 737.542 102.479 755.675 105.678 773.452C108.923 791.484 114.22 808.269 122.569 824.653C130.777 840.759 141.5 855.495 154.291 868.272C167.082 881.049 181.83 891.757 197.95 899.956C214.362 908.302 231.174 913.595 249.238 916.836C267.027 920.029 285.174 921.088 303.161 921.573C311.42 921.796 319.679 921.891 327.941 921.941C337.748 922.001 347.554 921.997 357.361 921.997L470.006 922H555.217L667.644 921.996C677.432 921.996 687.22 922.001 697.008 921.941C705.253 921.891 713.495 921.796 721.738 921.573C739.698 921.087 757.816 920.027 775.579 916.832C793.597 913.591 810.368 908.3 826.739 899.959C842.831 891.761 857.554 881.051 870.32 868.272C883.086 855.497 893.786 840.763 901.978 824.66C910.316 808.268 915.604 791.475 918.844 773.431C922.034 755.661 923.092 737.535 923.577 719.566C923.8 711.316 923.895 703.066 923.944 694.815C924.005 685.019 924 675.223 924 665.427C924 665.427 923.994 554.983 923.994 552.998V466.999C923.994 465.533 924 354.627 924 354.627Z"
+ fill="white"
+ id="path6" />
+ </mask>
+ <g
+ mask="url(#mask0_102_69)"
+ id="g15">
+ <rect
+ x="42"
+ y="36"
+ width="914"
+ height="914"
+ fill="url(#paint1_linear_102_69)"
+ id="rect9" />
+ <g
+ filter="url(#filter1_b_102_69)"
+ id="g13">
+ <rect
+ x="100"
+ y="98"
+ width="824"
+ height="824"
+ rx="126"
+ fill="black"
+ fill-opacity="0.01"
+ id="rect11" />
+ </g>
+ </g>
+ <defs
+ id="defs74">
+ <filter
+ id="filter0_d_102_69"
+ x="90"
+ y="98"
+ width="844"
+ height="844"
+ filterUnits="userSpaceOnUse"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ flood-opacity="0"
+ result="BackgroundImageFix"
+ id="feFlood31" />
+ <feColorMatrix
+ in="SourceAlpha"
+ type="matrix"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
+ result="hardAlpha"
+ id="feColorMatrix33" />
+ <feOffset
+ dy="10"
+ id="feOffset35" />
+ <feGaussianBlur
+ stdDeviation="5"
+ id="feGaussianBlur37" />
+ <feColorMatrix
+ type="matrix"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"
+ id="feColorMatrix39" />
+ <feBlend
+ mode="normal"
+ in2="BackgroundImageFix"
+ result="effect1_dropShadow_102_69"
+ id="feBlend41" />
+ <feBlend
+ mode="normal"
+ in="SourceGraphic"
+ in2="effect1_dropShadow_102_69"
+ result="shape"
+ id="feBlend43" />
+ </filter>
+ <filter
+ id="filter1_b_102_69"
+ x="89.1269"
+ y="87.1269"
+ width="845.746"
+ height="845.746"
+ filterUnits="userSpaceOnUse"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ flood-opacity="0"
+ result="BackgroundImageFix"
+ id="feFlood46" />
+ <feGaussianBlur
+ in="BackgroundImage"
+ stdDeviation="5.43656"
+ id="feGaussianBlur48" />
+ <feComposite
+ in2="SourceAlpha"
+ operator="in"
+ result="effect1_backgroundBlur_102_69"
+ id="feComposite50" />
+ <feBlend
+ mode="normal"
+ in="SourceGraphic"
+ in2="effect1_backgroundBlur_102_69"
+ result="shape"
+ id="feBlend52" />
+ </filter>
+ <linearGradient
+ id="paint0_linear_102_69"
+ x1="-181.14"
+ y1="98"
+ x2="-181.14"
+ y2="1484.28"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="white"
+ id="stop55" />
+ <stop
+ offset="0.489516"
+ stop-color="#EFEFEF"
+ id="stop57" />
+ <stop
+ offset="1"
+ stop-color="#C0C0C0"
+ id="stop59" />
+ </linearGradient>
+ <linearGradient
+ id="paint1_linear_102_69"
+ x1="928.377"
+ y1="992.826"
+ x2="928.377"
+ y2="134.072"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="#F6F3F3"
+ id="stop62" />
+ <stop
+ offset="1"
+ stop-color="white"
+ id="stop64" />
+ </linearGradient>
+ <linearGradient
+ id="paint2_linear_102_69"
+ x1="394.815"
+ y1="372.239"
+ x2="629.182"
+ y2="542.528"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="#88B858"
+ id="stop67" />
+ <stop
+ offset="0.5"
+ stop-color="#72B147"
+ id="stop69" />
+ <stop
+ offset="1"
+ stop-color="#5A9A30"
+ id="stop71" />
+ </linearGradient>
+ </defs>
+ <g
+ id="g1817"
+ transform="matrix(0.81938386,0,0,0.81938386,-746.9626,25.220302)">
+ <path
+ style="fill:#99cd61;fill-opacity:1;stroke-width:17.3878"
+ d="M 1536.4629,591.62417 Z"
+ id="path7899" />
+ <path
+ id="path3228"
+ style="fill:#df6277;fill-opacity:1;stroke-width:17.3878"
+ d="m 1536.4629,209.09169 -165.6591,286.89936 165.6591,95.63312 165.6262,-95.63312 7.2003,-203.69576 c -75.6493,-43.67547 -153.6998,-83.2036 -172.8265,-83.2036 z" />
+ <path
+ id="path2659"
+ style="fill:#fb9168;fill-opacity:1;stroke-width:17.3878"
+ d="m 1709.2894,292.29529 -172.8265,299.32888 165.6262,95.63312 165.6591,-286.89936 c -9.5633,-16.56418 -82.8113,-64.38717 -158.4588,-108.06264 z" />
+ <path
+ id="path2708"
+ style="fill:#f3db6c;fill-opacity:1;stroke-width:17.3878"
+ d="m 1867.7482,400.35793 -331.2853,191.26624 165.6262,95.63312 179.9919,-95.63312 c 0,-87.35094 -4.7677,-174.70206 -14.3328,-191.26624 z" />
+ <path
+ id="path1737"
+ style="fill:#7ab392;fill-opacity:1;stroke-width:17.3878"
+ d="m 1536.4629,591.62417 v 191.26624 h 331.2853 c 9.5633,-16.56418 14.3328,-103.9153 14.3328,-191.26624 z" />
+ <path
+ id="path2937"
+ style="fill:#4b7cbc;fill-opacity:1;stroke-width:17.3878"
+ d="m 1536.4629,591.62417 v 191.26624 l 172.8265,108.06281 c 75.6475,-43.67547 148.8955,-91.49863 158.4588,-108.06281 z" />
+ <path
+ id="path3117"
+ style="fill:#6f488c;fill-opacity:1;stroke-width:17.3878"
+ d="m 1536.4629,591.62417 -165.6591,95.63312 165.6591,286.89936 c 19.1267,0 97.1772,-39.52795 172.8265,-83.20343 z" />
+ <path
+ id="path2010"
+ style="fill:#4d3f33;fill-opacity:1;stroke-width:17.3878"
+ d="m 1370.8038,495.99105 -165.6262,286.89936 c 19.1267,33.12818 293.0321,191.26624 331.2853,191.26624 V 591.62417 Z" />
+ <path
+ id="path1744"
+ style="fill:#7a573b;fill-opacity:1;stroke-width:17.3878"
+ d="m 1205.1776,400.35793 c -19.1266,33.12818 -19.1266,349.4043 0,382.53248 L 1536.4629,591.62417 V 400.35793 Z" />
+ <path
+ id="path1739"
+ style="fill:#99cd61;fill-opacity:1;stroke-width:17.3878"
+ d="m 1536.4629,209.09169 c -38.2532,0 -312.1586,158.13806 -331.2853,191.26624 l 331.2853,191.26624 z" />
+ <g
+ id="g1657"
+ transform="matrix(57.831674,0,0,57.831674,402.40368,92.688452)">
+ <g
+ id="g7651"
+ transform="translate(13.259961,2.2775894)">
+ <path
+ id="path6659"
+ style="fill:#ffffff;stroke-width:0.264583"
+ d="m 6.3498163,2.9393223 c -0.3410461,0 -2.782726,1.4098777 -2.9532491,1.7052323 L 6.3498163,9.7602513 9.3035983,4.6445546 C 9.1330753,4.3492 6.6908624,2.9393223 6.3498163,2.9393223 Z"
+ transform="matrix(0.96974817,0,0,0.96974817,0.19209885,0.19209792)" />
+ </g>
+ <path
+ id="path461"
+ style="fill:#dfdfdf;fill-opacity:1;stroke-width:0.264583"
+ d="m 16.745875,6.9737355 2.863908,4.9609385 c 0.330729,0 2.69906,-1.367226 2.864424,-1.653646 0.165365,-0.2864204 0.165365,-3.0208729 0,-3.3072925 l -2.864424,1.6536459 z" />
+ </g>
+ <path
+ id="path5065"
+ style="fill:#d6d2d2;fill-opacity:1;stroke-width:17.3878"
+ d="m 1370.8455,495.99122 c -9.5633,16.56436 -9.5651,174.70241 0,191.26624 9.5633,16.56366 146.4995,95.63382 165.6261,95.63312 V 591.62434 Z" />
+ </g>
+</svg>
diff --git a/program_info/org.polymc.PolyMC.desktop.in b/program_info/org.prismlauncher.PrismLauncher.desktop.in
index e6d88909..63a6b586 100644
--- a/program_info/org.polymc.PolyMC.desktop.in
+++ b/program_info/org.prismlauncher.PrismLauncher.desktop.in
@@ -1,12 +1,12 @@
[Desktop Entry]
Version=1.0
-Name=PolyMC
+Name=Prism Launcher
Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
Type=Application
Terminal=false
Exec=@Launcher_APP_BINARY_NAME@
StartupNotify=true
-Icon=org.polymc.PolyMC
+Icon=org.prismlauncher.PrismLauncher
Categories=Game;
Keywords=game;minecraft;launcher;mc;
-StartupWMClass=PolyMC
+StartupWMClass=PrismLauncher
diff --git a/program_info/org.prismlauncher.PrismLauncher.logo-darkmode.svg b/program_info/org.prismlauncher.PrismLauncher.logo-darkmode.svg
new file mode 100644
index 00000000..208d6f08
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.logo-darkmode.svg
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ width="144"
+ height="48"
+ version="1.1"
+ viewBox="0 0 38.1 12.7"
+ id="svg66"
+ sodipodi:docname="org.prismlauncher.PrismLauncher.logo-dark.svg"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <defs
+ id="defs70" />
+ <sodipodi:namedview
+ id="namedview68"
+ pagecolor="#000000"
+ bordercolor="#999999"
+ borderopacity="1"
+ inkscape:showpageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="true"
+ inkscape:deskcolor="#000000"
+ showgrid="false"
+ inkscape:zoom="8.9305556"
+ inkscape:cx="65.001555"
+ inkscape:cy="23.962675"
+ inkscape:window-width="2560"
+ inkscape:window-height="1386"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg66" />
+ <title
+ id="title2">Prism Launcher Logo</title>
+ <g
+ stroke-width=".26458"
+ id="g24">
+ <path
+ d="m6.35 6.35"
+ fill="#99cd61"
+ id="path4" />
+ <path
+ d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z"
+ fill="#df6277"
+ id="path6" />
+ <path
+ d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z"
+ fill="#fb9168"
+ id="path8" />
+ <path
+ d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.07255-2.6584-0.21808-2.9104z"
+ fill="#f3db6c"
+ id="path10" />
+ <path
+ d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104z"
+ fill="#7ab392"
+ id="path12" />
+ <path
+ d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443z"
+ fill="#4b7cbc"
+ id="path14" />
+ <path
+ d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661z"
+ fill="#6f488c"
+ id="path16" />
+ <path
+ d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208z"
+ fill="#4d3f33"
+ id="path18" />
+ <path
+ d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104z"
+ fill="#7a573b"
+ id="path20" />
+ <path
+ d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104z"
+ fill="#99cd61"
+ id="path22" />
+ </g>
+ <g
+ transform="matrix(.88 0 0 .88 -10.906 -1.2421)"
+ id="g32">
+ <g
+ transform="translate(13.26 2.2776)"
+ id="g28">
+ <path
+ transform="matrix(.96975 0 0 .96975 .1921 .1921)"
+ d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z"
+ fill="#fff"
+ stroke-width=".26458"
+ id="path26" />
+ </g>
+ <path
+ d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z"
+ fill="#dfdfdf"
+ stroke-width=".26458"
+ id="path30" />
+ </g>
+ <path
+ d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z"
+ fill="#d6d2d2"
+ stroke-width=".26458"
+ id="path34" />
+ <g
+ fill="#14191e"
+ stroke-width=".26458"
+ aria-label="Prism Launcher"
+ id="g62"
+ style="fill:#ffffff;fill-opacity:1">
+ <path
+ d="m15.669 3.991h-0.44291v-0.8382h0.44291c0.32385 0 0.46196 0.16192 0.46196 0.4191 0 0.25718-0.13811 0.4191-0.46196 0.4191zm1.2906-0.4191c0-0.61436-0.40958-1.0763-1.2287-1.0763h-1.3192v3.3433h0.81439v-1.2001h0.50482c0.85249 0 1.2287-0.51435 1.2287-1.0668z"
+ id="path36"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m18.198 4.6053c0-0.4572 0.22384-0.59055 0.6096-0.59055h0.22384v-0.86201c-0.35719 0-0.6477 0.1905-0.83344 0.47149v-0.44291h-0.81439v2.6575h0.81439z"
+ id="path38"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m19.421 3.1813v2.6575h0.81439v-2.6575zm0.40958-0.27622c0.28575 0 0.48101-0.19526 0.48101-0.43815 0-0.24765-0.19526-0.44291-0.48101-0.44291-0.29051 0-0.48578 0.19526-0.48578 0.44291 0 0.24289 0.19526 0.43815 0.48578 0.43815z"
+ id="path40"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m21.908 5.8769c0.66675 0 1.0763-0.34766 1.0763-0.80962-0.01429-0.9906-1.4526-0.69056-1.4526-1.1144 0-0.12859 0.10478-0.20479 0.29528-0.20479 0.2286 0 0.36671 0.11906 0.39052 0.30004h0.75248c-0.052387-0.52388-0.43339-0.90487-1.1192-0.90487-0.69532 0-1.0811 0.37147-1.0811 0.82391 0 0.97631 1.4478 0.66675 1.4478 1.0954 0 0.11906-0.10954 0.21431-0.31909 0.21431-0.22384 0-0.39052-0.12382-0.40958-0.30956h-0.80486c0.0381 0.51435 0.51435 0.90964 1.224 0.90964z"
+ id="path42"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m27.146 4.3958v1.443h0.80962v-1.5526c0-0.71438-0.42386-1.1335-1.0811-1.1335-0.38576 0-0.71914 0.21431-0.89535 0.4953-0.18098-0.31909-0.50482-0.4953-0.90488-0.4953-0.34766 0-0.61912 0.14764-0.77629 0.36195v-0.33337h-0.81439v2.6575h0.81439v-1.443c0-0.34766 0.20002-0.53816 0.50959-0.53816 0.30956 0 0.50959 0.1905 0.50959 0.53816v1.443h0.80962v-1.443c0-0.34766 0.20002-0.53816 0.50959-0.53816 0.30956 0 0.50959 0.1905 0.50959 0.53816z"
+ id="path44"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m15.226 7.258h-0.81439v3.3433h1.8812v-0.62865h-1.0668z"
+ id="path46"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m16.521 9.2678c0 0.8382 0.51911 1.3716 1.1668 1.3716 0.39529 0 0.67628-0.18098 0.82391-0.41434v0.37624h0.81439v-2.6575h-0.81439v0.37624c-0.14288-0.23336-0.42386-0.41434-0.81915-0.41434-0.65246 0-1.1716 0.52387-1.1716 1.3621zm1.9907 0.00476c0 0.42386-0.27146 0.65722-0.58102 0.65722-0.3048 0-0.58102-0.23812-0.58102-0.66199s0.27622-0.65246 0.58102-0.65246c0.30956 0 0.58102 0.23336 0.58102 0.65722z"
+ id="path48"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m22.541 10.601v-2.6575h-0.81439v1.443c0 0.36195-0.20002 0.56198-0.51435 0.56198-0.3048 0-0.50959-0.20002-0.50959-0.56198v-1.443h-0.80962v1.5526c0 0.70961 0.41434 1.1335 1.0287 1.1335 0.35719 0 0.64294-0.16192 0.80486-0.39052v0.36195z"
+ id="path50"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m24.96 9.1583v1.443h0.80962v-1.5526c0-0.71438-0.40958-1.1335-1.0239-1.1335-0.35719 0-0.64294 0.15716-0.80486 0.381v-0.35242h-0.81439v2.6575h0.81439v-1.443c0-0.36195 0.20002-0.56198 0.50959-0.56198 0.30956 0 0.50959 0.20002 0.50959 0.56198z"
+ id="path52"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m26.175 9.2726c0 0.84296 0.55245 1.3668 1.3335 1.3668 0.66675 0 1.1382-0.38576 1.2764-1.0001h-0.86678c-0.07144 0.19526-0.20002 0.3048-0.42386 0.3048-0.29051 0-0.49054-0.2286-0.49054-0.67151s0.20002-0.67151 0.49054-0.67151c0.22384 0 0.35719 0.11906 0.42386 0.3048h0.86678c-0.13811-0.63341-0.6096-1.0001-1.2764-1.0001-0.78105 0-1.3335 0.52864-1.3335 1.3668z"
+ id="path54"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m29.218 7.0771v3.5243h0.81439v-1.443c0-0.36195 0.20002-0.56198 0.50959-0.56198 0.30956 0 0.50959 0.20002 0.50959 0.56198v1.443h0.80962v-1.5526c0-0.71438-0.40481-1.1335-1.0096-1.1335-0.36671 0-0.65722 0.15716-0.81915 0.38576v-1.224z"
+ id="path56"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m33.599 8.5582c0.27146 0 0.50006 0.16669 0.50006 0.4572h-1.0192c0.04762-0.29528 0.25241-0.4572 0.51911-0.4572zm1.2716 1.162h-0.86678c-0.06667 0.14288-0.19526 0.25718-0.42386 0.25718-0.26194 0-0.47625-0.16192-0.50482-0.50959h1.8431c0.0095-0.080963 0.01429-0.16192 0.01429-0.23812 0-0.80962-0.54769-1.324-1.324-1.324-0.79058 0-1.343 0.52387-1.343 1.3668 0 0.84296 0.56198 1.3668 1.343 1.3668 0.66199 0 1.1335-0.40005 1.2621-0.91916z"
+ id="path58"
+ style="fill:#ffffff;fill-opacity:1" />
+ <path
+ d="m36.176 9.3678c0-0.4572 0.22384-0.59055 0.6096-0.59055h0.22384v-0.86201c-0.35719 0-0.6477 0.1905-0.83344 0.47149v-0.44291h-0.81439v2.6575h0.81439z"
+ id="path60"
+ style="fill:#ffffff;fill-opacity:1" />
+ </g>
+ <metadata
+ id="metadata64">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Notice" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Attribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/org.prismlauncher.PrismLauncher.logo.source.svg b/program_info/org.prismlauncher.PrismLauncher.logo.source.svg
new file mode 100644
index 00000000..56db4258
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.logo.source.svg
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ width="144"
+ height="48"
+ viewBox="0 0 38.1 12.7"
+ version="1.1"
+ id="svg3606"
+ sodipodi:docname="org.prismlauncher.PrismLauncher.logo.source.svg"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <title
+ id="title261">Prism Launcher Logo</title>
+ <sodipodi:namedview
+ id="namedview3608"
+ pagecolor="#ffffff"
+ bordercolor="#000000"
+ borderopacity="0.25"
+ inkscape:showpageshadow="2"
+ inkscape:pageopacity="0.0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ inkscape:document-units="px"
+ showgrid="false"
+ showguides="true"
+ inkscape:zoom="5.6568543"
+ inkscape:cx="87.327687"
+ inkscape:cy="22.98097"
+ inkscape:window-width="2560"
+ inkscape:window-height="1386"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="layer1">
+ <sodipodi:guide
+ position="0.52916688,12.170833"
+ orientation="1,0"
+ id="guide4870"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="12.170833,12.170833"
+ orientation="0,-1"
+ id="guide4872"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="12.170833,0.5291669"
+ orientation="1,0"
+ id="guide4874"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="0.52916688,0.5291666"
+ orientation="0,-1"
+ id="guide4876"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,12.170833"
+ orientation="1,0"
+ id="guide6491"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,6.3499993"
+ orientation="-0.49999657,-0.86602738"
+ id="guide9375"
+ inkscape:locked="false" />
+ <sodipodi:guide
+ position="6.3500002,6.3499993"
+ orientation="-0.49999666,0.86602733"
+ id="guide9377"
+ inkscape:locked="false" />
+ </sodipodi:namedview>
+ <defs
+ id="defs3603" />
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <g
+ id="g531"
+ transform="matrix(0.1353646,0,0,0.1353646,15.301582,0.52916663)" />
+ <g
+ id="g397">
+ <path
+ style="fill:#99cd61;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.3500002,6.350001 Z"
+ id="path7899" />
+ <path
+ id="path3228"
+ style="fill:#df6277;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35,0.52916667 3.8292236,4.8947917 6.35,6.35 8.8702596,4.8947917 8.9798136,1.7952393 C 7.828708,1.1306481 6.6410414,0.52916667 6.35,0.52916667 Z" />
+ <path
+ id="path2659"
+ style="fill:#fb9168;fill-opacity:1;stroke-width:0.264583"
+ d="M 8.9798136,1.7952393 6.35,6.35 8.8702596,7.8052083 11.391036,3.4395833 C 11.245515,3.1875341 10.130919,2.4598305 8.9798136,1.7952393 Z" />
+ <path
+ id="path2708"
+ style="fill:#f3db6c;fill-opacity:1;stroke-width:0.264583"
+ d="M 11.391036,3.4395833 6.35,6.35 8.8702596,7.8052083 11.609111,6.35 c 0,-1.3291823 -0.07255,-2.6583674 -0.218075,-2.9104167 z" />
+ <path
+ id="path1737"
+ style="fill:#7ab392;fill-opacity:1;stroke-width:0.264583"
+ d="m 6.35,6.35 v 2.9104167 h 5.041036 C 11.536557,9.0083674 11.60911,7.6791823 11.609111,6.35 Z" />
+ <path
+ id="path2937"
+ style="fill:#4b7cbc;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35,6.35 V 9.2604167 L 8.9798136,10.904761 C 10.130919,10.24017 11.245515,9.5124659 11.391036,9.2604167 Z" />
+ <path
+ id="path3117"
+ style="fill:#6f488c;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35,6.35 3.8292236,7.8052083 6.35,12.170833 c 0.2910414,0 1.4787079,-0.601481 2.6298136,-1.266072 z" />
+ <path
+ id="path2010"
+ style="fill:#4d3f33;fill-opacity:1;stroke-width:0.264583"
+ d="M 3.8292236,4.8947917 1.308964,9.2604167 C 1.6000054,9.7645152 5.7679172,12.170833 6.35,12.170833 V 6.35 Z" />
+ <path
+ id="path1744"
+ style="fill:#7a573b;fill-opacity:1;stroke-width:0.264583"
+ d="m 1.308964,3.4395833 c -0.2910414,0.5040985 -0.2910413,5.3167349 0,5.8208334 L 6.35,6.35 V 3.4395833 Z" />
+ <path
+ id="path1739"
+ style="fill:#99cd61;fill-opacity:1;stroke-width:0.264583"
+ d="M 6.35,0.52916667 C 5.7679172,0.52916665 1.6000054,2.9354849 1.308964,3.4395833 L 6.35,6.35 Z" />
+ <g
+ id="g379">
+ <g
+ id="g1657"
+ transform="matrix(0.87999988,0,0,0.87999988,-10.906495,-1.242093)">
+ <g
+ id="g7651"
+ transform="translate(13.259961,2.2775894)">
+ <path
+ id="path6659"
+ style="fill:#ffffff;stroke-width:0.264583"
+ d="m 6.3498163,2.9393223 c -0.3410461,0 -2.782726,1.4098777 -2.9532491,1.7052323 L 6.3498163,9.7602513 9.3035983,4.6445546 C 9.1330753,4.3492 6.6908624,2.9393223 6.3498163,2.9393223 Z"
+ transform="matrix(0.96974817,0,0,0.96974817,0.19209885,0.19209792)" />
+ </g>
+ <path
+ id="path461"
+ style="fill:#dfdfdf;fill-opacity:1;stroke-width:0.264583"
+ d="m 16.745875,6.9737355 2.863908,4.9609385 c 0.330729,0 2.69906,-1.367226 2.864424,-1.653646 0.165365,-0.2864204 0.165365,-3.0208729 0,-3.3072925 l -2.864424,1.6536459 z" />
+ </g>
+ <path
+ id="path5065"
+ style="fill:#d6d2d2;fill-opacity:1;stroke-width:0.264583"
+ d="m 3.8298625,4.8947933 c -0.1455111,0.2520549 -0.1455304,2.6583729 0,2.9104166 0.1455304,0.2520438 2.2292181,1.4552195 2.5202596,1.4552084 V 6.3500016 Z" />
+ </g>
+ </g>
+ <g
+ aria-label="Prism
+Launcher"
+ id="text637"
+ style="font-weight:bold;font-size:4.7625px;line-height:1;font-family:poppins;-inkscape-font-specification:'poppins Bold';stroke-width:0.264583">
+ <path
+ d="M 15.668625,3.9909748 H 15.225712 V 3.1527749 h 0.442913 c 0.32385,0 0.461962,0.161925 0.461962,0.4190999 0,0.257175 -0.138112,0.4191 -0.461962,0.4191 z m 1.290637,-0.4191 c 0,-0.6143624 -0.409575,-1.0763249 -1.228725,-1.0763249 h -1.319212 v 3.3432748 h 0.814387 V 4.6386748 h 0.504825 c 0.852488,0 1.228725,-0.51435 1.228725,-1.0668 z"
+ style="fill:#14191e"
+ id="path419" />
+ <path
+ d="m 18.197515,4.6053373 c 0,-0.4572 0.223837,-0.59055 0.6096,-0.59055 h 0.223837 V 3.1527749 c -0.357187,0 -0.6477,0.1904999 -0.833437,0.4714874 V 3.1813499 h -0.814388 v 2.6574748 h 0.814388 z"
+ style="fill:#14191e"
+ id="path421" />
+ <path
+ d="m 19.421475,3.1813499 v 2.6574748 h 0.814387 V 3.1813499 Z m 0.409575,-0.276225 c 0.28575,0 0.481012,-0.1952625 0.481012,-0.43815 0,-0.24765 -0.195262,-0.4429125 -0.481012,-0.4429125 -0.290513,0 -0.485775,0.1952625 -0.485775,0.4429125 0,0.2428875 0.195262,0.43815 0.485775,0.43815 z"
+ style="fill:#14191e"
+ id="path423" />
+ <path
+ d="m 21.9075,5.8769247 c 0.66675,0 1.076325,-0.3476624 1.076325,-0.8096249 -0.01429,-0.9906 -1.452563,-0.6905625 -1.452563,-1.114425 0,-0.1285875 0.104775,-0.2047875 0.295275,-0.2047875 0.2286,0 0.366713,0.1190625 0.390525,0.3000375 h 0.752475 C 22.91715,3.5242498 22.53615,3.1432499 21.85035,3.1432499 c -0.695325,0 -1.081088,0.3714749 -1.081088,0.8239124 0,0.9763125 1.4478,0.66675 1.4478,1.095375 0,0.1190625 -0.109537,0.2143125 -0.319087,0.2143125 -0.223838,0 -0.390525,-0.123825 -0.409575,-0.3095625 h -0.804863 c 0.0381,0.51435 0.51435,0.9096374 1.223963,0.9096374 z"
+ style="fill:#14191e"
+ id="path425" />
+ <path
+ d="m 27.146252,4.3957873 v 1.4430374 h 0.809625 V 4.2862498 c 0,-0.714375 -0.423862,-1.1334749 -1.081087,-1.1334749 -0.385763,0 -0.719138,0.2143124 -0.89535,0.4952999 -0.180975,-0.3190875 -0.504825,-0.4952999 -0.904875,-0.4952999 -0.347663,0 -0.619125,0.1476375 -0.776288,0.3619499 V 3.1813499 H 23.48389 v 2.6574748 h 0.814387 V 4.3957873 c 0,-0.3476625 0.200025,-0.5381625 0.509588,-0.5381625 0.309562,0 0.509587,0.1905 0.509587,0.5381625 v 1.4430374 h 0.809625 V 4.3957873 c 0,-0.3476625 0.200025,-0.5381625 0.509588,-0.5381625 0.309562,0 0.509587,0.1905 0.509587,0.5381625 z"
+ style="fill:#14191e"
+ id="path427" />
+ <path
+ d="m 15.225712,7.2580497 h -0.814387 v 3.3432753 h 1.881187 V 9.9726746 h -1.0668 z"
+ style="fill:#14191e"
+ id="path429" />
+ <path
+ d="m 16.521109,9.2678246 c 0,0.8382004 0.519112,1.3716004 1.166812,1.3716004 0.395288,0 0.676275,-0.180975 0.823913,-0.414338 v 0.376238 h 0.814387 V 7.9438497 h -0.814387 v 0.3762374 c -0.142875,-0.2333624 -0.423863,-0.4143374 -0.81915,-0.4143374 -0.652463,0 -1.171575,0.5238749 -1.171575,1.3620749 z m 1.990725,0.00476 c 0,0.4238625 -0.271463,0.657225 -0.581025,0.657225 -0.3048,0 -0.581025,-0.238125 -0.581025,-0.6619875 0,-0.4238625 0.276225,-0.6524625 0.581025,-0.6524625 0.309562,0 0.581025,0.2333625 0.581025,0.657225 z"
+ style="fill:#14191e"
+ id="path431" />
+ <path
+ d="M 22.540912,10.601325 V 7.9438497 h -0.814387 v 1.4430374 c 0,0.36195 -0.200025,0.561975 -0.51435,0.561975 -0.3048,0 -0.509588,-0.200025 -0.509588,-0.561975 V 7.9438497 h -0.809624 v 1.5525749 c 0,0.7096124 0.414337,1.1334754 1.028699,1.1334754 0.357188,0 0.642938,-0.161925 0.804863,-0.390525 v 0.36195 z"
+ style="fill:#14191e"
+ id="path433" />
+ <path
+ d="m 24.960261,9.1582871 v 1.4430379 h 0.809625 V 9.0487496 c 0,-0.714375 -0.409575,-1.1334749 -1.023937,-1.1334749 -0.357188,0 -0.642938,0.1571625 -0.804863,0.381 v -0.352425 h -0.814387 v 2.6574753 h 0.814387 V 9.1582871 c 0,-0.36195 0.200025,-0.561975 0.509588,-0.561975 0.309562,0 0.509587,0.200025 0.509587,0.561975 z"
+ style="fill:#14191e"
+ id="path435" />
+ <path
+ d="m 26.174697,9.2725871 c 0,0.8429629 0.55245,1.3668379 1.3335,1.3668379 0.66675,0 1.138238,-0.385763 1.27635,-1.0001254 h -0.866775 c -0.07144,0.1952625 -0.200025,0.3048 -0.423862,0.3048 -0.290513,0 -0.490538,-0.2286 -0.490538,-0.6715125 0,-0.4429125 0.200025,-0.6715125 0.490538,-0.6715125 0.223837,0 0.357187,0.1190625 0.423862,0.3048 h 0.866775 c -0.138112,-0.6334124 -0.6096,-1.0001249 -1.27635,-1.0001249 -0.78105,0 -1.3335,0.5286374 -1.3335,1.3668374 z"
+ style="fill:#14191e"
+ id="path437" />
+ <path
+ d="M 29.217933,7.0770747 V 10.601325 H 30.03232 V 9.1582871 c 0,-0.36195 0.200025,-0.561975 0.509588,-0.561975 0.309562,0 0.509587,0.200025 0.509587,0.561975 V 10.601325 H 31.86112 V 9.0487496 c 0,-0.714375 -0.404812,-1.1334749 -1.00965,-1.1334749 -0.366712,0 -0.657225,0.1571625 -0.81915,0.3857625 V 7.0770747 Z"
+ style="fill:#14191e"
+ id="path439" />
+ <path
+ d="m 33.599433,8.5582121 c 0.271462,0 0.500062,0.1666875 0.500062,0.4572 H 33.08032 c 0.04762,-0.295275 0.252413,-0.4572 0.519113,-0.4572 z m 1.271587,1.16205 h -0.866775 c -0.06667,0.142875 -0.195262,0.257175 -0.423862,0.257175 -0.261938,0 -0.47625,-0.161925 -0.504825,-0.5095875 h 1.843087 c 0.0095,-0.080963 0.01429,-0.161925 0.01429,-0.238125 0,-0.809625 -0.547688,-1.3239749 -1.323975,-1.3239749 -0.790575,0 -1.343025,0.5238749 -1.343025,1.3668374 0,0.8429629 0.561975,1.3668379 1.343025,1.3668379 0.661987,0 1.133475,-0.40005 1.262062,-0.9191629 z"
+ style="fill:#14191e"
+ id="path441" />
+ <path
+ d="m 36.17594,9.3678371 c 0,-0.4572 0.223837,-0.59055 0.6096,-0.59055 h 0.223837 V 7.9152747 c -0.357187,0 -0.6477,0.1905 -0.833437,0.4714874 V 7.9438497 h -0.814388 v 2.6574753 h 0.814388 z"
+ style="fill:#14191e"
+ id="path443" />
+ </g>
+ </g>
+ <metadata
+ id="metadata259">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Notice" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#Attribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://creativecommons.org/ns#ShareAlike" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/org.prismlauncher.PrismLauncher.logo.svg b/program_info/org.prismlauncher.PrismLauncher.logo.svg
new file mode 100644
index 00000000..efaf3931
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.logo.svg
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg width="144" height="48" version="1.1" viewBox="0 0 38.1 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.07255-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104z" fill="#99cd61"/>
+ </g>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <g fill="#14191e" stroke-width=".26458" aria-label="Prism Launcher">
+ <path d="m15.669 3.991h-0.44291v-0.8382h0.44291c0.32385 0 0.46196 0.16192 0.46196 0.4191 0 0.25718-0.13811 0.4191-0.46196 0.4191zm1.2906-0.4191c0-0.61436-0.40958-1.0763-1.2287-1.0763h-1.3192v3.3433h0.81439v-1.2001h0.50482c0.85249 0 1.2287-0.51435 1.2287-1.0668z"/>
+ <path d="m18.198 4.6053c0-0.4572 0.22384-0.59055 0.6096-0.59055h0.22384v-0.86201c-0.35719 0-0.6477 0.1905-0.83344 0.47149v-0.44291h-0.81439v2.6575h0.81439z"/>
+ <path d="m19.421 3.1813v2.6575h0.81439v-2.6575zm0.40958-0.27622c0.28575 0 0.48101-0.19526 0.48101-0.43815 0-0.24765-0.19526-0.44291-0.48101-0.44291-0.29051 0-0.48578 0.19526-0.48578 0.44291 0 0.24289 0.19526 0.43815 0.48578 0.43815z"/>
+ <path d="m21.908 5.8769c0.66675 0 1.0763-0.34766 1.0763-0.80962-0.01429-0.9906-1.4526-0.69056-1.4526-1.1144 0-0.12859 0.10478-0.20479 0.29528-0.20479 0.2286 0 0.36671 0.11906 0.39052 0.30004h0.75248c-0.052387-0.52388-0.43339-0.90487-1.1192-0.90487-0.69532 0-1.0811 0.37147-1.0811 0.82391 0 0.97631 1.4478 0.66675 1.4478 1.0954 0 0.11906-0.10954 0.21431-0.31909 0.21431-0.22384 0-0.39052-0.12382-0.40958-0.30956h-0.80486c0.0381 0.51435 0.51435 0.90964 1.224 0.90964z"/>
+ <path d="m27.146 4.3958v1.443h0.80962v-1.5526c0-0.71438-0.42386-1.1335-1.0811-1.1335-0.38576 0-0.71914 0.21431-0.89535 0.4953-0.18098-0.31909-0.50482-0.4953-0.90488-0.4953-0.34766 0-0.61912 0.14764-0.77629 0.36195v-0.33337h-0.81439v2.6575h0.81439v-1.443c0-0.34766 0.20002-0.53816 0.50959-0.53816 0.30956 0 0.50959 0.1905 0.50959 0.53816v1.443h0.80962v-1.443c0-0.34766 0.20002-0.53816 0.50959-0.53816 0.30956 0 0.50959 0.1905 0.50959 0.53816z"/>
+ <path d="m15.226 7.258h-0.81439v3.3433h1.8812v-0.62865h-1.0668z"/>
+ <path d="m16.521 9.2678c0 0.8382 0.51911 1.3716 1.1668 1.3716 0.39529 0 0.67628-0.18098 0.82391-0.41434v0.37624h0.81439v-2.6575h-0.81439v0.37624c-0.14288-0.23336-0.42386-0.41434-0.81915-0.41434-0.65246 0-1.1716 0.52387-1.1716 1.3621zm1.9907 0.00476c0 0.42386-0.27146 0.65722-0.58102 0.65722-0.3048 0-0.58102-0.23812-0.58102-0.66199s0.27622-0.65246 0.58102-0.65246c0.30956 0 0.58102 0.23336 0.58102 0.65722z"/>
+ <path d="m22.541 10.601v-2.6575h-0.81439v1.443c0 0.36195-0.20002 0.56198-0.51435 0.56198-0.3048 0-0.50959-0.20002-0.50959-0.56198v-1.443h-0.80962v1.5526c0 0.70961 0.41434 1.1335 1.0287 1.1335 0.35719 0 0.64294-0.16192 0.80486-0.39052v0.36195z"/>
+ <path d="m24.96 9.1583v1.443h0.80962v-1.5526c0-0.71438-0.40958-1.1335-1.0239-1.1335-0.35719 0-0.64294 0.15716-0.80486 0.381v-0.35242h-0.81439v2.6575h0.81439v-1.443c0-0.36195 0.20002-0.56198 0.50959-0.56198 0.30956 0 0.50959 0.20002 0.50959 0.56198z"/>
+ <path d="m26.175 9.2726c0 0.84296 0.55245 1.3668 1.3335 1.3668 0.66675 0 1.1382-0.38576 1.2764-1.0001h-0.86678c-0.07144 0.19526-0.20002 0.3048-0.42386 0.3048-0.29051 0-0.49054-0.2286-0.49054-0.67151s0.20002-0.67151 0.49054-0.67151c0.22384 0 0.35719 0.11906 0.42386 0.3048h0.86678c-0.13811-0.63341-0.6096-1.0001-1.2764-1.0001-0.78105 0-1.3335 0.52864-1.3335 1.3668z"/>
+ <path d="m29.218 7.0771v3.5243h0.81439v-1.443c0-0.36195 0.20002-0.56198 0.50959-0.56198 0.30956 0 0.50959 0.20002 0.50959 0.56198v1.443h0.80962v-1.5526c0-0.71438-0.40481-1.1335-1.0096-1.1335-0.36671 0-0.65722 0.15716-0.81915 0.38576v-1.224z"/>
+ <path d="m33.599 8.5582c0.27146 0 0.50006 0.16669 0.50006 0.4572h-1.0192c0.04762-0.29528 0.25241-0.4572 0.51911-0.4572zm1.2716 1.162h-0.86678c-0.06667 0.14288-0.19526 0.25718-0.42386 0.25718-0.26194 0-0.47625-0.16192-0.50482-0.50959h1.8431c0.0095-0.080963 0.01429-0.16192 0.01429-0.23812 0-0.80962-0.54769-1.324-1.324-1.324-0.79058 0-1.343 0.52387-1.343 1.3668 0 0.84296 0.56198 1.3668 1.343 1.3668 0.66199 0 1.1335-0.40005 1.2621-0.91916z"/>
+ <path d="m36.176 9.3678c0-0.4572 0.22384-0.59055 0.6096-0.59055h0.22384v-0.86201c-0.35719 0-0.6477 0.1905-0.83344 0.47149v-0.44291h-0.81439v2.6575h0.81439z"/>
+ </g>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Notice"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Attribution"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/org.polymc.PolyMC.metainfo.xml.in b/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in
index ef5a7d93..2e10f7be 100644
--- a/program_info/org.polymc.PolyMC.metainfo.xml.in
+++ b/program_info/org.prismlauncher.PrismLauncher.metainfo.xml.in
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
- <id>org.polymc.PolyMC</id>
+ <id>org.prismlauncher.PrismLauncher</id>
<provides>
- <id>org.polymc.PolyMC</id>
+ <id>org.prismlauncher.PrismLauncher</id>
</provides>
- <launchable type="desktop-id">org.polymc.PolyMC.desktop</launchable>
- <name>PolyMC</name>
- <developer_name>PolyMC</developer_name>
+ <launchable type="desktop-id">org.prismlauncher.PrismLauncher.desktop</launchable>
+ <name>PrismLauncher</name>
+ <developer_name>PrismLauncher</developer_name>
<summary>A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
- <url type="homepage">https://polymc.org/</url>
- <url type="help">https://polymc.org/wiki/</url>
+ <url type="homepage">https://prismlauncher.org/</url>
+ <url type="help">https://prismlauncher.org/wiki/</url>
<description>
- <p>PolyMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.</p>
+ <p>PrismLauncher is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.</p>
<p>Features:</p>
<ul>
<li>Easily install game modifications, such as Fabric, Forge and Quilt</li>
@@ -27,28 +27,28 @@
</description>
<screenshots>
<screenshot type="default">
- <caption>The main PolyMC window</caption>
- <image type="source" width="976" height="764">https://polymc.org/img/screenshots/LauncherDark.png</image>
+ <caption>The main PrismLauncher window</caption>
+ <image type="source" width="976" height="764">https://prismlauncher.org/img/screenshots/LauncherDark.png</image>
</screenshot>
<screenshot>
<caption>Modpack installation</caption>
- <image type="source" width="1103" height="954">https://polymc.org/img/screenshots/ModpackInstallDark.png</image>
+ <image type="source" width="1103" height="954">https://prismlauncher.org/img/screenshots/ModpackInstallDark.png</image>
</screenshot>
<screenshot>
<caption>Mod installation</caption>
- <image type="source" width="1000" height="692">https://polymc.org/img/screenshots/ModInstallDark.png</image>
+ <image type="source" width="1000" height="692">https://prismlauncher.org/img/screenshots/ModInstallDark.png</image>
</screenshot>
<screenshot>
<caption>Mod updating</caption>
- <image type="source" width="930" height="858">https://polymc.org/img/screenshots/ModUpdateDark.png</image>
+ <image type="source" width="930" height="858">https://prismlauncher.org/img/screenshots/ModUpdateDark.png</image>
</screenshot>
<screenshot>
<caption>Instance management</caption>
- <image type="source" width="1083" height="735">https://polymc.org/img/screenshots/PropertiesDark.png</image>
+ <image type="source" width="1083" height="735">https://prismlauncher.org/img/screenshots/PropertiesDark.png</image>
</screenshot>
<screenshot>
<caption>Cat :)</caption>
- <image type="source" width="931" height="759">https://polymc.org/img/screenshots/LauncherCatDark.png</image>
+ <image type="source" width="931" height="759">https://prismlauncher.org/img/screenshots/LauncherCatDark.png</image>
</screenshot>
</screenshots>
<releases>
diff --git a/program_info/org.prismlauncher.PrismLauncher.svg b/program_info/org.prismlauncher.PrismLauncher.svg
new file mode 100644
index 00000000..aeee8433
--- /dev/null
+++ b/program_info/org.prismlauncher.PrismLauncher.svg
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg width="48" height="48" version="1.1" viewBox="0 0 12.7 12.7" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <title>Prism Launcher Logo</title>
+ <g stroke-width=".26458">
+ <path d="m6.35 6.35" fill="#99cd61"/>
+ <path d="m6.35 0.52917-2.5208 4.3656 2.5208 1.4552 2.5203-1.4552 0.10955-3.0996c-1.1511-0.66459-2.3388-1.2661-2.6298-1.2661z" fill="#df6277"/>
+ <path d="m8.9798 1.7952-2.6298 4.5548 2.5203 1.4552 2.5208-4.3656c-0.14552-0.25205-1.2601-0.97975-2.4112-1.6443z" fill="#fb9168"/>
+ <path d="m11.391 3.4396-5.041 2.9104 2.5203 1.4552 2.7389-1.4552c0-1.3292-0.072554-2.6584-0.21808-2.9104z" fill="#f3db6c"/>
+ <path d="m6.35 6.35v2.9104h5.041c0.14552-0.25205 0.21807-1.5812 0.21808-2.9104h-5.2591z" fill="#7ab392"/>
+ <path d="m6.35 6.35v2.9104l2.6298 1.6443c1.1511-0.66459 2.2657-1.3923 2.4112-1.6443l-5.041-2.9104z" fill="#4b7cbc"/>
+ <path d="m6.35 6.35-2.5208 1.4552 2.5208 4.3656c0.29104 0 1.4787-0.60148 2.6298-1.2661l-2.6298-4.5548z" fill="#6f488c"/>
+ <path d="m3.8292 4.8948-2.5203 4.3656c0.29104 0.5041 4.459 2.9104 5.041 2.9104v-5.8208l-2.5208-1.4552z" fill="#4d3f33"/>
+ <path d="m1.309 3.4396c-0.29104 0.5041-0.29104 5.3167 0 5.8208l5.041-2.9104v-2.9104h-5.041z" fill="#7a573b"/>
+ <path d="m6.35 0.52917c-0.58208-2e-8 -4.75 2.4063-5.041 2.9104l5.041 2.9104v-5.8208z" fill="#99cd61"/>
+ </g>
+ <g transform="matrix(.88 0 0 .88 -10.906 -1.2421)">
+ <g transform="translate(13.26 2.2776)">
+ <path transform="matrix(.96975 0 0 .96975 .1921 .1921)" d="m6.3498 2.9393c-0.34105 0-2.7827 1.4099-2.9532 1.7052l2.9532 5.1157 2.9538-5.1157c-0.17052-0.29535-2.6127-1.7052-2.9538-1.7052z" fill="#fff" stroke-width=".26458"/>
+ </g>
+ <path d="m16.746 6.9737 2.8639 4.9609c0.33073 0 2.6991-1.3672 2.8644-1.6536 0.16536-0.28642 0.16536-3.0209 0-3.3073l-2.8644 1.6536z" fill="#dfdfdf" stroke-width=".26458"/>
+ </g>
+ <path d="m3.8299 4.8948c-0.14551 0.25205-0.14553 2.6584 0 2.9104 0.14553 0.25204 2.2292 1.4552 2.5203 1.4552v-2.9104z" fill="#d6d2d2" stroke-width=".26458"/>
+ <metadata>
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:title>Prism Launcher Logo</dc:title>
+ <dc:date>19/10/2022</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>AutiOne, Boba, ely, Fulmine, gon sawa, Pankakes, tobimori, Zeke</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:source>https://github.com/PrismLauncher/PrismLauncher</dc:source>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>Prism Launcher</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/"/>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#Distribution"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Notice"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#Attribution"/>
+ <cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks"/>
+ <cc:requires rdf:resource="http://creativecommons.org/ns#ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+</svg>
diff --git a/program_info/polymc-header-black.svg b/program_info/polymc-header-black.svg
deleted file mode 100644
index e9e7c3e2..00000000
--- a/program_info/polymc-header-black.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg viewBox="0 0 376.77 135.47" xmlns="http://www.w3.org/2000/svg" class="home">
- <defs>
- <linearGradient id="a" x1="4.498" x2="12.435" y1="3.801" y2="9.568" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <path d="M42.375 118.668s0-24.797 34.094-24.797c34.103 0 34.094 24.797 34.094 24.797z" fill="#765338"/>
- <path d="M76.47 93.872 42.376 118.67 21.304 53.751z" fill="#b7835a"/>
- <path d="m76.47 93.872 55.165-40.121-21.072 64.918z" fill="#5b422d"/>
- <path d="m79 95.709-2.53 1.84-2.532-1.84c0-1.84 2.531-1.84 2.531-1.84s2.531 0 2.531 1.84z" fill="#72b147"/>
- <path d="M76.47 93.872s0-40.121 55.165-40.121l-1.564 4.819-6.384 8.324-6.384.962-6.383 8.324-6.384.961-6.384 8.325-6.384.961-6.384 8.324-6.383.962z" fill="#5a9a30"/>
- <path d="m73.938 95.709-6.383-.961-6.384-8.325-6.384-.961-6.384-8.324-6.384-.962-6.383-8.324-6.384-.962-6.384-8.324-1.564-4.819c55.165 0 55.165 40.121 55.165 40.121z" fill="#88b858"/>
- <path d="m.53 6.685 7.937 5.766 7.937-5.766L8.467.918z" fill="url(#a)" transform="matrix(6.95 0 0 6.9572 17.626 7.241)"/>
- <path d="m22.868 58.567-1.564-4.82L76.469 93.87l55.166-40.122-1.564 4.82L76.47 97.55z" fill="none"/>
- <g fill="#000" stroke-width=".265" aria-label="PolyMC">
- <g stroke-width=".01" aria-label="PolyMC">
- <path d="M168.153 47.323q5.434 0 9.287 1.858 3.852 1.788 5.916 5.228 2.133 3.44 2.133 8.324 0 2.958-.895 5.847-.894 2.82-2.889 5.16-1.926 2.27-5.09 3.646t-7.705 1.375h-7.361v18.3h-6.673V47.322zm.688 25.041q2.958 0 4.884-.963 1.927-.963 3.027-2.408 1.1-1.513 1.582-3.164.482-1.651.482-2.958 0-1.514-.482-3.096-.481-1.651-1.65-2.958-1.101-1.376-2.959-2.202-1.788-.894-4.471-.894h-7.705v18.643zM187.49 82.6q0-4.265 1.994-7.705 2.064-3.44 5.641-5.434 3.577-1.995 8.118-1.995 4.678 0 8.186 1.995 3.509 1.995 5.435 5.434 1.926 3.44 1.926 7.705t-1.926 7.773q-1.926 3.44-5.503 5.435-3.509 1.995-8.187 1.995-4.54 0-8.118-1.857-3.508-1.927-5.572-5.298-1.995-3.44-1.995-8.048zm6.397.07q0 2.751 1.238 5.021 1.238 2.202 3.302 3.509 2.133 1.307 4.678 1.307 2.683 0 4.747-1.307 2.133-1.307 3.302-3.509 1.17-2.27 1.17-5.022 0-2.752-1.17-4.953-1.17-2.27-3.302-3.577-2.064-1.376-4.747-1.376-2.614 0-4.747 1.376-2.063 1.376-3.302 3.646-1.17 2.201-1.17 4.884zM223.251 43.858h6.398v53.246h-6.398zM238.914 110.808l18.78-42.17h5.917l-18.368 42.17zm7.017-13.484-13.69-28.687h7.223l11.489 25.453zM266.775 97.085V51.2h.063l23.855 33.774-3.043-.67L311.384 51.2h.122v45.885h-7.06v-29.88l.487 3.59-16.065 22.7h-.122l-16.31-22.7 1.218-3.286v29.576zM352.299 93.62q-.974.67-2.921 1.643-1.887.973-4.564 1.704-2.617.67-5.843.608-5.172-.062-9.31-1.825-4.138-1.826-6.999-4.869-2.86-3.104-4.442-7.06-1.522-4.016-1.522-8.52 0-5.05 1.583-9.25t4.503-7.241q2.921-3.104 6.938-4.808 4.016-1.704 8.763-1.704 4.199 0 7.485 1.156 3.347 1.096 5.598 2.496l-2.799 6.633q-1.704-1.156-4.26-2.313-2.556-1.156-5.781-1.156-2.921 0-5.599 1.217-2.678 1.156-4.686 3.347-2.008 2.13-3.225 4.99-1.156 2.86-1.156 6.208 0 3.468 1.034 6.39 1.096 2.92 3.043 5.05 2.008 2.07 4.747 3.287 2.799 1.156 6.268 1.156 3.408 0 5.964-1.035 2.616-1.095 4.199-2.434z"/>
- </g>
- </g>
-</svg>
diff --git a/program_info/polymc-header.Source.svg b/program_info/polymc-header.Source.svg
deleted file mode 100644
index c960f33b..00000000
--- a/program_info/polymc-header.Source.svg
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- width="1424"
- height="512"
- version="1.1"
- viewBox="0 0 376.77 135.47"
- id="svg866"
- sodipodi:docname="PolyMC-Header.Source.svg"
- inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:svg="http://www.w3.org/2000/svg">
- <sodipodi:namedview
- id="namedview868"
- pagecolor="#343434"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0"
- inkscape:pagecheckerboard="0"
- showgrid="false"
- inkscape:zoom="0.61938202"
- inkscape:cx="534.40363"
- inkscape:cy="299.49206"
- inkscape:window-width="2560"
- inkscape:window-height="1382"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg866" />
- <defs
- id="defs831">
- <linearGradient
- id="linearGradient84726"
- x1="4.4979"
- x2="12.435"
- y1="3.8011"
- y2="9.5681"
- gradientUnits="userSpaceOnUse">
- <stop
- stop-color="#88b858"
- offset="0"
- id="stop824" />
- <stop
- stop-color="#72b147"
- offset=".5"
- id="stop826" />
- <stop
- stop-color="#5a9a30"
- offset="1"
- id="stop828" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient84726"
- id="linearGradient1147"
- gradientUnits="userSpaceOnUse"
- x1="4.4979"
- y1="3.8011"
- x2="12.435"
- y2="9.5681" />
- </defs>
- <g
- id="g1157">
- <g
- transform="matrix(6.95,0,0,6.9572,17.626477,7.241195)"
- id="g1322">
- <g
- id="g1318">
- <path
- d="m 3.561,16.016 c 0,0 0,-3.5642 4.9056,-3.5642 4.9069,0 4.9056,3.5642 4.9056,3.5642 z"
- fill="#765338"
- id="path1304" />
- <path
- d="M 8.4667,12.452 3.5611,16.0162 0.5292,6.6851 Z"
- fill="#b7835a"
- id="path1306" />
- <path
- d="m 8.4667,12.452 7.9375,-5.7669 -3.0319,9.3311 z"
- fill="#5b422d"
- id="path1308" />
- <path
- d="M 8.8308,12.716 8.46663,12.98058 8.10246,12.716 c 0,-0.26458 0.36417,-0.26458 0.36417,-0.26458 0,0 0.36417,0 0.36417,0.26458 z"
- fill="#72b147"
- id="path1310" />
- <path
- d="m 8.4667,12.452 c 0,0 -2e-7,-5.7669 7.9375,-5.7669 l -0.22507,0.69269 -0.91853,1.1965 -0.91853,0.13819 -0.91853,1.1965 -0.91853,0.13819 -0.91853,1.1965 -0.91853,0.13819 -0.91853,1.1965 -0.91853,0.13819 z"
- fill="#5a9a30"
- id="path1312" />
- <path
- d="M 8.1025,12.716 7.18397,12.57781 6.26544,11.38131 5.34691,11.24312 4.42838,10.04662 3.50985,9.90843 2.59132,8.71193 1.67279,8.57374 0.75426,7.37724 0.52919,6.68455 c 7.9375,1e-7 7.9375,5.7669 7.9375,5.7669 z"
- fill="#88b858"
- id="path1314" />
- <path
- d="m 0.52917,6.6846 7.9375,5.7669 7.9375,-5.7669 -7.9375,-5.7669 z"
- fill="url(#linearGradient84726)"
- id="path1316"
- style="fill:url(#linearGradient1147)" />
- </g>
- <path
- d="m 0.75424,7.3773 -0.22507,-0.69269 7.9375,5.7669 7.9375,-5.7669 -0.22507,0.69269 -7.7124,5.6034 z"
- fill-opacity="0"
- id="path1320" />
- </g>
- <g
- id="polymc-header-text-3"
- fill="white"
- transform="matrix(6.9306,0,0,6.9306,-695.39957,-649.40511)"
- stroke-width="0.26458"
- aria-label="PolyMC"
- style="fill:#ffffff;fill-opacity:1">
- <text
- xml:space="preserve"
- style="font-size:9.92603px;line-height:1.25;font-family:sans-serif;letter-spacing:-0.610833px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke-width:0.0101009"
- x="121.65298"
- y="107.71044"
- id="text4534"><tspan
- sodipodi:role="line"
- id="tspan4532"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.92603px;font-family:'Josefin Sans';-inkscape-font-specification:'Josefin Sans';fill:#ffffff;fill-opacity:1;stroke-width:0.0101009"
- x="121.65298"
- y="107.71044">Poly<tspan
- style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-size:8.78072px;font-family:'Josefin Sans';-inkscape-font-specification:'Josefin Sans Semi-Bold'"
- id="tspan137828"
- rotate="0 0">MC</tspan></tspan></text>
- </g>
- </g>
- <g
- id="polymc-header-text-4"
- fill="white"
- transform="matrix(6.9306,0,0,6.9306,-697.30938,-585.54339)"
- stroke-width="0.26458"
- aria-label="PolyMC"
- style="fill:#ffffff;fill-opacity:1" />
-</svg>
diff --git a/program_info/polymc-header.svg b/program_info/polymc-header.svg
deleted file mode 100644
index 837004e1..00000000
--- a/program_info/polymc-header.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg viewBox="0 0 376.77 135.47" xmlns="http://www.w3.org/2000/svg" class="home">
- <defs>
- <linearGradient id="a" x1="4.498" x2="12.435" y1="3.801" y2="9.568" gradientUnits="userSpaceOnUse">
- <stop stop-color="#88b858" offset="0"/>
- <stop stop-color="#72b147" offset=".5"/>
- <stop stop-color="#5a9a30" offset="1"/>
- </linearGradient>
- </defs>
- <path d="M42.375 118.668s0-24.797 34.094-24.797c34.103 0 34.094 24.797 34.094 24.797z" fill="#765338"/>
- <path d="M76.47 93.872 42.376 118.67 21.304 53.751z" fill="#b7835a"/>
- <path d="m76.47 93.872 55.165-40.121-21.072 64.918z" fill="#5b422d"/>
- <path d="m79 95.709-2.53 1.84-2.532-1.84c0-1.84 2.531-1.84 2.531-1.84s2.531 0 2.531 1.84z" fill="#72b147"/>
- <path d="M76.47 93.872s0-40.121 55.165-40.121l-1.564 4.819-6.384 8.324-6.384.962-6.383 8.324-6.384.961-6.384 8.325-6.384.961-6.384 8.324-6.383.962z" fill="#5a9a30"/>
- <path d="m73.938 95.709-6.383-.961-6.384-8.325-6.384-.961-6.384-8.324-6.384-.962-6.383-8.324-6.384-.962-6.384-8.324-1.564-4.819c55.165 0 55.165 40.121 55.165 40.121z" fill="#88b858"/>
- <path d="m.53 6.685 7.937 5.766 7.937-5.766L8.467.918z" fill="url(#a)" transform="matrix(6.95 0 0 6.9572 17.626 7.241)"/>
- <path d="m22.868 58.567-1.564-4.82L76.469 93.87l55.166-40.122-1.564 4.82L76.47 97.55z" fill="none"/>
- <g fill="#fff" stroke-width=".265" aria-label="PolyMC">
- <g stroke-width=".01" aria-label="PolyMC">
- <path d="M168.153 47.323q5.434 0 9.287 1.858 3.852 1.788 5.916 5.228 2.133 3.44 2.133 8.324 0 2.958-.895 5.847-.894 2.82-2.889 5.16-1.926 2.27-5.09 3.646t-7.705 1.375h-7.361v18.3h-6.673V47.322zm.688 25.041q2.958 0 4.884-.963 1.927-.963 3.027-2.408 1.1-1.513 1.582-3.164.482-1.651.482-2.958 0-1.514-.482-3.096-.481-1.651-1.65-2.958-1.101-1.376-2.959-2.202-1.788-.894-4.471-.894h-7.705v18.643zM187.49 82.6q0-4.265 1.994-7.705 2.064-3.44 5.641-5.434 3.577-1.995 8.118-1.995 4.678 0 8.186 1.995 3.509 1.995 5.435 5.434 1.926 3.44 1.926 7.705t-1.926 7.773q-1.926 3.44-5.503 5.435-3.509 1.995-8.187 1.995-4.54 0-8.118-1.857-3.508-1.927-5.572-5.298-1.995-3.44-1.995-8.048zm6.397.07q0 2.751 1.238 5.021 1.238 2.202 3.302 3.509 2.133 1.307 4.678 1.307 2.683 0 4.747-1.307 2.133-1.307 3.302-3.509 1.17-2.27 1.17-5.022 0-2.752-1.17-4.953-1.17-2.27-3.302-3.577-2.064-1.376-4.747-1.376-2.614 0-4.747 1.376-2.063 1.376-3.302 3.646-1.17 2.201-1.17 4.884zM223.251 43.858h6.398v53.246h-6.398zM238.914 110.808l18.78-42.17h5.917l-18.368 42.17zm7.017-13.484-13.69-28.687h7.223l11.489 25.453zM266.775 97.085V51.2h.063l23.855 33.774-3.043-.67L311.384 51.2h.122v45.885h-7.06v-29.88l.487 3.59-16.065 22.7h-.122l-16.31-22.7 1.218-3.286v29.576zM352.299 93.62q-.974.67-2.921 1.643-1.887.973-4.564 1.704-2.617.67-5.843.608-5.172-.062-9.31-1.825-4.138-1.826-6.999-4.869-2.86-3.104-4.442-7.06-1.522-4.016-1.522-8.52 0-5.05 1.583-9.25t4.503-7.241q2.921-3.104 6.938-4.808 4.016-1.704 8.763-1.704 4.199 0 7.485 1.156 3.347 1.096 5.598 2.496l-2.799 6.633q-1.704-1.156-4.26-2.313-2.556-1.156-5.781-1.156-2.921 0-5.599 1.217-2.678 1.156-4.686 3.347-2.008 2.13-3.225 4.99-1.156 2.86-1.156 6.208 0 3.468 1.034 6.39 1.096 2.92 3.043 5.05 2.008 2.07 4.747 3.287 2.799 1.156 6.268 1.156 3.408 0 5.964-1.035 2.616-1.095 4.199-2.434z"/>
- </g>
- </g>
-</svg>
diff --git a/program_info/polymc.icns b/program_info/polymc.icns
deleted file mode 100644
index 231fa22a..00000000
--- a/program_info/polymc.icns
+++ /dev/null
Binary files differ
diff --git a/program_info/polymc.ico b/program_info/polymc.ico
deleted file mode 100644
index d56313f3..00000000
--- a/program_info/polymc.ico
+++ /dev/null
Binary files differ
diff --git a/program_info/prismlauncher-monochrome.Source.svg b/program_info/prismlauncher-monochrome.Source.svg
new file mode 100644
index 00000000..7e8c8798
--- /dev/null
+++ b/program_info/prismlauncher-monochrome.Source.svg
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ width="504.11801"
+ height="292.15204"
+ viewBox="0 0 504.11801 292.15204"
+ fill="none"
+ version="1.1"
+ id="svg180"
+ sodipodi:docname="PrismLauncher_(1).svg"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14, custom)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <sodipodi:namedview
+ id="namedview182"
+ pagecolor="#ffffff"
+ bordercolor="#999999"
+ borderopacity="1"
+ inkscape:showpageshadow="0"
+ inkscape:pageopacity="0"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1"
+ showgrid="false"
+ inkscape:zoom="1.4142136"
+ inkscape:cx="405.52574"
+ inkscape:cy="178.19091"
+ inkscape:window-width="2560"
+ inkscape:window-height="1386"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg180" />
+ <defs
+ id="defs178">
+ <filter
+ id="filter0_d_56_257"
+ x="78.848396"
+ y="368.16199"
+ width="59.429001"
+ height="64.004501"
+ filterUnits="userSpaceOnUse"
+ color-interpolation-filters="sRGB">
+ <feFlood
+ flood-opacity="0"
+ result="BackgroundImageFix"
+ id="feFlood146" />
+ <feColorMatrix
+ in="SourceAlpha"
+ type="matrix"
+ values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"
+ result="hardAlpha"
+ id="feColorMatrix148" />
+ <feOffset
+ id="feOffset150" />
+ <feGaussianBlur
+ stdDeviation="5"
+ id="feGaussianBlur152" />
+ <feComposite
+ in2="hardAlpha"
+ operator="out"
+ id="feComposite154" />
+ <feColorMatrix
+ type="matrix"
+ values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"
+ id="feColorMatrix156" />
+ <feBlend
+ mode="normal"
+ in2="BackgroundImageFix"
+ result="effect1_dropShadow_56_257"
+ id="feBlend158" />
+ <feBlend
+ mode="normal"
+ in="SourceGraphic"
+ in2="effect1_dropShadow_56_257"
+ result="shape"
+ id="feBlend160" />
+ </filter>
+ <linearGradient
+ id="paint0_linear_56_257"
+ x1="77.984497"
+ y1="40.9678"
+ x2="124.275"
+ y2="75.7817"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="#BCCA38"
+ id="stop163" />
+ <stop
+ offset="1"
+ stop-color="#5EB672"
+ id="stop165" />
+ </linearGradient>
+ <linearGradient
+ id="paint1_linear_56_257"
+ x1="77.984497"
+ y1="197.04401"
+ x2="124.275"
+ y2="231.858"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="#BCCA38"
+ id="stop168" />
+ <stop
+ offset="1"
+ stop-color="#5EB672"
+ id="stop170" />
+ </linearGradient>
+ <linearGradient
+ id="paint2_linear_56_257"
+ x1="77.984497"
+ y1="353.12"
+ x2="124.275"
+ y2="387.93399"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ stop-color="#BCCA38"
+ id="stop173" />
+ <stop
+ offset="1"
+ stop-color="#5EB672"
+ id="stop175" />
+ </linearGradient>
+ </defs>
+ <g
+ id="g2123"
+ transform="translate(-20,-488.228)">
+ <rect
+ x="20"
+ y="644.30402"
+ width="504.11801"
+ height="136.076"
+ rx="15"
+ fill="#202020"
+ id="rect86" />
+ <g
+ id="g1354-3"
+ transform="matrix(0.19116204,0,0,0.19116204,60.622437,664.39882)">
+ <path
+ id="path318-6"
+ style="fill:#b5b3b3;fill-opacity:1;stroke-width:5.05912"
+ d="m 250.77344,33.132812 c -9.79798,10e-7 -19.59643,2.550591 -28.375,7.642579 L 84.207031,121.01758 c -8.778522,5.10312 -15.880498,12.35843 -20.785156,20.89062 -4.881988,8.53219 -7.587891,18.33026 -7.587891,28.52539 v 160.48243 c 0,10.19513 2.70629,20.0146 7.59961,28.53515 l 0.0059,-0.004 c 4.904482,8.52855 11.991948,15.78332 20.767578,20.88476 l 138.191408,80.25195 c 8.77857,5.092 18.57702,7.64454 28.375,7.64454 V 360.83984 l -0.0117,-0.01 c -6.52423,0 -13.04846,-1.69722 -18.91602,-5.10352 L 169.75,319.66016 c -5.84479,-3.4063 -10.56855,-8.2355 -13.8418,-13.91993 -3.26211,-5.68391 -5.0625,-12.22239 -5.0625,-19.01171 v -72.09766 c 0,-6.80046 1.80039,-13.33952 5.0625,-19.02344 3.27376,-5.69605 7.99709,-10.53697 13.85352,-13.93164 l 62.0957,-36.06445 c 5.86757,-3.4058 12.39178,-5.0918 18.91602,-5.0918 z" />
+ <path
+ id="path320-7"
+ style="fill:#e6e6e6;fill-opacity:1;stroke-width:5.05912"
+ d="M 250.77344,33.132812 V 140.51953 c 6.52423,0 13.04846,1.686 18.91601,5.0918 l 31.03711,18.0332 47.51758,-82.748046 -69.0957,-40.121093 c -8.77857,-5.091988 -18.57702,-7.642579 -28.375,-7.642579 z m 97.48242,47.775391 -47.51758,82.746097 31.0586,18.0332 c 5.84269,3.39345 10.56477,8.23229 13.83789,13.91406 l -0.008,0.006 c 3.27376,5.68392 5.07422,12.23411 5.07422,19.02344 v 36.04297 36.05469 c 0,6.78932 -1.80046,13.33901 -5.07422,19.02343 l 5.07422,2.95117 87.41211,50.74805 c 4.89318,-8.52055 7.59961,-18.34002 7.59961,-28.53515 v -80.24219 -80.24024 l -0.01,0.01 c 0,-10.19303 -2.69722,-20.00946 -7.5996,-28.5293 l 0.01,-0.006 0.0117,0.0117 c -4.9043,-8.5322 -11.99486,-15.80058 -20.77344,-20.89258 z m 89.85742,278.542967 -0.0117,0.0117 -92.47461,-53.69922 c -3.27324,5.68442 -7.99701,10.51362 -13.84179,13.91992 l -31.04883,18.02735 -0.01,-0.0176 -31.03711,18.0332 c -5.86755,3.4063 -12.39178,5.10352 -18.91601,5.10352 V 468.2168 c 9.79798,0 19.59643,-2.55253 28.375,-7.64453 l 69.09179,-40.11719 0.004,0.008 69.0957,-40.11914 c 8.77807,-5.10363 15.86864,-12.37151 20.77344,-20.89258 z" />
+ <path
+ d="m 350.70202,214.6316 v 72.09648 c 0,13.60144 -7.20418,26.15462 -18.91654,32.94396 l -62.09562,36.06544 c -5.86706,3.4058 -12.3918,5.10313 -18.91604,5.10313 -6.52475,0 -13.04898,-1.69733 -18.91655,-5.10313 L 169.76216,319.67204 C 158.0498,312.8827 150.84561,300.32952 150.84561,286.72808 V 214.6316 c 0,-13.60094 7.20419,-26.15463 18.91655,-32.94397 l 62.09511,-36.06493 c 5.86757,-3.40631 12.3918,-5.092 18.91655,-5.092 6.52424,0 13.04898,1.69733 18.91604,5.092 l 31.03668,18.03221 31.05894,18.03272 c 5.84479,3.40631 10.56849,8.23625 13.84174,13.92067 3.27376,5.68392 5.0748,12.23396 5.0748,19.0233 z"
+ fill="#ffffff"
+ id="path336-5"
+ style="fill:#464646;fill-opacity:1;stroke-width:5.05912" />
+ <path
+ d="m 350.70202,214.6316 v 72.09648 c 0,6.78933 -1.80104,13.33937 -5.0748,19.0238 -3.27375,5.68442 -7.99695,10.51436 -13.84174,13.92016 l -31.05894,18.03272 -31.03668,18.03272 c -5.86756,3.4058 -12.3918,5.10313 -18.91604,5.10313 V 250.6854 l 74.50968,-43.25293 20.35485,-11.81304 c 3.27376,5.68443 5.0748,12.23447 5.0748,19.0238 z"
+ fill="#dfdfdf"
+ id="path338-3"
+ style="fill:#3c3c3c;fill-opacity:1;stroke-width:5.05912" />
+ <path
+ d="m 250.77382,250.67427 v 110.15521 c -6.52475,0 -13.04898,-1.69733 -18.91655,-5.10363 l -62.09511,-36.06494 c -5.8448,-3.4063 -10.56849,-8.23624 -13.84225,-13.92067 -3.27325,-5.68392 -5.0743,-12.23396 -5.0743,-19.02329 v -72.09648 c 0,-6.78934 1.80105,-13.33938 5.0743,-19.0238 l 94.86504,55.06597 z"
+ fill="#d6d2d2"
+ id="path340-5"
+ style="fill:#4a4a4a;fill-opacity:1;stroke-width:5.05912" />
+ </g>
+ <rect
+ x="20"
+ y="488.228"
+ width="504.11801"
+ height="136.076"
+ rx="15"
+ fill="#f8f8f8"
+ id="rect58" />
+ <path
+ d="m 200.844,550.849 c 0,1.616 -0.371,3.1 -1.113,4.451 -0.742,1.325 -1.881,2.398 -3.418,3.219 -1.536,0.822 -3.444,1.232 -5.722,1.232 h -4.213 v 10.015 h -6.796 v -27.898 h 11.009 c 2.225,0 4.106,0.384 5.643,1.152 1.536,0.769 2.689,1.828 3.457,3.18 0.769,1.351 1.153,2.901 1.153,4.649 z m -10.77,3.497 c 1.298,0 2.265,-0.304 2.901,-0.914 0.636,-0.609 0.954,-1.47 0.954,-2.583 0,-1.113 -0.318,-1.974 -0.954,-2.583 -0.636,-0.609 -1.603,-0.914 -2.901,-0.914 h -3.696 v 6.994 z m 20.706,-3.06 c 0.795,-1.218 1.788,-2.172 2.98,-2.861 1.193,-0.715 2.517,-1.073 3.975,-1.073 v 7.193 h -1.868 c -1.696,0 -2.968,0.371 -3.815,1.113 -0.848,0.715 -1.272,1.987 -1.272,3.815 v 10.293 h -6.796 V 547.59 h 6.796 z m 13.223,-6.001 c -1.192,0 -2.172,-0.344 -2.941,-1.033 -0.742,-0.715 -1.112,-1.589 -1.112,-2.623 0,-1.059 0.37,-1.934 1.112,-2.623 0.769,-0.715 1.749,-1.073 2.941,-1.073 1.166,0 2.12,0.358 2.861,1.073 0.769,0.689 1.153,1.564 1.153,2.623 0,1.034 -0.384,1.908 -1.153,2.623 -0.741,0.689 -1.695,1.033 -2.861,1.033 z m 3.378,2.305 v 22.176 h -6.796 V 547.59 Z m 13.549,22.494 c -1.934,0 -3.656,-0.331 -5.167,-0.994 -1.51,-0.662 -2.702,-1.563 -3.576,-2.702 -0.875,-1.166 -1.365,-2.464 -1.471,-3.895 h 6.717 c 0.079,0.769 0.437,1.391 1.073,1.868 0.635,0.477 1.417,0.716 2.344,0.716 0.848,0 1.497,-0.159 1.948,-0.477 0.476,-0.345 0.715,-0.782 0.715,-1.312 0,-0.636 -0.331,-1.099 -0.994,-1.391 -0.662,-0.318 -1.735,-0.662 -3.219,-1.033 -1.589,-0.371 -2.914,-0.755 -3.974,-1.153 -1.06,-0.423 -1.974,-1.073 -2.742,-1.947 -0.768,-0.901 -1.152,-2.106 -1.152,-3.616 0,-1.272 0.344,-2.424 1.033,-3.458 0.715,-1.059 1.748,-1.894 3.1,-2.503 1.377,-0.61 3.007,-0.914 4.888,-0.914 2.782,0 4.967,0.688 6.557,2.066 1.616,1.378 2.544,3.206 2.782,5.484 h -6.279 c -0.106,-0.768 -0.451,-1.377 -1.033,-1.828 -0.557,-0.45 -1.299,-0.675 -2.226,-0.675 -0.795,0 -1.404,0.159 -1.828,0.477 -0.424,0.291 -0.636,0.702 -0.636,1.232 0,0.635 0.331,1.112 0.994,1.43 0.689,0.318 1.748,0.636 3.179,0.954 1.643,0.424 2.981,0.848 4.014,1.272 1.033,0.397 1.934,1.059 2.702,1.987 0.795,0.901 1.206,2.119 1.232,3.656 0,1.298 -0.371,2.464 -1.113,3.497 -0.715,1.007 -1.761,1.802 -3.139,2.385 -1.351,0.582 -2.928,0.874 -4.729,0.874 z m 41.037,-22.732 c 2.755,0 4.941,0.835 6.557,2.504 1.643,1.669 2.464,3.987 2.464,6.954 v 12.956 h -6.756 v -12.042 c 0,-1.43 -0.384,-2.53 -1.152,-3.298 -0.742,-0.795 -1.775,-1.192 -3.1,-1.192 -1.325,0 -2.371,0.397 -3.14,1.192 -0.741,0.768 -1.112,1.868 -1.112,3.298 v 12.042 h -6.756 v -12.042 c 0,-1.43 -0.384,-2.53 -1.153,-3.298 -0.742,-0.795 -1.775,-1.192 -3.1,-1.192 -1.324,0 -2.371,0.397 -3.139,1.192 -0.742,0.768 -1.113,1.868 -1.113,3.298 v 12.042 h -6.796 V 547.59 h 6.796 v 2.782 c 0.689,-0.927 1.59,-1.656 2.703,-2.185 1.112,-0.557 2.371,-0.835 3.775,-0.835 1.669,0 3.153,0.358 4.451,1.073 1.325,0.715 2.358,1.735 3.1,3.06 0.768,-1.219 1.815,-2.212 3.139,-2.98 1.325,-0.769 2.769,-1.153 4.332,-1.153 z m 17.589,19.473 h 9.697 v 2.941 H 295.94 v -27.7 h 3.616 z m 11.789,-8.028 c 0,-2.225 0.45,-4.172 1.351,-5.841 0.901,-1.696 2.133,-3.008 3.696,-3.935 1.59,-0.927 3.352,-1.391 5.286,-1.391 1.907,0 3.563,0.411 4.967,1.232 1.405,0.822 2.451,1.855 3.14,3.1 v -3.974 h 3.656 v 21.778 h -3.656 v -4.054 c -0.715,1.272 -1.788,2.332 -3.219,3.18 -1.404,0.821 -3.047,1.232 -4.928,1.232 -1.934,0 -3.683,-0.477 -5.246,-1.431 -1.563,-0.954 -2.795,-2.292 -3.696,-4.014 -0.901,-1.722 -1.351,-3.683 -1.351,-5.882 z m 18.44,0.04 c 0,-1.642 -0.331,-3.073 -0.994,-4.292 -0.662,-1.219 -1.563,-2.146 -2.702,-2.782 -1.113,-0.662 -2.345,-0.993 -3.696,-0.993 -1.351,0 -2.583,0.318 -3.696,0.954 -1.113,0.635 -2,1.563 -2.663,2.781 -0.662,1.219 -0.993,2.65 -0.993,4.292 0,1.67 0.331,3.127 0.993,4.372 0.663,1.219 1.55,2.159 2.663,2.822 1.113,0.635 2.345,0.953 3.696,0.953 1.351,0 2.583,-0.318 3.696,-0.953 1.139,-0.663 2.04,-1.603 2.702,-2.822 0.663,-1.245 0.994,-2.689 0.994,-4.332 z m 28.684,-10.849 v 21.778 h -3.616 v -3.219 c -0.689,1.113 -1.656,1.987 -2.901,2.623 -1.219,0.609 -2.57,0.914 -4.054,0.914 -1.696,0 -3.219,-0.345 -4.57,-1.033 -1.351,-0.716 -2.424,-1.775 -3.219,-3.18 -0.768,-1.404 -1.153,-3.113 -1.153,-5.126 v -12.757 h 3.577 v 12.28 c 0,2.146 0.543,3.802 1.629,4.968 1.087,1.139 2.57,1.708 4.451,1.708 1.935,0 3.458,-0.596 4.571,-1.788 1.112,-1.192 1.669,-2.928 1.669,-5.206 v -11.962 z m 16.32,-0.398 c 2.649,0 4.795,0.809 6.438,2.425 1.643,1.589 2.464,3.894 2.464,6.915 v 12.836 h -3.577 v -12.32 c 0,-2.172 -0.543,-3.828 -1.629,-4.967 -1.087,-1.166 -2.57,-1.749 -4.451,-1.749 -1.908,0 -3.431,0.596 -4.57,1.788 -1.113,1.193 -1.67,2.928 -1.67,5.206 v 12.042 h -3.616 v -21.778 h 3.616 v 3.1 c 0.716,-1.113 1.683,-1.974 2.902,-2.583 1.245,-0.61 2.609,-0.915 4.093,-0.915 z m 13.061,11.247 c 0,-2.252 0.45,-4.212 1.351,-5.881 0.901,-1.696 2.146,-3.008 3.736,-3.935 1.616,-0.927 3.457,-1.391 5.524,-1.391 2.675,0 4.874,0.649 6.597,1.948 1.748,1.298 2.901,3.099 3.457,5.404 h -3.895 c -0.371,-1.324 -1.099,-2.371 -2.185,-3.139 -1.06,-0.769 -2.385,-1.153 -3.974,-1.153 -2.067,0 -3.736,0.716 -5.008,2.146 -1.272,1.404 -1.907,3.405 -1.907,6.001 0,2.623 0.635,4.65 1.907,6.081 1.272,1.43 2.941,2.146 5.008,2.146 1.589,0 2.914,-0.371 3.974,-1.113 1.059,-0.742 1.788,-1.802 2.185,-3.179 h 3.895 c -0.583,2.225 -1.749,4.013 -3.497,5.365 -1.749,1.324 -3.935,1.987 -6.557,1.987 -2.067,0 -3.908,-0.464 -5.524,-1.391 -1.59,-0.928 -2.835,-2.239 -3.736,-3.935 -0.901,-1.695 -1.351,-3.682 -1.351,-5.961 z m 35.903,-11.247 c 1.642,0 3.126,0.358 4.451,1.073 1.324,0.689 2.358,1.736 3.099,3.14 0.769,1.404 1.153,3.113 1.153,5.127 v 12.836 h -3.577 v -12.32 c 0,-2.172 -0.543,-3.828 -1.629,-4.967 -1.086,-1.166 -2.57,-1.749 -4.451,-1.749 -1.908,0 -3.431,0.596 -4.57,1.788 -1.113,1.193 -1.67,2.928 -1.67,5.206 v 12.042 h -3.616 v -29.408 h 3.616 v 10.73 c 0.716,-1.113 1.696,-1.974 2.941,-2.583 1.272,-0.61 2.689,-0.915 4.253,-0.915 z m 34.083,10.452 c 0,0.689 -0.039,1.418 -0.119,2.186 h -17.406 c 0.132,2.146 0.861,3.829 2.185,5.047 1.352,1.192 2.981,1.789 4.889,1.789 1.563,0 2.861,-0.358 3.894,-1.073 1.06,-0.742 1.802,-1.723 2.226,-2.941 h 3.894 c -0.583,2.093 -1.748,3.802 -3.497,5.126 -1.748,1.299 -3.921,1.948 -6.517,1.948 -2.067,0 -3.922,-0.464 -5.564,-1.391 -1.616,-0.928 -2.888,-2.239 -3.815,-3.935 -0.928,-1.722 -1.391,-3.709 -1.391,-5.961 0,-2.252 0.45,-4.226 1.351,-5.921 0.901,-1.696 2.159,-2.994 3.775,-3.895 1.643,-0.927 3.524,-1.391 5.644,-1.391 2.066,0 3.894,0.451 5.484,1.351 1.589,0.901 2.808,2.146 3.656,3.736 0.874,1.563 1.311,3.338 1.311,5.325 z m -3.735,-0.755 c 0,-1.377 -0.305,-2.556 -0.914,-3.537 -0.61,-1.006 -1.444,-1.762 -2.504,-2.265 -1.033,-0.53 -2.186,-0.795 -3.457,-0.795 -1.828,0 -3.392,0.583 -4.69,1.749 -1.272,1.166 -2,2.782 -2.186,4.848 z m 11.728,-5.762 c 0.636,-1.245 1.537,-2.212 2.703,-2.901 1.192,-0.689 2.636,-1.034 4.331,-1.034 v 3.736 h -0.953 c -4.054,0 -6.081,2.199 -6.081,6.597 v 11.843 h -3.616 v -21.778 h 3.616 z"
+ fill="#000000"
+ id="path84" />
+ <path
+ d="m 200.844,706.925 c 0,1.616 -0.371,3.1 -1.113,4.451 -0.742,1.325 -1.881,2.398 -3.418,3.219 -1.536,0.822 -3.444,1.232 -5.722,1.232 h -4.213 v 10.015 h -6.796 v -27.898 h 11.009 c 2.225,0 4.106,0.384 5.643,1.152 1.536,0.769 2.689,1.828 3.457,3.179 0.769,1.352 1.153,2.902 1.153,4.65 z m -10.77,3.497 c 1.298,0 2.265,-0.304 2.901,-0.914 0.636,-0.609 0.954,-1.47 0.954,-2.583 0,-1.113 -0.318,-1.974 -0.954,-2.583 -0.636,-0.609 -1.603,-0.914 -2.901,-0.914 h -3.696 v 6.994 z m 20.706,-3.06 c 0.795,-1.218 1.788,-2.172 2.98,-2.861 1.193,-0.715 2.517,-1.073 3.975,-1.073 v 7.193 h -1.868 c -1.696,0 -2.968,0.371 -3.815,1.113 -0.848,0.715 -1.272,1.987 -1.272,3.815 v 10.293 h -6.796 v -22.176 h 6.796 z m 13.223,-6.001 c -1.192,0 -2.172,-0.344 -2.941,-1.033 -0.742,-0.715 -1.112,-1.589 -1.112,-2.623 0,-1.059 0.37,-1.934 1.112,-2.623 0.769,-0.715 1.749,-1.073 2.941,-1.073 1.166,0 2.12,0.358 2.861,1.073 0.769,0.689 1.153,1.564 1.153,2.623 0,1.034 -0.384,1.908 -1.153,2.623 -0.741,0.689 -1.695,1.033 -2.861,1.033 z m 3.378,2.305 v 22.176 h -6.796 v -22.176 z m 13.549,22.494 c -1.934,0 -3.656,-0.331 -5.167,-0.994 -1.51,-0.662 -2.702,-1.563 -3.576,-2.702 -0.875,-1.166 -1.365,-2.464 -1.471,-3.895 h 6.717 c 0.079,0.769 0.437,1.391 1.073,1.868 0.635,0.477 1.417,0.716 2.344,0.716 0.848,0 1.497,-0.159 1.948,-0.477 0.476,-0.345 0.715,-0.782 0.715,-1.312 0,-0.636 -0.331,-1.099 -0.994,-1.391 -0.662,-0.318 -1.735,-0.662 -3.219,-1.033 -1.589,-0.371 -2.914,-0.755 -3.974,-1.153 -1.06,-0.423 -1.974,-1.073 -2.742,-1.947 -0.768,-0.901 -1.152,-2.106 -1.152,-3.616 0,-1.272 0.344,-2.424 1.033,-3.458 0.715,-1.06 1.748,-1.894 3.1,-2.503 1.377,-0.61 3.007,-0.914 4.888,-0.914 2.782,0 4.967,0.688 6.557,2.066 1.616,1.378 2.544,3.206 2.782,5.484 h -6.279 c -0.106,-0.768 -0.451,-1.377 -1.033,-1.828 -0.557,-0.45 -1.299,-0.675 -2.226,-0.675 -0.795,0 -1.404,0.159 -1.828,0.477 -0.424,0.291 -0.636,0.702 -0.636,1.231 0,0.636 0.331,1.113 0.994,1.431 0.689,0.318 1.748,0.636 3.179,0.954 1.643,0.424 2.981,0.848 4.014,1.272 1.033,0.397 1.934,1.059 2.702,1.987 0.795,0.901 1.206,2.119 1.232,3.656 0,1.298 -0.371,2.464 -1.113,3.497 -0.715,1.007 -1.761,1.802 -3.139,2.385 -1.351,0.582 -2.928,0.874 -4.729,0.874 z m 41.037,-22.732 c 2.755,0 4.941,0.835 6.557,2.504 1.643,1.669 2.464,3.987 2.464,6.954 v 12.956 h -6.756 V 713.8 c 0,-1.43 -0.384,-2.53 -1.152,-3.298 -0.742,-0.795 -1.775,-1.192 -3.1,-1.192 -1.325,0 -2.371,0.397 -3.14,1.192 -0.741,0.768 -1.112,1.868 -1.112,3.298 v 12.042 h -6.756 V 713.8 c 0,-1.43 -0.384,-2.53 -1.153,-3.298 -0.742,-0.795 -1.775,-1.192 -3.1,-1.192 -1.324,0 -2.371,0.397 -3.139,1.192 -0.742,0.768 -1.113,1.868 -1.113,3.298 v 12.042 h -6.796 v -22.176 h 6.796 v 2.782 c 0.689,-0.927 1.59,-1.656 2.703,-2.185 1.112,-0.557 2.371,-0.835 3.775,-0.835 1.669,0 3.153,0.358 4.451,1.073 1.325,0.715 2.358,1.735 3.1,3.06 0.768,-1.219 1.815,-2.212 3.139,-2.981 1.325,-0.768 2.769,-1.152 4.332,-1.152 z m 17.589,19.473 h 9.697 v 2.941 H 295.94 v -27.7 h 3.616 z m 11.789,-8.028 c 0,-2.225 0.45,-4.172 1.351,-5.842 0.901,-1.695 2.133,-3.007 3.696,-3.934 1.59,-0.927 3.352,-1.391 5.286,-1.391 1.907,0 3.563,0.411 4.967,1.232 1.405,0.821 2.451,1.855 3.14,3.1 v -3.974 h 3.656 v 21.778 h -3.656 v -4.054 c -0.715,1.272 -1.788,2.332 -3.219,3.18 -1.404,0.821 -3.047,1.232 -4.928,1.232 -1.934,0 -3.683,-0.477 -5.246,-1.431 -1.563,-0.954 -2.795,-2.292 -3.696,-4.014 -0.901,-1.722 -1.351,-3.683 -1.351,-5.882 z m 18.44,0.04 c 0,-1.642 -0.331,-3.073 -0.994,-4.292 -0.662,-1.219 -1.563,-2.146 -2.702,-2.782 -1.113,-0.662 -2.345,-0.993 -3.696,-0.993 -1.351,0 -2.583,0.318 -3.696,0.954 -1.113,0.635 -2,1.563 -2.663,2.781 -0.662,1.219 -0.993,2.65 -0.993,4.292 0,1.67 0.331,3.127 0.993,4.372 0.663,1.219 1.55,2.159 2.663,2.822 1.113,0.635 2.345,0.953 3.696,0.953 1.351,0 2.583,-0.318 3.696,-0.953 1.139,-0.663 2.04,-1.603 2.702,-2.822 0.663,-1.245 0.994,-2.689 0.994,-4.332 z m 28.684,-10.849 v 21.778 h -3.616 v -3.219 c -0.689,1.113 -1.656,1.987 -2.901,2.623 -1.219,0.609 -2.57,0.914 -4.054,0.914 -1.696,0 -3.219,-0.345 -4.57,-1.033 -1.351,-0.716 -2.424,-1.775 -3.219,-3.18 -0.768,-1.404 -1.153,-3.113 -1.153,-5.126 v -12.757 h 3.577 v 12.28 c 0,2.146 0.543,3.802 1.629,4.967 1.087,1.14 2.57,1.709 4.451,1.709 1.935,0 3.458,-0.596 4.571,-1.788 1.112,-1.192 1.669,-2.928 1.669,-5.206 v -11.962 z m 16.32,-0.398 c 2.649,0 4.795,0.808 6.438,2.425 1.643,1.589 2.464,3.894 2.464,6.915 v 12.836 h -3.577 v -12.32 c 0,-2.172 -0.543,-3.828 -1.629,-4.967 -1.087,-1.166 -2.57,-1.749 -4.451,-1.749 -1.908,0 -3.431,0.596 -4.57,1.788 -1.113,1.193 -1.67,2.928 -1.67,5.206 v 12.042 h -3.616 v -21.778 h 3.616 v 3.1 c 0.716,-1.113 1.683,-1.974 2.902,-2.584 1.245,-0.609 2.609,-0.914 4.093,-0.914 z m 13.061,11.247 c 0,-2.252 0.45,-4.212 1.351,-5.882 0.901,-1.695 2.146,-3.007 3.736,-3.934 1.616,-0.927 3.457,-1.391 5.524,-1.391 2.675,0 4.874,0.649 6.597,1.947 1.748,1.299 2.901,3.1 3.457,5.405 h -3.895 c -0.371,-1.324 -1.099,-2.371 -2.185,-3.139 -1.06,-0.769 -2.385,-1.153 -3.974,-1.153 -2.067,0 -3.736,0.716 -5.008,2.146 -1.272,1.404 -1.907,3.405 -1.907,6.001 0,2.623 0.635,4.65 1.907,6.081 1.272,1.43 2.941,2.146 5.008,2.146 1.589,0 2.914,-0.371 3.974,-1.113 1.059,-0.742 1.788,-1.802 2.185,-3.179 h 3.895 c -0.583,2.225 -1.749,4.013 -3.497,5.365 -1.749,1.324 -3.935,1.987 -6.557,1.987 -2.067,0 -3.908,-0.464 -5.524,-1.391 -1.59,-0.928 -2.835,-2.239 -3.736,-3.935 -0.901,-1.695 -1.351,-3.682 -1.351,-5.961 z m 35.903,-11.247 c 1.642,0 3.126,0.358 4.451,1.073 1.324,0.689 2.358,1.736 3.099,3.14 0.769,1.404 1.153,3.113 1.153,5.127 v 12.836 h -3.577 v -12.32 c 0,-2.172 -0.543,-3.828 -1.629,-4.967 -1.086,-1.166 -2.57,-1.749 -4.451,-1.749 -1.908,0 -3.431,0.596 -4.57,1.788 -1.113,1.193 -1.67,2.928 -1.67,5.206 v 12.042 h -3.616 v -29.408 h 3.616 v 10.73 c 0.716,-1.113 1.696,-1.974 2.941,-2.584 1.272,-0.609 2.689,-0.914 4.253,-0.914 z m 34.083,10.452 c 0,0.689 -0.039,1.418 -0.119,2.186 h -17.406 c 0.132,2.146 0.861,3.828 2.185,5.047 1.352,1.192 2.981,1.789 4.889,1.789 1.563,0 2.861,-0.358 3.894,-1.073 1.06,-0.742 1.802,-1.723 2.226,-2.941 h 3.894 c -0.583,2.093 -1.748,3.802 -3.497,5.126 -1.748,1.299 -3.921,1.948 -6.517,1.948 -2.067,0 -3.922,-0.464 -5.564,-1.391 -1.616,-0.928 -2.888,-2.239 -3.815,-3.935 -0.928,-1.722 -1.391,-3.709 -1.391,-5.961 0,-2.252 0.45,-4.226 1.351,-5.921 0.901,-1.696 2.159,-2.994 3.775,-3.895 1.643,-0.927 3.524,-1.391 5.644,-1.391 2.066,0 3.894,0.451 5.484,1.351 1.589,0.901 2.808,2.146 3.656,3.736 0.874,1.563 1.311,3.338 1.311,5.325 z m -3.735,-0.755 c 0,-1.377 -0.305,-2.556 -0.914,-3.537 -0.61,-1.006 -1.444,-1.762 -2.504,-2.265 -1.033,-0.53 -2.186,-0.795 -3.457,-0.795 -1.828,0 -3.392,0.583 -4.69,1.749 -1.272,1.166 -2,2.782 -2.186,4.848 z m 11.728,-5.762 c 0.636,-1.245 1.537,-2.212 2.703,-2.901 1.192,-0.689 2.636,-1.034 4.331,-1.034 v 3.736 h -0.953 c -4.054,0 -6.081,2.199 -6.081,6.597 v 11.843 h -3.616 v -21.778 h 3.616 z"
+ fill="#fefefe"
+ id="path112" />
+ <g
+ id="g1354"
+ transform="matrix(0.19116204,0,0,0.19116204,60.622437,508.32282)">
+ <path
+ id="path318"
+ style="fill:#464646;fill-opacity:1;stroke-width:5.05912"
+ d="m 250.77344,33.132812 c -9.79798,10e-7 -19.59643,2.550591 -28.375,7.642579 L 84.207031,121.01758 c -8.778522,5.10312 -15.880498,12.35843 -20.785156,20.89062 -4.881988,8.53219 -7.587891,18.33026 -7.587891,28.52539 v 160.48243 c 0,10.19513 2.70629,20.0146 7.59961,28.53515 l 0.0059,-0.004 c 4.904482,8.52855 11.991948,15.78332 20.767578,20.88476 l 138.191408,80.25195 c 8.77857,5.092 18.57702,7.64454 28.375,7.64454 V 360.83984 l -0.0117,-0.01 c -6.52423,0 -13.04846,-1.69722 -18.91602,-5.10352 L 169.75,319.66016 c -5.84479,-3.4063 -10.56855,-8.2355 -13.8418,-13.91993 -3.26211,-5.68391 -5.0625,-12.22239 -5.0625,-19.01171 v -72.09766 c 0,-6.80046 1.80039,-13.33952 5.0625,-19.02344 3.27376,-5.69605 7.99709,-10.53697 13.85352,-13.93164 l 62.0957,-36.06445 c 5.86757,-3.4058 12.39178,-5.0918 18.91602,-5.0918 z" />
+ <path
+ id="path320"
+ style="fill:#606060;fill-opacity:1;stroke-width:5.05912"
+ d="M 250.77344,33.132812 V 140.51953 c 6.52423,0 13.04846,1.686 18.91601,5.0918 l 31.03711,18.0332 47.51758,-82.748046 -69.0957,-40.121093 c -8.77857,-5.091988 -18.57702,-7.642579 -28.375,-7.642579 z m 97.48242,47.775391 -47.51758,82.746097 31.0586,18.0332 c 5.84269,3.39345 10.56477,8.23229 13.83789,13.91406 l -0.008,0.006 c 3.27376,5.68392 5.07422,12.23411 5.07422,19.02344 v 36.04297 36.05469 c 0,6.78932 -1.80046,13.33901 -5.07422,19.02343 l 5.07422,2.95117 87.41211,50.74805 c 4.89318,-8.52055 7.59961,-18.34002 7.59961,-28.53515 v -80.24219 -80.24024 l -0.01,0.01 c 0,-10.19303 -2.69722,-20.00946 -7.5996,-28.5293 l 0.01,-0.006 0.0117,0.0117 c -4.9043,-8.5322 -11.99486,-15.80058 -20.77344,-20.89258 z m 89.85742,278.542967 -0.0117,0.0117 -92.47461,-53.69922 c -3.27324,5.68442 -7.99701,10.51362 -13.84179,13.91992 l -31.04883,18.02735 -0.01,-0.0176 -31.03711,18.0332 c -5.86755,3.4063 -12.39178,5.10352 -18.91601,5.10352 V 468.2168 c 9.79798,0 19.59643,-2.55253 28.375,-7.64453 l 69.09179,-40.11719 0.004,0.008 69.0957,-40.11914 c 8.77807,-5.10363 15.86864,-12.37151 20.77344,-20.89258 z" />
+ <path
+ d="m 350.70202,214.6316 v 72.09648 c 0,13.60144 -7.20418,26.15462 -18.91654,32.94396 l -62.09562,36.06544 c -5.86706,3.4058 -12.3918,5.10313 -18.91604,5.10313 -6.52475,0 -13.04898,-1.69733 -18.91655,-5.10313 L 169.76216,319.67204 C 158.0498,312.8827 150.84561,300.32952 150.84561,286.72808 V 214.6316 c 0,-13.60094 7.20419,-26.15463 18.91655,-32.94397 l 62.09511,-36.06493 c 5.86757,-3.40631 12.3918,-5.092 18.91655,-5.092 6.52424,0 13.04898,1.69733 18.91604,5.092 l 31.03668,18.03221 31.05894,18.03272 c 5.84479,3.40631 10.56849,8.23625 13.84174,13.92067 3.27376,5.68392 5.0748,12.23396 5.0748,19.0233 z"
+ fill="#ffffff"
+ id="path336"
+ style="stroke-width:5.05912" />
+ <path
+ d="m 350.70202,214.6316 v 72.09648 c 0,6.78933 -1.80104,13.33937 -5.0748,19.0238 -3.27375,5.68442 -7.99695,10.51436 -13.84174,13.92016 l -31.05894,18.03272 -31.03668,18.03272 c -5.86756,3.4058 -12.3918,5.10313 -18.91604,5.10313 V 250.6854 l 74.50968,-43.25293 20.35485,-11.81304 c 3.27376,5.68443 5.0748,12.23447 5.0748,19.0238 z"
+ fill="#dfdfdf"
+ id="path338"
+ style="stroke-width:5.05912" />
+ <path
+ d="m 250.77382,250.67427 v 110.15521 c -6.52475,0 -13.04898,-1.69733 -18.91655,-5.10363 l -62.09511,-36.06494 c -5.8448,-3.4063 -10.56849,-8.23624 -13.84225,-13.92067 -3.27325,-5.68392 -5.0743,-12.23396 -5.0743,-19.02329 v -72.09648 c 0,-6.78934 1.80105,-13.33938 5.0743,-19.0238 l 94.86504,55.06597 z"
+ fill="#d6d2d2"
+ id="path340"
+ style="stroke-width:5.05912" />
+ </g>
+ </g>
+</svg>
diff --git a/program_info/polymc.6.scd b/program_info/prismlauncher.6.scd
index f0628cc9..e3c7de86 100644
--- a/program_info/polymc.6.scd
+++ b/program_info/prismlauncher.6.scd
@@ -1,33 +1,33 @@
-polymc(6)
+prismlauncher(6)
# NAME
-polymc - a launcher and instance manager for Minecraft.
+prismlauncher - a launcher and instance manager for Minecraft.
# SYNOPSIS
-*polymc* [OPTIONS...]
+*prismlauncher* [OPTIONS...]
# DESCRIPTION
-PolyMC is a custom launcher for Minecraft that allows you to easily manage
+Prism Launcher is a custom launcher for Minecraft that allows you to easily manage
multiple installations of Minecraft at once. It also allows you to easily
install and remove mods by simply dragging and dropping.
-Here are the current features of PolyMC.
+Here are the current features of Prism Launcher.
# OPTIONS
*-d, --dir*=DIRECTORY
- Use DIRECTORY as the PolyMC root.
+ Use DIRECTORY as the Prism Launcher root.
*-l, --launch*=INSTANCE_ID
Launch the instance specified by INSTANCE_ID.
*--alive*
- Write a small 'live.check' file after PolyMC starts.
+ Write a small 'live.check' file after Prism Launcher starts.
*-h, --help*
Display help text and exit.
@@ -48,14 +48,14 @@ Here are the current features of PolyMC.
# BUGS
-https://github.com/PolyMC/PolyMC/issues
+https://github.com/PrismLauncher/PrismLauncher/issues
# RESOURCES
-GitHub: https://github.com/PolyMC/PolyMC
+GitHub: https://github.com/PrismLauncher/PrismLauncher
-Main website: https://polymc.org
+Main website: https://prismlauncher.org
# AUTHORS
-PolyMC Contributors
+Prism Launcher Contributors
diff --git a/program_info/prismlauncher.icns b/program_info/prismlauncher.icns
new file mode 100644
index 00000000..a4c0f7ea
--- /dev/null
+++ b/program_info/prismlauncher.icns
Binary files differ
diff --git a/program_info/prismlauncher.ico b/program_info/prismlauncher.ico
new file mode 100644
index 00000000..e4529f93
--- /dev/null
+++ b/program_info/prismlauncher.ico
Binary files differ
diff --git a/program_info/polymc.manifest.in b/program_info/prismlauncher.manifest.in
index b85b6d46..1d764445 100644
--- a/program_info/polymc.manifest.in
+++ b/program_info/prismlauncher.manifest.in
@@ -1,6 +1,6 @@
<?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">
- <assemblyIdentity name="PolyMC.Application.1" type="win32" version="@Launcher_VERSION_NAME4@" />
+ <assemblyIdentity name="PrismLauncher.Application.1" type="win32" version="@Launcher_VERSION_NAME4@" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
diff --git a/program_info/polymc.qrc b/program_info/prismlauncher.qrc
index 9ea695de..4f326c2b 100644
--- a/program_info/polymc.qrc
+++ b/program_info/prismlauncher.qrc
@@ -1,6 +1,6 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource prefix="/">
- <file>org.polymc.PolyMC.svg</file>
+ <file>org.prismlauncher.PrismLauncher.svg</file>
</qresource>
</RCC>
diff --git a/program_info/polymc.rc.in b/program_info/prismlauncher.rc.in
index be51ad71..07f7aede 100644
--- a/program_info/polymc.rc.in
+++ b/program_info/prismlauncher.rc.in
@@ -3,8 +3,8 @@
#endif
#include <windows.h>
-IDI_ICON1 ICON DISCARDABLE "polymc.ico"
-1 RT_MANIFEST "polymc.manifest"
+IDI_ICON1 ICON DISCARDABLE "prismlauncher.ico"
+1 RT_MANIFEST "prismlauncher.manifest"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @Launcher_VERSION_NAME4_COMMA@
@@ -15,10 +15,10 @@ BEGIN
BEGIN
BLOCK "000004b0"
BEGIN
- VALUE "CompanyName", "MultiMC & PolyMC Contributors"
- VALUE "FileDescription", "PolyMC"
+ VALUE "CompanyName", "MultiMC & Prism Launcher Contributors"
+ VALUE "FileDescription", "Prism Launcher"
VALUE "FileVersion", "@Launcher_VERSION_NAME4@"
- VALUE "ProductName", "PolyMC"
+ VALUE "ProductName", "Prism Launcher"
VALUE "ProductVersion", "@Launcher_VERSION_NAME4@"
END
END
diff --git a/tests/FileSystem_test.cpp b/tests/FileSystem_test.cpp
index 4efb90ac..47a963b0 100644
--- a/tests/FileSystem_test.cpp
+++ b/tests/FileSystem_test.cpp
@@ -147,6 +147,42 @@ slots:
f();
}
+ void test_copy_with_dot_hidden()
+ {
+ QString folder = QFINDTESTDATA("testdata/FileSystem/test_folder");
+ auto f = [&folder]()
+ {
+ QTemporaryDir tempDir;
+ tempDir.setAutoRemove(true);
+ qDebug() << "From:" << folder << "To:" << tempDir.path();
+
+ QDir target_dir(FS::PathCombine(tempDir.path(), "test_folder"));
+ qDebug() << tempDir.path();
+ qDebug() << target_dir.path();
+ FS::copy c(folder, target_dir.path());
+ c();
+
+ auto filter = QDir::Filter::Files | QDir::Filter::Dirs | QDir::Filter::Hidden;
+
+ for (auto entry: target_dir.entryList(filter)) {
+ qDebug() << entry;
+ }
+
+ QVERIFY(target_dir.entryList(filter).contains(".secret_folder"));
+ target_dir.cd(".secret_folder");
+ QVERIFY(target_dir.entryList(filter).contains(".secret_file.txt"));
+ };
+
+ // first try variant without trailing /
+ QVERIFY(!folder.endsWith('/'));
+ f();
+
+ // then variant with trailing /
+ folder.append('/');
+ QVERIFY(folder.endsWith('/'));
+ f();
+ }
+
void test_getDesktop()
{
QCOMPARE(FS::getDesktopDir(), QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
diff --git a/tests/Library_test.cpp b/tests/Library_test.cpp
index 869c7673..db8380c7 100644
--- a/tests/Library_test.cpp
+++ b/tests/Library_test.cpp
@@ -1,3 +1,38 @@
+// SPDX-License-Identifier: GPL-3.0-only
+/*
+ * PolyMC - Minecraft Launcher
+ * Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * This file incorporates work covered by the following copyright and
+ * permission notice:
+ *
+ * Copyright 2013-2021 MultiMC Contributors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include <QTest>
#include <minecraft/MojangVersionFormat.h>
@@ -5,6 +40,7 @@
#include <minecraft/Library.h>
#include <net/HttpMetaCache.h>
#include <FileSystem.h>
+#include <RuntimeContext.h>
class LibraryTest : public QObject
{
@@ -24,6 +60,14 @@ private:
{
return {FS::PathCombine(cache->getBasePath("libraries"), relative)};
}
+
+ RuntimeContext dummyContext(QString system = "linux", QString arch = "64", QString realArch = "amd64") {
+ RuntimeContext r;
+ r.javaArchitecture = arch;
+ r.javaRealArchitecture = realArch;
+ r.system = system;
+ return r;
+ }
private
slots:
void initTestCase()
@@ -34,12 +78,13 @@ slots:
}
void test_legacy()
{
+ RuntimeContext r = dummyContext();
Library test("test.package:testname:testversion");
QCOMPARE(test.artifactPrefix(), QString("test.package:testname"));
QCOMPARE(test.isNative(), false);
QStringList jar, native, native32, native64;
- test.getApplicableFiles(currentSystem, jar, native, native32, native64, QString());
+ test.getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, getStorage("test/package/testname/testversion/testname-testversion.jar"));
QCOMPARE(native, {});
QCOMPARE(native32, {});
@@ -47,10 +92,11 @@ slots:
}
void test_legacy_url()
{
+ RuntimeContext r = dummyContext();
QStringList failedFiles;
Library test("test.package:testname:testversion");
test.setRepositoryURL("file://foo/bar");
- auto downloads = test.getDownloads(currentSystem, cache.get(), failedFiles, QString());
+ auto downloads = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(downloads.size(), 1);
QCOMPARE(failedFiles, {});
NetAction::Ptr dl = downloads[0];
@@ -58,27 +104,29 @@ slots:
}
void test_legacy_url_local_broken()
{
+ RuntimeContext r = dummyContext();
Library test("test.package:testname:testversion");
QCOMPARE(test.isNative(), false);
QStringList failedFiles;
test.setHint("local");
- auto downloads = test.getDownloads(currentSystem, cache.get(), failedFiles, QString());
+ auto downloads = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(downloads.size(), 0);
QCOMPARE(failedFiles, {"testname-testversion.jar"});
}
void test_legacy_url_local_override()
{
+ RuntimeContext r = dummyContext();
Library test("com.paulscode:codecwav:20101023");
QCOMPARE(test.isNative(), false);
QStringList failedFiles;
test.setHint("local");
- auto downloads = test.getDownloads(currentSystem, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
+ auto downloads = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
QCOMPARE(downloads.size(), 0);
qDebug() << failedFiles;
QCOMPARE(failedFiles.size(), 0);
QStringList jar, native, native32, native64;
- test.getApplicableFiles(currentSystem, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
+ test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, {QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath()});
QCOMPARE(native, {});
QCOMPARE(native32, {});
@@ -86,19 +134,20 @@ slots:
}
void test_legacy_native()
{
+ RuntimeContext r = dummyContext();
Library test("test.package:testname:testversion");
- test.m_nativeClassifiers[OpSys::Os_Linux]="linux";
+ test.m_nativeClassifiers["linux"] = "linux";
QCOMPARE(test.isNative(), true);
test.setRepositoryURL("file://foo/bar");
{
QStringList jar, native, native32, native64;
- test.getApplicableFiles(Os_Linux, jar, native, native32, native64, QString());
+ test.getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});
QCOMPARE(native, getStorage("test/package/testname/testversion/testname-testversion-linux.jar"));
QCOMPARE(native32, {});
QCOMPARE(native64, {});
QStringList failedFiles;
- auto dls = test.getDownloads(Os_Linux, cache.get(), failedFiles, QString());
+ auto dls = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 1);
QCOMPARE(failedFiles, {});
auto dl = dls[0];
@@ -107,49 +156,52 @@ slots:
}
void test_legacy_native_arch()
{
+ RuntimeContext r = dummyContext();
Library test("test.package:testname:testversion");
- test.m_nativeClassifiers[OpSys::Os_Linux]="linux-${arch}";
- test.m_nativeClassifiers[OpSys::Os_OSX]="osx-${arch}";
- test.m_nativeClassifiers[OpSys::Os_Windows]="windows-${arch}";
+ test.m_nativeClassifiers["linux"]="linux-${arch}";
+ test.m_nativeClassifiers["osx"]="osx-${arch}";
+ test.m_nativeClassifiers["windows"]="windows-${arch}";
QCOMPARE(test.isNative(), true);
test.setRepositoryURL("file://foo/bar");
{
QStringList jar, native, native32, native64;
- test.getApplicableFiles(Os_Linux, jar, native, native32, native64, QString());
+ test.getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, getStorage("test/package/testname/testversion/testname-testversion-linux-32.jar"));
QCOMPARE(native64, getStorage("test/package/testname/testversion/testname-testversion-linux-64.jar"));
QStringList failedFiles;
- auto dls = test.getDownloads(Os_Linux, cache.get(), failedFiles, QString());
+ auto dls = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 2);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-linux-32.jar"));
QCOMPARE(dls[1]->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-linux-64.jar"));
}
+ r.system = "windows";
{
QStringList jar, native, native32, native64;
- test.getApplicableFiles(Os_Windows, jar, native, native32, native64, QString());
+ test.getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, getStorage("test/package/testname/testversion/testname-testversion-windows-32.jar"));
QCOMPARE(native64, getStorage("test/package/testname/testversion/testname-testversion-windows-64.jar"));
QStringList failedFiles;
- auto dls = test.getDownloads(Os_Windows, cache.get(), failedFiles, QString());
+ auto dls = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 2);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-windows-32.jar"));
QCOMPARE(dls[1]->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-windows-64.jar"));
}
+ r.system = "osx";
{
QStringList jar, native, native32, native64;
- test.getApplicableFiles(Os_OSX, jar, native, native32, native64, QString());
+ test.getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, getStorage("test/package/testname/testversion/testname-testversion-osx-32.jar"));
QCOMPARE(native64, getStorage("test/package/testname/testversion/testname-testversion-osx-64.jar"));
QStringList failedFiles;
- auto dls = test.getDownloads(Os_OSX, cache.get(), failedFiles, QString());
+ auto dls = test.getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 2);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("file://foo/bar/test/package/testname/testversion/testname-testversion-osx-32.jar"));
@@ -158,103 +210,112 @@ slots:
}
void test_legacy_native_arch_local_override()
{
+ RuntimeContext r = dummyContext();
Library test("test.package:testname:testversion");
- test.m_nativeClassifiers[OpSys::Os_Linux]="linux-${arch}";
+ test.m_nativeClassifiers["linux"]="linux-${arch}";
test.setHint("local");
QCOMPARE(test.isNative(), true);
test.setRepositoryURL("file://foo/bar");
{
QStringList jar, native, native32, native64;
- test.getApplicableFiles(Os_Linux, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
+ test.getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, {QFileInfo(QFINDTESTDATA("testdata/Library/testname-testversion-linux-32.jar")).absoluteFilePath()});
QCOMPARE(native64, {QFileInfo(QFINDTESTDATA("testdata/Library") + "/testname-testversion-linux-64.jar").absoluteFilePath()});
QStringList failedFiles;
- auto dls = test.getDownloads(Os_Linux, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
+ auto dls = test.getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles, {QFileInfo(QFINDTESTDATA("testdata/Library") + "/testname-testversion-linux-64.jar").absoluteFilePath()});
}
}
void test_onenine()
{
+ RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-simple.json"));
{
QStringList jar, native, native32, native64;
- test->getApplicableFiles(Os_OSX, jar, native, native32, native64, QString());
+ test->getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, getStorage("com/paulscode/codecwav/20101023/codecwav-20101023.jar"));
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
}
+ r.system = "linux";
{
QStringList failedFiles;
- auto dls = test->getDownloads(Os_Linux, cache.get(), failedFiles, QString());
+ auto dls = test->getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 1);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/com/paulscode/codecwav/20101023/codecwav-20101023.jar"));
}
+ r.system = "osx";
test->setHint("local");
{
QStringList jar, native, native32, native64;
- test->getApplicableFiles(Os_OSX, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
+ test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, {QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath()});
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
}
+ r.system = "linux";
{
QStringList failedFiles;
- auto dls = test->getDownloads(Os_Linux, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
+ auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles, {});
}
}
void test_onenine_local_override()
{
+ RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-simple.json"));
test->setHint("local");
{
QStringList jar, native, native32, native64;
- test->getApplicableFiles(Os_OSX, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
+ test->getApplicableFiles(r, jar, native, native32, native64, QFINDTESTDATA("testdata/Library"));
QCOMPARE(jar, {QFileInfo(QFINDTESTDATA("testdata/Library/codecwav-20101023.jar")).absoluteFilePath()});
QCOMPARE(native, {});
QCOMPARE(native32, {});
QCOMPARE(native64, {});
}
+ r.system = "linux";
{
QStringList failedFiles;
- auto dls = test->getDownloads(Os_Linux, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
+ auto dls = test->getDownloads(r, cache.get(), failedFiles, QFINDTESTDATA("testdata/Library"));
QCOMPARE(dls.size(), 0);
QCOMPARE(failedFiles, {});
}
}
void test_onenine_native()
{
+ RuntimeContext r = dummyContext("osx");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-native.json"));
QStringList jar, native, native32, native64;
- test->getApplicableFiles(Os_OSX, jar, native, native32, native64, QString());
+ test->getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, QStringList());
QCOMPARE(native, getStorage("org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar"));
QCOMPARE(native32, {});
QCOMPARE(native64, {});
QStringList failedFiles;
- auto dls = test->getDownloads(Os_OSX, cache.get(), failedFiles, QString());
+ auto dls = test->getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 1);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar"));
}
void test_onenine_native_arch()
{
+ RuntimeContext r = dummyContext("windows");
auto test = readMojangJson(QFINDTESTDATA("testdata/Library/lib-native-arch.json"));
QStringList jar, native, native32, native64;
- test->getApplicableFiles(Os_Windows, jar, native, native32, native64, QString());
+ test->getApplicableFiles(r, jar, native, native32, native64, QString());
QCOMPARE(jar, {});
QCOMPARE(native, {});
QCOMPARE(native32, getStorage("tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-32.jar"));
QCOMPARE(native64, getStorage("tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-64.jar"));
QStringList failedFiles;
- auto dls = test->getDownloads(Os_Windows, cache.get(), failedFiles, QString());
+ auto dls = test->getDownloads(r, cache.get(), failedFiles, QString());
QCOMPARE(dls.size(), 2);
QCOMPARE(failedFiles, {});
QCOMPARE(dls[0]->m_url, QUrl("https://libraries.minecraft.net/tv/twitch/twitch-platform/5.16/twitch-platform-5.16-natives-windows-32.jar"));
diff --git a/tests/testdata/FileSystem/test_folder/.secret_folder/.secret_file.txt b/tests/testdata/FileSystem/test_folder/.secret_folder/.secret_file.txt
new file mode 100644
index 00000000..65e37085
--- /dev/null
+++ b/tests/testdata/FileSystem/test_folder/.secret_folder/.secret_file.txt
@@ -0,0 +1 @@
+oooooo spooky easter egg :oo