From e6246a9306567f5646d3bc1971a1c5c4cf8f4f54 Mon Sep 17 00:00:00 2001 From: Lenny McLennington Date: Mon, 20 Dec 2021 02:41:08 +0000 Subject: Move MSA Client ID to the same place as the others MSA Client ID has been moved to CMakeLists.txt, and defaults to the Client ID for the PolyMC application. Removed secrets/notsecrets library, replace with (temporary?) program_info subdirectory. --- notsecrets/CMakeLists.txt | 18 --- notsecrets/Launcher.icns | Bin 304757 -> 0 bytes notsecrets/Launcher.ico | Bin 102134 -> 0 bytes notsecrets/Launcher.manifest | 31 ----- notsecrets/README.md | 13 --- notsecrets/Secrets.cpp | 40 ------- notsecrets/Secrets.h | 8 -- notsecrets/genicons.sh | 18 --- notsecrets/launcher.rc | 29 ----- notsecrets/logo.qrc | 8 -- notsecrets/logo.svg | 271 ------------------------------------------- 11 files changed, 436 deletions(-) delete mode 100644 notsecrets/CMakeLists.txt delete mode 100644 notsecrets/Launcher.icns delete mode 100644 notsecrets/Launcher.ico delete mode 100644 notsecrets/Launcher.manifest delete mode 100644 notsecrets/README.md delete mode 100644 notsecrets/Secrets.cpp delete mode 100644 notsecrets/Secrets.h delete mode 100755 notsecrets/genicons.sh delete mode 100644 notsecrets/launcher.rc delete mode 100644 notsecrets/logo.qrc delete mode 100644 notsecrets/logo.svg (limited to 'notsecrets') diff --git a/notsecrets/CMakeLists.txt b/notsecrets/CMakeLists.txt deleted file mode 100644 index 00b132a3..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 "PolyMC") - -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 "polymc.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/Launcher.icns b/notsecrets/Launcher.icns deleted file mode 100644 index 951b74fc..00000000 Binary files a/notsecrets/Launcher.icns and /dev/null differ diff --git a/notsecrets/Launcher.ico b/notsecrets/Launcher.ico deleted file mode 100644 index 9308958f..00000000 Binary files a/notsecrets/Launcher.ico and /dev/null differ diff --git a/notsecrets/Launcher.manifest b/notsecrets/Launcher.manifest deleted file mode 100644 index 0ee781ee..00000000 --- a/notsecrets/Launcher.manifest +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - Custom Minecraft launcher for managing multiple installs. - - - - - - - - - - - - - - - diff --git a/notsecrets/README.md b/notsecrets/README.md deleted file mode 100644 index dcc67699..00000000 --- a/notsecrets/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# PolyMC (Not) Secrets - -This is a dummy implementation of PolyMC'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 PolyMC code contributions. - -All you have to do is add the Microsoft client ID. See `Secrets.cpp` for details. diff --git a/notsecrets/Secrets.cpp b/notsecrets/Secrets.cpp deleted file mode 100644 index 6d2444a2..00000000 --- a/notsecrets/Secrets.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "Secrets.h" - -#include -#include - -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 - * - * 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 -#include - -namespace Secrets { -bool hasMSAClientID(); -QString getMSAClientID(uint8_t separator); -} diff --git a/notsecrets/genicons.sh b/notsecrets/genicons.sh deleted file mode 100755 index e6f704f9..00000000 --- a/notsecrets/genicons.sh +++ /dev/null @@ -1,18 +0,0 @@ -#/bin/bash - -inkscape -w 16 -h 16 -o logo_16.png logo.svg -inkscape -w 24 -h 24 -o logo_24.png logo.svg -inkscape -w 32 -h 32 -o logo_32.png logo.svg -inkscape -w 48 -h 48 -o logo_48.png logo.svg -inkscape -w 64 -h 64 -o logo_64.png logo.svg -inkscape -w 128 -h 128 -o logo_128.png logo.svg - -convert logo_128.png logo_64.png logo_48.png logo_32.png logo_24.png logo_16.png Launcher.ico - -inkscape -w 256 -h 256 -o logo_256.png logo.svg -inkscape -w 512 -h 512 -o logo_512.png logo.svg -inkscape -w 1024 -h 1024 -o logo_1024.png logo.svg - -png2icns Launcher.icns logo_1024.png logo_512.png logo_256.png logo_128.png logo_32.png logo_16.png - -rm -f logo_*.png diff --git a/notsecrets/launcher.rc b/notsecrets/launcher.rc deleted file mode 100644 index f84104fb..00000000 --- a/notsecrets/launcher.rc +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include - -IDI_ICON1 ICON DISCARDABLE "Launcher.ico" -1 RT_MANIFEST "Launcher.manifest" - -VS_VERSION_INFO VERSIONINFO -FILEVERSION 1,0,0,0 -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "MultiMC Contributors" - VALUE "FileDescription", "A Minecraft Launcher" - VALUE "FileVersion", "1.0.0.0" - VALUE "ProductName", "Launcher" - VALUE "ProductVersion", "5" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0000, 0x04b0 // Unicode - END -END diff --git a/notsecrets/logo.qrc b/notsecrets/logo.qrc deleted file mode 100644 index f1da6fe6..00000000 --- a/notsecrets/logo.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - - logo.svg - - - - diff --git a/notsecrets/logo.svg b/notsecrets/logo.svg deleted file mode 100644 index a1c8e439..00000000 --- a/notsecrets/logo.svg +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - -- cgit