diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 51ad0f49f8..709f114501 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,12 +44,12 @@ jobs: -DLauncher_LAYOUT=lin-nodeps \ -DLauncher_BUILD_PLATFORM=lin64 \ -DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues \ + -DLauncher_EMBED_SECRETS=On \ $GITHUB_WORKSPACE - name: Compile run: | cd build - make tcversion make -j$(nproc) - name: Test @@ -167,6 +167,7 @@ jobs: -DLauncher_LAYOUT=win-bundle ^ -DLauncher_BUILD_PLATFORM=win32 ^ -DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues ^ + -DLauncher_EMBED_SECRETS=On ^ -G "MinGW Makefiles" ^ .. @@ -180,7 +181,6 @@ jobs: set PATH=%PATHCM%;%PATH% set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%PATH% cd build - mingw32-make tcversion mingw32-make -j%NUMBER_OF_PROCESSORS% - name: Test @@ -245,26 +245,26 @@ jobs: mkdir build cd build cmake \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);$(brew --prefix qt@5)/lib/cmake/Qt5Core;$(brew --prefix qt@5)/lib/cmake/Qt5Widgets;$(brew --prefix qt@5)/lib/cmake/Qt5Concurrent;$(brew --prefix qt@5)/lib/cmake/Qt5Network;$(brew --prefix qt@5)/lib/cmake/Qt5Test;$(brew --prefix qt@5)/lib/cmake/Qt5Xml" \ - -DQt5_DIR="$(brew --prefix qt@5)" \ - -DLauncher_UPDATER_BASE=https://files.multimc.org/update/ \ - -DLauncher_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ \ - -DLauncher_ANALYTICS_ID:STRING=UA-87731965-2 \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ - $GITHUB_WORKSPACE + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);$(brew --prefix qt@5)/lib/cmake/Qt5Core;$(brew --prefix qt@5)/lib/cmake/Qt5Widgets;$(brew --prefix qt@5)/lib/cmake/Qt5Concurrent;$(brew --prefix qt@5)/lib/cmake/Qt5Network;$(brew --prefix qt@5)/lib/cmake/Qt5Test;$(brew --prefix qt@5)/lib/cmake/Qt5Xml" \ + -DQt5_DIR="$(brew --prefix qt@5)" \ + -DLauncher_UPDATER_BASE=https://files.multimc.org/update/ \ + -DLauncher_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ \ + -DLauncher_ANALYTICS_ID:STRING=UA-87731965-2 \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ + -DLauncher_EMBED_SECRETS=On \ + $GITHUB_WORKSPACE - name: Compile run: | cd build - make tcversion make -j$(sysctl -n hw.logicalcpu) - name: Test diff --git a/.gitignore b/.gitignore index 6b3f6246e9..f1bd42a290 100644 --- a/.gitignore +++ b/.gitignore @@ -36,5 +36,4 @@ tags .DS_Store branding/ -secrets/ run/ diff --git a/notsecrets/README.md b/notsecrets/README.md deleted file mode 100644 index 4664fa893d..0000000000 --- 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/CMakeLists.txt b/secrets/CMakeLists.txt similarity index 76% rename from notsecrets/CMakeLists.txt rename to secrets/CMakeLists.txt index 1b2ba3d7ee..21f08ceb4b 100644 --- a/notsecrets/CMakeLists.txt +++ b/secrets/CMakeLists.txt @@ -13,6 +13,6 @@ set(Launcher_UserAgent "MultiMC/5.0" PARENT_SCOPE) set(Launcher_ConfigFile "ultimmc.cfg" PARENT_SCOPE) set(Launcher_Git "https://github.com/UltimMC/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) +set(Launcher_Branding_ICNS "secrets/Launcher.icns" PARENT_SCOPE) +set(Launcher_Branding_WindowsRC "secrets/launcher.rc" PARENT_SCOPE) +set(Launcher_Branding_LogoQRC "secrets/logo.qrc" PARENT_SCOPE) diff --git a/notsecrets/Launcher.icns b/secrets/Launcher.icns similarity index 100% rename from notsecrets/Launcher.icns rename to secrets/Launcher.icns diff --git a/notsecrets/Launcher.ico b/secrets/Launcher.ico similarity index 100% rename from notsecrets/Launcher.ico rename to secrets/Launcher.ico diff --git a/notsecrets/Launcher.manifest b/secrets/Launcher.manifest similarity index 100% rename from notsecrets/Launcher.manifest rename to secrets/Launcher.manifest diff --git a/notsecrets/Secrets.cpp b/secrets/Secrets.cpp similarity index 100% rename from notsecrets/Secrets.cpp rename to secrets/Secrets.cpp diff --git a/notsecrets/Secrets.h b/secrets/Secrets.h similarity index 100% rename from notsecrets/Secrets.h rename to secrets/Secrets.h diff --git a/notsecrets/genicons.sh b/secrets/genicons.sh similarity index 100% rename from notsecrets/genicons.sh rename to secrets/genicons.sh diff --git a/notsecrets/launcher.rc b/secrets/launcher.rc similarity index 100% rename from notsecrets/launcher.rc rename to secrets/launcher.rc diff --git a/notsecrets/logo.qrc b/secrets/logo.qrc similarity index 100% rename from notsecrets/logo.qrc rename to secrets/logo.qrc diff --git a/notsecrets/logo.svg b/secrets/logo.svg similarity index 100% rename from notsecrets/logo.svg rename to secrets/logo.svg