aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.git-blame-ignore-revs4
-rw-r--r--.github/workflows/update-flake.yml28
-rw-r--r--CMakeLists.txt36
-rw-r--r--flake.lock48
-rw-r--r--launcher/Application.cpp28
-rw-r--r--launcher/CMakeLists.txt17
-rw-r--r--launcher/FileIgnoreProxy.cpp23
-rw-r--r--launcher/FileIgnoreProxy.h13
-rw-r--r--launcher/FileSystem.cpp86
-rw-r--r--launcher/FileSystem.h9
-rw-r--r--launcher/LaunchController.cpp4
-rw-r--r--launcher/Markdown.cpp31
-rw-r--r--launcher/Markdown.h12
-rw-r--r--launcher/VersionProxyModel.cpp30
-rw-r--r--launcher/launch/steps/CheckJava.cpp15
-rw-r--r--launcher/launch/steps/CheckJava.h2
-rw-r--r--launcher/meta/Index.cpp8
-rw-r--r--launcher/minecraft/MinecraftInstance.cpp17
-rw-r--r--launcher/minecraft/PackProfile.cpp3
-rw-r--r--launcher/minecraft/auth/AccountList.cpp12
-rw-r--r--launcher/minecraft/auth/Yggdrasil.cpp1
-rw-r--r--launcher/minecraft/mod/DataPack.cpp2
-rw-r--r--launcher/minecraft/mod/Mod.cpp7
-rw-r--r--launcher/minecraft/mod/Mod.h2
-rw-r--r--launcher/minecraft/mod/ModFolderModel.cpp17
-rw-r--r--launcher/minecraft/mod/Resource.cpp11
-rw-r--r--launcher/minecraft/mod/Resource.h2
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.cpp89
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.h14
-rw-r--r--launcher/minecraft/mod/ResourcePack.cpp2
-rw-r--r--launcher/minecraft/mod/tasks/LocalResourceParse.cpp9
-rw-r--r--launcher/minecraft/mod/tasks/ModFolderLoadTask.cpp2
-rw-r--r--launcher/modplatform/EnsureMetadataTask.cpp6
-rw-r--r--launcher/modplatform/ModIndex.h1
-rw-r--r--launcher/modplatform/flame/FlameAPI.h28
-rw-r--r--launcher/modplatform/flame/FlameInstanceCreationTask.cpp11
-rw-r--r--launcher/modplatform/flame/FlamePackExportTask.cpp473
-rw-r--r--launcher/modplatform/flame/FlamePackExportTask.h90
-rw-r--r--launcher/modplatform/flame/PackManifest.cpp9
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.cpp86
-rw-r--r--launcher/modplatform/legacy_ftb/PackInstallTask.h27
-rw-r--r--launcher/modplatform/modrinth/ModrinthAPI.h6
-rw-r--r--launcher/modplatform/modrinth/ModrinthPackExportTask.cpp55
-rw-r--r--launcher/mojang/PackageManifest.cpp427
-rw-r--r--launcher/mojang/PackageManifest.h171
-rw-r--r--launcher/resources/OSX/OSX.qrc1
-rw-r--r--launcher/resources/OSX/scalable/launcher.svg57
-rw-r--r--launcher/resources/breeze_dark/scalable/launcher.svg57
-rw-r--r--launcher/resources/flat/flat.qrc1
-rw-r--r--launcher/resources/flat/scalable/launcher.svg57
-rw-r--r--launcher/resources/flat_white/flat_white.qrc1
-rw-r--r--launcher/resources/flat_white/scalable/launcher.svg2
-rw-r--r--launcher/resources/iOS/iOS.qrc1
-rw-r--r--launcher/resources/iOS/scalable/launcher.svg57
-rw-r--r--launcher/resources/pe_blue/pe_blue.qrc1
-rw-r--r--launcher/resources/pe_blue/scalable/launcher.svg57
-rw-r--r--launcher/resources/pe_colored/pe_colored.qrc1
-rw-r--r--launcher/resources/pe_colored/scalable/launcher.svg57
-rw-r--r--launcher/resources/pe_dark/pe_dark.qrc1
-rw-r--r--launcher/resources/pe_dark/scalable/launcher.svg57
-rw-r--r--launcher/resources/pe_light/pe_light.qrc1
-rw-r--r--launcher/resources/pe_light/scalable/launcher.svg57
-rw-r--r--launcher/translations/TranslationsModel.cpp31
-rw-r--r--launcher/translations/TranslationsModel.h29
-rw-r--r--launcher/ui/MainWindow.cpp853
-rw-r--r--launcher/ui/MainWindow.h1
-rw-r--r--launcher/ui/MainWindow.ui8
-rw-r--r--launcher/ui/dialogs/ExportInstanceDialog.cpp28
-rw-r--r--launcher/ui/dialogs/ExportPackDialog.cpp (renamed from launcher/ui/dialogs/ExportMrPackDialog.cpp)66
-rw-r--r--launcher/ui/dialogs/ExportPackDialog.h (renamed from launcher/ui/dialogs/ExportMrPackDialog.h)14
-rw-r--r--launcher/ui/dialogs/ExportPackDialog.ui (renamed from launcher/ui/dialogs/ExportMrPackDialog.ui)15
-rw-r--r--launcher/ui/dialogs/NewInstanceDialog.cpp4
-rw-r--r--launcher/ui/dialogs/ProgressDialog.cpp48
-rw-r--r--launcher/ui/dialogs/ProgressDialog.h2
-rw-r--r--launcher/ui/dialogs/ResourceDownloadDialog.cpp9
-rw-r--r--launcher/ui/instanceview/AccessibleInstanceView.cpp2
-rw-r--r--launcher/ui/instanceview/InstanceView.cpp26
-rw-r--r--launcher/ui/instanceview/InstanceView.h8
-rw-r--r--launcher/ui/pages/BasePage.h2
-rw-r--r--launcher/ui/pages/global/APIPage.cpp4
-rw-r--r--launcher/ui/pages/global/LauncherPage.ui2
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.cpp35
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.h2
-rw-r--r--launcher/ui/pages/instance/ExternalResourcesPage.ui11
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.cpp19
-rw-r--r--launcher/ui/pages/instance/InstanceSettingsPage.h3
-rw-r--r--launcher/ui/pages/instance/ManagedPackPage.cpp29
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp68
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.h5
-rw-r--r--launcher/ui/pages/instance/ResourcePackPage.cpp2
-rw-r--r--launcher/ui/pages/instance/ScreenshotsPage.cpp79
-rw-r--r--launcher/ui/pages/instance/ShaderPackPage.cpp3
-rw-r--r--launcher/ui/pages/instance/TexturePackPage.cpp2
-rw-r--r--launcher/ui/pages/instance/VersionPage.cpp307
-rw-r--r--launcher/ui/pages/instance/VersionPage.h55
-rw-r--r--launcher/ui/pages/instance/VersionPage.ui10
-rw-r--r--launcher/ui/pages/instance/WorldListPage.cpp1
-rw-r--r--launcher/ui/pages/modplatform/CustomPage.cpp (renamed from launcher/ui/pages/modplatform/VanillaPage.cpp)68
-rw-r--r--launcher/ui/pages/modplatform/CustomPage.h (renamed from launcher/ui/pages/modplatform/VanillaPage.h)12
-rw-r--r--launcher/ui/pages/modplatform/CustomPage.ui (renamed from launcher/ui/pages/modplatform/VanillaPage.ui)4
-rw-r--r--launcher/ui/pages/modplatform/legacy_ftb/Page.cpp4
-rw-r--r--launcher/ui/setupwizard/JavaWizardPage.cpp1
-rw-r--r--launcher/ui/setupwizard/SetupWizard.cpp2
-rw-r--r--launcher/ui/widgets/InfoFrame.cpp203
-rw-r--r--launcher/ui/widgets/InfoFrame.h43
-rw-r--r--launcher/ui/widgets/LanguageSelectionWidget.cpp28
-rw-r--r--launcher/ui/widgets/LanguageSelectionWidget.h25
-rw-r--r--launcher/ui/widgets/ModListView.cpp16
-rw-r--r--launcher/ui/widgets/PageContainer.cpp4
-rw-r--r--launcher/ui/widgets/WideBar.cpp13
-rw-r--r--libraries/murmur2/src/MurmurHash2.cpp2
-rwxr-xr-xprogram_info/genicons.sh5
-rw-r--r--tests/CMakeLists.txt3
-rw-r--r--tests/FileSystem_test.cpp16
-rw-r--r--tests/PackageManifest_test.cpp343
-rw-r--r--tests/ResourceModel_test.cpp8
-rw-r--r--tests/Task_test.cpp147
-rw-r--r--tests/Version_test.cpp17
118 files changed, 2241 insertions, 2946 deletions
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
new file mode 100644
index 00000000..2163db45
--- /dev/null
+++ b/.git-blame-ignore-revs
@@ -0,0 +1,4 @@
+# .git-blame-ignore-revs
+
+# tabs -> spaces
+bbb3b3e6f6e3c0f95873f22e6d0a4aaf350f49d9
diff --git a/.github/workflows/update-flake.yml b/.github/workflows/update-flake.yml
new file mode 100644
index 00000000..ad22120e
--- /dev/null
+++ b/.github/workflows/update-flake.yml
@@ -0,0 +1,28 @@
+name: Update Flake Lockfile
+
+on:
+ schedule:
+ # run weekly on sunday
+ - cron: "0 0 * * 0"
+ workflow_dispatch:
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ update-flake:
+ if: github.repository == 'PrismLauncher/PrismLauncher'
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - uses: cachix/install-nix-action@v22
+
+ - uses: DeterminateSystems/update-flake-lock@v19
+ with:
+ commit-msg: "chore(nix): update lockfile"
+ pr-title: "chore(nix): update lockfile"
+ pr-labels: |
+ Linux
+ simple change
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70a55319..c238086e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,38 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTOML_ENABLE_FLOAT16=0")
# set CXXFLAGS for build targets
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELEASE}")
+option(DEBUG_ADDRESS_SANITIZER "Enable Address Sanitizer in Debug builds" on)
+
+# If this is a Debug build turn on address sanitiser
+if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND DEBUG_ADDRESS_SANITIZER)
+ message(STATUS "Address Sanitizer enabled for Debug builds, Turn it off with -DDEBUG_ADDRESS_SANITIZER=off")
+ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
+ # using clang with clang-cl front end
+ message(STATUS "Address Sanitizer available on Clang MSVC frontend")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address /O1 /Oy-")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address /O1 /Oy-")
+ else()
+ # AppleClang and Clang
+ message(STATUS "Address Sanitizer available on Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer")
+ endif()
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ # GCC
+ message(STATUS "Address Sanitizer available on GCC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -O1 -fno-omit-frame-pointer")
+ link_libraries("asan")
+ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+ message(STATUS "Address Sanitizer available on MSVC")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address /O1 /Oy-")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address /O1 /Oy-")
+ else()
+ message(STATUS "Address Sanitizer not available on compiler ${CMAKE_CXX_COMPILER_ID}")
+ endif()
+endif()
+
option(ENABLE_LTO "Enable Link Time Optimization" off)
if(ENABLE_LTO)
@@ -332,7 +364,7 @@ elseif(UNIX)
set(BINARY_DEST_DIR "bin")
set(LIBRARY_DEST_DIR "lib${LIB_SUFFIX}")
- set(JARS_DEST_DIR "share/${Launcher_APP_BINARY_NAME}")
+ set(JARS_DEST_DIR "share/${Launcher_Name}")
# install as bundle with no dependencies included
set(INSTALL_BUNDLE "nodeps")
@@ -345,7 +377,7 @@ elseif(UNIX)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_SVG} DESTINATION "${KDE_INSTALL_ICONDIR}/hicolor/scalable/apps")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_mrpack_MIMEInfo} DESTINATION ${KDE_INSTALL_MIMEDIR})
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/launcher/qtlogging.ini" DESTINATION "${KDE_INSTALL_DATADIR}/${Launcher_Name}")
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/launcher/qtlogging.ini" DESTINATION "share/${Launcher_Name}")
if(Launcher_ManPage)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_ManPage} DESTINATION "${KDE_INSTALL_MANDIR}/man6")
diff --git a/flake.lock b/flake.lock
index 87586643..91a67f08 100644
--- a/flake.lock
+++ b/flake.lock
@@ -21,11 +21,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1683560683,
- "narHash": "sha256-XAygPMN5Xnk/W2c1aW