aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml8
-rw-r--r--.github/ISSUE_TEMPLATE/config.yml4
-rw-r--r--.github/ISSUE_TEMPLATE/suggestion.yml10
-rw-r--r--.gitignore13
-rw-r--r--.gitmodules4
-rw-r--r--BUILD.md75
-rw-r--r--CMakeLists.txt41
-rw-r--r--COPYING.md25
-rw-r--r--README.md94
-rw-r--r--buildconfig/BuildConfig.cpp.in2
-rw-r--r--buildconfig/BuildConfig.h9
-rw-r--r--doc/polymc.1.txt (renamed from doc/multimc.1.txt)22
-rw-r--r--launcher/Application.cpp160
-rw-r--r--launcher/Application.h10
-rw-r--r--launcher/CMakeLists.txt5
-rw-r--r--launcher/java/JavaUtils.cpp2
-rw-r--r--launcher/minecraft/auth/steps/MSAStep.cpp3
-rw-r--r--launcher/package/rpm/MultiMC5.spec52
-rw-r--r--launcher/package/rpm/README.md12
-rw-r--r--launcher/package/ubuntu/README.md14
-rw-r--r--launcher/package/ubuntu/multimc/DEBIAN/control12
-rwxr-xr-xlauncher/package/ubuntu/multimc/DEBIAN/postrm3
-rw-r--r--launcher/package/ubuntu/multimc/opt/multimc/icon.svg353
-rwxr-xr-xlauncher/package/ubuntu/multimc/opt/multimc/run.sh33
-rwxr-xr-xlauncher/package/ubuntu/multimc/usr/share/applications/multimc.desktop16
-rw-r--r--launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.197
-rw-r--r--launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml54
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp4
-rw-r--r--launcher/ui/pages/global/LauncherPage.cpp17
-rw-r--r--launcher/ui/pages/global/LauncherPage.ui63
-rw-r--r--launcher/ui/setupwizard/AnalyticsWizardPage.cpp63
-rw-r--r--launcher/ui/setupwizard/AnalyticsWizardPage.h25
-rw-r--r--launcher/ui/setupwizard/SetupWizard.cpp2
-rw-r--r--libraries/README.md7
-rw-r--r--libraries/ganalytics/CMakeLists.txt17
-rw-r--r--libraries/ganalytics/LICENSE.txt24
-rw-r--r--libraries/ganalytics/README.md34
-rw-r--r--libraries/ganalytics/include/ganalytics.h67
-rw-r--r--libraries/ganalytics/src/ganalytics.cpp237
-rw-r--r--libraries/ganalytics/src/ganalytics_worker.cpp254
-rw-r--r--libraries/ganalytics/src/ganalytics_worker.h65
-rw-r--r--libraries/javacheck/CMakeLists.txt2
-rw-r--r--libraries/launcher/CMakeLists.txt2
m---------libraries/quazip0
-rw-r--r--notsecrets/CMakeLists.txt18
-rw-r--r--notsecrets/README.md25
-rw-r--r--notsecrets/Secrets.cpp42
-rw-r--r--notsecrets/Secrets.h8
-rwxr-xr-xpackages/debian/makedeb.sh10
-rw-r--r--packages/debian/polymc/DEBIAN/control.template9
-rw-r--r--packages/debian/polymc/usr/share/applications/polymc.desktop11
-rw-r--r--packages/flatpak/BUILDING.md28
-rw-r--r--packages/flatpak/org.polymc.PolyMC.desktop11
-rw-r--r--packages/flatpak/org.polymc.PolyMC.yml74
-rw-r--r--program_info/CMakeLists.txt14
-rw-r--r--program_info/Launcher.icns (renamed from notsecrets/Launcher.icns)bin304757 -> 304757 bytes
-rw-r--r--program_info/Launcher.ico (renamed from notsecrets/Launcher.ico)bin102134 -> 102134 bytes
-rw-r--r--program_info/Launcher.manifest (renamed from notsecrets/Launcher.manifest)0
-rw-r--r--program_info/README.md5
-rwxr-xr-xprogram_info/genicons.sh (renamed from notsecrets/genicons.sh)0
-rw-r--r--program_info/launcher.rc (renamed from notsecrets/launcher.rc)0
-rw-r--r--program_info/logo.qrc (renamed from notsecrets/logo.qrc)0
-rw-r--r--program_info/logo.svg (renamed from notsecrets/logo.svg)0
-rw-r--r--program_info/polymc.desktop11
64 files changed, 360 insertions, 1922 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 72986e94..eb560f0e 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -5,12 +5,12 @@ body:
- type: markdown
attributes:
value: |
- If you need help with running Minecraft, please visit us [on our Discord](https://discord.gg/multimc) before making a bug report.
+ If you need help with running Minecraft, please visit us on our Discord before making a bug report.
Before submitting a bug report, please make sure you have read this *entire* form, and that:
- * You have read the [FAQ](https://github.com/MultiMC/Launcher/wiki/FAQ) and it has not answered your question
+ * You have read the [FAQ](https://github.com/PolyMC/PolyMC/wiki/FAQ) and it has not answered your question
* Your bug is not caused by Minecraft or any mods you have installed.
- * Your issue has not been reported before, [make sure to use the search function!](https://github.com/MultiMC/Launcher/issues)
+ * Your issue has not been reported before, [make sure to use the search function!](https://github.com/PolyMC/PolyMC/issues)
**Do not forget to give your issue a descriptive title.** "Bug in the instance screen" makes it hard to distinguish issues at a glance.
- type: dropdown
@@ -48,4 +48,4 @@ body:
label: This issue is unique
options:
- label: I have searched the issue tracker and did not find an issue describing my bug.
- required: true
+ required: true
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 089f1eb5..932d0c8f 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- - name: MultiMC Discord
- url: https://discord.gg/multimc
+ - name: PolyMC Matrix Support Room
+ url: https://matrix.to/#/#support:polymc.org
about: Please ask for support here before opening an issue.
diff --git a/.github/ISSUE_TEMPLATE/suggestion.yml b/.github/ISSUE_TEMPLATE/suggestion.yml
index 88bf66cf..b58a6672 100644
--- a/.github/ISSUE_TEMPLATE/suggestion.yml
+++ b/.github/ISSUE_TEMPLATE/suggestion.yml
@@ -5,25 +5,25 @@ body:
- type: markdown
attributes:
value: |
- ### Use this form to suggest a feature for MultiMC.
+ ### Use this form to suggest a feature for PolyMC.
- type: input
attributes:
label: Role
- description: In what way do you use MultiMC that needs this feature?
+ description: In what way do you use PolyMC that needs this feature?
placeholder: I play modded Minecraft.
validations:
required: true
- type: input
attributes:
label: Suggestion
- description: What do you want MultiMC to do?
+ description: What do you want PolyMC to do?
placeholder: I want the cat button to meow.
validations:
required: true
- type: input
attributes:
label: Benefit
- description: Why do you need MultiMC to do this?
+ description: Why do you need PolyMC to do this?
placeholder: so that I can always hear a cat when I need to.
validations:
required: true
@@ -32,7 +32,7 @@ body:
label: This suggestion is unique
options:
- label: I have searched the issue tracker and did not find an issue describing my suggestion, especially not one that has been rejected.
- required: true
+ required: true
- type: textarea
attributes:
label: You may use the editor below to elaborate further.
diff --git a/.gitignore b/.gitignore
index 69dda72c..88163fc2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,16 @@ tags
branding/
secrets/
run/
+
+.cache/
+
+# Flatpak builds
+.flatpak-builder
+flatbuild
+builddir
+# Deb
+packages/debian/polymc/usr/bin
+packages/debian/polymc/usr/lib
+packages/debian/polymc/usr/share/polymc/jars
+packages/debian/polymc.deb
+packages/debian/polymc/DEBIAN/control \ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
index 04a561c2..6b90601f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,5 +4,5 @@
pushurl = git@github.com:MultiMC/libnbtplusplus.git
[submodule "libraries/quazip"]
path = libraries/quazip
- url = https://github.com/MultiMC/quazip.git
- pushurl = git@github.com:MultiMC/quazip.git
+ url = https://github.com/PolyMC/quazip.git
+ pushurl = git@github.com:PolyMC/quazip.git
diff --git a/BUILD.md b/BUILD.md
index ecc46260..2345d6ad 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -9,27 +9,13 @@ Build Instructions
* [Windows](#windows)
* [macOS](#macos)
-# Note
-
-MultiMC is a portable application and is not supposed to be installed into any system folders.
-That would be anything outside your home folder. Before running `make install`, make sure
-you set the install path to something you have write access to. Never build this under
-an administrator/root level account. Don't use `sudo`. It won't work and it's not supposed to work.
-Also note that this guide is for development purposes only.
-**No support is given for building your own fork or special build for any reason whatsoever**.
-
-# Branding, identifying marks and API keys
-
-The logo and related assets are All Rights Reserved and may only be used in official builds of MultiMC hosted on multimc.org, and as such, are not, and will not be included in this repository. The source is only provided for the purpose of collaboration.
-
-API keys are necessary for Microsoft account functionality. More info in [(Not) Secrets](https://github.com/MultiMC/Launcher/tree/develop/notsecrets)
# Getting the source
Clone the source code using git and grab all the submodules:
```
-git clone https://github.com/MultiMC/Launcher.git
+git clone https://github.com/PolyMC/PolyMC.git
git submodule init
git submodule update
```
@@ -40,33 +26,58 @@ Getting the project to build and run on Linux is easy if you use any modern and
## Build dependencies
* A C++ compiler capable of building C++11 code.
-* Qt 5.6+ Development tools (http://qt-project.org/downloads) ("Qt Online Installer for Linux (64 bit)") or the equivalent from your package manager. It is always better to use the Qt from your distribution, as long as it has a new enough version.
-* cmake 3.1 or newer
-* zlib (for example, `zlib1g-dev`)
-* Java JDK 8 (for example, `openjdk-8-jdk`)
-* GL headers (for example, `libgl1-mesa-dev`)
+* Qt Development tools 5.6 or newer (`qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5core5a libqt5network5 libqt5gui5` on Debian-based system)
+* cmake 3.1 or newer (`cmake` on Debian-based system)
+* zlib (`zlib1g-dev` on Debian-based system)
+* Java JDK (`openjdk-17-jdk`on Debian-based system)
+* GL headers (`libgl1-mesa-dev` on Debian-based system)
+
+### Building a .deb
+
+You need to install the build dependencies first
+
+```
+git clone https://github.com/PolyMC/PolyMC.git
+git submodule init && git submodule update
+cd packages/debian
+./makedeb.sh
+```
+
+If everything works correctly, the .deb will be next to the build script, in `PolyMC/packages/debian`
### Building from command line
You need a source folder, a build folder and an install folder.
-Let's say you want everything in `~/MultiMC/`:
-
```
# make all the folders
-mkdir ~/MultiMC && cd ~/MultiMC
+mkdir ~/PolyMC && cd ~/PolyMC
mkdir build
mkdir install
# clone the complete source
-git clone --recursive https://github.com/MultiMC/Launcher.git src
+git clone --recursive https://github.com/PolyMC/PolyMC.git src
# configure the project
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ../src
-# build & install (use -j with the number of cores your CPU has)
-make -j8 install
+make -j$(nproc) install
```
You can use IDEs like KDevelop or QtCreator to open the CMake project if you want to work on the code.
+### Building & Installing to the System
+This is the preferred method for installation, and is suitable for packages.
+
+```
+git clone --recursive https://github.com/PolyMC/PolyMC.git && cd PolyMC
+
+# configure everything
+cmake -S . -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="/usr" \ # Use "/usr" for packages, otherwise, leave it at the default "/usr/local".
+ -DLauncher_LAYOUT=lin-system
+
+make -j$(nproc) install # Optionally specify DESTDIR for packages (i.e. DESTDIR=${pkgdir})
+```
+
### Installing Qt using the installer (optional)
1. Run the Qt installer.
2. Choose a place to install Qt.
@@ -91,7 +102,7 @@ You can use IDEs like KDevelop or QtCreator to open the CMake project if you wan
6. Cross your fingers and press the Run button (bottom left of Qt Creator).
- If the project builds successfully it will run and the Launcher window will pop up.
-**If this doesn't work for you, let us know on IRC ([Esper/#MultiMC](http://webchat.esper.net/?nick=&channels=MultiMC))!**
+**If this doesn't work for you, let us know on our Discord.**
# Windows
@@ -169,15 +180,15 @@ ssleay32.dll
zlib1.dll
```
-**These build instructions worked for me (Drayshak) on a fresh Windows 8 x64 Professional install. If they don't work for you, let us know on IRC ([Esper/#MultiMC](http://webchat.esper.net/?nick=&channels=MultiMC))!**
+**These build instructions worked for me (Drayshak) on a fresh Windows 8 x64 Professional install. If they don't work for you, let us know on our Discord.**
### Compile from command line on Windows
1. If you installed Qt with the web installer, there should be a shortcut called `Qt 5.4 for Desktop (MinGW 4.9 32-bit)` in the Start menu on Windows 7 and 10. Best way to find it is to search for it. Do note you cannot just use cmd.exe, you have to use the shortcut, otherwise the proper MinGW software will not be on the PATH.
-2. Once that is open, change into your user directory, and clone MultiMC by doing `git clone --recursive https://github.com/MultiMC/Launcher.git`, and change directory to the folder you cloned to.
+2. Once that is open, change into your user directory, and clone PolyMC by doing `git clone --recursive https://github.com/PolyMC/PolyMC.git`, and change directory to the folder you cloned to.
3. Make a build directory, and change directory to the directory and do `cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:\Path\that\makes\sense\for\you`. By default, it will install to C:\Program Files (x86), which you might not want, if you want a local installation. If you want to install it to that directory, make sure to run the command window as administrator.
3. Do `mingw32-make -jX`, where X is the number of cores your CPU has plus one.
4. Now to wait for it to compile. This could take some time. Hopefully it compiles properly.
-5. Run the command `mingw32-make install`, and it should install MultiMC, to whatever the `-DCMAKE_INSTALL_PREFIX` was.
-6. In most cases, whenever compiling, the OpenSSL dll's aren't put into the directory to where MultiMC installs, meaning you cannot log in. The best way to fix this is just to do `copy C:\OpenSSL-Win32\*.dll C:\Where\you\installed\MultiMC\to`. This should copy the required OpenSSL dll's to log in.
+5. Run the command `mingw32-make install`, and it should install PolyMC, to whatever the `-DCMAKE_INSTALL_PREFIX` was.
+6. In most cases, whenever compiling, the OpenSSL dll's aren't put into the directory to where PolyMC installs, meaning you cannot log in. The best way to fix this is just to do `copy C:\OpenSSL-Win32\*.dll C:\Where\you\installed\PolyMC\to`. This should copy the required OpenSSL dll's to log in.
# macOS
@@ -200,7 +211,7 @@ xcode-select --install
Pick an installation path - this is where the final `.app` will be constructed when you run `make install`. Supply it as the `CMAKE_INSTALL_PREFIX` argument during CMake configuration.
```
-git clone --recursive https://github.com/MultiMC/Launcher.git
+git clone --recursive https://github.com/PolyMC/PolyMC.git
cd Launcher
mkdir build
cd build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1c6ac3b..5b89ff6b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,11 +81,11 @@ set(Launcher_PASTE_EE_API_KEY "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" CACHE
# Imgur API Client ID
set(Launcher_IMGUR_CLIENT_ID "5b97b0713fba4a3" CACHE STRING "Client ID you can get from Imgur when you register an application")
-# Google analytics ID
-set(Launcher_ANALYTICS_ID "UA-87731965-2" CACHE STRING "ID you can get from Google analytics")
+# MSA Client ID
+set(Launcher_MSA_CLIENT_ID "17b47edd-c884-4997-926d-9e7f9a6b4647" CACHE STRING "Client ID you can get from Microsoft Identity Platform when you register an application")
# Bug tracker URL
-set(Launcher_BUG_TRACKER_URL "" CACHE STRING "URL for the bug tracker.")
+set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STRING "URL for the bug tracker.")
# Discord URL
set(Launcher_DISCORD_URL "" CACHE STRING "URL for the Discord guild.")
@@ -93,9 +93,6 @@ set(Launcher_DISCORD_URL "" CACHE STRING "URL for the Discord guild.")
# Subreddit URL
set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.")
-# Use the secrets library or a public stub?
-option(Launcher_EMBED_SECRETS "Determines whether to embed secrets. Secrets are separate and non-public." OFF)
-
#### Check the current Git commit and branch
include(GetGitRevisionDescription)
get_git_head_revision(Launcher_GIT_REFSPEC Launcher_GIT_COMMIT)
@@ -134,17 +131,13 @@ endif()
####################################### Secrets #######################################
-if(Launcher_EMBED_SECRETS)
- add_subdirectory(secrets)
-else()
- add_subdirectory(notsecrets)
-endif()
+add_subdirectory(program_info)
####################################### Install layout #######################################
# How to install the build results
-set(Launcher_LAYOUT "auto" CACHE STRING "The layout for the launcher installation (auto, win-bundle, lin-nodeps, mac-bundle)")
-set_property(CACHE Launcher_LAYOUT PROPERTY STRINGS auto win-bundle lin-nodeps mac-bundle)
+set(Launcher_LAYOUT "auto" CACHE STRING "The layout for the launcher installation (auto, win-bundle, lin-nodeps, lin-system, mac-bundle)")
+set_property(CACHE Launcher_LAYOUT PROPERTY STRINGS auto win-bundle lin-nodeps lin-system mac-bundle)
if(Launcher_LAYOUT STREQUAL "auto")
if(UNIX AND APPLE)
@@ -209,6 +202,25 @@ elseif(Launcher_LAYOUT_REAL STREQUAL "lin-nodeps")
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" DESTINATION ${BUNDLE_DEST_DIR} RENAME ${Launcher_Name})
+elseif(Launcher_LAYOUT_REAL STREQUAL "lin-system")
+ set(Launcher_APP_BINARY_NAME "polymc" CACHE STRING "Name of the Launcher binary")
+ set(Launcher_BINARY_DEST_DIR "bin" CACHE STRING "Path to the binary directory")
+ set(Launcher_LIBRARY_DEST_DIR "lib${LIB_SUFFIX}" CACHE STRING "Path to the library directory")
+ set(Launcher_SHARE_DEST_DIR "share/polymc" CACHE STRING "Path to the shared data directory")
+ set(JARS_DEST_DIR "${Launcher_SHARE_DEST_DIR}/jars")
+ set(Launcher_DESKTOP_DEST_DIR "share/applications" CACHE STRING "Path to the desktop file directory")
+
+ set(BINARY_DEST_DIR ${Launcher_BINARY_DEST_DIR})
+ set(LIBRARY_DEST_DIR ${Launcher_LIBRARY_DEST_DIR})
+
+ MESSAGE(STATUS "Compiling for linux system with ${Launcher_SHARE_DEST_DIR} and LAUNCHER_LINUX_DATADIR")
+ SET(Launcher_APP_BINARY_DEFS "-DMULTIMC_JARS_LOCATION=${CMAKE_INSTALL_PREFIX}/${JARS_DEST_DIR}" "-DLAUNCHER_LINUX_DATADIR")
+
+ install(FILES ${Launcher_Desktop} DESTINATION ${Launcher_DESKTOP_DEST_DIR})
+
+ # install as bundle with no dependencies included
+ set(INSTALL_BUNDLE "nodeps")
+
elseif(Launcher_LAYOUT_REAL STREQUAL "win-bundle")
set(BINARY_DEST_DIR ".")
set(LIBRARY_DEST_DIR ".")
@@ -241,7 +253,6 @@ set(NBT_NAME Launcher_nbt++)
set(NBT_DEST_DIR ${LIBRARY_DEST_DIR})
add_subdirectory(libraries/libnbtplusplus)
-add_subdirectory(libraries/ganalytics) # google analytics library
add_subdirectory(libraries/systeminfo) # system information library
add_subdirectory(libraries/hoedown) # markdown parser
add_subdirectory(libraries/launcher) # java based launcher part for Minecraft
@@ -251,7 +262,7 @@ add_subdirectory(libraries/quazip) # zip manipulation library
add_subdirectory(libraries/rainbow) # Qt extension for colors
add_subdirectory(libraries/iconfix) # fork of Qt's QIcon loader
add_subdirectory(libraries/LocalPeer) # fork of a library from Qt solutions
-add_subdirectory(libraries/classparser) # google analytics library
+add_subdirectory(libraries/classparser) # class parser library
add_subdirectory(libraries/optional-bare)
add_subdirectory(libraries/tomlc99) # toml parser
add_subdirectory(libraries/katabasis) # An OAuth2 library that tried to do too much
diff --git a/COPYING.md b/COPYING.md
index 4c19bbc2..04bd1f11 100644
--- a/COPYING.md
+++ b/COPYING.md
@@ -1,17 +1,20 @@
-# MultiMC
+# PolyMC
- Copyright 2012-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
+ Copyright (C) 2012-2021 MultiMC Contributors
+ Copyright (C) 2021 PolyMC Contributors
- http://www.apache.org/licenses/LICENSE-2.0
+ 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, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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/>.
# MinGW runtime (Windows)
diff --git a/README.md b/README.md
index 7c278866..f1292a94 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,33 @@
<p align="center">
- <img src="https://avatars2.githubusercontent.com/u/5411890" alt="MultiMC logo"/>
+ <img src="https://avatars.githubusercontent.com/u/96310119" alt="PolyMC logo"/>
</p>
-MultiMC 5
+PolyMC 5
=========
-MultiMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.
+PolyMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.
-## Development
-If you want to contribute, talk to us on [Discord](https://discord.gg/multimc) first.
+This is a **fork** of the MultiMC Launcher and not endorsed by MultiMC. The PolyMC community felt that the maintainer was not acting in the spirit of Free Software so this fork was made. Read "[Why was this fork made?](https://github.com/PolyMC/PolyMC/wiki/FAQ)" on the wiki for more details.
+
+## Packages
+Several source build packages are available, along with experimental pre-built generic packages.
-While blindly submitting PRs is definitely possible, they're not necessarily going to get accepted.
+- An [AUR package](https://aur.archlinux.org/packages/polymc-git/) is available.
+- A Gentoo ebuild is available in the [swirl](https://git.swurl.xyz/swirl/ebuilds) overlay, named `games-action/polymc`. Check the README for instructions on how to add the overlay.
+- A Flatpak is available. Instructions on building it can be found in [packages/flatpak/BUILDING.md](packages/flatpak/BUILDING.md).
+- Generic, prebuilt packages (archived by version) can be found [here](https://packages.polymc.org/) ([latest](https://packages.polymc.org/latest))
+- Last build status: https://jenkins.polymc.org/job/PolyMC/lastBuild/
+- [Linux (AMD64) System](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst) ([SHA256](https://packages.polymc.org/latest/lin64-system/lin64-system.tar.zst.sha256)) - this is a generic system package intended to be used as a base for making distro-specific packages.
+- [Windows (32-bit)](https://packages.polymc.org/latest/win32/win32.zip) ([SHA256](https://packages.polymc.org/latest/win32/win32.zip.sha256)) - this is a portable package, you can extract it anywhere and run it. This package needs testing.
+- [Debian (AMD64)](https://packages.polymc.org/latest/deb/polymc-amd64.deb) ([SHA256](https://packages.polymc.org/latest/deb/polymc-amd64.deb.sha256)) - this is intended to be installed with `dpkg -i`. Alternatively, you may build the `.deb` yourself, by going to `packages/debian` and running `./makedeb.sh`.
+- [AppImage (AMD64)](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage) ([SHA256](https://packages.polymc.org/latest/appimage/PolyMC-latest-x86_64.AppImage.sha256)) - `chmod +x` must be run on this file before usage. This should work on any distribution
+- MacOS currently does not have any packages. We are still working on setting up MacOS packaging.
-We aren't looking for flashy features, but expanding upon the existing feature set without distruption or endangering future viability of the project is OK.
+## Development
+If you want to contribute to PolyMC you might find it useful to join [#development:polymc.org on Matrix](https://matrix.to/#/#development:polymc.org) or join [our Discord server](https://discord.gg/xq7fxrgtMP), which is bridged with the PolyMC Matrix rooms. Thank you!
### Building
-If you want to build MultiMC yourself, check [BUILD.md](BUILD.md) for build instructions.
+If you want to build PolyMC yourself, check [BUILD.md](BUILD.md) for build instructions.
### Code formatting
Just follow the existing formatting.
@@ -27,54 +39,24 @@ In general, in order of importance:
* Indent with 4 space unless it's in a submodule.
* Keep lists (of arguments, parameters, initializers...) as lists, not paragraphs. It should either read from top to bottom, or left to right. Not both.
-
## Translations
-Translations can be done [on crowdin](https://translate.multimc.org). Please avoid making direct pull requests to the translations repository.
+TODO
## Forking/Redistributing/Custom builds policy
-We keep Launcher open source because we think it's important to be able to see the source code for a project like this, and we do so using the Apache license.
-
-Part of the reason for using the Apache license is that we don't want people using the "MultiMC" name when redistributing the project. This means people must take the time to go through the source code and remove all references to "MultiMC", including but not limited to the project icon and the title of windows, (no *MultiMC-fork* in the title).
-
-Apache covers reasonable use for the name - a mention of the project's origins in the About dialog and the license is acceptable. However, it should be abundantly clear that the project is a fork *without* implying that you have our blessing.
-
-
-## License
-Copyright &copy; 2013-2021 MultiMC Contributors
-
-Licensed under the Apache License, Version 2.0 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](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.
-
-## Build status
-### Linux (Intel32)
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Linux32_Build&guest=1">
-Build: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Linux32_Build)/statusIcon"/>
-</a>
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Linux32_Deploy&guest=1">
-Deploy: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Linux32_Deploy)/statusIcon"/>
-</a>
-
-### Linux (AMD64)
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Linux64_Build&guest=1">
-Build: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Linux64_Build)/statusIcon"/>
-</a>
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Linux64_Deploy&guest=1">
-Deploy: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Linux64_Deploy)/statusIcon"/>
-</a>
-
-### macOS (AMD64)
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_MacOS_Build&guest=1">
-Build: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_MacOS_Build)/statusIcon"/>
-</a>
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_MacOS_Deploy&guest=1">
-Deploy: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_MacOS_Deploy)/statusIcon"/>
-</a>
-
-### Windows (Intel32)
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Windows_Build&guest=1">
-Build: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Windows_Build)/statusIcon"/>
-</a>
-<a href="https://teamcity.multimc.org/viewType.html?buildTypeId=Launcher_Launcher_Windows_Deploy&guest=1">
-Deploy: <img src="https://teamcity.multimc.org/app/rest/builds/buildType:(id:Launcher_Launcher_Windows_Deploy)/statusIcon"/>
-</a>
+Do whatever you want, we don't care. Just follow the license. If you have any questions about this feel free to ask in an issue.
+
+## 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. Be sure to enable spaces first (Settings -> Labs -> Spaces), and then you may join the space:
+
+[![PolyMC Space](https://img.shields.io/matrix/polymc:polymc.org?label=PolyMC%20Space&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#polymc:polymc.org)
+
+Matrix's support for spaces is still in development, so if you have issues accessing rooms via the space, then you can join the rooms directly:
+
+[![Support](https://img.shields.io/matrix/support:polymc.org?label=%23support&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#support:polymc.org)
+[![Discussion](https://img.shields.io/matrix/discussion:polymc.org?label=%23discussion&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#discussion:polymc.org)
+[![Development](https://img.shields.io/matrix/development:polymc.org?label=%23development&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#development:polymc.org)
+[![News](https://img.shields.io/matrix/news:polymc.org?label=%23news&server_fqdn=matrix.polymc.org)](https://matrix.to/#/#news:polymc.org)
diff --git a/buildconfig/BuildConfig.cpp.in b/buildconfig/BuildConfig.cpp.in
index 9e449aec..af8845dc 100644
--- a/buildconfig/BuildConfig.cpp.in
+++ b/buildconfig/BuildConfig.cpp.in
@@ -24,7 +24,6 @@ Config::Config()
BUILD_PLATFORM = "@Launcher_BUILD_PLATFORM@";
UPDATER_BASE = "@Launcher_UPDATER_BASE@";
- ANALYTICS_ID = "@Launcher_ANALYTICS_ID@";
NOTIFICATION_URL = "@Launcher_NOTIFICATION_URL@";
FULL_VERSION_STR = "@Launcher_VERSION_MAJOR@.@Launcher_VERSION_MINOR@.@Launcher_VERSION_BUILD@";
@@ -45,6 +44,7 @@ Config::Config()
NEWS_RSS_URL = "@Launcher_NEWS_RSS_URL@";
PASTE_EE_KEY = "@Launcher_PASTE_EE_API_KEY@";
IMGUR_CLIENT_ID = "@Launcher_IMGUR_CLIENT_ID@";
+ MSA_CLIENT_ID = "@Launcher_MSA_CLIENT_ID@";
META_URL = "@Launcher_META_URL@";
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
diff --git a/buildconfig/BuildConfig.h b/buildconfig/BuildConfig.h
index ac05f288..009fb2bc 100644
--- a/buildconfig/BuildConfig.h
+++ b/buildconfig/BuildConfig.h
@@ -46,9 +46,6 @@ public:
QString USER_AGENT_UNCACHED;
- /// Google analytics ID
- QString ANALYTICS_ID;
-
/// URL for notifications
QString NOTIFICATION_URL;
@@ -81,6 +78,11 @@ public:
QString IMGUR_CLIENT_ID;
/**
+ * Client ID you can get from Microsoft Identity Platform when you register an application
+ */
+ QString MSA_CLIENT_ID;
+
+ /**
* Metadata repository URL prefix
*/
QString META_URL;
@@ -110,3 +112,4 @@ public:
};
extern const Config BuildConfig;
+
diff --git a/doc/multimc.1.txt b/doc/polymc.1.txt
index da65af2e..9ba34662 100644
--- a/doc/multimc.1.txt
+++ b/doc/polymc.1.txt
@@ -1,35 +1,35 @@
-MULTIMC(1)
+POLYMC(1)
==========
:doctype: manpage
NAME
----
-multimc - a launcher and instance manager for Minecraft.
+polymc - a launcher and instance manager for Minecraft.
SYNOPSIS
--------
-*multimc* ['OPTIONS']
+*polymc* ['OPTIONS']
DESCRIPTION
-----------
-MultiMC is a custom launcher for Minecraft that allows you to easily manage
+PolyMC 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 MultiMC.
+Here are the current features of PolyMC.
OPTIONS
-------
*-d, --dir*='DIRECTORY'::
- Use 'DIRECTORY' as the MultiMC root.
+ Use 'DIRECTORY' as the PolyMC root.
*-l, --launch*='INSTANCE_ID'::
Launch the instance specified by 'INSTANCE_ID'.
*--alive*::
- Write a small 'live.check' file after MultiMC starts.
+ Write a small 'live.check' file after PolyMC starts.
*-h, --help*::
Display help text and exit.
@@ -49,16 +49,18 @@ EXIT STATUS
BUGS
----
-<https://github.com/MultiMC/Launcher/issues>
+<https://github.com/PolyMC/PolyMC/issues>
RESOURCES
---------
-GitHub: <https://github.com/MultiMC/Launcher>
+GitHub: <https://github.com/PolyMC/PolyMC>
-Main website: <https://multimc.org>
+Main website: <https://polymc.org>
AUTHORS
-------
peterix <peterix@gmail.com>
+swurl <swurl@swurl.xyz>
+
// vim: syntax=asciidoc
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 958c5e3d..cbfdcbe2 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -26,7 +26,6 @@
#include "ui/setupwizard/SetupWizard.h"
#include "ui/setupwizard/LanguageWizardPage.h"
#include "ui/setupwizard/JavaWizardPage.h"
-#include "ui/setupwizard/AnalyticsWizardPage.h"
#include "ui/dialogs/CustomMessageBox.h"
@@ -73,11 +72,8 @@
#include <DesktopServices.h>
#include <LocalPeer.h>
-#include <ganalytics.h>
#include <sys.h>
-#include <Secrets.h>
-
#if defined Q_OS_WIN32
#ifndef WIN32_LEAN_AND_MEAN
@@ -308,7 +304,13 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
}
else
{
-#if defined(Q_OS_MAC)
+#ifdef LAUNCHER_LINUX_DATADIR
+ QString xdgDataHome = QFile::decodeName(qgetenv("XDG_DATA_HOME"));
+ if (xdgDataHome.isEmpty())
+ xdgDataHome = QDir::homePath() + QLatin1String("/.local/share");
+ dataPath = xdgDataHome + "/polymc";
+ adjustedBy += "XDG standard " + dataPath;
+#elif defined(Q_OS_MAC)
QDir foo(FS::PathCombine(applicationDirPath(), "../../Data"));
dataPath = foo.absolutePath();
adjustedBy += "Fallback to special Mac location " + dataPath;
@@ -533,6 +535,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
FS::updateTimestamp(m_rootPath);
#endif
+#ifdef MULTIMC_JARS_LOCATION
+ m_jarsPath = TOSTRING(MULTIMC_JARS_LOCATION);
+#endif
+
qDebug() << BuildConfig.LAUNCHER_DISPLAYNAME << ", (c) 2013-2021 " << BuildConfig.LAUNCHER_COPYRIGHT;
qDebug() << "Version : " << BuildConfig.printableVersionString();
qDebug() << "Git commit : " << BuildConfig.GIT_COMMIT;
@@ -711,14 +717,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
// paste.ee API key
m_settings->registerSetting("PasteEEAPIKey", "multimc");
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- // Analytics
- m_settings->registerSetting("Analytics", true);
- m_settings->registerSetting("AnalyticsSeen", 0);
- m_settings->registerSetting("AnalyticsClientID", QString());
- }
-
// Init page provider
{
m_globalSettingsProvider = std::make_shared<GenericPageProvider>(tr("Settings"));
@@ -900,46 +898,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
qDebug() << "<> Application theme set.";
}
- // Initialize analytics
- [this]()
- {
- const int analyticsVersion = 2;
- if(BuildConfig.ANALYTICS_ID.isEmpty())
- {
- return;
- }
-
- auto analyticsSetting = m_settings->getSetting("Analytics");
- connect(analyticsSetting.get(), &Setting::SettingChanged, this, &Application::analyticsSettingChanged);
- QString clientID = m_settings->get("AnalyticsClientID").toString();
- if(clientID.isEmpty())
- {
- clientID = QUuid::createUuid().toString();
- clientID.remove(QLatin1Char('{'));
- clientID.remove(QLatin1Char('}'));
- m_settings->set("AnalyticsClientID", clientID);
- }
- m_analytics = new GAnalytics(BuildConfig.ANALYTICS_ID, clientID, analyticsVersion, this);
- m_analytics->setLogLevel(GAnalytics::Debug);
- m_analytics->setAnonymizeIPs(true);
- // FIXME: the ganalytics library has no idea about our fancy shared pointers...
- m_analytics->setNetworkAccessManager(network().get());
-
- if(m_settings->get("AnalyticsSeen").toInt() < m_analytics->version())
- {
- qDebug() << "Analytics info not seen by user yet (or old version).";
- return;
- }
- if(!m_settings->get("Analytics").toBool())
- {
- qDebug() << "Analytics disabled by user.";
- return;
- }
-
- m_analytics->enable();
- qDebug() << "<> Initialized analytics with tid" << BuildConfig.ANALYTICS_ID;
- }();
-
if(createSetupWizard())
{
return;
@@ -966,29 +924,13 @@ bool Application::createSetupWizard()
}
return false;
}();
- bool analyticsRequired = [&]()
- {
- if(BuildConfig.ANALYTICS_ID.isEmpty())
- {
- return false;
- }
- if (!settings()->get("Analytics").toBool())
- {
- return false;
- }
- if (settings()->get("AnalyticsSeen").toInt() < analytics()->version())
- {
- return true;
- }
- return false;
- }();
bool languageRequired = [&]()
{
if (settings()->get("Language").toString().isEmpty())
return true;
return false;
}();
- bool wizardRequired = javaRequired || analyticsRequired || languageRequired;
+ bool wizardRequired = javaRequired || languageRequired;
if(wizardRequired)
{
@@ -1001,10 +943,6 @@ bool Application::createSetupWizard()
{
m_setupWizard->addPage(new JavaWizardPage(m_setupWizard));
}
- if(analyticsRequired)
- {
- m_setupWizard->addPage(new AnalyticsWizardPage(m_setupWizard));
- }
connect(m_setupWizard, &QDialog::finished, this, &Application::setupWizardFinished);
m_setupWizard->show();
return true;
@@ -1161,22 +1099,6 @@ void Application::messageReceived(const QByteArray& message)
}
}
-void Application::analyticsSettingChanged(const Setting&, QVariant value)
-{
- if(!m_analytics)
- return;
- bool enabled = value.toBool();
- if(enabled)
- {
- qDebug() << "Analytics enabled by user.";
- }
- else
- {
- qDebug() << "Analytics disabled by user.";
- }
- m_analytics->enable(enabled);
-}
-
std::shared_ptr<TranslationsModel> Application::translations()
{
return m_translations;
@@ -1446,60 +1368,6 @@ MainWindow* Application::showMainWindow(bool minimized)
connect(m_mainWindow, &MainWindow::isClosing, this, &Application::on_windowClose);
m_openWindows++;
}
- // FIXME: move this somewhere else...
- if(m_analytics)
- {
- auto windowSize = m_mainWindow->size();
- auto sizeString = QString("%1x%2").arg(windowSize.width()).arg(windowSize.height());
- qDebug() << "Viewport size" << sizeString;
- m_analytics->setViewportSize(sizeString);
- /*
- * cm1 = java min heap [MB]
- * cm2 = java max heap [MB]
- * cm3 = system RAM [MB]
- *
- * cd1 = java version
- * cd2 = java architecture
- * cd3 = system architecture
- * cd4 = CPU architecture
- */
- QVariantMap customValues;
- int min = m_settings->get("MinMemAlloc").toInt();
- int max = m_settings->get("MaxMemAlloc").toInt();
- if(min < max)
- {
- customValues["cm1"] = min;
- customValues["cm2"] = max;
- }
- else
- {
- customValues["cm1"] = max;
- customValues["cm2"] = min;
- }
-
- constexpr uint64_t Mega = 1024ull * 1024ull;
- int ramSize = int(Sys::getSystemRam() / Mega);
- qDebug() << "RAM size is" << ramSize << "MB";
- customValues["cm3"] = ramSize;
-
- customValues["cd1"] = m_settings->get("JavaVersion");
- customValues["cd2"] = m_settings->get("JavaArchitecture");
- customValues["cd3"] = Sys::isSystem64bit() ? "64":"32";
- customValues["cd4"] = Sys::isCPU64bit() ? "64":"32";
- auto kernelInfo = Sys::getKernelInfo();
- customValues["cd5"] = kernelInfo.kernelName;
- customValues["cd6"] = kernelInfo.kernelVersion;
- auto distInfo = Sys::getDistributionInfo();
- if(!distInfo.distributionName.isEmpty())
- {
- customValues["cd7"] = distInfo.distributionName;
- }
- if(!distInfo.distributionVersion.isEmpty())
- {
- customValues["cd8"] = distInfo.distributionVersion;
- }
- m_analytics->sendScreenView("Main Window", customValues);
- }
return m_mainWindow;
}
@@ -1558,10 +1426,6 @@ void Application::on_windowClose()
}
}
-QString Application::msaClientId() const {
- return Secrets::getMSAClientID('-');
-}
-
void Application::updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password)
{
// Set the application proxy settings.
diff --git a/launcher/Application.h b/launcher/Application.h
index 1b2a2b60..c1cd8224 100644
--- a/launcher/Application.h
+++ b/launcher/Application.h
@@ -33,7 +33,6 @@ class BaseDetachedToolFactory;
class TranslationsModel;
class ITheme;
class MCEditTool;
-class GAnalytics;
namespace Meta {
class Index;
@@ -60,10 +59,6 @@ public:
Application(int &argc, char **argv);
virtual ~Application();
- GAnalytics *analytics() const {
- return m_analytics;
- }
-
std::shared_ptr<SettingsObject> settings() const {
return m_settings;
}
@@ -104,8 +99,6 @@ public:
return m_accounts;
}
- QString msaClientId() const;
-
Status status() const {
return m_status;
}
@@ -163,7 +156,6 @@ private slots:
void messageReceived(const QByteArray & message);
void controllerSucceeded();
void controllerFailed(const QString & error);
- void analyticsSettingChanged(const Setting &setting, QVariant value);
void setupWizardFinished(int status);
private:
@@ -228,7 +220,6 @@ private:
// peer launcher instance connector - used to implement single instance launcher and signalling
LocalPeer * m_peerInstance = nullptr;
- GAnalytics * m_analytics = nullptr;
SetupWizard * m_setupWizard = nullptr;
public:
QString m_instanceIdToLaunch;
@@ -238,3 +229,4 @@ public:
QUrl m_zipToImport;
std::unique_ptr<QFile> logFile;
};
+
diff --git a/launcher/CMakeLists.txt b/launcher/CMakeLists.txt
index 2dfc78b5..b5c52afa 100644
--- a/launcher/CMakeLists.txt
+++ b/launcher/CMakeLists.txt
@@ -627,8 +627,6 @@ SET(LAUNCHER_SOURCES
# GUI - setup wizard
ui/setupwizard/SetupWizard.h
ui/setupwizard/SetupWizard.cpp
- ui/setupwizard/AnalyticsWizardPage.cpp
- ui/setupwizard/AnalyticsWizardPage.h
ui/setupwizard/BaseWizardPage.h
ui/setupwizard/JavaWizardPage.cpp
ui/setupwizard/JavaWizardPage.h
@@ -932,10 +930,9 @@ target_link_libraries(Launcher_logic
hoedown
Launcher_rainbow
LocalPeer
- ganalytics
)
-target_link_libraries(Launcher_logic secrets)
+target_link_libraries(Launcher_logic)
add_executable(${Launcher_Name} MACOSX_BUNDLE WIN32 main.cpp ${LAUNCHER_RCS})
target_link_libraries(${Launcher_Name} Launcher_logic)
diff --git a/launcher/java/JavaUtils.cpp b/launcher/java/JavaUtils.cpp
index fd7e43e9..8249fc29 100644
--- a/launcher/java/JavaUtils.cpp
+++ b/launcher/java/JavaUtils.cpp
@@ -407,6 +407,8 @@ QList<QString> JavaUtils::FindJavaPaths()
// manually installed JDKs in /opt
scanJavaDir("/opt/jdk");
scanJavaDir("/opt/jdks");
+ // flatpak
+ scanJavaDir("/app/jdk");
return javas;
}
#else
diff --git a/launcher/minecraft/auth/steps/MSAStep.cpp b/launcher/minecraft/auth/steps/MSAStep.cpp
index be711f7e..bc10aa4e 100644
--- a/launcher/minecraft/auth/steps/MSAStep.cpp
+++ b/launcher/minecraft/auth/steps/MSAStep.cpp
@@ -2,6 +2,7 @@
#include <QNetworkRequest>
+#include "BuildConfig.h"
#include "minecraft/auth/AuthRequest.h"
#include "minecraft/auth/Parsers.h"
@@ -13,7 +14,7 @@ using Activity = Katabasis::Activity;
MSAStep::MSAStep(AccountData* data, Action action) : AuthStep(data), m_action(action) {
OAuth2::Options opts;
opts.scope = "XboxLive.signin offline_access";
- opts.clientIdentifier = APPLICATION->msaClientId();
+ opts.clientIdentifier = BuildConfig.MSA_CLIENT_ID;
opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode";
opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
diff --git a/launcher/package/rpm/MultiMC5.spec b/launcher/package/rpm/MultiMC5.spec
deleted file mode 100644
index 20839f11..00000000
--- a/launcher/package/rpm/MultiMC5.spec
+++ /dev/null
@@ -1,52 +0,0 @@
-Name: MultiMC5
-Version: 1.4
-Release: 3%{?dist}
-Summary: A local install wrapper for MultiMC
-
-License: ASL 2.0
-URL: https://multimc.org
-BuildArch: x86_64
-
-Requires: zenity qt5-qtbase wget xrandr
-Provides: multimc MultiMC multimc5
-
-%description
-A local install wrapper for MultiMC
-
-%prep
-
-
-%build
-
-%install
-mkdir -p %{buildroot}/opt/multimc
-install -m 0644 ../ubuntu/multimc/opt/multimc/icon.svg %{buildroot}/opt/multimc/icon.svg
-install -m 0755 ../ubuntu/multimc/opt/multimc/run.sh %{buildroot}/opt/multimc/run.sh
-mkdir -p %{buildroot}/%{_datadir}/applications
-install -m 0644 ../ubuntu/multimc/usr/share/applications/multimc.desktop %{buildroot}/%{_datadir}/applications/multimc.desktop
-mkdir -p %{buildroot}/%{_datadir}/metainfo
-install -m 0644 ../ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml %{buildroot}/%{_datadir}/metainfo/multimc.metainfo.xml
-mkdir -p %{buildroot}/%{_mandir}/man1
-install -m 0644 ../ubuntu/multimc/usr/share/man/man1/multimc.1 %{buildroot}/%{_mandir}/man1/multimc.1
-
-%files
-%dir /opt/multimc
-/opt/multimc/icon.svg
-/opt/multimc/run.sh
-%{_datadir}/applications/multimc.desktop
-%{_datadir}/metainfo/multimc.metainfo.xml
-%dir /usr/share/man/man1
-%{_mandir}/man1/multimc.1.gz
-
-%changelog
-* Sun Oct 03 2021 imperatorstorm <30777770+ImperatorStorm@users.noreply.github.com>
-- added manpage
-
-* Tue Jun 01 2021 kb1000 <fedora@kb1000.de> - 1.4-2
-- Add xrandr to the dependencies
-
-* Tue Dec 08 00:34:35 CET 2020 joshua-stone <joshua.gage.stone@gmail.com>
-- Add metainfo.xml for improving package metadata
-
-* Wed Nov 25 22:53:59 CET 2020 kb1000 <fedora@kb1000.de>
-- Initial version of the RPM package, based on the Ubuntu package
diff --git a/launcher/package/rpm/README.md b/launcher/package/rpm/README.md
deleted file mode 100644
index 0c2b1e49..00000000
--- a/launcher/package/rpm/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# What is this?
-A simple RPM package for MultiMC that contains a script that downloads and installs real MultiMC on Red Hat based systems.
-
-It contains a `.desktop` file, a `.metainfo.xml` file, an icon, and a simple script that does the heavy lifting.
-
-# How to build this?
-You need the `rpm-build` package. Switch into this directory, then run:
-```
-rpmbuild --build-in-place -bb MultiMC5.spec
-```
-
-Replace the version with whatever is appropriate.
diff --git a/launcher/package/ubuntu/README.md b/launcher/package/ubuntu/README.md
deleted file mode 100644
index ddc97ae6..00000000
--- a/launcher/package/ubuntu/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# What is this?
-A simple Ubuntu package for MultiMC that contains a script that downloads and installs real MultiMC on Ubuntu based systems.
-
-It contains a `.desktop` file, an icon, and a simple script that does the heavy lifting.
-
-This is also the source for the files in the [RPM package](../rpm). If you rename, create or delete files here, you'll likely also have to update the RPM spec file there.
-
-# How to build this?
-You need dpkg utils. Rename the `multimc` folder to `multimc_1.6-1` and then run:
-```
-fakeroot dpkg-deb --build multimc_1.6-1
-```
-
-Replace the version with whatever is appropriate.
diff --git a/launcher/package/ubuntu/multimc/DEBIAN/control b/launcher/package/ubuntu/multimc/DEBIAN/control
deleted file mode 100644
index bfa3f1f2..00000000
--- a/launcher/package/ubuntu/multimc/DEBIAN/control
+++ /dev/null
@@ -1,12 +0,0 @@
-Package: multimc
-Version: 1.6-2
-Architecture: all
-Maintainer: Petr Mrázek <peterix@gmail.com>
-Section: games
-Priority: optional
-Installed-Size: 75
-Depends: zenity, desktop-file-utils, libqt5widgets5, libqt5gui5, libqt5network5, libqt5core5a, libqt5xml5, libqt5concurrent5, wget
-Recommends: openjdk-8-jre
-Homepage: http://multimc.org
-Description: A local install wrapper for MultiMC
-
diff --git a/launcher/package/ubuntu/multimc/DEBIAN/postrm b/launcher/package/ubuntu/multimc/DEBIAN/postrm
deleted file mode 100755
index f9bbc8a7..00000000
--- a/launcher/package/ubuntu/multimc/DEBIAN/postrm
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-set -e
-update-desktop-database
diff --git a/launcher/package/ubuntu/multimc/opt/multimc/icon.svg b/launcher/package/ubuntu/multimc/opt/multimc/icon.svg
deleted file mode 100644
index 8bb0e289..00000000
--- a/launcher/package/ubuntu/multimc/opt/multimc/icon.svg
+++ /dev/null
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="68.26667"
- height="68.26667"
- id="svg4427"
- version="1.1"
- inkscape:version="0.92.1 r"
- sodipodi:docname="multimc-smooth-biginfinity.svg"
- inkscape:export-filename="/home/peterix/playground/MultiMC-icons/multimc-smooth-biginfinity.png"
- inkscape:export-xdpi="180"
- inkscape:export-ydpi="180">
- <defs
- id="defs4429">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient4809">
- <stop
- style="stop-color:#98c867;stop-opacity:1"
- offset="0"
- id="stop4805" />
- <stop
- style="stop-color:#5c9a33;stop-opacity:1"
- offset="1"
- id="stop4807" />
- </linearGradient>
- <linearGradient
- id="linearGradient5668"
- inkscape:collect="always">
- <stop
- id="stop5670"
- offset="0"
- style="stop-color:#75b54b;stop-opacity:1;" />
- <stop
- id="stop5672"
- offset="1"
- style="stop-color:#75b54b;stop-opacity:0.6" />
- </linearGradient>
- <linearGradient
- id="linearGradient5084"
- inkscape:collect="always">
- <stop
- id="stop5086"
- offset="0"
- style="stop-color:#000000;stop-opacity:0.8" />
- <stop
- id="stop5088"
- offset="1"
- style="stop-color:#000000;stop-opacity:0.35" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5668"
- id="linearGradient5072"
- x1="6.7342591"
- y1="28.510933"
- x2="50.506943"
- y2="61.773685"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.01532073,-0.00938002)" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5084"
- id="linearGradient5082"
- x1="14.312115"
- y1="9.7948904"
- x2="44.097023"
- y2="82.973114"
- gradientUnits="userSpaceOnUse" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5668"
- id="linearGradient3281"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.01532073,-0.00938002)"
- x1="6.7342591"
- y1="28.510933"
- x2="50.506943"
- y2="61.773685" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5668"
- id="linearGradient3283"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.01532073,-0.00938002)"
- x1="6.7342591"
- y1="28.510933"
- x2="50.506943"
- y2="61.773685" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5668"
- id="linearGradient3286"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2671525,0,0,0.89790119,-0.01941371,-0.00842234)"
- x1="6.7342591"
- y1="28.510933"
- x2="50.506943"
- y2="61.773685" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5084"
- id="linearGradient3288"
- gradientUnits="userSpaceOnUse"
- x1="14.312115"
- y1="9.7948904"
- x2="44.097023"
- y2="82.973114" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5084"
- id="linearGradient3290"
- gradientUnits="userSpaceOnUse"
- x1="14.312115"
- y1="9.7948904"
- x2="44.097023"
- y2="82.973114" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5084"
- id="linearGradient3293"
- gradientUnits="userSpaceOnUse"
- x1="14.312115"
- y1="9.7948904"
- x2="44.097023"
- y2="82.973114"
- gradientTransform="scale(1.2671525,0.89790119)" />
- <linearGradient
- inkscape:collect="always"
- id="linearGradient5580">
- <stop
- style="stop-color:#000000;stop-opacity:0.0627451"
- offset="0"
- id="stop5576" />
- <stop
- style="stop-color:#322217;stop-opacity:0.58823532"
- offset="1"
- id="stop5578" />
- </linearGradient>
- <linearGradient
- id="linearGradient3999"
- inkscape:collect="always">
- <stop
- id="stop3995"
- offset="0"
- style="stop-color:#a3704b;stop-opacity:1" />
- <stop
- id="stop3997"
- offset="1"
- style="stop-color:#6a4a33;stop-opacity:1" />
- </linearGradient>
- <linearGradient
- id="linearGradient2727"
- inkscape:collect="always">
- <stop
- id="stop2723"
- offset="0"
- style="stop-color:#966c4a;stop-opacity:1" />
- <stop
- id="stop2725"
- offset="1"
- style="stop-color:#593d29;stop-opacity:1" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient2727"
- id="linearGradient2050"
- gradientUnits="userSpaceOnUse"
- x1="36.546478"
- y1="33.80484"
- x2="86.415741"
- y2="97.065842" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3999"
- id="radialGradient2052"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-9.105292e-4,-0.00104444)"
- cx="34.133331"
- cy="34.133335"
- fx="34.133331"
- fy="34.133335"
- r="29.866665" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5580"
- id="linearGradient2140"
- gradientUnits="userSpaceOnUse"
- gradientTransform="translate(-0.0010513,-9.083059e-4)"
- x1="29.866674"
- y1="29.867579"
- x2="38.400005"
- y2="38.400913" />
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient5084"
- id="linearGradient4790"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2671525,0,0,0.89790119,-0.82864077,-1.0012743)"
- x1="14.312115"
- y1="9.7948904"
- x2="44.097023"
- y2="82.973114" />
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4809"
- id="radialGradient4803"
- cx="-42.66758"
- cy="-34.134373"
- fx="-42.66758"
- fy="-34.134373"
- r="34.132812"
- gradientTransform="matrix(1.7500268,0.1250019,-0.01781176,0.24936465,95.393964,18.110151)"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="3.6203867"
- inkscape:cx="52.171166"
- inkscape:cy="11.292073"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:document-units="px"
- inkscape:grid-bbox="true"
- inkscape:window-width="1368"
- inkscape:window-height="905"
- inkscape:window-x="2452"
- inkscape:window-y="723"
- inkscape:window-maximized="0"
- inkscape:snap-bbox="true"
- inkscape:bbox-paths="false"
- inkscape:snap-bbox-edge-midpoints="false"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-midpoints="false"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-midpoints="false"
- inkscape:snap-intersection-paths="true"
- inkscape:object-paths="true"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-text-baseline="true"
- inkscape:snap-center="true">
- <inkscape:grid
- type="xygrid"
- id="grid4446"
- empspacing="16"
- visible="true"
- enabled="true"
- snapvisiblegridlinesonly="true"
- spacingx="4.2666667"
- spacingy="4.2666667"
- originx="0"
- originy="0" />
- </sodipodi:namedview>
- <metadata
- id="metadata4432">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- id="layer1"
- inkscape:label="Layer 1"
- inkscape:groupmode="layer">
- <g
- id="g2048"
- transform="translate(9.113e-4,0.00104183)">
- <rect
- rx="8.5333338"
- ry="8.5333338"
- style="fill:url(#linearGradient2050);fill-opacity:1;stroke:none;stroke-width:17.06666756"
- id="rect2026"
- width="68.26667"
- height="68.26667"
- x="-1.3322676e-15"
- y="3.0270508e-06" />
- <rect
- rx="4.2666626"
- y="4.2656283"
- x="4.2657552"
- height="59.733334"
- width="59.73333"
- id="rect2028"
- style="fill:url(#radialGradient2052);fill-opacity:1;stroke:none;stroke-width:14.93333435"
- ry="4.2666669" />
- <path
- inkscape:connector-curvature="0"
- id="path4811"
- d="m 4.2669272,4.2645856 -9.11e-4,8.5333334 h 4.267577 v 4.267579 h 8.5332038 v 4.265625 h 4.265625 V 8.5322946 H 25.6 v 8.5332034 h 4.265625 v -4.267579 h 4.267578 v 8.533204 h 4.265625 v -4.265625 h 4.267578 v 4.265625 h 4.267579 v -4.265625 h 4.265624 v -4.267579 h 4.267579 v 4.267579 h 8.533203 l -1.3e-4,-12.8009124 z"
- style="opacity:0.6;fill:#593d29;fill-opacity:1;stroke:none;stroke-width:17.06666756"
- sodipodi:nodetypes="ccccccccccccccccccccccccccc" />
- <path
- style="fill:url(#radialGradient4803);fill-opacity:1;stroke:none;stroke-width:17.06666756"
- d="m 8.5329442,-0.0018207 c -4.7274675,0 -8.5332035,3.805736 -8.5332035,8.533203 v 4.2675787 h 4.265625 V 8.5313823 c 0,-0.521698 0.105433,-1.01339 0.27539,-1.47461 -0.169616,0.460814 -0.27539,0.953462 -0.27539,1.47461 h 4.2675785 v 4.2675787 h 4.2656248 4.267578 v 4.265625 h 4.265625 V 12.798961 8.5313823 4.2657573 h 4.267578 v 4.265625 4.2675787 h 4.265625 V 8.5313823 h 4.267578 v 4.2675787 4.265625 h 4.265625 v -4.265625 h 4.267578 v 4.265625 h 4.267579 v -4.265625 h 4.265624 V 8.5313823 h 4.267579 v 4.2675787 h 4.265625 4.267578 V 8.5313823 h 4.265625 c 0,-4.727467 -3.805737,-8.533203 -8.533203,-8.533203 z m -3.019531,5.513671 c -0.318089,0.317888 -0.570428,0.695824 -0.7753915,1.101563 0.2048795,-0.405231 0.4576385,-0.784012 0.7753915,-1.101563 z"
- id="path4794"
- inkscape:connector-curvature="0" />
- <path
- style="opacity:1;fill:url(#linearGradient2140);fill-opacity:1;stroke:none;stroke-width:17.06666756"
- d="m 8.5322887,-9.083059e-4 c -4.72747,0 -8.5332,3.8057359059 -8.5332,8.5332029059 V 59.731515 c 0,4.727467 3.80573,8.535156 8.5332,8.535156 H 59.731502 c 4.72747,0 8.5332,-3.807689 8.5332,-8.535156 V 8.5322946 c 0,-4.727467 -3.80573,-8.5332029059 -8.5332,-8.5332029059 z m 0,4.2675779059 H 59.731502 c 2.36373,0 4.26758,1.901892 4.26758,4.265625 V 59.731515 c 0,2.363733 -1.90385,4.267578 -4.26758,4.267578 H 8.5322887 c -2.36373,0 -4.26758,-1.903845 -4.26758,-4.267578 V 8.5322946 c 0,-2.363733 1.90385,-4.265625 4.26758,-4.265625 z"
- id="path2046"
- inkscape:connector-curvature="0" />
- </g>
- <g
- id="g1092">
- <path
- inkscape:connector-curvature="0"
- id="path4786"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:76.18933868px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient4790);fill-opacity:1;stroke:none;stroke-width:1.06666672;opacity:0.5"
- d="m 38.886673,44.940882 c -0.974277,-0.801673 -2.231353,-2.137814 -3.771231,-4.008427 -2.105641,2.672298 -4.085536,4.598569 -5.939688,5.778816 -2.325625,1.425227 -5.295467,2.137836 -8.909534,2.137828 -4.242656,8e-6 -7.762467,-1.124578 -10.5594458,-3.37376 C 6.7526311,43.114834 5.275567,39.986037 5.2755773,36.088937 5.275567,32.347763 6.7526311,29.207831 9.7067742,26.669132 12.346618,24.419991 15.897857,23.295407 20.360501,23.295373 c 2.294138,3.4e-5 4.289747,0.334069 5.986829,1.002107 1.979863,0.73491 3.645488,1.737016 4.996881,3.00632 1.257039,1.135751 2.514115,2.471891 3.771231,4.008428 2.105563,-2.672257 4.085457,-4.598527 5.939689,-5.778816 2.325544,-1.425186 5.295385,-2.137794 8.909533,-2.137828 4.242577,3.4e-5 7.762388,1.124618 10.559447,3.37376 2.954063,2.360546 4.431127,5.489343 4.431197,9.386401 -7e-5,3.741216 -1.477134,6.881147 -4.431197,9.419806 -2.639925,2.24918 -6.191163,3.373767 -10.653727,3.373758 -2.294219,9e-6 -4.289826,-0.334026 -5.98683,-1.002106 -1.697101,-0.601255 -3.362726,-1.603361 -4.996881,-3.006321 M 19.747676,44.473233 c 5.185412,1.1e-5 9.333763,-2.672271 12.445062,-8.016856 -3.991253,-5.834464 -8.139602,-8.751705 -12.445062,-8.751733 -3.142715,2.8e-5 -5.515446,0.801713 -7.118198,2.405057 -1.728498,1.71474 -2.592737,3.707818 -2.592722,5.979236 -1.5e-5,2.494152 0.864224,4.509499 2.592722,6.046046 1.759887,1.558846 4.132618,2.338261 7.118198,2.33825 M 50.483209,27.77145 c -4.682663,2.9e-5 -8.831013,2.672312 -12.445062,8.016856 3.959745,5.834503 8.108095,8.751746 12.445062,8.751733 3.142633,1.3e-5 5.515364,-0.801671 7.118198,-2.405056 1.728416,-1.714701 2.592656,-3.707778 2.592722,-5.979238 -6.6e-5,-2.49411 -0.864306,-4.509456 -2.592722,-6.046044 -1.759968,-1.558805 -4.132699,-2.338222 -7.118198,-2.338251" />
- <path
- d="m 39.715314,45.942156 c -0.974277,-0.801673 -2.231353,-2.137814 -3.771231,-4.008427 -2.105641,2.672298 -4.085536,4.598569 -5.939688,5.778816 -2.325625,1.425227 -5.295467,2.137836 -8.909534,2.137828 -4.242656,8e-6 -7.762467,-1.124578 -10.559446,-3.37376 -2.9541431,-2.360505 -4.4312072,-5.489302 -4.4311969,-9.386402 -1.03e-5,-3.741174 1.4770538,-6.881106 4.4311969,-9.419805 2.639844,-2.249141 6.191083,-3.373725 10.653727,-3.373759 2.294138,3.4e-5 4.289747,0.334069 5.986829,1.002107 1.979863,0.73491 3.645488,1.737016 4.996881,3.00632 1.257039,1.135751 2.514115,2.471891 3.771231,4.008428 2.105563,-2.672257 4.085457,-4.598527 5.939689,-5.778816 2.325544,-1.425186 5.295385,-2.137794 8.909533,-2.137828 4.242577,3.4e-5 7.762388,1.124618 10.559447,3.37376 2.954063,2.360546 4.431127,5.489343 4.431197,9.386401 -7e-5,3.741216 -1.477134,6.881147 -4.431197,9.419806 -2.639925,2.24918 -6.191163,3.373767 -10.653727,3.373758 -2.294219,9e-6 -4.289826,-0.334026 -5.98683,-1.002106 -1.697101,-0.601255 -3.362726,-1.603361 -4.996881,-3.006321 M 20.576317,45.474507 c 5.185412,1.1e-5 9.333763,-2.672271 12.445062,-8.016856 -3.991253,-5.834464 -8.139602,-8.751705 -12.445062,-8.751733 -3.142715,2.8e-5 -5.515446,0.801713 -7.118198,2.405057 -1.728498,1.71474 -2.592737,3.707818 -2.592722,5.979236 -1.5e-5,2.494152 0.864224,4.509499 2.592722,6.046046 1.759887,1.558846 4.132618,2.338261 7.118198,2.33825 M 51.31185,28.772724 c -4.682663,2.9e-5 -8.831013,2.672312 -12.445062,8.016856 3.959745,5.834503 8.108095,8.751746 12.445062,8.751733 3.142633,1.3e-5 5.515364,-0.801671 7.118198,-2.405056 1.728416,-1.714701 2.592656,-3.707778 2.592722,-5.979238 -6.6e-5,-2.49411 -0.864306,-4.509456 -2.592722,-6.046044 C 56.67008,29.55217 54.297349,28.772753 51.31185,28.772724"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:76.18933868px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient3293);fill-opacity:1;stroke:none;stroke-width:1.06666672;opacity:0.5"
- id="path3279"
- inkscape:connector-curvature="0" />
- <path
- d="m 37.904564,42.951873 c -0.974278,-0.801672 -2.231352,-2.137814 -3.771231,-4.008428 -2.105642,2.672298 -4.085537,4.598568 -5.939688,5.778817 -2.325625,1.425227 -5.295466,2.137836 -8.909534,2.137828 -4.242656,8e-6 -7.762467,-1.124577 -10.5594464,-3.37376 -2.9541428,-2.360505 -4.4312068,-5.489302 -4.4311963,-9.386401 -1.05e-5,-3.741175 1.4770535,-6.881107 4.4311963,-9.419805 2.6398444,-2.249142 6.1910824,-3.373727 10.6537284,-3.37376 2.294137,3.3e-5 4.289745,0.334068 5.986829,1.002107 1.979863,0.734909 3.645487,1.737016 4.99688,3.00632 1.257039,1.13575 2.514116,2.471891 3.771231,4.008428 2.105562,-2.672257 4.085456,-4.598528 5.939689,-5.778817 2.325544,-1.425185 5.295387,-2.137795 8.909534,-2.137828 4.242576,3.3e-5 7.762387,1.12462 10.559446,3.373761 2.954062,2.360545 4.431127,5.489343 4.431197,9.386401 -7e-5,3.741216 -1.477135,6.881148 -4.431197,9.419805 -2.639924,2.249182 -6.191164,3.373767 -10.653728,3.37376 -2.294217,7e-6 -4.289826,-0.334028 -5.986828,-1.002107 -1.697101,-0.601254 -3.362727,-1.603361 -4.996882,-3.006321 m -19.138997,-0.46765 c 5.185412,1.3e-5 9.333762,-2.67227 12.445062,-8.016856 -3.991252,-5.834462 -8.139602,-8.751704 -12.445062,-8.751733 -3.142714,2.9e-5 -5.515444,0.801714 -7.118198,2.405056 -1.7284972,1.714743 -2.5927368,3.707819 -2.5927216,5.979239 -1.52e-5,2.49415 0.8642244,4.509496 2.5927216,6.046045 1.759888,1.558845 4.132618,2.338262 7.118198,2.338249 M 49.5011,25.782442 c -4.682663,2.8e-5 -8.831014,2.672311 -12.445063,8.016855 3.959745,5.834504 8.108096,8.751745 12.445063,8.751733 3.142634,1.2e-5 5.515365,-0.801673 7.118198,-2.405056 1.728417,-1.7147 2.592657,-3.707778 2.592721,-5.979238 -6.4e-5,-2.49411 -0.864304,-4.509456 -2.592721,-6.046046 C 54.85933,26.561886 52.486599,25.78247 49.5011,25.782442"
- style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:76.18933868px;line-height:125%;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient3286);fill-opacity:1;stroke:none;stroke-width:1.06666672"
- id="path3272"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccscsccccccccccccccccccccscscccccsccscccccc"
- inkscape:connector-curvature="0"
- id="text5100"
- d="m 19.4,21.166667 c -4.462644,3.3e-5 -8.026822,1.150858 -10.6666667,3.4 -2.9541428,2.538698 -4.4333436,5.658825 -4.4333333,9.4 -1.03e-5,3.897098 1.4791905,7.039495 4.4333333,9.4 -1.622701,-2.044271 -2.433341,-4.51168 -2.4333333,-7.4 -1.03e-5,-3.741175 1.4791905,-6.861302 4.433333,-9.4 2.639845,-2.249142 6.204023,-3.399967 10.666667,-3.4 2.294138,3.3e-5 4.302916,0.365295 6,1.033333 1.979862,0.73491 3.615274,1.730695 4.966667,3 0.06836,0.06177 0.131637,0.137049 0.2,0.2 -0.731813,-0.797005 -1.468213,-1.538822 -2.2,-2.2 -1.351393,-1.269305 -2.986805,-2.26509 -4.966667,-3 -1.697084,-0.668038 -3.705862,-1.0333 -6,-1.033333 z m 29.6,0.1 c -3.614148,3.3e-5 -6.574457,0.74148 -8.9,2.166666 -1.818222,1.157367 -3.923451,3.291388 -5.983333,5.883334 0.618278,0.658774 1.248369,1.377605 1.866666,2.133333 2.105562,-2.672257 4.262434,-4.836378 6.116667,-6.016667 2.325543,-1.425186 5.285852,-2.166633 8.9,-2.166666 4.242576,3.3e-5 7.769607,1.150858 10.566667,3.4 -0.570388,-0.722129 -1.227721,-1.382884 -2,-2 C 56.769607,22.417525 53.242576,21.2667 49,21.266667 Z m 8.866667,8.1 c 0.9092,1.305235 1.366619,2.857751 1.366666,4.666666 -6.5e-5,2.271461 -0.871584,4.285301 -2.6,6 -1.602834,1.603384 -3.957366,2.400012 -7.1,2.4 -2.653707,8e-6 -5.320858,-1.032242 -7.833333,-3.216666 3.136636,3.509305 6.469807,5.216676 9.833333,5.216666 3.142634,1.2e-5 5.497166,-0.796616 7.1,-2.4 1.728416,-1.714699 2.599935,-3.728539 2.6,-6 -6.5e-5,-2.49411 -0.871584,-4.496744 -2.6,-6.033333 -0.24943,-0.220921 -0.49262,-0.443723 -0.766666,-0.633333 z m -26.633334,4.966666 c -3.1113,5.344585 -7.247921,8.033345 -12.433333,8.033334 -2.58055,1e-5 -4.543473,-0.352086 -6.208333,-1.516667 0.348871,0.50642 0.590094,0.752276 1.075,1.183333 1.759888,1.558846 4.147753,2.333345 7.133333,2.333334 5.185412,1.1e-5 9.322033,-2.688749 12.433333,-8.033334 z m 4.933334,6.5 c -0.04103,0.05207 -0.09239,0.08182 -0.133334,0.133334 0.687326,0.744419 1.306949,1.359747 1.833334,1.8 -0.529404,-0.580895 -1.078447,-1.178283 -1.7,-1.933334 z"
- style="font-style:normal;font-weight:normal;font-size:76.18933868px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;opacity:0.3;fill:#ccff00;fill-opacity:1;stroke:none;stroke-width:1.06666672" />
- <path
- sodipodi:nodetypes="ccsccscccccccccccccccccccscscccccsccsccccccc"
- id="text5058-0"
- d="m 19.730474,21.54714 c -4.462645,3.3e-5 -8.026823,1.150859 -10.6666669,3.4 -2.9541429,2.538699 -4.433344,5.658826 -4.4333333,9.4 -1.07e-5,3.897099 1.4791904,7.039495 4.4333333,9.4 0.042837,0.03444 0.090155,0.06608 0.1333334,0.1 -2.2392086,-2.228193 -3.3666752,-5.040417 -3.3666667,-8.433333 -1.07e-5,-3.741174 1.4791904,-6.861301 4.4333332,-9.4 2.639844,-2.249141 6.204022,-3.399967 10.666667,-3.4 2.294137,3.3e-5 4.302916,0.365295 6,1.033333 1.870874,0.694455 3.42364,1.628367 4.733333,2.8 -0.314265,-0.308986 -0.652406,-0.582729 -0.966667,-0.866666 -1.351393,-1.269305 -2.986804,-2.265091 -4.966666,-3 -1.697084,-0.668039 -3.705863,-1.033301 -6,-1.033334 z m 29.6,0.1 c -3.614149,3.3e-5 -6.574457,0.741481 -8.9,2.166667 -1.813279,1.154221 -3.963039,3.235656 -6.016667,5.816667 0.355649,0.402628 0.711011,0.798625 1.066667,1.233333 2.105561,-2.672257 4.295767,-4.803044 6.15,-5.983333 2.325543,-1.425187 5.285851,-2.166634 8.9,-2.166667 4.22442,3.3e-5 7.742084,1.136734 10.533333,3.366667 -0.36096,-0.367566 -0.745726,-0.696967 -1.166667,-1.033334 -2.797059,-2.249141 -6.32409,-3.399967 -10.566666,-3.4 z m 8.233333,7.333334 c 1.323326,1.449243 1.999942,3.250987 2,5.433333 -6.5e-5,2.27146 -0.871584,4.2853 -2.6,6 -1.602834,1.603383 -3.957366,2.400012 -7.1,2.4 -2.406328,6e-6 -4.776468,-0.90386 -7.066667,-2.7 2.669147,2.483838 5.436929,3.766674 8.266667,3.766667 3.142634,1.1e-5 5.497166,-0.796617 7.1,-2.4 1.728416,-1.7147 2.599935,-3.72854 2.6,-6 -6.5e-5,-2.49411 -0.871584,-4.496745 -2.6,-6.033334 -0.185641,-0.164422 -0.400724,-0.319587 -0.6,-0.466666 z m -26,5.733333 c -3.1113,5.344584 -7.247921,8.033345 -12.433333,8.033333 -2.612382,1.1e-5 -4.759372,-0.60651 -6.433334,-1.8 0.166027,0.176488 0.313947,0.367942 0.5,0.533334 1.759888,1.558845 4.147754,2.333345 7.133334,2.333333 5.185412,1.2e-5 9.322033,-2.688749 12.433333,-8.033333 z m 4.133333,5.566667 c -0.04657,0.05909 -0.08689,0.108298 -0.133333,0.166666 1.038571,1.18897 1.9748,2.169945 2.7,2.766667 0.06249,0.05364 0.137426,0.08086 0.2,0.133333 -0.792178,-0.781249 -1.706288,-1.778539 -2.766667,-3.066666 z"
- style="font-style:normal;font-weight:normal;font-size:76.18933868px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;opacity:0.6;fill:#ccff00;fill-opacity:1;stroke:none;stroke-width:1.06666672"
- inkscape:connector-curvature="0" />
- </g>
- </g>
-</svg>
diff --git a/launcher/package/ubuntu/multimc/opt/multimc/run.sh b/launcher/package/ubuntu/multimc/opt/multimc/run.sh
deleted file mode 100755
index 12a9b45c..00000000
--- a/launcher/package/ubuntu/multimc/opt/multimc/run.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-INSTDIR="${XDG_DATA_HOME-$HOME/.local/share}/multimc"
-
-if [ `getconf LONG_BIT` = "64" ]
-then
- PACKAGE="mmc-stable-lin64.tar.gz"
-else
- PACKAGE="mmc-stable-lin32.tar.gz"
-fi
-
-deploy() {
- mkdir -p $INSTDIR
- cd ${INSTDIR}
-
- wget --progress=dot:force "https://files.multimc.org/downloads/${PACKAGE}" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --auto-close --auto-kill --title="Downloading MultiMC..."
-
- tar -xzf ${PACKAGE} --transform='s,MultiMC/,,'
- rm ${PACKAGE}
- chmod +x MultiMC
-}
-
-runmmc() {
- cd ${INSTDIR}
- exec ./MultiMC "$@"
-}
-
-if [[ ! -f ${INSTDIR}/MultiMC ]]; then
- deploy
- runmmc "$@"
-else
- runmmc "$@"
-fi
diff --git a/launcher/package/ubuntu/multimc/usr/share/applications/multimc.desktop b/launcher/package/ubuntu/multimc/usr/share/applications/multimc.desktop
deleted file mode 100755
index e0456f89..00000000
--- a/launcher/package/ubuntu/multimc/usr/share/applications/multimc.desktop
+++ /dev/null
@@ -1,16 +0,0 @@
-[Desktop Entry]
-Categories=Game;
-Exec=/opt/multimc/run.sh
-Icon=/opt/multimc/icon.svg
-Keywords=game;Minecraft;
-MimeType=
-Name=MultiMC 5
-Path=
-StartupNotify=true
-Terminal=false
-TerminalOptions=
-Type=Application
-X-DBUS-ServiceName=
-X-DBUS-StartupType=
-X-KDE-SubstituteUID=false
-X-KDE-Username=
diff --git a/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1 b/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1
deleted file mode 100644
index b4af25e3..00000000
--- a/launcher/package/ubuntu/multimc/usr/share/man/man1/multimc.1
+++ /dev/null
@@ -1,97 +0,0 @@
-'\" t
-.\" Title: multimc
-.\" Author: [see the "AUTHORS" section]
-.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 11/07/2021
-.\" Manual: \ \&
-.\" Source: \ \&
-.\" Language: English
-.\"
-.TH "MULTIMC" "1" "11/07/2021" "\ \&" "\ \&"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-multimc \- a launcher and instance manager for Minecraft\&.
-.SH "SYNOPSIS"
-.sp
-\fBmultimc\fR [\fIOPTIONS\fR]
-.SH "DESCRIPTION"
-.sp
-MultiMC 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 MultiMC\&.
-.SH "OPTIONS"
-.PP
-\fB\-d, \-\-dir\fR=\fIDIRECTORY\fR
-.RS 4
-Use
-\fIDIRECTORY\fR
-as the MultiMC root\&.
-.RE
-.PP
-\fB\-l, \-\-launch\fR=\fIINSTANCE_ID\fR
-.RS 4
-Launch the instance specified by
-\fIINSTANCE_ID\fR\&.
-.RE
-.PP
-\fB\-\-alive\fR
-.RS 4
-Write a small
-\fIlive\&.check\fR
-file after MultiMC starts\&.
-.RE
-.PP
-\fB\-h, \-\-help\fR
-.RS 4
-Display help text and exit\&.
-.RE
-.PP
-\fB\-v, \-\-version\fR
-.RS 4
-Display program version and exit\&.
-.RE
-.PP
-\fB\-a, \-\-profile\fR=\fIPROFILE\fR
-.RS 4
-Use the account specified by
-\fIPROFILE\fR
-(only valid in combination with \-\-launch)\&.
-.RE
-.SH "EXIT STATUS"
-.PP
-\fB0\fR
-.RS 4
-Success
-.RE
-.PP
-\fB1\fR
-.RS 4
-Failure (syntax or usage error; configuration error; unexpected error)\&.
-.RE
-.SH "BUGS"
-.sp
-https://github\&.com/MultiMC/Launcher/issues
-.SH "RESOURCES"
-.sp
-GitHub: https://github\&.com/MultiMC/Launcher
-.sp
-Main website: https://multimc\&.org
-.SH "AUTHORS"
-.sp
-peterix <peterix@gmail\&.com>
diff --git a/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml b/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml
deleted file mode 100644
index 3bccba47..00000000
--- a/launcher/package/ubuntu/multimc/usr/share/metainfo/multimc.metainfo.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component type="desktop">
- <id>multimc</id>
- <launchable type="desktop-id">multimc.desktop</launchable>
- <name>MultiMC</name>
- <summary>Manage Minecraft instances with ease</summary>
- <description>
- <p>Overview</p>
- <p>MultiMC is a free, open source launcher for Minecraft. It allows you to have multiple, cleanly separated instances of Minecraft (each with their own mods, texture packs, saves, etc) and helps you manage them and their associated options with a simple and powerful interface.</p>
- <p>Features</p>
- <ul>
- <li>Manage multiple instances of Minecraft at once</li>
- <li>Start Minecraft with a custom resolution</li>
- <li>Change Java's runtime options (including memory options)</li>
- <li>Shows Minecraft's console output in a colour coded window</li>
- <li>Kill Minecraft easily if it crashes / freezes</li>
- <li>Custom icons and groups for instances</li>
- <li>Forge integration (automatic installation, version downloads, mod management)</li>
- <li>Minecraft world management</li>
- <li>Import and export Minecraft instances to share them with anyone</li>
- <li>Supports every version of Minecraft that the vanilla launcher does</li>
- </ul>
- </description>
- <screenshots>
- <screenshot type="default">
- <image type="source" width="936" height="921">https://multimc.org/images/screenshots/main.png</image>
- </screenshot>
- <screenshot>
- <image type="source" width="936" height="998">https://multimc.org/images/screenshots/editmods.png</image>
- </screenshot>
- <screenshot>
- <image type="source" width="936" height="998">https://multimc.org/images/screenshots/version.png</image>
- </screenshot>
- <screenshot>
- <image type="source" width="936" height="998">https://multimc.org/images/screenshots/console.png</image>
- </screenshot>
- <screenshot>
- <image type="source" width="936" height="921">https://multimc.org/images/screenshots/settings.png</image>
- </screenshot>
- </screenshots>
- <releases>
- <release date="2021-01-07" version="5"/>
- </releases>
- <url type="homepage">https://multimc.org/</url>
- <url type="help">https://discord.com/invite/0k2zsXGNHs0fE4Wm</url>
- <url type="faq">https://github.com/MultiMC/Launcher/wiki/FAQ</url>
- <url type="bugtracker">https://github.com/MultiMC/Launcher/issues</url>
- <url type="translate">https://translate.multimc.org/</url>
- <url type="donation">https://www.patreon.com/multimc</url>
- <developer_name>The MultiMC Team</developer_name>
- <metadata_license>CC0-1.0</metadata_license>
- <project_license>Apache-2.0</project_license>
- <update_contact>peterix_at_gmail.com</update_contact>
-</component>
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index d3eb2655..87fcac86 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -37,8 +37,6 @@
#include "BuildConfig.h"
-#include "Secrets.h"
-
AccountListPage::AccountListPage(QWidget *parent)
: QMainWindow(parent), ui(new Ui::AccountListPage)
{
@@ -74,7 +72,7 @@ AccountListPage::AccountListPage(QWidget *parent)
updateButtonStates();
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
- ui->actionAddMicrosoft->setVisible(Secrets::hasMSAClientID());
+ ui->actionAddMicrosoft->setVisible(BuildConfig.MSA_CLIENT_ID.size() != 0);
}
AccountListPage::~AccountListPage()
diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp
index 2eb73e44..4d4d4e89 100644
--- a/launcher/ui/pages/global/LauncherPage.cpp
+++ b/launcher/ui/pages/global/LauncherPage.cpp
@@ -73,11 +73,6 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch
{
ui->updateSettingsBox->setHidden(true);
}
- // Analytics
- if(BuildConfig.ANALYTICS_ID.isEmpty())
- {
- ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->analyticsTab));
- }
connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview()));
connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview()));
@@ -321,12 +316,6 @@ void LauncherPage::applySettings()
s->set("InstSortMode", "Name");
break;
}
-
- // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- s->set("Analytics", ui->analyticsCheck->isChecked());
- }
}
void LauncherPage::loadSettings()
{
@@ -422,12 +411,6 @@ void LauncherPage::loadSettings()
{
ui->sortByNameBtn->setChecked(true);
}
-
- // Analytics
- if(!BuildConfig.ANALYTICS_ID.isEmpty())
- {
- ui->analyticsCheck->setChecked(s->get("Analytics").toBool());
- }
}
void LauncherPage::refreshFontPreview()
diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui
index 62a66d73..2b3729bc 100644
--- a/launcher/ui/pages/global/LauncherPage.ui
+++ b/launcher/ui/pages/global/LauncherPage.ui
@@ -485,69 +485,6 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="analyticsTab">
- <attribute name="title">
- <string>Analytics</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <item>
- <widget class="QGroupBox" name="consoleSettingsBox_2">
- <property name="title">
- <string>Analytics Settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <widget class="QCheckBox" name="analyticsCheck">
- <property name="text">
- <string>Send anonymous usage statistics?</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;
-&lt;body&gt;
-&lt;p&gt;The launcher sends anonymous usage statistics on every start of the application.&lt;/p&gt;&lt;p&gt;The following data is collected:&lt;/p&gt;
-&lt;ul&gt;
-&lt;li&gt;Launcher version.&lt;/li&gt;
-&lt;li&gt;Operating system name, version and architecture.&lt;/li&gt;
-&lt;li&gt;CPU architecture (kernel architecture on linux).&lt;/li&gt;
-&lt;li&gt;Size of system memory.&lt;/li&gt;
-&lt;li&gt;Java version, architecture and memory settings.&lt;/li&gt;
-&lt;/ul&gt;
-&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
</widget>
</item>
</layout>
diff --git a/launcher/ui/setupwizard/AnalyticsWizardPage.cpp b/launcher/ui/setupwizard/AnalyticsWizardPage.cpp
deleted file mode 100644
index 3db2f6dc..00000000
--- a/launcher/ui/setupwizard/AnalyticsWizardPage.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "AnalyticsWizardPage.h"
-#include <Application.h>
-
-#include <QVBoxLayout>
-#include <QTextBrowser>
-#include <QCheckBox>
-
-#include <ganalytics.h>
-#include <BuildConfig.h>
-
-AnalyticsWizardPage::AnalyticsWizardPage(QWidget *parent)
- : BaseWizardPage(parent)
-{
- setObjectName(QStringLiteral("analyticsPage"));
- verticalLayout_3 = new QVBoxLayout(this);
- verticalLayout_3->setObjectName(QStringLiteral("verticalLayout_3"));
- textBrowser = new QTextBrowser(this);
- textBrowser->setObjectName(QStringLiteral("textBrowser"));
- textBrowser->setAcceptRichText(false);
- textBrowser->setOpenExternalLinks(true);
- verticalLayout_3->addWidget(textBrowser);
-
- checkBox = new QCheckBox(this);
- checkBox->setObjectName(QStringLiteral("checkBox"));
- checkBox->setChecked(true);
- verticalLayout_3->addWidget(checkBox);
- retranslate();
-}
-
-AnalyticsWizardPage::~AnalyticsWizardPage()
-{
-}
-
-bool AnalyticsWizardPage::validatePage()
-{
- auto settings = APPLICATION->settings();
- auto analytics = APPLICATION->analytics();
- auto status = checkBox->isChecked();
- settings->set("AnalyticsSeen", analytics->version());
- settings->set("Analytics", status);
- return true;
-}
-
-void AnalyticsWizardPage::retranslate()
-{
- setTitle(tr("Analytics"));
- setSubTitle(tr("We track some anonymous statistics about users."));
- textBrowser->setHtml(tr(
- "<html><body>"
- "<p>The launcher sends anonymous usage statistics on every start of the application. This helps us decide what platforms and issues to focus on.</p>"
- "<p>The data is processed by Google Analytics, see their <a href=\"https://support.google.com/analytics/answer/6004245?hl=en\">article on the "
- "matter</a>.</p>"
- "<p>The following data is collected:</p>"
- "<ul><li>A random unique ID of the installation.<br />It is stored in the application settings file.</li>"
- "<li>Anonymized (partial) IP address.</li>"
- "<li>Launcher version.</li>"
- "<li>Operating system name, version and architecture.</li>"
- "<li>CPU architecture (kernel architecture on linux).</li>"
- "<li>Size of system memory.</li>"
- "<li>Java version, architecture and memory settings.</li></ul>"
- "<p>If we change the tracked information, you will see this page again.</p></body></html>"));
- checkBox->setText(tr("Enable Analytics"));
-}
diff --git a/launcher/ui/setupwizard/AnalyticsWizardPage.h b/launcher/ui/setupwizard/AnalyticsWizardPage.h
deleted file mode 100644
index c451db2c..00000000
--- a/launcher/ui/setupwizard/AnalyticsWizardPage.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-#include "BaseWizardPage.h"
-
-class QVBoxLayout;
-class QTextBrowser;
-class QCheckBox;
-
-class AnalyticsWizardPage : public BaseWizardPage
-{
- Q_OBJECT
-public:
- explicit AnalyticsWizardPage(QWidget *parent = Q_NULLPTR);
- virtual ~AnalyticsWizardPage();
-
- bool validatePage() override;
-
-protected:
- void retranslate() override;
-
-private:
- QVBoxLayout *verticalLayout_3 = nullptr;
- QTextBrowser *textBrowser = nullptr;
- QCheckBox *checkBox = nullptr;
-}; \ No newline at end of file
diff --git a/launcher/ui/setupwizard/SetupWizard.cpp b/launcher/ui/setupwizard/SetupWizard.cpp
index 5af5ba91..22eab60e 100644
--- a/launcher/ui/setupwizard/SetupWizard.cpp
+++ b/launcher/ui/setupwizard/SetupWizard.cpp
@@ -2,12 +2,10 @@
#include "LanguageWizardPage.h"
#include "JavaWizardPage.h"
-#include "AnalyticsWizardPage.h"
#include "translations/TranslationsModel.h"
#include <Application.h>
#include <FileSystem.h>
-#include <ganalytics.h>
#include <QAbstractButton>
#include <BuildConfig.h>
diff --git a/libraries/README.md b/libraries/README.md
index 39505881..7e7e740d 100644
--- a/libraries/README.md
+++ b/libraries/README.md
@@ -9,13 +9,6 @@ This library has served as a base for some (much more full-featured and advanced
Copyright belongs to Petr Mrázek, unless explicitly stated otherwise in the source files. Available under the Apache 2.0 license.
-## ganalytics
-A Google Analytics library for Qt.
-
-BSD licensed, derived from [qt-google-analytics](https://github.com/HSAnet/qt-google-analytics).
-
-Modifications include better handling of IP anonymization (can be enabled) and general improvements of the API (application handles persistence and ID generation instead of the library).
-
## hoedown
Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porté.
diff --git a/libraries/ganalytics/CMakeLists.txt b/libraries/ganalytics/CMakeLists.txt
deleted file mode 100644
index cf1cc559..00000000
--- a/libraries/ganalytics/CMakeLists.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-project(ganalytics)
-
-find_package(Qt5Core)
-find_package(Qt5Gui)
-find_package(Qt5Network)
-
-set(ganalytics_SOURCES
-src/ganalytics.cpp
-src/ganalytics_worker.cpp
-src/ganalytics_worker.h
-include/ganalytics.h
-)
-
-add_library(ganalytics STATIC ${ganalytics_SOURCES})
-target_link_libraries(ganalytics Qt5::Core Qt5::Gui Qt5::Network)
-target_include_directories(ganalytics PUBLIC include)
-target_link_libraries(ganalytics systeminfo)
diff --git a/libraries/ganalytics/LICENSE.txt b/libraries/ganalytics/LICENSE.txt
deleted file mode 100644
index 795497ff..00000000
--- a/libraries/ganalytics/LICENSE.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2014-2015, University of Applied Sciences Augsburg
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted 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.
- * Neither the name of the University of Applied Sciences Augsburg nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-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
-OODS 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
-UT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/libraries/ganalytics/README.md b/libraries/ganalytics/README.md
deleted file mode 100644
index d7e1e33c..00000000
--- a/libraries/ganalytics/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-qt-google-analytics
-================
-
-Qt5 classes for providing google analytics usage in a Qt/QML application.
-
-## Building
-Include ```qt-google-analytics.pri``` in your .pro file.
-
-## Using
-Please make sure you have set your application information using ```QApplication::setApplicationName``` and ```QApplication::setApplicationVersion```.
-
-### In C++:
-```
-GAnalytics tracker("UA-my-id");
-tracker.sendScreenView("Main Screen");
-```
-
-### In QtQuick:
-Register the class on the C++ side using ```qmlRegisterType<GAnalytics>("analytics", 0, 1, "Tracker");```
-```
-Tracker {
- id: tracker
- trackingID: "UA-my-id"
-}
-
-[...]
-tracker.sendScreenView("Main Screen")
-```
-
-There is also an example application in the examples folder.
-
-## License
-Copyright (c) 2014-2016, University of Applied Sciences Augsburg.
-All rights reserved. Distributed under the terms and conditions of the BSD License. See separate LICENSE.txt.
diff --git a/libraries/ganalytics/include/ganalytics.h b/libraries/ganalytics/include/ganalytics.h
deleted file mode 100644
index ba422457..00000000
--- a/libraries/ganalytics/include/ganalytics.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#pragma once
-
-#include <QObject>
-#include <QVariantMap>
-
-class QNetworkAccessManager;
-class GAnalyticsWorker;
-
-class GAnalytics : public QObject
-{
- Q_OBJECT
- Q_ENUMS(LogLevel)
-
-public:
- explicit GAnalytics(const QString &trackingID, const QString &clientID, const int version, QObject *parent = 0);
- ~GAnalytics();
-
-public:
- enum LogLevel
- {
- Debug,
- Info,
- Error
- };
-
- int version();
-
- void setLogLevel(LogLevel logLevel);
- LogLevel logLevel() const;
-
- // Getter and Setters
- void setViewportSize(const QString &viewportSize);
- QString viewportSize() const;
-
- void setLanguage(const QString &language);
- QString language() const;
-
- void setAnonymizeIPs(bool anonymize);
- bool anonymizeIPs();
-
- void setSendInterval(int milliseconds);
- int sendInterval() const;
-
- void enable(bool state = true);
- bool isEnabled();
-
- /// Get or set the network access manager. If none is set, the class creates its own on the first request
- void setNetworkAccessManager(QNetworkAccessManager *networkAccessManager);
- QNetworkAccessManager *networkAccessManager() const;
-
-public slots:
- void sendScreenView(const QString &screenName, const QVariantMap &customValues = QVariantMap());
- void sendEvent(const QString &category, const QString &action, const QString &label = QString(), const QVariant &value = QVariant(),
- const QVariantMap &customValues = QVariantMap());
- void sendException(const QString &exceptionDescription, bool exceptionFatal = true, const QVariantMap &customValues = QVariantMap());
- void startSession();
- void endSession();
-
-private:
- GAnalyticsWorker *d;
-
- friend QDataStream &operator<<(QDataStream &outStream, const GAnalytics &analytics);
- friend QDataStream &operator>>(QDataStream &inStream, GAnalytics &analytics);
-};
-
-QDataStream &operator<<(QDataStream &outStream, const GAnalytics &analytics);
-QDataStream &operator>>(QDataStream &inStream, GAnalytics &analytics);
diff --git a/libraries/ganalytics/src/ganalytics.cpp b/libraries/ganalytics/src/ganalytics.cpp
deleted file mode 100644
index a4b7394f..00000000
--- a/libraries/ganalytics/src/ganalytics.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-#include "ganalytics.h"
-#include "ganalytics_worker.h"
-#include "sys.h"
-
-#include <QDataStream>
-#include <QDebug>
-#include <QLocale>
-#include <QNetworkAccessManager>
-#include <QNetworkReply>
-#include <QNetworkRequest>
-#include <QQueue>
-#include <QSettings>
-#include <QTimer>
-#include <QUrlQuery>
-#include <QUuid>
-
-GAnalytics::GAnalytics(const QString &trackingID, const QString &clientID, const int version, QObject *parent) : QObject(parent)
-{
- d = new GAnalyticsWorker(this);
- d->m_trackingID = trackingID;
- d->m_clientID = clientID;
- d->m_version = version;
-}
-
-/**
- * Destructor of class GAnalytics.
- */
-GAnalytics::~GAnalytics()
-{
- delete d;
-}
-
-void GAnalytics::setLogLevel(GAnalytics::LogLevel logLevel)
-{
- d->m_logLevel = logLevel;
-}
-
-GAnalytics::LogLevel GAnalytics::logLevel() const
-{
- return d->m_logLevel;
-}
-
-// SETTER and GETTER
-void GAnalytics::setViewportSize(const QString &viewportSize)
-{
- d->m_viewportSize = viewportSize;
-}
-
-QString GAnalytics::viewportSize() const
-{
- return d->m_viewportSize;
-}
-
-void GAnalytics::setLanguage(const QString &language)
-{
- d->m_language = language;
-}
-
-QString GAnalytics::language() const
-{
- return d->m_language;
-}
-
-void GAnalytics::setAnonymizeIPs(bool anonymize)
-{
- d->m_anonymizeIPs = anonymize;
-}
-
-bool GAnalytics::anonymizeIPs()
-{
- return d->m_anonymizeIPs;
-}
-
-void GAnalytics::setSendInterval(int milliseconds)
-{
- d->m_timer.setInterval(milliseconds);
-}
-
-int GAnalytics::sendInterval() const
-{
- return (d->m_timer.interval());
-}
-
-bool GAnalytics::isEnabled()
-{
- return d->m_isEnabled;
-}
-
-void GAnalytics::enable(bool state)
-{
- d->enable(state);
-}
-
-int GAnalytics::version()
-{
- return d->m_version;
-}
-
-void GAnalytics::setNetworkAccessManager(QNetworkAccessManager *networkAccessManager)
-{
- if (d->networkManager != networkAccessManager)
- {
- // Delete the old network manager if it was our child
- if (d->networkManager && d->networkManager->parent() == this)
- {
- d->networkManager->deleteLater();
- }
-
- d->networkManager = networkAccessManager;
- }
-}
-
-QNetworkAccessManager *GAnalytics::networkAccessManager() const
-{
- return d->networkManager;
-}
-
-static void appendCustomValues(QUrlQuery &query, const QVariantMap &customValues)
-{
- for (QVariantMap::const_iterator iter = customValues.begin(); iter != customValues.end(); ++iter)
- {
- query.addQueryItem(iter.key(), iter.value().toString());
- }
-}
-
-/**
- * Sent screen view is called when the user changed the applications view.
- * These action of the user should be noticed and reported. Therefore
- * a QUrlQuery is build in this method. It holts all the parameter for
- * a http POST. The UrlQuery will be stored in a message Queue.
- */
-void GAnalytics::sendScreenView(const QString &screenName, const QVariantMap &customValues)
-{
- d->logMessage(Info, QString("ScreenView: %1").arg(screenName));
-
- QUrlQuery query = d->buildStandardPostQuery("screenview");
- query.addQueryItem("cd", screenName);
- query.addQueryItem("an", d->m_appName);
- query.addQueryItem("av", d->m_appVersion);
- appendCustomValues(query, customValues);
-
- d->enqueQueryWithCurrentTime(query);
-}
-
-/**
- * This method is called whenever a button was pressed in the application.
- * A query for a POST message will be created to report this event. The
- * created query will be stored in a message queue.
- */
-void GAnalytics::sendEvent(const QString &category, const QString &action, const QString &label, const QVariant &value, const QVariantMap &customValues)
-{
- QUrlQuery query = d->buildStandardPostQuery("event");
- query.addQueryItem("an", d->m_appName);
- query.addQueryItem("av", d->m_appVersion);
- query.addQueryItem("ec", category);
- query.addQueryItem("ea", action);
- if (!label.isEmpty())
- query.addQueryItem("el", label);
- if (value.isValid())
- query.addQueryItem("ev", value.toString());
-
- appendCustomValues(query, customValues);
-
- d->enqueQueryWithCurrentTime(query);
-}
-
-/**
- * Method is called after an exception was raised. It builds a
- * query for a POST message. These query will be stored in a
- * message queue.
- */
-void GAnalytics::sendException(const QString &exceptionDescription, bool exceptionFatal, const QVariantMap &customValues)
-{
- QUrlQuery query = d->buildStandardPostQuery("exception");
- query.addQueryItem("an", d->m_appName);
- query.addQueryItem("av", d->m_appVersion);
-
- query.addQueryItem("exd", exceptionDescription);
-
- if (exceptionFatal)
- {
- query.addQueryItem("exf", "1");
- }
- else
- {
- query.addQueryItem("exf", "0");
- }
- appendCustomValues(query, customValues);
-
- d->enqueQueryWithCurrentTime(query);
-}
-
-/**
- * Session starts. This event will be sent by a POST message.
- * Query is setup in this method and stored in the message
- * queue.
- */
-void GAnalytics::startSession()
-{
- QVariantMap customValues;
- customValues.insert("sc", "start");
- sendEvent("Session", "Start", QString(), QVariant(), customValues);
-}
-
-/**
- * Session ends. This event will be sent by a POST message.
- * Query is setup in this method and stored in the message
- * queue.
- */
-void GAnalytics::endSession()
-{
- QVariantMap customValues;
- customValues.insert("sc", "end");
- sendEvent("Session", "End", QString(), QVariant(), customValues);
-}
-
-/**
- * Qut stream to persist class GAnalytics.
- */
-QDataStream &operator<<(QDataStream &outStream, const GAnalytics &analytics)
-{
- outStream << analytics.d->persistMessageQueue();
-
- return outStream;
-}
-
-/**
- * In stream to read GAnalytics from file.
- */
-QDataStream &operator>>(QDataStream &inStream, GAnalytics &analytics)
-{
- QList<QString> dataList;
- inStream >> dataList;
- analytics.d->readMessagesFromFile(dataList);
-
- return inStream;
-}
diff --git a/libraries/ganalytics/src/ganalytics_worker.cpp b/libraries/ganalytics/src/ganalytics_worker.cpp
deleted file mode 100644
index b0ae75a4..00000000
--- a/libraries/ganalytics/src/ganalytics_worker.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-#include "ganalytics.h"
-#include "ganalytics_worker.h"
-#include "sys.h"
-
-#include <QCoreApplication>
-#include <QNetworkAccessManager>
-#include <QNetworkReply>
-
-#include <QGuiApplication>
-#include <QScreen>
-
-const QLatin1String GAnalyticsWorker::dateTimeFormat("yyyy,MM,dd-hh:mm::ss:zzz");
-
-GAnalyticsWorker::GAnalyticsWorker(GAnalytics *parent)
- : QObject(parent), q(parent), m_logLevel(GAnalytics::Error)
-{
- m_appName = QCoreApplication::instance()->applicationName();
- m_appVersion = QCoreApplication::instance()->applicationVersion();
- m_request.setUrl(QUrl("https://www.google-analytics.com/collect"));
- m_request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
- m_request.setHeader(QNetworkRequest::UserAgentHeader, getUserAgent());
-
- m_language = QLocale::system().name().toLower().replace("_", "-");
- m_screenResolution = getScreenResolution();
-
- m_timer.setInterval(m_timerInterval);
- connect(&m_timer, &QTimer::timeout, this, &GAnalyticsWorker::postMessage);
-}
-
-void GAnalyticsWorker::enable(bool state)
-{
- // state change to the same is not valid.
- if(m_isEnabled == state)
- {
- return;
- }
-
- m_isEnabled = state;
- if(m_isEnabled)
- {
- // enable -> start doing things :)
- m_timer.start();
- }
- else
- {
- // disable -> stop the timer
- m_timer.stop();
- }
-}
-
-void GAnalyticsWorker::logMessage(GAnalytics::LogLevel level, const QString &message)
-{
- if (m_logLevel > level)
- {
- return;
- }
-
- qDebug() << "[Analytics]" << message;
-}
-
-/**
- * Build the POST query. Adds all parameter to the query
- * which are used in every POST.
- * @param type Type of POST message. The event which is to post.
- * @return query Most used parameter in a query for a POST.
- */
-QUrlQuery GAnalyticsWorker::buildStandardPostQuery(const QString &type)
-{
- QUrlQuery query;
- query.addQueryItem("v", "1");
- query.addQueryItem("tid", m_trackingID);
- query.addQueryItem("cid", m_clientID);
- if (!m_userID.isEmpty())
- {
- query.addQueryItem("uid", m_userID);
- }
- query.addQueryItem("t", type);
- query.addQueryItem("ul", m_language);
- query.addQueryItem("vp", m_viewportSize);
- query.addQueryItem("sr", m_screenResolution);
- if(m_anonymizeIPs)
- {
- query.addQueryItem("aip", "1");
- }
- return query;
-}
-
-/**
- * Get primary screen resolution.
- * @return A QString like "800x600".
- */
-QString GAnalyticsWorker::getScreenResolution()
-{
- QScreen *screen = QGuiApplication::primaryScreen();
- QSize size = screen->size();
-
- return QString("%1x%2").arg(size.width()).arg(size.height());
-}
-
-/**
- * Try to gain information about the system where this application
- * is running. It needs to get the name and version of the operating
- * system, the language and screen resolution.
- * All this information will be send in POST messages.
- * @return agent A QString with all the information formatted for a POST message.
- */
-QString GAnalyticsWorker::getUserAgent()
-{
- return QString("%1/%2").arg(m_appName).arg(m_appVersion);
-}
-
-/**
- * The message queue contains a list of QueryBuffer object.
- * QueryBuffer holds a QUrlQuery object and a QDateTime object.
- * These both object are freed from the buffer object and
- * inserted as QString objects in a QList.
- * @return dataList The list with concartinated queue data.
- */
-QList<QString> GAnalyticsWorker::persistMessageQueue()
-{
- QList<QString> dataList;
- foreach (QueryBuffer buffer, m_messageQueue)
- {
- dataList << buffer.postQuery.toString();
- dataList << buffer.time.toString(dateTimeFormat);
- }
- return dataList;
-}
-
-/**
- * Reads persistent messages from a file.
- * Gets all message data as a QList<QString>.
- * Two lines in the list build a QueryBuffer object.
- */
-void GAnalyticsWorker::readMessagesFromFile(const QList<QString> &dataList)
-{
- QListIterator<QString> iter(dataList);
- while (iter.hasNext())
- {
- QString queryString = iter.next();
- QString dateString = iter.next();
- QUrlQuery query;
- query.setQuery(queryString);
- QDateTime dateTime = QDateTime::fromString(dateString, dateTimeFormat);
- QueryBuffer buffer;
- buffer.postQuery = query;
- buffer.time = dateTime;
- m_messageQueue.enqueue(buffer);
- }
-}
-
-/**
- * Takes a QUrlQuery object and wrapp it together with
- * a QTime object into a QueryBuffer struct. These struct
- * will be stored in the message queue.
- */
-void GAnalyticsWorker::enqueQueryWithCurrentTime(const QUrlQuery &query)
-{
- QueryBuffer buffer;
- buffer.postQuery = query;
- buffer.time = QDateTime::currentDateTime();
-
- m_messageQueue.enqueue(buffer);
-}
-
-/**
- * This function is called by a timer interval.
- * The function tries to send a messages from the queue.
- * If message was successfully send then this function
- * will be called back to send next message.
- * If message queue contains more than one message then
- * the connection will kept open.
- * The message POST is asyncroniously when the server
- * answered a signal will be emitted.
- */
-void GAnalyticsWorker::postMessage()
-{
- if (m_messageQueue.isEmpty())
- {
- // queue empty -> try sending later
- m_timer.start();
- return;
- }
- else
- {
- // queue has messages -> stop timer and start sending
- m_timer.stop();
- }
-
- QString connection = "close";
- if (m_messageQueue.count() > 1)
- {
- connection = "keep-alive";
- }
-
- QueryBuffer buffer = m_messageQueue.head();
- QDateTime sendTime = QDateTime::currentDateTime();
- qint64 timeDiff = buffer.time.msecsTo(sendTime);
-
- if (timeDiff > fourHours)
- {
- // too old.
- m_messageQueue.dequeue();
- emit postMessage();
- return;
- }
-
- buffer.postQuery.addQueryItem("qt", QString::number(timeDiff));
- m_request.setRawHeader("Connection", connection.toUtf8());
- m_request.setHeader(QNetworkRequest::ContentLengthHeader, buffer.postQuery.toString().length());
-
- logMessage(GAnalytics::Debug, "Query string = " + buffer.postQuery.toString());
-
- // Create a new network access manager if we don't have one yet
- if (networkManager == NULL)
- {
- networkManager = new QNetworkAccessManager(this);
- }
-
- QNetworkReply *reply = networkManager->post(m_request, buffer.postQuery.query(QUrl::EncodeUnicode).toUtf8());
- connect(reply, SIGNAL(finished()), this, SLOT(postMessageFinished()));
-}
-
-/**
- * NetworkAccsessManager has finished to POST a message.
- * If POST message was successfully send then the message
- * query should be removed from queue.
- * SIGNAL "postMessage" will be emitted to send next message
- * if there is any.
- * If message couldn't be send then next try is when the
- * timer emits its signal.
- */
-void GAnalyticsWorker::postMessageFinished()
-{
- QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
-
- int httpStausCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
- if (httpStausCode < 200 || httpStausCode > 299)
- {
- logMessage(GAnalytics::Error, QString("Error posting message: %1").arg(reply->errorString()));
-
- // An error ocurred. Try sending later.
- m_timer.start();
- return;
- }
- else
- {
- logMessage(GAnalytics::Debug, "Message sent");
- }
-
- m_messageQueue.dequeue();
- postMessage();
- reply->deleteLater();
-}
diff --git a/libraries/ganalytics/src/ganalytics_worker.h b/libraries/ganalytics/src/ganalytics_worker.h
deleted file mode 100644
index 1962f799..00000000
--- a/libraries/ganalytics/src/ganalytics_worker.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#pragma once
-
-#include <QUrlQuery>
-#include <QDateTime>
-#include <QTimer>
-#include <QNetworkRequest>
-#include <QQueue>
-
-struct QueryBuffer
-{
- QUrlQuery postQuery;
- QDateTime time;
-};
-
-class GAnalyticsWorker : public QObject
-{
- Q_OBJECT
-
-public:
- explicit GAnalyticsWorker(GAnalytics *parent = 0);
-
- GAnalytics *q;
-
- QNetworkAccessManager *networkManager = nullptr;
-
- QQueue<QueryBuffer> m_messageQueue;
- QTimer m_timer;
- QNetworkRequest m_request;
- GAnalytics::LogLevel m_logLevel;
-
- QString m_trackingID;
- QString m_clientID;
- QString m_userID;
- QString m_appName;
- QString m_appVersion;
- QString m_language;
- QString m_screenResolution;
- QString m_viewportSize;
-
- bool m_anonymizeIPs = false;
- bool m_isEnabled = false;
- int m_timerInterval = 30000;
- int m_version = 0;
-
- const static int fourHours = 4 * 60 * 60 * 1000;
- const static QLatin1String dateTimeFormat;
-
-public:
- void logMessage(GAnalytics::LogLevel level, const QString &message);
-
- QUrlQuery buildStandardPostQuery(const QString &type);
- QString getScreenResolution();
- QString getUserAgent();
- QList<QString> persistMessageQueue();
- void readMessagesFromFile(const QList<QString> &dataList);
-
- void enqueQueryWithCurrentTime(const QUrlQuery &query);
- void setIsSending(bool doSend);
- void enable(bool state);
-
-public slots:
- void postMessage();
- void postMessageFinished();
-};
-
diff --git a/libraries/javacheck/CMakeLists.txt b/libraries/javacheck/CMakeLists.txt
index d0bea2a5..f599bf15 100644
--- a/libraries/javacheck/CMakeLists.txt
+++ b/libraries/javacheck/CMakeLists.txt
@@ -4,7 +4,7 @@ find_package(Java 1.7 REQUIRED COMPONENTS Development)
include(UseJava)
set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck)
-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7 -Xlint:deprecation -Xlint:unchecked)
+set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8 -Xlint:deprecation -Xlint:unchecked)
set(SRC
JavaCheck.java
diff --git a/libraries/launcher/CMakeLists.txt b/libraries/launcher/CMakeLists.txt
index ff2a4149..54913fd4 100644
--- a/libraries/launcher/CMakeLists.txt
+++ b/libraries/launcher/CMakeLists.txt
@@ -4,7 +4,7 @@ find_package(Java 1.7 REQUIRED COMPONENTS Development)
include(UseJava)
set(CMAKE_JAVA_JAR_ENTRY_POINT org.multimc.EntryPoint)
-set(CMAKE_JAVA_COMPILE_FLAGS -target 7 -source 7 -Xlint:deprecation -Xlint:unchecked)
+set(CMAKE_JAVA_COMPILE_FLAGS -target 8 -source 8 -Xlint:deprecation -Xlint:unchecked)
set(SRC
org/multimc/EntryPoint.java
diff --git a/libraries/quazip b/libraries/quazip
-Subproject b1a72ac0bb5a732bf887a535ab75c6f9bedb6b6
+Subproject c9ef32de19bceb58d236f5c22382698deaec69f
diff --git a/notsecrets/CMakeLists.txt b/notsecrets/CMakeLists.txt
deleted file mode 100644
index b5dd3cf8..00000000
--- a/notsecrets/CMakeLists.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-add_library(secrets STATIC Secrets.cpp Secrets.h)
-target_link_libraries(secrets Qt5::Core)
-target_compile_definitions(secrets PUBLIC -DEMBED_SECRETS)
-target_include_directories(secrets PUBLIC .)
-
-set(Launcher_CommonName "DevLauncher")
-
-set(Launcher_Copyright "MultiMC Contributors" PARENT_SCOPE)
-set(Launcher_Domain "multimc.org" PARENT_SCOPE)
-set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
-set(Launcher_DisplayName "${Launcher_CommonName} 5" PARENT_SCOPE)
-set(Launcher_UserAgent "${Launcher_CommonName}/5.0" PARENT_SCOPE)
-set(Launcher_ConfigFile "devlauncher.cfg" PARENT_SCOPE)
-set(Launcher_Git "https://github.com/MultiMC/Launcher" PARENT_SCOPE)
-
-set(Launcher_Branding_ICNS "notsecrets/Launcher.icns" PARENT_SCOPE)
-set(Launcher_Branding_WindowsRC "notsecrets/launcher.rc" PARENT_SCOPE)
-set(Launcher_Branding_LogoQRC "notsecrets/logo.qrc" PARENT_SCOPE)
diff --git a/notsecrets/README.md b/notsecrets/README.md
deleted file mode 100644
index 4664fa89..00000000
--- a/notsecrets/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# DevLauncher (Not) Secrets
-
-This is a dummy implementation of MultiMC's _Secrets_ library, used to store private information needed for:
-- Application name and logo (and branding in general)
-- Various URLs and API endpoints
-- Your Microsoft Identity Platform client ID. **This is required to use Microsoft accounts to play!**
- - If omitted, adding Microsoft accounts will be completely disabled.
-
-## MultiMC development
-
-In its current state, the `notsecrets` library is suitable for MultiMC code contributions (the code builds as `DevLauncher`).
-
-All you have to do is add the Microsoft client ID. See `Secrets.cpp` for details.
-
-## Forking
-
-Forks of this project that intend to distribute binaries to users should use their own implementation of this library that does not impersonate MultiMC in any way (see the Apache 2.0 license, common sense and trademark law).
-
-A fork is a serious business, especially if you intend to distribute binaries to users. This is because you need to agree to the Microsoft identity platform Terms of Use:
-
-https://docs.microsoft.com/en-us/legal/microsoft-identity-platform/terms-of-use
-
-If you truly want to accept such an agreement, a starting point is to copy `notsecrets` to `secrets`, enable the `Launcher_EMBED_SECRETS` CMake option and customize the files.
-
-We do not want confused users asking for help with your fork in MultiMC Discord or similar locations.
diff --git a/notsecrets/Secrets.cpp b/notsecrets/Secrets.cpp
deleted file mode 100644
index 88995635..00000000
--- a/notsecrets/Secrets.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "Secrets.h"
-
-#include <array>
-#include <cstdio>
-
-namespace {
-
-/*
- * This is the MSA client ID. It is confidential and should not be reused.
- * You can obtain one for yourself by using azure app registration:
- * https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
- *
- * The app registration should:
- * - Be only for personal accounts.
- * - Not have any redirect URI.
- * - Not have any platform.
- * - Have no credentials.
- * - No certificates.
- * - No client secrets.
- * - Enable 'Live SDK support' for access to XBox APIs.
- * - Enable 'public client flows' for OAuth2 device flow.
- *
- * By putting one in here, you accept the terms and conditions for using the MS Identity Plaform and assume all responsibilities associated with it.
- * See: https://docs.microsoft.com/en-us/legal/microsoft-identity-platform/terms-of-use
- *
- * Above all else, do not impersonate other applications! This includes the Mojang Launcher and MultiMC - your builds are *NOT* MultiMC.
- *
- * If you intend to base your own launcher on this code, take care and customize this to obfuscate the client ID, so it cannot be trivially found by casual attackers.
- */
-
-QString MSAClientID = "";
-}
-
-namespace Secrets {
-bool hasMSAClientID() {
- return !MSAClientID.isEmpty();
-}
-
-QString getMSAClientID(uint8_t separator) {
- return MSAClientID;
-}
-}
diff --git a/notsecrets/Secrets.h b/notsecrets/Secrets.h
deleted file mode 100644
index 6872b68e..00000000
--- a/notsecrets/Secrets.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-#include <QString>
-#include <cstdint>
-
-namespace Secrets {
-bool hasMSAClientID();
-QString getMSAClientID(uint8_t separator);
-}
diff --git a/packages/debian/makedeb.sh b/packages/debian/makedeb.sh
new file mode 100755
index 00000000..5a8c71dd
--- /dev/null
+++ b/packages/debian/makedeb.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+mkdir builddir
+cd builddir
+cmake -DLauncher_LAYOUT=lin-system -DCMAKE_INSTALL_PREFIX=../polymc/usr ../../../
+make -j$(nproc) install
+cd ..
+VERSION_PLACEHOLDER=$(git describe --tags | sed 's/-.*//')
+cp polymc/DEBIAN/control.template polymc/DEBIAN/control
+sed -i "2s/.*/Version: $VERSION_PLACEHOLDER/" polymc/DEBIAN/control
+dpkg-deb --build polymc
diff --git a/packages/debian/polymc/DEBIAN/control.template b/packages/debian/polymc/DEBIAN/control.template
new file mode 100644
index 00000000..f7c294bc
--- /dev/null
+++ b/packages/debian/polymc/DEBIAN/control.template
@@ -0,0 +1,9 @@
+Package: polymc
+Version:
+Section: games
+Priority: optional
+Architecture: amd64
+Depends: libqt5core5a, libqt5network5, libqt5gui5
+Maintainer: PolyMC Team
+Description: PolyMC
+ A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once
diff --git a/packages/debian/polymc/usr/share/applications/polymc.desktop b/packages/debian/polymc/usr/share/applications/polymc.desktop
new file mode 100644
index 00000000..7cf78e9f
--- /dev/null
+++ b/packages/debian/polymc/usr/share/applications/polymc.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Name=PolyMC
+Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
+Type=Application
+Terminal=false
+Exec=polymc
+StartupNotify=true
+Icon=null
+Categories=Game;
+Keywords=game;minecraft;launcher;
diff --git a/packages/flatpak/BUILDING.md b/packages/flatpak/BUILDING.md
new file mode 100644
index 00000000..c1594b8f
--- /dev/null
+++ b/packages/flatpak/BUILDING.md
@@ -0,0 +1,28 @@
+# Building the flatpak
+
+### 1. Install tools
+
+Install `flatpak` and `flatpak-builder` from your distribution repositories.
+
+### 2. Install SDK
+
+`flatpak install org.kde.Sdk org.kde.Platform`
+Pick version `5.15`
+
+### 3. Get the yml flatpak file
+
+You can download it directly from github, or clone the repo.
+
+### 4. Build it
+
+```
+flatpak-builder --ccache --force-clean flatbuild packages/flatpak/org.polymc.PolyMC.yml
+```
+
+If you didn't clone the repo, the path might be different.
+
+### 5. Install the custom build
+
+```
+flatpak-builder --user --install --ccache --force-clean flatbuild packages/org.polymc.PolyMC.yml
+```
diff --git a/packages/flatpak/org.polymc.PolyMC.desktop b/packages/flatpak/org.polymc.PolyMC.desktop
new file mode 100644
index 00000000..7cf78e9f
--- /dev/null
+++ b/packages/flatpak/org.polymc.PolyMC.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Name=PolyMC
+Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
+Type=Application
+Terminal=false
+Exec=polymc
+StartupNotify=true
+Icon=null
+Categories=Game;
+Keywords=game;minecraft;launcher;
diff --git a/packages/flatpak/org.polymc.PolyMC.yml b/packages/flatpak/org.polymc.PolyMC.yml
new file mode 100644
index 00000000..632f990b
--- /dev/null
+++ b/packages/flatpak/org.polymc.PolyMC.yml
@@ -0,0 +1,74 @@
+app-id: org.polymc.PolyMC
+runtime: org.kde.Platform
+runtime-version: "5.15"
+sdk: org.kde.Sdk
+command: polymc
+finish-args:
+ - --share=ipc
+ - --socket=x11
+ - --socket=wayland
+ - --device=dri
+ - --share=network
+ # for Discord RPC mods
+ - --filesystem=xdg-run/app/com.discordapp.Discord:create
+
+modules:
+ - name: compile
+ buildsystem: simple
+ build-commands:
+ - mkdir build
+ - mkdir -p /app/bin
+ - cd build && JAVA_HOME=/run/build/compile/jdk PATH=$JAVA_HOME:$PATH JAVA_COMPILER=../jdk/bin/javac cmake -DLauncher_LAYOUT=lin-system -DCMAKE_INSTALL_PREFIX=/app/ .. && make -j$(nproc) install
+ sources:
+ - type: git
+ url: https://github.com/PolyMC/PolyMC.git
+ tag: 1.0.0
+ - type: archive
+ url: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_linux_hotspot_17_35.tar.gz
+ sha256: 6f1335d9a7855159f982dac557420397be9aa85f3f7bc84e111d25871c02c0c7
+ archive-type: tar-gzip
+ dest: jdk
+ # old MC versions depend on Xrandr
+ - name: xrandr
+ buildsystem: simple
+ build-commands:
+ - ./configure --prefix=/app
+ - make
+ - make install
+ sources:
+ - type: archive
+ url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.1.tar.xz
+ sha256: 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762
+ - name: java
+ buildsystem: simple
+ build-commands:
+ - mkdir -p /app/jdk
+ - mv ./* /app/jdk
+ sources:
+ # JDK 17 for MC 1.18
+ - type: archive
+ url: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jre_x64_linux_hotspot_17.0.1_12.tar.gz
+ sha256: 9d58cb741509a88e0ae33eb022334fb900b409b198eca6fe76246f0677b392ad
+ strip-components: 0
+ # JDK for Minecraft 1.17 - 1.18
+ - type: archive
+ url: https://github.com/adoptium/temurin16-binaries/releases/download/jdk-16.0.2%2B7/OpenJDK16U-jdk_x64_linux_hotspot_16.0.2_7.tar.gz
+ sha256: 323d6d7474a359a28eff7ddd0df8e65bd61554a8ed12ef42fd9365349e573c2c
+ strip-components: 0
+ # JDK 11 for 1.9 - 1.15.2
+ - type: archive
+ url: https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jre_x64_linux_hotspot_11.0.13_8.tar.gz
+ sha256: fb0a27e6e1f26a1ee79daa92e4cfe3ec0d676acfe114d99dd84b3414f056e8a0
+ strip-components: 0
+ # JDK 8 for pre1.9
+ - type: archive
+ url: https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jre_x64_linux_hotspot_8u312b07.tar.gz
+ sha256: 18fd13e77621f712326bfcf79c3e3cc08c880e3e4b8f63a1e5da619f3054b063
+ strip-components: 0
+ - name: desktopfiles
+ buildsystem: simple
+ build-commands:
+ - install -Dm644 org.polymc.PolyMC.desktop /app/share/applications/org.polymc.PolyMC.desktop
+ sources:
+ - type: file
+ path: org.polymc.PolyMC.desktop
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
new file mode 100644
index 00000000..dd120ab3
--- /dev/null
+++ b/program_info/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(Launcher_CommonName "PolyMC")
+
+set(Launcher_Copyright "PolyMC Contributors" PARENT_SCOPE)
+set(Launcher_Domain "github.com/PolyMC" PARENT_SCOPE)
+set(Launcher_Name "${Launcher_CommonName}" PARENT_SCOPE)
+set(Launcher_DisplayName "${Launcher_CommonName} 5" PARENT_SCOPE)
+set(Launcher_UserAgent "${Launcher_CommonName}/5.0" PARENT_SCOPE)
+set(Launcher_ConfigFile "polymc.cfg" PARENT_SCOPE)
+set(Launcher_Git "https://github.com/PolyMC/PolyMC" PARENT_SCOPE)
+
+set(Launcher_Desktop "program_info/polymc.desktop" PARENT_SCOPE)
+set(Launcher_Branding_ICNS "program_info/Launcher.icns" PARENT_SCOPE)
+set(Launcher_Branding_WindowsRC "program_info/launcher.rc" PARENT_SCOPE)
+set(Launcher_Branding_LogoQRC "program_info/logo.qrc" PARENT_SCOPE)
diff --git a/notsecrets/Launcher.icns b/program_info/Launcher.icns
index 951b74fc..951b74fc 100644
--- a/notsecrets/Launcher.icns
+++ b/program_info/Launcher.icns
Binary files differ
diff --git a/notsecrets/Launcher.ico b/program_info/Launcher.ico
index 9308958f..9308958f 100644
--- a/notsecrets/Launcher.ico
+++ b/program_info/Launcher.ico
Binary files differ
diff --git a/notsecrets/Launcher.manifest b/program_info/Launcher.manifest
index 0ee781ee..0ee781ee 100644
--- a/notsecrets/Launcher.manifest
+++ b/program_info/Launcher.manifest
diff --git a/program_info/README.md b/program_info/README.md
new file mode 100644
index 00000000..01c4d02b
--- /dev/null
+++ b/program_info/README.md
@@ -0,0 +1,5 @@
+# PolyMC Program Info
+
+This is PolyMC's program info which contains information about:
+- Application name and logo (and branding in general)
+- Various URLs and API endpoints
diff --git a/notsecrets/genicons.sh b/program_info/genicons.sh
index e6f704f9..e6f704f9 100755
--- a/notsecrets/genicons.sh
+++ b/program_info/genicons.sh
diff --git a/notsecrets/launcher.rc b/program_info/launcher.rc
index f84104fb..f84104fb 100644
--- a/notsecrets/launcher.rc
+++ b/program_info/launcher.rc
diff --git a/notsecrets/logo.qrc b/program_info/logo.qrc
index f1da6fe6..f1da6fe6 100644
--- a/notsecrets/logo.qrc
+++ b/program_info/logo.qrc
diff --git a/notsecrets/logo.svg b/program_info/logo.svg
index a1c8e439..a1c8e439 100644
--- a/notsecrets/logo.svg
+++ b/program_info/logo.svg
diff --git a/program_info/polymc.desktop b/program_info/polymc.desktop
new file mode 100644
index 00000000..835ef6e1
--- /dev/null
+++ b/program_info/polymc.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Version=1.0
+Name=PolyMC
+Comment=A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once.
+Type=Application
+Terminal=false
+Exec=polymc
+StartupNotify=true
+Icon=polymc
+Categories=Game;
+Keywords=game;minecraft;launcher;