Skip to content

Commit

Permalink
UltimMC: Add our changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Neptune650 committed Mar 3, 2024
1 parent 2c9e7b7 commit 0d01261
Show file tree
Hide file tree
Showing 45 changed files with 2,191 additions and 445 deletions.
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
blank_issues_enabled: true
contact_links:
- name: MultiMC Discord
url: https://discord.gg/multimc
about: Please ask for support here before opening an issue.
284 changes: 284 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,284 @@
name: CI

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:

jobs:
build-linux:
name: build-linux
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
with:
submodules: 'recursive'

- name: Install Dependencies
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo add-apt-repository 'deb http://dk.archive.ubuntu.com/ubuntu/ bionic main'
sudo add-apt-repository 'deb http://dk.archive.ubuntu.com/ubuntu/ bionic universe'
sudo apt update
sudo apt install libgl1-mesa-dev qttools5-dev g++-5 gcc-5
- name: Build
run: |
export JAVA_HOME=$JAVA_HOME_8_X64
mkdir build
cd build
cmake \
-DCMAKE_C_COMPILER=/usr/bin/gcc-5 \
-DCMAKE_CXX_COMPILER=/usr/bin/g++-5 \
-DCMAKE_BUILD_TYPE=Release \
-DLauncher_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \
-DCMAKE_INSTALL_PREFIX:PATH=/home/runner/UltimMC/UltimMC \
-DLauncher_UPDATER_BASE=https://files.multimc.org/update/ \
-DLauncher_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ \
-DLauncher_ANALYTICS_ID:STRING=UA-87731965-2 \
-DLauncher_LAYOUT=lin-nodeps \
-DLauncher_BUILD_PLATFORM=lin64 \
-DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues \
$GITHUB_WORKSPACE
- name: Compile
run: |
cd build
make tcversion
make -j$(nproc)
- name: Test
run: |
cd build
make test
cmake -E remove_directory "/home/runner/UltimMC/UltimMC"
- name: Install
run: |
cd build
make install
chmod +x /home/runner/UltimMC/UltimMC/UltimMC
chmod +x /home/runner/UltimMC/UltimMC/bin/UltimMC
- name: Upload Artifacts
uses: actions/upload-artifact@main
with:
name: mmc-cracked-lin64
path: /home/runner/UltimMC

build-windows:
name: build-windows
runs-on: windows-latest

steps:
- uses: actions/checkout@main
with:
submodules: 'recursive'

- name: Cache Qt
uses: actions/cache@main
id: qt-cached
with:
path: "D:/Qt"
key: ${{ runner.os }}-qt56-installed-d

- name: Cache Qt Installer
uses: actions/cache@main
if: steps.qt-cached.outputs.cache-hit != 'true'
id: installer-cached
with:
path: "installer.exe"
key: ${{ runner.os }}-qt56-installer

- name: Create QtAccount File
if: steps.qt-cached.outputs.cache-hit != 'true'
run: |
mkdir C:/Users/runneradmin/AppData/Roaming/Qt/
curl https://gist.github.com/Neptune650/1086e0a3126be6a66580b71afcf8bd99/raw/797d8b90edf07ce88f265b38a573cc6b1fb45bfb/qtaccount.txt --output C:/Users/runneradmin/AppData/Roaming/Qt/qtaccount.ini
- name: Download Qt Installer
if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true'
run: curl https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe --output installer.exe

- name: Download Qt non-Interactive Script
if: steps.qt-cached.outputs.cache-hit != 'true'
run: curl https://gist.githubusercontent.com/Neptune650/aa6c051abc17e7d9d609add7f6dfd16a/raw/074dedb7525c0ffc010b39871615b008c2efbcd6/qt-installer-noninteractive.qs --output nonInteractive.qs

- name: Install Qt
if: steps.qt-cached.outputs.cache-hit != 'true'
shell: cmd
run: installer.exe -v --script nonInteractive.qs --silent

- name: Setup CMake
run: |
curl -L $(curl -s https://api.github.com/repos/kitware/cmake/releases/latest | python -c "import sys, json; print(json.load(sys.stdin)['assets'][14]['browser_download_url'])") -o cmake.zip
unzip cmake.zip
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
architecture: x86

- name: Setup zlib
run: |
mkdir zlib
cd zlib
C:\msys64\usr\bin\wget.exe -O zlib.zip https://downloads.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-bin.zip
C:\msys64\usr\bin\wget.exe -O zliblibs.zip https://downloads.sourceforge.net/project/gnuwin32/zlib/1.2.3/zlib-1.2.3-lib.zip
unzip zlib.zip
unzip zliblibs.zip
- name: Setup OpenSSL
run: |
mkdir OpenSSL
cd OpenSSL
curl -L https://files.catbox.moe/ctwswu.dll -o libeay32.dll
curl -L https://files.catbox.moe/ie9e77.dll -o ssleay32.dll
- name: Build
shell: cmd
if: steps.build-cached.outputs.cache-hit != 'true'
run: |
for /f "tokens=*" %%n in ('powershell -NoLogo -Command "$(ls $pwd\cmake-*-windows-i386\bin).Fullname"') do @(set PATHCM=%%n)
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:\Qt\Tools\mingw492_32\bin;
set PATH=%CD%\zlib;%CD%\zlib\bin;%CD%\zlib\lib;%CD%\zlib\include;%PATH%
set PATH=%CD%\OpenSSL;%PATH%
set PATH=%PATHCM%;%PATH%
mkdir build
cd build
cmake ^
-DCMAKE_C_COMPILER=gcc ^
-DCMAKE_CXX_COMPILER=g++ ^
-DCMAKE_BUILD_TYPE=Release ^
-DLauncher_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json ^
-DCMAKE_INSTALL_PREFIX:PATH="D:/UltimMC/UltimMC" ^
-DCMAKE_PREFIX_PATH="D:\Qt\5.6.3\mingw49_32" ^
-DQt5_DIR="D:\Qt\5.6.3\mingw49_32" ^
-DLauncher_UPDATER_BASE=https://files.multimc.org/update/ ^
-DLauncher_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ ^
-DLauncher_ANALYTICS_ID:STRING=UA-87731965-2 ^
-DLauncher_LAYOUT=win-bundle ^
-DLauncher_BUILD_PLATFORM=win32 ^
-DLauncher_BUG_TRACKER_URL=https://github.com/UltimMC/Launcher/issues ^
-G "MinGW Makefiles" ^
..
- name: Compile
shell: cmd
run: |
for /f "tokens=*" %%n in ('powershell -NoLogo -Command "$(ls $pwd\cmake-*-windows-i386\bin).Fullname"') do @(set PATHCM=%%n)
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:\Qt\Tools\mingw492_32\bin;
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
set PATH=%CD%\OpenSSL;%PATH%
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
shell: cmd
run: |
for /f "tokens=*" %%n in ('powershell -NoLogo -Command "$(ls $pwd\cmake-*-windows-i386\bin).Fullname"') do @(set PATHCM=%%n)
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:\Qt\Tools\mingw492_32\bin;
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
set PATH=%CD%\OpenSSL;%PATH%
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 test
cmake -E remove_directory "D:/UltimMC/UltimMC"
- name: Install
shell: cmd
run: |
for /f "tokens=*" %%n in ('powershell -NoLogo -Command "$(ls $pwd\cmake-*-windows-i386\bin).Fullname"') do @(set PATHCM=%%n)
set PATH=D:\Qt\5.6.3\mingw49_32\bin;D:\Qt\Tools\mingw492_32\bin;
set PATH=%CD%\zlib;%CD%\zlib\bin;%PATH%
set PATH=%CD%\OpenSSL;%PATH%
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 install
- name: Copy OpenSSL
shell: cmd
run: |
cp OpenSSL/ssleay32.dll D:/UltimMC/UltimMC/ssleay32.dll
cp OpenSSL/libeay32.dll D:/UltimMC/UltimMC/libeay32.dll
- name: Upload Artifacts
uses: actions/upload-artifact@main
with:
name: mmc-cracked-win32
path: "D:/UltimMC"

build-mac:
name: build-mac
runs-on: macos-latest

steps:
- uses: actions/checkout@main
with:
submodules: 'recursive'

- name: Cache Dependencies
uses: actions/cache@main
with:
path: /Users/runner/Library/Caches/Homebrew
key: ${{ runner.os }}-deps-cache

- name: Install Dependencies
run: |
brew cleanup
brew install qt@5
- name: Build
run: |
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
- name: Compile
run: |
cd build
make tcversion
make -j$(sysctl -n hw.logicalcpu)
- name: Test
run: |
cd build
make test
cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist"
- name: Install
run: |
cd build
make install
chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC
- name: Upload Artifacts
uses: actions/upload-artifact@main
with:
name: mmc-cracked-osx64
path: /Users/runner/work/UltimMC/build/dist
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ tags
branding/
secrets/
run/

.vscode
17 changes: 7 additions & 10 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ MultiMC is a portable application and is not supposed to be installed into any s
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.
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.
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)

Expand All @@ -29,7 +29,7 @@ API keys are necessary for Microsoft account functionality. More info in [(Not)
Clone the source code using git and grab all the submodules:

```
git clone https://github.com/MultiMC/Launcher.git
git clone https://github.com/UltimMC/Launcher.git
git submodule init
git submodule update
```
Expand Down Expand Up @@ -57,7 +57,7 @@ mkdir ~/MultiMC && cd ~/MultiMC
mkdir build
mkdir install
# clone the complete source
git clone --recursive https://github.com/MultiMC/Launcher.git src
git clone --recursive https://github.com/UltimMC/Launcher.git src
# configure the project
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install ../src
Expand Down Expand Up @@ -93,8 +93,6 @@ 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))!**

# Windows

Getting the project to build and run on Windows is easy if you use Qt's IDE, Qt Creator. The project will simply not compile using Microsoft build tools, because that's not something we do. If it does compile, it is by chance only.
Expand Down Expand Up @@ -171,10 +169,9 @@ 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))!**
### 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 MultiMC by doing `git clone --recursive https://github.com/UltimMC/Launcher.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.
Expand Down Expand Up @@ -202,8 +199,8 @@ 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
cd Launcher
git clone --recursive https://github.com/UltimMC/Launcher.git
cd MultiMC5-Cracked
mkdir build
cd build
cmake \
Expand Down
Loading

0 comments on commit 0d01261

Please sign in to comment.