From 2e7649978777ddfaaaf8e4f7eb8a244e20afeb8b Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:20:08 -0300 Subject: [PATCH 01/28] Add GitHub Actions workflow for building Windows EXE --- .github/workflows/build-windows.yml | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000000..0342523aa4 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,40 @@ +name: Build Windows EXE + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: '5.15.2' + arch: 'win64_mingw81' + + - name: Configure CMake + run: | + mkdir build + cd build + cmake .. -G "MinGW Makefiles" + + - name: Build + run: | + cd build + mingw32-make -j2 + + - name: Deploy Qt + run: | + cd build + windeployqt *.exe + + - name: Upload EXE + uses: actions/upload-artifact@v4 + with: + name: UltimMC-Windows + path: build/*.exe From 55d91b589b02607ef831dbe17af41291e7ed7ff5 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:22:12 -0300 Subject: [PATCH 02/28] Add GitHub Actions workflow for Windows build --- .github/workflows/build-win-simple.yml | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build-win-simple.yml diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml new file mode 100644 index 0000000000..842c2b7ec0 --- /dev/null +++ b/.github/workflows/build-win-simple.yml @@ -0,0 +1,45 @@ +name: Build Windows (Simple) + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: '5.15.2' + arch: 'win64_mingw81' + + - name: Configure + run: | + mkdir build + cd build + cmake .. ^ + -G "MinGW Makefiles" ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DLauncher_LAYOUT=win-bundle ^ + -DLauncher_BUILD_PLATFORM=win64 + + - name: Build + run: | + cd build + mingw32-make -j2 + + - name: Deploy Qt + run: | + cd build + windeployqt *.exe + + - name: Upload EXE + uses: actions/upload-artifact@v4 + with: + name: UltimMC-Windows + path: build/ From e5adb4de36180ef0ff0209167c28acbfc9495d7f Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:37:32 -0300 Subject: [PATCH 03/28] Add shell specification for Configure step --- .github/workflows/build-win-simple.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 842c2b7ec0..62f9009f8d 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -19,6 +19,7 @@ jobs: arch: 'win64_mingw81' - name: Configure + shell: cmd run: | mkdir build cd build From b43b47e023aa454a3b598351e5dadb6210e46fd9 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:43:16 -0300 Subject: [PATCH 04/28] Change shell from cmd to pwsh in build workflow --- .github/workflows/build-win-simple.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 62f9009f8d..c7f1837015 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -19,17 +19,19 @@ jobs: arch: 'win64_mingw81' - name: Configure - shell: cmd + shell: pwsh run: | mkdir build cd build - cmake .. ^ - -G "MinGW Makefiles" ^ - -DCMAKE_BUILD_TYPE=Release ^ - -DLauncher_LAYOUT=win-bundle ^ + cmake .. ` + -G "MinGW Makefiles" ` + -DCMAKE_BUILD_TYPE=Release ` + -DLauncher_LAYOUT=win-bundle ` -DLauncher_BUILD_PLATFORM=win64 + - name: Build + shell: pwsh run: | cd build mingw32-make -j2 From fe77e992ca6b5a1a9e0e6c02fa42b3650694b5ce Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:52:10 -0300 Subject: [PATCH 05/28] Enhance Windows build workflow with MSYS2 setup Added MSYS2/MinGW setup and debug steps to workflow. --- .github/workflows/build-win-simple.yml | 67 +++++++++++++++++++++----- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index c7f1837015..14e20d890d 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -12,34 +12,77 @@ jobs: with: submodules: recursive + - name: Setup MSYS2 / MinGW (instala toolchain) + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: > + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-cmake + mingw-w64-x86_64-pkg-config + - name: Install Qt uses: jurplel/install-qt-action@v3 with: version: '5.15.2' arch: 'win64_mingw81' - - name: Configure + - name: Debug toolchain shell: pwsh run: | - mkdir build - cd build - cmake .. ` - -G "MinGW Makefiles" ` - -DCMAKE_BUILD_TYPE=Release ` - -DLauncher_LAYOUT=win-bundle ` - -DLauncher_BUILD_PLATFORM=win64 + Write-Host "=== PATH ===" + Write-Host $env:PATH + Write-Host "=== Locate toolchain executables ===" + where.exe cc || true + where.exe gcc || true + where.exe mingw32-make || true + Write-Host "=== Versions ===" + & C:/mingw64/bin/cc.exe --version 2>&1 || & gcc --version 2>&1 || & mingw32-make --version 2>&1 || Write-Host "No explicit version output" + Write-Host "=== Try compiling a tiny C program ===" + 'int main(){return 0;}' | Out-File -FilePath test.c -Encoding ascii + try { + & C:/mingw64/bin/cc.exe test.c -o test.exe 2>&1 | Write-Host + if (Test-Path test.exe) { + Write-Host "Test program compiled successfully." + } else { + Write-Error "Test program did not produce an executable." + exit 1 + } + } catch { + Write-Error "Compilation test failed: $_" + exit 1 + } + - name: Configure + shell: pwsh + run: | + cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DLauncher_LAYOUT=win-bundle -DLauncher_BUILD_PLATFORM=win64 - name: Build shell: pwsh run: | - cd build - mingw32-make -j2 + cmake --build build --config Release -- -j2 - name: Deploy Qt + shell: pwsh run: | - cd build - windeployqt *.exe + Set-Location -Path build + $w = Get-Command windeployqt.exe -ErrorAction SilentlyContinue + if (-not $w) { $w = Get-Command windeployqt -ErrorAction SilentlyContinue } + if (-not $w) { + Write-Error "windeployqt not found in PATH. Verifique se o Qt foi instalado e se o binário está acessível." + exit 1 + } + $exes = Get-ChildItem -Path . -Filter *.exe -File -ErrorAction SilentlyContinue + if (-not $exes -or $exes.Count -eq 0) { + Write-Error "Nenhum arquivo .exe encontrado em build/. Verifique se a build gerou executáveis." + exit 1 + } + foreach ($e in $exes) { + Write-Host "Running windeployqt for $($e.Name)" + & $w.Path $e.FullName + } - name: Upload EXE uses: actions/upload-artifact@v4 From 7ef3dac4e325f1ebf95dc5d7e9fe7239c94b053b Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:20:12 -0300 Subject: [PATCH 06/28] Change Qt installation action version to v2 --- .github/workflows/build-win-simple.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 14e20d890d..1e29f464ba 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -22,11 +22,13 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-pkg-config - - name: Install Qt - uses: jurplel/install-qt-action@v3 + - name: Install Qt (try older action version to avoid aqtinstall bug) + # trocar para @v3 se quiser testar a versão mais nova novamente + uses: jurplel/install-qt-action@v2 with: version: '5.15.2' arch: 'win64_mingw81' + # opcional: output: Qt (pode ser adicionado se precisar do caminho) - name: Debug toolchain shell: pwsh From 9de714adaab915bd2f14ff77a074e8c662d5832e Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:34:12 -0300 Subject: [PATCH 07/28] Update Windows build workflow to include Python setup --- .github/workflows/build-win-simple.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 1e29f464ba..fe025711d0 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -12,6 +12,23 @@ jobs: with: submodules: recursive + - name: Setup Python 3.11 (fix pyzstd build issues) + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Upgrade pip/setuptools/wheel + shell: pwsh + run: | + python -m pip install --upgrade pip setuptools wheel + + - name: Show Python info (debug) + shell: pwsh + run: | + python --version + python -m pip --version + python -m pip list --format=columns + - name: Setup MSYS2 / MinGW (instala toolchain) uses: msys2/setup-msys2@v2 with: @@ -22,13 +39,12 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-pkg-config - - name: Install Qt (try older action version to avoid aqtinstall bug) - # trocar para @v3 se quiser testar a versão mais nova novamente + - name: Install Qt (usar v2 para maior compatibilidade) uses: jurplel/install-qt-action@v2 with: version: '5.15.2' arch: 'win64_mingw81' - # opcional: output: Qt (pode ser adicionado se precisar do caminho) + # opcional: output: Qt - name: Debug toolchain shell: pwsh From c2abba2b94fb0da008e556eb88b4f90dad571b26 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Wed, 21 Jan 2026 17:40:46 -0300 Subject: [PATCH 08/28] Refactor Windows build workflow for clarity and updates Refactor and enhance the Windows build workflow by updating steps, improving comments, and ensuring compatibility with Python and Qt installations. --- .github/workflows/build-win-simple.yml | 117 ++++++++++++++----------- 1 file changed, 67 insertions(+), 50 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index fe025711d0..6e4f893865 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -8,11 +8,12 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: submodules: recursive - - name: Setup Python 3.11 (fix pyzstd build issues) + - name: Setup Python 3.11 (ensure compatible wheels for aqtinstall) uses: actions/setup-python@v5 with: python-version: '3.11' @@ -21,15 +22,10 @@ jobs: shell: pwsh run: | python -m pip install --upgrade pip setuptools wheel - - - name: Show Python info (debug) - shell: pwsh - run: | python --version python -m pip --version - python -m pip list --format=columns - - name: Setup MSYS2 / MinGW (instala toolchain) + - name: Setup MSYS2 / MinGW (install toolchain) uses: msys2/setup-msys2@v2 with: msystem: MINGW64 @@ -39,71 +35,92 @@ jobs: mingw-w64-x86_64-cmake mingw-w64-x86_64-pkg-config - - name: Install Qt (usar v2 para maior compatibilidade) - uses: jurplel/install-qt-action@v2 - with: - version: '5.15.2' - arch: 'win64_mingw81' - # opcional: output: Qt + - name: Install aqtinstall (AQTool) and dependencies with controlled Python + shell: pwsh + run: | + python -m pip install --upgrade pip + python -m pip install aqtinstall==3.1.21 py7zr==1.1.2 + python -m pip show aqtinstall + python -m pip show py7zr - - name: Debug toolchain + - name: Install Qt using aqt (runs with the Python we set up) shell: pwsh + env: + AQT_OUTPUTDIR: "${{ github.workspace }}\\Qt" run: | - Write-Host "=== PATH ===" - Write-Host $env:PATH - Write-Host "=== Locate toolchain executables ===" - where.exe cc || true - where.exe gcc || true - where.exe mingw32-make || true - Write-Host "=== Versions ===" - & C:/mingw64/bin/cc.exe --version 2>&1 || & gcc --version 2>&1 || & mingw32-make --version 2>&1 || Write-Host "No explicit version output" - Write-Host "=== Try compiling a tiny C program ===" - 'int main(){return 0;}' | Out-File -FilePath test.c -Encoding ascii - try { - & C:/mingw64/bin/cc.exe test.c -o test.exe 2>&1 | Write-Host - if (Test-Path test.exe) { - Write-Host "Test program compiled successfully." - } else { - Write-Error "Test program did not produce an executable." - exit 1 - } - } catch { - Write-Error "Compilation test failed: $_" + # Install Qt for MinGW (uses python from setup-python above) + # Using the module call ensures we use the intended Python, avoiding actions that pick an unexpected python version. + python -m aqt install-qt windows desktop 5.15.2 win64_mingw81 --outputdir "${env:AQT_OUTPUTDIR}" --archives + # After install, verify windeployqt exists + $qtBin = Join-Path "${env:AQT_OUTPUTDIR}" "5.15.2\\mingw81_64\\bin" + Write-Host "Qt bin dir: $qtBin" + if (-not (Test-Path $qtBin)) { + Write-Error "Qt bin directory not found at $qtBin" + Get-ChildItem "${env:AQT_OUTPUTDIR}" -Recurse | Select-Object -First 100 | ForEach-Object { Write-Host $_.FullName } exit 1 } + Get-ChildItem $qtBin -Filter windeployqt* -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } - - name: Configure + - name: Configure (CMake) shell: pwsh run: | - cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DLauncher_LAYOUT=win-bundle -DLauncher_BUILD_PLATFORM=win64 + cmake -S . -B build -G "MinGW Makefiles" ` + -DCMAKE_BUILD_TYPE=Release ` + -DLauncher_LAYOUT=win-bundle ` + -DLauncher_BUILD_PLATFORM=win64 - name: Build shell: pwsh run: | cmake --build build --config Release -- -j2 - - name: Deploy Qt + - name: Deploy Qt (windeployqt) shell: pwsh run: | - Set-Location -Path build - $w = Get-Command windeployqt.exe -ErrorAction SilentlyContinue - if (-not $w) { $w = Get-Command windeployqt -ErrorAction SilentlyContinue } - if (-not $w) { - Write-Error "windeployqt not found in PATH. Verifique se o Qt foi instalado e se o binário está acessível." - exit 1 + # locate Qt bin directory where windeployqt was installed + $qtBase = Join-Path $PWD "Qt\\5.15.2\\mingw81_64\\bin" + if (-not (Test-Path $qtBase)) { + # fallback: try common install locations + $alt = Get-ChildItem -Path $PWD -Filter "windeployqt.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($alt) { + $qtBin = Split-Path $alt.FullName + } else { + Write-Error "windeployqt not found. Ensure Qt was installed to ${PWD}\\Qt and contains 5.15.2\\mingw81_64\\bin" + exit 1 + } + } else { + $qtBin = $qtBase } - $exes = Get-ChildItem -Path . -Filter *.exe -File -ErrorAction SilentlyContinue + + Write-Host "Using Qt bin: $qtBin" + Set-Location -Path build + + $exes = Get-ChildItem -Path . -Filter *.exe -File -Recurse -ErrorAction SilentlyContinue if (-not $exes -or $exes.Count -eq 0) { - Write-Error "Nenhum arquivo .exe encontrado em build/. Verifique se a build gerou executáveis." + Write-Error "Nenhum .exe encontrado em build/. Verifique se a build gerou executáveis." exit 1 } + foreach ($e in $exes) { - Write-Host "Running windeployqt for $($e.Name)" - & $w.Path $e.FullName + Write-Host "Deploying $($e.FullName) with windeployqt" + & (Join-Path $qtBin "windeployqt.exe") $e.FullName + } + + - name: Zip EXE(s) + shell: pwsh + run: | + Set-Location -Path build + $exes = Get-ChildItem -Path . -Filter *.exe -File -Recurse -ErrorAction SilentlyContinue + if (-not $exes -or $exes.Count -eq 0) { + Write-Error "Nenhum .exe encontrado para compactar." + exit 1 } + $exePaths = $exes | ForEach-Object { $_.FullName } + Compress-Archive -Path $exePaths -DestinationPath "${{ github.workspace }}\\UltimMC-Windows.zip" -Force + Write-Host "Created artifact: ${{ github.workspace }}\\UltimMC-Windows.zip" - - name: Upload EXE + - name: Upload artifact uses: actions/upload-artifact@v4 with: name: UltimMC-Windows - path: build/ + path: UltimMC-Windows.zip From 04e72b62f7370c8e059534541e1849ef4ca35e45 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 09:50:10 -0300 Subject: [PATCH 09/28] Delete .github/workflows/build-windows.yml --- .github/workflows/build-windows.yml | 40 ----------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml deleted file mode 100644 index 0342523aa4..0000000000 --- a/.github/workflows/build-windows.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build Windows EXE - -on: - workflow_dispatch: - -jobs: - build: - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: '5.15.2' - arch: 'win64_mingw81' - - - name: Configure CMake - run: | - mkdir build - cd build - cmake .. -G "MinGW Makefiles" - - - name: Build - run: | - cd build - mingw32-make -j2 - - - name: Deploy Qt - run: | - cd build - windeployqt *.exe - - - name: Upload EXE - uses: actions/upload-artifact@v4 - with: - name: UltimMC-Windows - path: build/*.exe From 8dff847f370c9b3c8c2a58816172c2081628368e Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:15:06 -0300 Subject: [PATCH 10/28] Refactor Windows build workflow and update steps --- .github/workflows/build-win-simple.yml | 404 +++++++++++++++++-------- 1 file changed, 286 insertions(+), 118 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 6e4f893865..f073a4685e 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -1,126 +1,294 @@ -name: Build Windows (Simple) +name: TESTE on: + push: + branches: [ develop ] + pull_request: + branches: [ develop ] workflow_dispatch: + schedule: + - cron: "0 0 1 * *" jobs: - build: + build-linux: + name: build-linux + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Install Dependencies + run: | + set -e + # Nota: apt-key está deprecado, mas mantenho a lógica original aqui para compatibilidade. + 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 -y libgl1-mesa-dev qttools5-dev g++-5 gcc-5 + + - name: Build + run: | + set -euo pipefail + export JAVA_HOME=$JAVA_HOME_8_X64 + mkdir -p 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 \ + -DLauncher_EMBED_SECRETS=On \ + $GITHUB_WORKSPACE + + - name: Compile + run: | + set -e + cd build + make -j$(nproc) + + - name: Test + run: | + set -e + cd build + make test + cmake -E remove_directory "/home/runner/UltimMC/UltimMC" + + - name: Install + run: | + set -e + cd build + make install + chmod +x /home/runner/UltimMC/UltimMC/UltimMC || true + chmod +x /home/runner/UltimMC/UltimMC/bin/UltimMC || true + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: mmc-cracked-lin64 + path: /home/runner/UltimMC + + build-windows: + name: build-windows runs-on: windows-latest steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup Python 3.11 (ensure compatible wheels for aqtinstall) - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Upgrade pip/setuptools/wheel - shell: pwsh - run: | - python -m pip install --upgrade pip setuptools wheel - python --version - python -m pip --version - - - name: Setup MSYS2 / MinGW (install toolchain) - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: > - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-cmake - mingw-w64-x86_64-pkg-config - - - name: Install aqtinstall (AQTool) and dependencies with controlled Python - shell: pwsh - run: | - python -m pip install --upgrade pip - python -m pip install aqtinstall==3.1.21 py7zr==1.1.2 - python -m pip show aqtinstall - python -m pip show py7zr - - - name: Install Qt using aqt (runs with the Python we set up) - shell: pwsh - env: - AQT_OUTPUTDIR: "${{ github.workspace }}\\Qt" - run: | - # Install Qt for MinGW (uses python from setup-python above) - # Using the module call ensures we use the intended Python, avoiding actions that pick an unexpected python version. - python -m aqt install-qt windows desktop 5.15.2 win64_mingw81 --outputdir "${env:AQT_OUTPUTDIR}" --archives - # After install, verify windeployqt exists - $qtBin = Join-Path "${env:AQT_OUTPUTDIR}" "5.15.2\\mingw81_64\\bin" - Write-Host "Qt bin dir: $qtBin" - if (-not (Test-Path $qtBin)) { - Write-Error "Qt bin directory not found at $qtBin" - Get-ChildItem "${env:AQT_OUTPUTDIR}" -Recurse | Select-Object -First 100 | ForEach-Object { Write-Host $_.FullName } - exit 1 - } - Get-ChildItem $qtBin -Filter windeployqt* -Recurse -ErrorAction SilentlyContinue | ForEach-Object { Write-Host $_.FullName } - - - name: Configure (CMake) - shell: pwsh - run: | - cmake -S . -B build -G "MinGW Makefiles" ` - -DCMAKE_BUILD_TYPE=Release ` - -DLauncher_LAYOUT=win-bundle ` - -DLauncher_BUILD_PLATFORM=win64 - - - name: Build - shell: pwsh - run: | - cmake --build build --config Release -- -j2 - - - name: Deploy Qt (windeployqt) - shell: pwsh - run: | - # locate Qt bin directory where windeployqt was installed - $qtBase = Join-Path $PWD "Qt\\5.15.2\\mingw81_64\\bin" - if (-not (Test-Path $qtBase)) { - # fallback: try common install locations - $alt = Get-ChildItem -Path $PWD -Filter "windeployqt.exe" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 1 - if ($alt) { - $qtBin = Split-Path $alt.FullName - } else { - Write-Error "windeployqt not found. Ensure Qt was installed to ${PWD}\\Qt and contains 5.15.2\\mingw81_64\\bin" - exit 1 - } - } else { - $qtBin = $qtBase - } - - Write-Host "Using Qt bin: $qtBin" - Set-Location -Path build - - $exes = Get-ChildItem -Path . -Filter *.exe -File -Recurse -ErrorAction SilentlyContinue - if (-not $exes -or $exes.Count -eq 0) { - Write-Error "Nenhum .exe encontrado em build/. Verifique se a build gerou executáveis." - exit 1 - } - - foreach ($e in $exes) { - Write-Host "Deploying $($e.FullName) with windeployqt" - & (Join-Path $qtBin "windeployqt.exe") $e.FullName - } - - - name: Zip EXE(s) - shell: pwsh - run: | - Set-Location -Path build - $exes = Get-ChildItem -Path . -Filter *.exe -File -Recurse -ErrorAction SilentlyContinue - if (-not $exes -or $exes.Count -eq 0) { - Write-Error "Nenhum .exe encontrado para compactar." - exit 1 - } - $exePaths = $exes | ForEach-Object { $_.FullName } - Compress-Archive -Path $exePaths -DestinationPath "${{ github.workspace }}\\UltimMC-Windows.zip" -Force - Write-Host "Created artifact: ${{ github.workspace }}\\UltimMC-Windows.zip" - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: UltimMC-Windows - path: UltimMC-Windows.zip + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Cache Qt + uses: actions/cache@v3 + id: qt-cached + with: + path: "D:/Qt" + key: ${{ runner.os }}-qt56-installed-d + + - name: Cache Qt Installer + uses: actions/cache@v3 + 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[...] + + - name: Download Qt Installer + if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true' + run: powershell -Command "Invoke-WebRequest -Uri 'https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe' -OutFile '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 https://github.com/Kitware/CMake/releases/download/v3.30.4/cmake-3.30.4-windows-i386.zip -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 ^ + -DLauncher_EMBED_SECRETS=On ^ + -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 -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: | + copy OpenSSL\ssleay32.dll D:\UltimMC\UltimMC\ssleay32.dll + copy OpenSSL\libeay32.dll D:\UltimMC\UltimMC\libeay32.dll + + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: mmc-cracked-win32 + path: "D:/UltimMC" + + build-mac: + name: build-mac + runs-on: macos-13 + + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Cache Dependencies + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-deps-cache + + - name: Install Dependencies + run: | + set -e + brew cleanup + brew install qt@5 + + - name: Build + run: | + set -euo pipefail + mkdir -p 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)/lib/cmake" \ + -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 -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@v3 + with: + name: mmc-cracked-osx64 + path: /Users/runner/work/UltimMC/build/dist From 8356adebcbb7a4b4c53c70836d2a1408cc38694c Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:18:00 -0300 Subject: [PATCH 11/28] Update GitHub Actions to use main branch for actions --- .github/workflows/build-win-simple.yml | 48 +++++++++----------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index f073a4685e..32128545d8 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -1,13 +1,7 @@ name: TESTE on: - push: - branches: [ develop ] - pull_request: - branches: [ develop ] workflow_dispatch: - schedule: - - cron: "0 0 1 * *" jobs: build-linux: @@ -15,25 +9,22 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@main with: submodules: 'recursive' - name: Install Dependencies run: | - set -e - # Nota: apt-key está deprecado, mas mantenho a lógica original aqui para compatibilidade. 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 -y libgl1-mesa-dev qttools5-dev g++-5 gcc-5 + sudo apt install libgl1-mesa-dev qttools5-dev g++-5 gcc-5 - name: Build run: | - set -euo pipefail export JAVA_HOME=$JAVA_HOME_8_X64 - mkdir -p build + mkdir build cd build cmake \ -DCMAKE_C_COMPILER=/usr/bin/gcc-5 \ @@ -52,27 +43,24 @@ jobs: - name: Compile run: | - set -e cd build make -j$(nproc) - name: Test run: | - set -e cd build make test cmake -E remove_directory "/home/runner/UltimMC/UltimMC" - name: Install run: | - set -e cd build make install - chmod +x /home/runner/UltimMC/UltimMC/UltimMC || true - chmod +x /home/runner/UltimMC/UltimMC/bin/UltimMC || true + chmod +x /home/runner/UltimMC/UltimMC/UltimMC + chmod +x /home/runner/UltimMC/UltimMC/bin/UltimMC - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@main with: name: mmc-cracked-lin64 path: /home/runner/UltimMC @@ -82,19 +70,19 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@main with: submodules: 'recursive' - name: Cache Qt - uses: actions/cache@v3 + uses: actions/cache@main id: qt-cached with: path: "D:/Qt" key: ${{ runner.os }}-qt56-installed-d - name: Cache Qt Installer - uses: actions/cache@v3 + uses: actions/cache@main if: steps.qt-cached.outputs.cache-hit != 'true' id: installer-cached with: @@ -109,7 +97,7 @@ jobs: - name: Download Qt Installer if: steps.installer-cached.outputs.cache-hit != 'true' && steps.qt-cached.outputs.cache-hit != 'true' - run: powershell -Command "Invoke-WebRequest -Uri 'https://download.qt.io/new_archive/qt/5.6/5.6.3/qt-opensource-windows-x86-mingw492-5.6.3.exe' -OutFile 'installer.exe'" + 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' @@ -217,11 +205,11 @@ jobs: - name: Copy OpenSSL shell: cmd run: | - copy OpenSSL\ssleay32.dll D:\UltimMC\UltimMC\ssleay32.dll - copy OpenSSL\libeay32.dll D:\UltimMC\UltimMC\libeay32.dll + 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@v3 + uses: actions/upload-artifact@main with: name: mmc-cracked-win32 path: "D:/UltimMC" @@ -231,26 +219,24 @@ jobs: runs-on: macos-13 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@main with: submodules: 'recursive' - name: Cache Dependencies - uses: actions/cache@v3 + uses: actions/cache@main with: path: /Users/runner/Library/Caches/Homebrew key: ${{ runner.os }}-deps-cache - name: Install Dependencies run: | - set -e brew cleanup brew install qt@5 - name: Build run: | - set -euo pipefail - mkdir -p build + mkdir build cd build cmake \ -DCMAKE_C_COMPILER=/usr/bin/clang \ @@ -288,7 +274,7 @@ jobs: chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC - name: Upload Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@main with: name: mmc-cracked-osx64 path: /Users/runner/work/UltimMC/build/dist From 5214853f6f943a3606301edeb21c000b869a5efc Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:29:54 -0300 Subject: [PATCH 12/28] Fix path for artifact upload in workflow From f2ae59333467de6e87c6fc5b72023f86dc367054 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:32:51 -0300 Subject: [PATCH 13/28] Update macOS build configuration and dependencies --- .github/workflows/build-win-simple.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index 32128545d8..ea626180d0 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -216,7 +216,8 @@ jobs: build-mac: name: build-mac - runs-on: macos-13 + # use macos-15-intel to get Intel macOS runner (se você precisa x86_64) + runs-on: macos-15-intel steps: - uses: actions/checkout@main @@ -229,23 +230,34 @@ jobs: path: /Users/runner/Library/Caches/Homebrew key: ${{ runner.os }}-deps-cache - - name: Install Dependencies + - name: Install Dependencies (Qt5) run: | - brew cleanup - brew install qt@5 + set -e + brew update + # Tenta instalar qt@5 diretamente. Se não existir no core, tenta o tap cartr/qt5. + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 + else + brew tap cartr/qt5 + brew install cartr/qt5/qt@5 + fi + # Ajusta PATH/CMAKE vars para o Qt instalado pelo brew + echo "QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null)" >> $GITHUB_ENV - name: Build run: | - mkdir build + set -euo pipefail + mkdir -p build cd build + # usa o prefix detectado em QT_PREFIX 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)/lib/cmake" \ - -DQt5_DIR="$(brew --prefix qt@5)" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ -DLauncher_UPDATER_BASE=https://files.multimc.org/update/ \ -DLauncher_PASTE_EE_API_KEY:STRING=utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ \ -DLauncher_ANALYTICS_ID:STRING=UA-87731965-2 \ From 97eab67ede53c62b198036facd5d19f1dfe393be Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:39:25 -0300 Subject: [PATCH 14/28] Add GitHub Actions workflow for macOS build This workflow builds a macOS application using CMake and make, with options for architecture selection and detailed logging. --- .github/workflows/build-mac.yml | 134 ++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 .github/workflows/build-mac.yml diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml new file mode 100644 index 0000000000..89c28c8396 --- /dev/null +++ b/.github/workflows/build-mac.yml @@ -0,0 +1,134 @@ +name: Build macOS (manual) + +on: + workflow_dispatch: + inputs: + arch: + description: 'Arquitetura do runner: "intel" (macos-15-intel) ou "arm64" (macos-latest).' + required: false + default: 'intel' + +jobs: + build-mac: + name: build-mac + runs-on: ${{ github.event.inputs.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} + env: + # Mantive as chaves embutidas conforme seu pedido (não as converti para secrets). + LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" + LAUNCHER_ANALYTICS_ID: "UA-87731965-2" + LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" + LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" + LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" + LAUNCHER_EMBED_SECRETS: "On" + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Cache Homebrew (speeds up repeated runs) + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-homebrew-cache + + - name: Install Dependencies (Qt5 via Homebrew) + run: | + set -e + brew update + # tenta instalar qt@5; se não existir no core, usa tap cartr/qt5 + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 + else + brew tap cartr/qt5 || true + brew install cartr/qt5/qt@5 + fi + # detecta prefix do Qt instalado (pode ser vazio se falhar) + QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) + echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV + echo "QT_PREFIX=${QT_PREFIX}" + + - name: Diagnostic: environment, tools and Qt location + run: | + echo "### environment ###" + env | sort + echo "### brew, clang, cmake versions ###" + brew --version || true + clang --version || true + cmake --version || true + echo "### QT_PREFIX ###" + echo "QT_PREFIX=${QT_PREFIX}" + if [ -n "${QT_PREFIX}" ]; then + echo "Listing ${QT_PREFIX}/lib/cmake" + ls -la "${QT_PREFIX}/lib/cmake" || true + echo "Listing ${QT_PREFIX}/include" + ls -la "${QT_PREFIX}/include" || true + fi + + - name: Configure (CMake) — verbose output saved + run: | + set -euo pipefail + mkdir -p build + cd build + # define arquitetura alvo para macOS: x86_64 para intel, arm64 para Apple Silicon + if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then + CMAKE_OSX_ARCHITECTURES=arm64 + else + CMAKE_OSX_ARCHITECTURES=x86_64 + fi + export CMAKE_OSX_ARCHITECTURES + echo "CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" + cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ + -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ + -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ + -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ + -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ + $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log + # salva CMake cache/vars para inspeção + cmake -LAH . > ../cmake_cache_and_vars.txt || true + + - name: Compile (make) — verbose output saved + run: | + set -euo pipefail + cd build + # compila com saída detalhada + make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) + + - name: Test (save logs) + run: | + set -e + cd build + make test 2>&1 | tee ../test_output.log || true + # limpa pasta de instalação antes do install (mantém logs) + cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true + + - name: Install (save logs) + run: | + set -e + cd build + make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) + chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true + + - name: Upload build artifacts and logs + uses: actions/upload-artifact@v3 + with: + name: mac-build-output + path: | + cmake_output.log + cmake_cache_and_vars.txt + build_output.log + test_output.log + install_output.log + /Users/runner/work/UltimMC/build/dist From b575fc736dcc28a5cf200ccb3ca3b909dbe0ff15 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:42:40 -0300 Subject: [PATCH 15/28] Delete .github/workflows/build-mac.yml --- .github/workflows/build-mac.yml | 134 -------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 .github/workflows/build-mac.yml diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml deleted file mode 100644 index 89c28c8396..0000000000 --- a/.github/workflows/build-mac.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: Build macOS (manual) - -on: - workflow_dispatch: - inputs: - arch: - description: 'Arquitetura do runner: "intel" (macos-15-intel) ou "arm64" (macos-latest).' - required: false - default: 'intel' - -jobs: - build-mac: - name: build-mac - runs-on: ${{ github.event.inputs.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} - env: - # Mantive as chaves embutidas conforme seu pedido (não as converti para secrets). - LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" - LAUNCHER_ANALYTICS_ID: "UA-87731965-2" - LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" - LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" - LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" - LAUNCHER_EMBED_SECRETS: "On" - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: 'recursive' - - - name: Cache Homebrew (speeds up repeated runs) - uses: actions/cache@v3 - with: - path: /Users/runner/Library/Caches/Homebrew - key: ${{ runner.os }}-homebrew-cache - - - name: Install Dependencies (Qt5 via Homebrew) - run: | - set -e - brew update - # tenta instalar qt@5; se não existir no core, usa tap cartr/qt5 - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 || true - brew install cartr/qt5/qt@5 - fi - # detecta prefix do Qt instalado (pode ser vazio se falhar) - QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) - echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV - echo "QT_PREFIX=${QT_PREFIX}" - - - name: Diagnostic: environment, tools and Qt location - run: | - echo "### environment ###" - env | sort - echo "### brew, clang, cmake versions ###" - brew --version || true - clang --version || true - cmake --version || true - echo "### QT_PREFIX ###" - echo "QT_PREFIX=${QT_PREFIX}" - if [ -n "${QT_PREFIX}" ]; then - echo "Listing ${QT_PREFIX}/lib/cmake" - ls -la "${QT_PREFIX}/lib/cmake" || true - echo "Listing ${QT_PREFIX}/include" - ls -la "${QT_PREFIX}/include" || true - fi - - - name: Configure (CMake) — verbose output saved - run: | - set -euo pipefail - mkdir -p build - cd build - # define arquitetura alvo para macOS: x86_64 para intel, arm64 para Apple Silicon - if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then - CMAKE_OSX_ARCHITECTURES=arm64 - else - CMAKE_OSX_ARCHITECTURES=x86_64 - fi - export CMAKE_OSX_ARCHITECTURES - echo "CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" - cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ - -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ - -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ - -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ - $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - # salva CMake cache/vars para inspeção - cmake -LAH . > ../cmake_cache_and_vars.txt || true - - - name: Compile (make) — verbose output saved - run: | - set -euo pipefail - cd build - # compila com saída detalhada - make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - - name: Test (save logs) - run: | - set -e - cd build - make test 2>&1 | tee ../test_output.log || true - # limpa pasta de instalação antes do install (mantém logs) - cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - - - name: Install (save logs) - run: | - set -e - cd build - make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) - chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true - - - name: Upload build artifacts and logs - uses: actions/upload-artifact@v3 - with: - name: mac-build-output - path: | - cmake_output.log - cmake_cache_and_vars.txt - build_output.log - test_output.log - install_output.log - /Users/runner/work/UltimMC/build/dist From e6bcd7fcf1cee14868ca5456ab7491c9a37d9adb Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:43:07 -0300 Subject: [PATCH 16/28] Add GitHub Actions workflow for macOS build --- .github/workflows/build-mac_test.yml | 134 +++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 .github/workflows/build-mac_test.yml diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml new file mode 100644 index 0000000000..89c28c8396 --- /dev/null +++ b/.github/workflows/build-mac_test.yml @@ -0,0 +1,134 @@ +name: Build macOS (manual) + +on: + workflow_dispatch: + inputs: + arch: + description: 'Arquitetura do runner: "intel" (macos-15-intel) ou "arm64" (macos-latest).' + required: false + default: 'intel' + +jobs: + build-mac: + name: build-mac + runs-on: ${{ github.event.inputs.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} + env: + # Mantive as chaves embutidas conforme seu pedido (não as converti para secrets). + LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" + LAUNCHER_ANALYTICS_ID: "UA-87731965-2" + LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" + LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" + LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" + LAUNCHER_EMBED_SECRETS: "On" + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Cache Homebrew (speeds up repeated runs) + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-homebrew-cache + + - name: Install Dependencies (Qt5 via Homebrew) + run: | + set -e + brew update + # tenta instalar qt@5; se não existir no core, usa tap cartr/qt5 + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 + else + brew tap cartr/qt5 || true + brew install cartr/qt5/qt@5 + fi + # detecta prefix do Qt instalado (pode ser vazio se falhar) + QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) + echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV + echo "QT_PREFIX=${QT_PREFIX}" + + - name: Diagnostic: environment, tools and Qt location + run: | + echo "### environment ###" + env | sort + echo "### brew, clang, cmake versions ###" + brew --version || true + clang --version || true + cmake --version || true + echo "### QT_PREFIX ###" + echo "QT_PREFIX=${QT_PREFIX}" + if [ -n "${QT_PREFIX}" ]; then + echo "Listing ${QT_PREFIX}/lib/cmake" + ls -la "${QT_PREFIX}/lib/cmake" || true + echo "Listing ${QT_PREFIX}/include" + ls -la "${QT_PREFIX}/include" || true + fi + + - name: Configure (CMake) — verbose output saved + run: | + set -euo pipefail + mkdir -p build + cd build + # define arquitetura alvo para macOS: x86_64 para intel, arm64 para Apple Silicon + if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then + CMAKE_OSX_ARCHITECTURES=arm64 + else + CMAKE_OSX_ARCHITECTURES=x86_64 + fi + export CMAKE_OSX_ARCHITECTURES + echo "CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" + cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ + -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ + -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ + -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ + -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ + $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log + # salva CMake cache/vars para inspeção + cmake -LAH . > ../cmake_cache_and_vars.txt || true + + - name: Compile (make) — verbose output saved + run: | + set -euo pipefail + cd build + # compila com saída detalhada + make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) + + - name: Test (save logs) + run: | + set -e + cd build + make test 2>&1 | tee ../test_output.log || true + # limpa pasta de instalação antes do install (mantém logs) + cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true + + - name: Install (save logs) + run: | + set -e + cd build + make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) + chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true + + - name: Upload build artifacts and logs + uses: actions/upload-artifact@v3 + with: + name: mac-build-output + path: | + cmake_output.log + cmake_cache_and_vars.txt + build_output.log + test_output.log + install_output.log + /Users/runner/work/UltimMC/build/dist From 42be3e42f03e2d18a98cc031f3f82bcc5bcb060c Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:43:54 -0300 Subject: [PATCH 17/28] Rename workflow to Build_macOS --- .github/workflows/build-mac_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 89c28c8396..ce36e11414 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -1,4 +1,4 @@ -name: Build macOS (manual) +name: Build_macOS on: workflow_dispatch: From 7bd24de43e43a6099ebeece97bbb5b895a82f1f6 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:52:34 -0300 Subject: [PATCH 18/28] Refactor macOS build workflow for manual trigger --- .github/workflows/build-mac_test.yml | 149 +++++++++++++++++++++------ 1 file changed, 120 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index ce36e11414..049486a9f2 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -1,4 +1,4 @@ -name: Build_macOS +name: Build macOS (manual) on: workflow_dispatch: @@ -8,18 +8,20 @@ on: required: false default: 'intel' +env: + # Mantive as chaves embutidas conforme seu pedido + LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" + LAUNCHER_ANALYTICS_ID: "UA-87731965-2" + LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" + LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" + LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" + LAUNCHER_EMBED_SECRETS: "On" + jobs: - build-mac: - name: build-mac - runs-on: ${{ github.event.inputs.arch == 'arm64' && 'macos-latest' || 'macos-15-intel' }} - env: - # Mantive as chaves embutidas conforme seu pedido (não as converti para secrets). - LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" - LAUNCHER_ANALYTICS_ID: "UA-87731965-2" - LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" - LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" - LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" - LAUNCHER_EMBED_SECRETS: "On" + build-mac-intel: + name: build-mac (intel) + if: ${{ github.event.inputs.arch != 'arm64' }} + runs-on: macos-15-intel steps: - name: Checkout @@ -27,7 +29,7 @@ jobs: with: submodules: 'recursive' - - name: Cache Homebrew (speeds up repeated runs) + - name: Cache Homebrew uses: actions/cache@v3 with: path: /Users/runner/Library/Caches/Homebrew @@ -37,19 +39,17 @@ jobs: run: | set -e brew update - # tenta instalar qt@5; se não existir no core, usa tap cartr/qt5 if brew info qt@5 >/dev/null 2>&1; then brew install qt@5 else brew tap cartr/qt5 || true brew install cartr/qt5/qt@5 fi - # detecta prefix do Qt instalado (pode ser vazio se falhar) QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV echo "QT_PREFIX=${QT_PREFIX}" - - name: Diagnostic: environment, tools and Qt location + - name: Diagnostic: env, tools and Qt location run: | echo "### environment ###" env | sort @@ -60,9 +60,7 @@ jobs: echo "### QT_PREFIX ###" echo "QT_PREFIX=${QT_PREFIX}" if [ -n "${QT_PREFIX}" ]; then - echo "Listing ${QT_PREFIX}/lib/cmake" ls -la "${QT_PREFIX}/lib/cmake" || true - echo "Listing ${QT_PREFIX}/include" ls -la "${QT_PREFIX}/include" || true fi @@ -71,14 +69,110 @@ jobs: set -euo pipefail mkdir -p build cd build - # define arquitetura alvo para macOS: x86_64 para intel, arm64 para Apple Silicon - if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then - CMAKE_OSX_ARCHITECTURES=arm64 + export CMAKE_OSX_ARCHITECTURES=x86_64 + cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ + -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ + -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ + -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ + -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ + $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log + cmake -LAH . > ../cmake_cache_and_vars.txt || true + + - name: Compile (make) — verbose output saved + run: | + set -euo pipefail + cd build + make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) + + - name: Test (save logs) + run: | + set -e + cd build + make test 2>&1 | tee ../test_output.log || true + cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true + + - name: Install (save logs) + run: | + set -e + cd build + make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) + chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true + + - name: Upload build artifacts and logs + uses: actions/upload-artifact@v3 + with: + name: mac-build-output-intel + path: | + cmake_output.log + cmake_cache_and_vars.txt + build_output.log + test_output.log + install_output.log + /Users/runner/work/UltimMC/build/dist + + build-mac-arm: + name: build-mac (arm64) + if: ${{ github.event.inputs.arch == 'arm64' }} + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: 'recursive' + + - name: Cache Homebrew + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-homebrew-cache + + - name: Install Dependencies (Qt5 via Homebrew) + run: | + set -e + brew update + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 else - CMAKE_OSX_ARCHITECTURES=x86_64 + brew tap cartr/qt5 || true + brew install cartr/qt5/qt@5 fi - export CMAKE_OSX_ARCHITECTURES - echo "CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}" + QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) + echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV + echo "QT_PREFIX=${QT_PREFIX}" + + - name: Diagnostic: env, tools and Qt location + run: | + echo "### environment ###" + env | sort + echo "### brew, clang, cmake versions ###" + brew --version || true + clang --version || true + cmake --version || true + echo "### QT_PREFIX ###" + echo "QT_PREFIX=${QT_PREFIX}" + if [ -n "${QT_PREFIX}" ]; then + ls -la "${QT_PREFIX}/lib/cmake" || true + ls -la "${QT_PREFIX}/include" || true + fi + + - name: Configure (CMake) — verbose output saved + run: | + set -euo pipefail + mkdir -p build + cd build + export CMAKE_OSX_ARCHITECTURES=arm64 cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ -DCMAKE_C_COMPILER=/usr/bin/clang \ @@ -96,22 +190,19 @@ jobs: -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - # salva CMake cache/vars para inspeção cmake -LAH . > ../cmake_cache_and_vars.txt || true - name: Compile (make) — verbose output saved run: | set -euo pipefail cd build - # compila com saída detalhada make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - name: Test (save logs) + - name: Test (save logs) run: | set -e cd build make test 2>&1 | tee ../test_output.log || true - # limpa pasta de instalação antes do install (mantém logs) cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - name: Install (save logs) @@ -124,7 +215,7 @@ jobs: - name: Upload build artifacts and logs uses: actions/upload-artifact@v3 with: - name: mac-build-output + name: mac-build-output-arm64 path: | cmake_output.log cmake_cache_and_vars.txt From f1aca5eb1b99d5c80dd853452b9352a910eb7fa6 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:54:46 -0300 Subject: [PATCH 19/28] Fix formatting and update comments in build workflow --- .github/workflows/build-mac_test.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 049486a9f2..2758bf4731 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -9,7 +9,6 @@ on: default: 'intel' env: - # Mantive as chaves embutidas conforme seu pedido LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" LAUNCHER_ANALYTICS_ID: "UA-87731965-2" LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" @@ -27,7 +26,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: recursive - name: Cache Homebrew uses: actions/cache@v3 @@ -64,7 +63,7 @@ jobs: ls -la "${QT_PREFIX}/include" || true fi - - name: Configure (CMake) — verbose output saved + - name: Configure (CMake) - verbose output saved run: | set -euo pipefail mkdir -p build @@ -89,7 +88,7 @@ jobs: $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log cmake -LAH . > ../cmake_cache_and_vars.txt || true - - name: Compile (make) — verbose output saved + - name: Compile (make) - verbose output saved run: | set -euo pipefail cd build @@ -130,7 +129,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - submodules: 'recursive' + submodules: recursive - name: Cache Homebrew uses: actions/cache@v3 @@ -167,7 +166,7 @@ jobs: ls -la "${QT_PREFIX}/include" || true fi - - name: Configure (CMake) — verbose output saved + - name: Configure (CMake) - verbose output saved run: | set -euo pipefail mkdir -p build @@ -192,7 +191,7 @@ jobs: $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log cmake -LAH . > ../cmake_cache_and_vars.txt || true - - name: Compile (make) — verbose output saved + - name: Compile (make) - verbose output saved run: | set -euo pipefail cd build From 6b36ee645bad0909230e8799c037b5a7875c19dc Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 10:58:45 -0300 Subject: [PATCH 20/28] Fix path formatting in build-mac_test.yml From 30017e785b5055453d0e6319f2cd749a302df55f Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:09:48 -0300 Subject: [PATCH 21/28] Fix path formatting in build-mac_test.yml From 8a1c00208610c3e32d836676c3a953bd2c0c9b91 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:11:09 -0300 Subject: [PATCH 22/28] Remove macOS build steps from workflow Removed macOS build workflow steps from the GitHub Actions configuration. --- .github/workflows/build-win-simple.yml | 77 -------------------------- 1 file changed, 77 deletions(-) diff --git a/.github/workflows/build-win-simple.yml b/.github/workflows/build-win-simple.yml index ea626180d0..2e377b723e 100644 --- a/.github/workflows/build-win-simple.yml +++ b/.github/workflows/build-win-simple.yml @@ -213,80 +213,3 @@ jobs: with: name: mmc-cracked-win32 path: "D:/UltimMC" - - build-mac: - name: build-mac - # use macos-15-intel to get Intel macOS runner (se você precisa x86_64) - runs-on: macos-15-intel - - 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 (Qt5) - run: | - set -e - brew update - # Tenta instalar qt@5 diretamente. Se não existir no core, tenta o tap cartr/qt5. - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 - brew install cartr/qt5/qt@5 - fi - # Ajusta PATH/CMAKE vars para o Qt instalado pelo brew - echo "QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null)" >> $GITHUB_ENV - - - name: Build - run: | - set -euo pipefail - mkdir -p build - cd build - # usa o prefix detectado em QT_PREFIX - 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:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -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 -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 From ce18c6731008fb6f7fd7d9d5a5c15bd3e8db21d9 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:14:26 -0300 Subject: [PATCH 23/28] Refactor workflow names for clarity --- .github/workflows/build-mac_test.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 2758bf4731..4cb53b2739 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: arch: - description: 'Arquitetura do runner: "intel" (macos-15-intel) ou "arm64" (macos-latest).' + description: 'Arquitetura: "intel" (macos-15-intel) ou "arm64" (macos-latest).' required: false default: 'intel' @@ -34,7 +34,7 @@ jobs: path: /Users/runner/Library/Caches/Homebrew key: ${{ runner.os }}-homebrew-cache - - name: Install Dependencies (Qt5 via Homebrew) + - name: Install Qt5 via Homebrew run: | set -e brew update @@ -48,22 +48,21 @@ jobs: echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV echo "QT_PREFIX=${QT_PREFIX}" - - name: Diagnostic: env, tools and Qt location + - name: Diagnostic: env and tools run: | echo "### environment ###" env | sort - echo "### brew, clang, cmake versions ###" + echo "### brew, clang, cmake ###" brew --version || true clang --version || true cmake --version || true - echo "### QT_PREFIX ###" echo "QT_PREFIX=${QT_PREFIX}" if [ -n "${QT_PREFIX}" ]; then ls -la "${QT_PREFIX}/lib/cmake" || true ls -la "${QT_PREFIX}/include" || true fi - - name: Configure (CMake) - verbose output saved + - name: Configure (CMake) - verbose run: | set -euo pipefail mkdir -p build @@ -88,7 +87,7 @@ jobs: $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log cmake -LAH . > ../cmake_cache_and_vars.txt || true - - name: Compile (make) - verbose output saved + - name: Build (make) - verbose run: | set -euo pipefail cd build @@ -137,7 +136,7 @@ jobs: path: /Users/runner/Library/Caches/Homebrew key: ${{ runner.os }}-homebrew-cache - - name: Install Dependencies (Qt5 via Homebrew) + - name: Install Qt5 via Homebrew run: | set -e brew update @@ -151,22 +150,21 @@ jobs: echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV echo "QT_PREFIX=${QT_PREFIX}" - - name: Diagnostic: env, tools and Qt location + - name: Diagnostic: env and tools run: | echo "### environment ###" env | sort - echo "### brew, clang, cmake versions ###" + echo "### brew, clang, cmake ###" brew --version || true clang --version || true cmake --version || true - echo "### QT_PREFIX ###" echo "QT_PREFIX=${QT_PREFIX}" if [ -n "${QT_PREFIX}" ]; then ls -la "${QT_PREFIX}/lib/cmake" || true ls -la "${QT_PREFIX}/include" || true fi - - name: Configure (CMake) - verbose output saved + - name: Configure (CMake) - verbose run: | set -euo pipefail mkdir -p build @@ -191,7 +189,7 @@ jobs: $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log cmake -LAH . > ../cmake_cache_and_vars.txt || true - - name: Compile (make) - verbose output saved + - name: Build (make) - verbose run: | set -euo pipefail cd build From 3fff33e93f200564c24e67b58622440822b6d87f Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:21:57 -0300 Subject: [PATCH 24/28] Update build-mac_test.yml --- .github/workflows/build-mac_test.yml | 204 ++------------------------- 1 file changed, 13 insertions(+), 191 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 4cb53b2739..3a8d017704 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -1,4 +1,4 @@ -name: Build macOS (manual) +name: Build macOS (sanity) on: workflow_dispatch: @@ -8,215 +8,37 @@ on: required: false default: 'intel' -env: - LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" - LAUNCHER_ANALYTICS_ID: "UA-87731965-2" - LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" - LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" - LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" - LAUNCHER_EMBED_SECRETS: "On" - jobs: build-mac-intel: name: build-mac (intel) if: ${{ github.event.inputs.arch != 'arm64' }} runs-on: macos-15-intel - steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Cache Homebrew - uses: actions/cache@v3 - with: - path: /Users/runner/Library/Caches/Homebrew - key: ${{ runner.os }}-homebrew-cache - - - name: Install Qt5 via Homebrew - run: | - set -e - brew update - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 || true - brew install cartr/qt5/qt@5 - fi - QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) - echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV - echo "QT_PREFIX=${QT_PREFIX}" - - - name: Diagnostic: env and tools + - name: Quick intel smoke run: | - echo "### environment ###" - env | sort - echo "### brew, clang, cmake ###" - brew --version || true - clang --version || true - cmake --version || true - echo "QT_PREFIX=${QT_PREFIX}" - if [ -n "${QT_PREFIX}" ]; then - ls -la "${QT_PREFIX}/lib/cmake" || true - ls -la "${QT_PREFIX}/include" || true - fi - - - name: Configure (CMake) - verbose - run: | - set -euo pipefail - mkdir -p build - cd build - export CMAKE_OSX_ARCHITECTURES=x86_64 - cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ - -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ - -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ - -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ - $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - cmake -LAH . > ../cmake_cache_and_vars.txt || true - - - name: Build (make) - verbose - run: | - set -euo pipefail - cd build - make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - - name: Test (save logs) - run: | - set -e - cd build - make test 2>&1 | tee ../test_output.log || true - cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - - - name: Install (save logs) - run: | - set -e - cd build - make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) - chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true - - - name: Upload build artifacts and logs + echo "Running intel mac job" + uname -a + - name: Upload marker uses: actions/upload-artifact@v3 with: - name: mac-build-output-intel - path: | - cmake_output.log - cmake_cache_and_vars.txt - build_output.log - test_output.log - install_output.log - /Users/runner/work/UltimMC/build/dist + name: mac-intel-marker + path: .github/workflows/build-mac_test.yml build-mac-arm: name: build-mac (arm64) if: ${{ github.event.inputs.arch == 'arm64' }} runs-on: macos-latest - steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Cache Homebrew - uses: actions/cache@v3 - with: - path: /Users/runner/Library/Caches/Homebrew - key: ${{ runner.os }}-homebrew-cache - - - name: Install Qt5 via Homebrew - run: | - set -e - brew update - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 || true - brew install cartr/qt5/qt@5 - fi - QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) - echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV - echo "QT_PREFIX=${QT_PREFIX}" - - - name: Diagnostic: env and tools - run: | - echo "### environment ###" - env | sort - echo "### brew, clang, cmake ###" - brew --version || true - clang --version || true - cmake --version || true - echo "QT_PREFIX=${QT_PREFIX}" - if [ -n "${QT_PREFIX}" ]; then - ls -la "${QT_PREFIX}/lib/cmake" || true - ls -la "${QT_PREFIX}/include" || true - fi - - - name: Configure (CMake) - verbose - run: | - set -euo pipefail - mkdir -p build - cd build - export CMAKE_OSX_ARCHITECTURES=arm64 - cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ - -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ - -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ - -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ - $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - cmake -LAH . > ../cmake_cache_and_vars.txt || true - - - name: Build (make) - verbose - run: | - set -euo pipefail - cd build - make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - - name: Test (save logs) - run: | - set -e - cd build - make test 2>&1 | tee ../test_output.log || true - cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - - - name: Install (save logs) + - name: Quick arm smoke run: | - set -e - cd build - make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) - chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true - - - name: Upload build artifacts and logs + echo "Running arm mac job" + uname -a + - name: Upload marker uses: actions/upload-artifact@v3 with: - name: mac-build-output-arm64 - path: | - cmake_output.log - cmake_cache_and_vars.txt - build_output.log - test_output.log - install_output.log - /Users/runner/work/UltimMC/build/dist + name: mac-arm-marker + path: .github/workflows/build-mac_test.yml From 323a7cc6cd98efa62f8bdeff97ddf1d19d9b299d Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:29:35 -0300 Subject: [PATCH 25/28] Rename workflow and update environment variables --- .github/workflows/build-mac_test.yml | 204 +++++++++++++++++++++++++-- 1 file changed, 191 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 3a8d017704..4cb53b2739 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -1,4 +1,4 @@ -name: Build macOS (sanity) +name: Build macOS (manual) on: workflow_dispatch: @@ -8,37 +8,215 @@ on: required: false default: 'intel' +env: + LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" + LAUNCHER_ANALYTICS_ID: "UA-87731965-2" + LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" + LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" + LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" + LAUNCHER_EMBED_SECRETS: "On" + jobs: build-mac-intel: name: build-mac (intel) if: ${{ github.event.inputs.arch != 'arm64' }} runs-on: macos-15-intel + steps: - name: Checkout uses: actions/checkout@v4 - - name: Quick intel smoke + with: + submodules: recursive + + - name: Cache Homebrew + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-homebrew-cache + + - name: Install Qt5 via Homebrew + run: | + set -e + brew update + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 + else + brew tap cartr/qt5 || true + brew install cartr/qt5/qt@5 + fi + QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) + echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV + echo "QT_PREFIX=${QT_PREFIX}" + + - name: Diagnostic: env and tools run: | - echo "Running intel mac job" - uname -a - - name: Upload marker + echo "### environment ###" + env | sort + echo "### brew, clang, cmake ###" + brew --version || true + clang --version || true + cmake --version || true + echo "QT_PREFIX=${QT_PREFIX}" + if [ -n "${QT_PREFIX}" ]; then + ls -la "${QT_PREFIX}/lib/cmake" || true + ls -la "${QT_PREFIX}/include" || true + fi + + - name: Configure (CMake) - verbose + run: | + set -euo pipefail + mkdir -p build + cd build + export CMAKE_OSX_ARCHITECTURES=x86_64 + cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ + -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ + -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ + -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ + -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ + $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log + cmake -LAH . > ../cmake_cache_and_vars.txt || true + + - name: Build (make) - verbose + run: | + set -euo pipefail + cd build + make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) + + - name: Test (save logs) + run: | + set -e + cd build + make test 2>&1 | tee ../test_output.log || true + cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true + + - name: Install (save logs) + run: | + set -e + cd build + make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) + chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true + + - name: Upload build artifacts and logs uses: actions/upload-artifact@v3 with: - name: mac-intel-marker - path: .github/workflows/build-mac_test.yml + name: mac-build-output-intel + path: | + cmake_output.log + cmake_cache_and_vars.txt + build_output.log + test_output.log + install_output.log + /Users/runner/work/UltimMC/build/dist build-mac-arm: name: build-mac (arm64) if: ${{ github.event.inputs.arch == 'arm64' }} runs-on: macos-latest + steps: - name: Checkout uses: actions/checkout@v4 - - name: Quick arm smoke + with: + submodules: recursive + + - name: Cache Homebrew + uses: actions/cache@v3 + with: + path: /Users/runner/Library/Caches/Homebrew + key: ${{ runner.os }}-homebrew-cache + + - name: Install Qt5 via Homebrew + run: | + set -e + brew update + if brew info qt@5 >/dev/null 2>&1; then + brew install qt@5 + else + brew tap cartr/qt5 || true + brew install cartr/qt5/qt@5 + fi + QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) + echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV + echo "QT_PREFIX=${QT_PREFIX}" + + - name: Diagnostic: env and tools + run: | + echo "### environment ###" + env | sort + echo "### brew, clang, cmake ###" + brew --version || true + clang --version || true + cmake --version || true + echo "QT_PREFIX=${QT_PREFIX}" + if [ -n "${QT_PREFIX}" ]; then + ls -la "${QT_PREFIX}/lib/cmake" || true + ls -la "${QT_PREFIX}/include" || true + fi + + - name: Configure (CMake) - verbose + run: | + set -euo pipefail + mkdir -p build + cd build + export CMAKE_OSX_ARCHITECTURES=arm64 + cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ + -DCMAKE_C_COMPILER=/usr/bin/clang \ + -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ + -DCMAKE_BUILD_TYPE=Release \ + -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ + -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ + -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ + -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ + -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ + -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ + -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ + -DLauncher_LAYOUT=mac-bundle \ + -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ + -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ + -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ + $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log + cmake -LAH . > ../cmake_cache_and_vars.txt || true + + - name: Build (make) - verbose + run: | + set -euo pipefail + cd build + make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) + + - name: Test (save logs) + run: | + set -e + cd build + make test 2>&1 | tee ../test_output.log || true + cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true + + - name: Install (save logs) run: | - echo "Running arm mac job" - uname -a - - name: Upload marker + set -e + cd build + make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) + chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true + + - name: Upload build artifacts and logs uses: actions/upload-artifact@v3 with: - name: mac-arm-marker - path: .github/workflows/build-mac_test.yml + name: mac-build-output-arm64 + path: | + cmake_output.log + cmake_cache_and_vars.txt + build_output.log + test_output.log + install_output.log + /Users/runner/work/UltimMC/build/dist From e6b7a6aebe9dcc6296fb044edb76018f7ea5996b Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:30:08 -0300 Subject: [PATCH 26/28] Update build-mac_test.yml From 434b1de8e59e12a7e3ba821c79171abf099bbab5 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:31:12 -0300 Subject: [PATCH 27/28] Update build-mac_test.yml --- .github/workflows/build-mac_test.yml | 204 ++------------------------- 1 file changed, 13 insertions(+), 191 deletions(-) diff --git a/.github/workflows/build-mac_test.yml b/.github/workflows/build-mac_test.yml index 4cb53b2739..3a8d017704 100644 --- a/.github/workflows/build-mac_test.yml +++ b/.github/workflows/build-mac_test.yml @@ -1,4 +1,4 @@ -name: Build macOS (manual) +name: Build macOS (sanity) on: workflow_dispatch: @@ -8,215 +8,37 @@ on: required: false default: 'intel' -env: - LAUNCHER_PASTE_EE_API_KEY: "utLvciUouSURFzfjPxLBf5W4ISsUX4pwBDF7N1AfZ" - LAUNCHER_ANALYTICS_ID: "UA-87731965-2" - LAUNCHER_NOTIFICATION_URL: "https://files.multimc.org/notifications.json" - LAUNCHER_UPDATER_BASE: "https://files.multimc.org/update/" - LAUNCHER_BUG_TRACKER_URL: "https://github.com/UltimMC/Launcher/issues" - LAUNCHER_EMBED_SECRETS: "On" - jobs: build-mac-intel: name: build-mac (intel) if: ${{ github.event.inputs.arch != 'arm64' }} runs-on: macos-15-intel - steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Cache Homebrew - uses: actions/cache@v3 - with: - path: /Users/runner/Library/Caches/Homebrew - key: ${{ runner.os }}-homebrew-cache - - - name: Install Qt5 via Homebrew - run: | - set -e - brew update - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 || true - brew install cartr/qt5/qt@5 - fi - QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) - echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV - echo "QT_PREFIX=${QT_PREFIX}" - - - name: Diagnostic: env and tools + - name: Quick intel smoke run: | - echo "### environment ###" - env | sort - echo "### brew, clang, cmake ###" - brew --version || true - clang --version || true - cmake --version || true - echo "QT_PREFIX=${QT_PREFIX}" - if [ -n "${QT_PREFIX}" ]; then - ls -la "${QT_PREFIX}/lib/cmake" || true - ls -la "${QT_PREFIX}/include" || true - fi - - - name: Configure (CMake) - verbose - run: | - set -euo pipefail - mkdir -p build - cd build - export CMAKE_OSX_ARCHITECTURES=x86_64 - cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ - -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ - -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ - -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ - $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - cmake -LAH . > ../cmake_cache_and_vars.txt || true - - - name: Build (make) - verbose - run: | - set -euo pipefail - cd build - make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - - name: Test (save logs) - run: | - set -e - cd build - make test 2>&1 | tee ../test_output.log || true - cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - - - name: Install (save logs) - run: | - set -e - cd build - make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) - chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true - - - name: Upload build artifacts and logs + echo "Running intel mac job" + uname -a + - name: Upload marker uses: actions/upload-artifact@v3 with: - name: mac-build-output-intel - path: | - cmake_output.log - cmake_cache_and_vars.txt - build_output.log - test_output.log - install_output.log - /Users/runner/work/UltimMC/build/dist + name: mac-intel-marker + path: .github/workflows/build-mac_test.yml build-mac-arm: name: build-mac (arm64) if: ${{ github.event.inputs.arch == 'arm64' }} runs-on: macos-latest - steps: - name: Checkout uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Cache Homebrew - uses: actions/cache@v3 - with: - path: /Users/runner/Library/Caches/Homebrew - key: ${{ runner.os }}-homebrew-cache - - - name: Install Qt5 via Homebrew - run: | - set -e - brew update - if brew info qt@5 >/dev/null 2>&1; then - brew install qt@5 - else - brew tap cartr/qt5 || true - brew install cartr/qt5/qt@5 - fi - QT_PREFIX=$(brew --prefix qt@5 2>/dev/null || brew --prefix cartr/qt5/qt@5 2>/dev/null || true) - echo "QT_PREFIX=${QT_PREFIX}" >> $GITHUB_ENV - echo "QT_PREFIX=${QT_PREFIX}" - - - name: Diagnostic: env and tools - run: | - echo "### environment ###" - env | sort - echo "### brew, clang, cmake ###" - brew --version || true - clang --version || true - cmake --version || true - echo "QT_PREFIX=${QT_PREFIX}" - if [ -n "${QT_PREFIX}" ]; then - ls -la "${QT_PREFIX}/lib/cmake" || true - ls -la "${QT_PREFIX}/include" || true - fi - - - name: Configure (CMake) - verbose - run: | - set -euo pipefail - mkdir -p build - cd build - export CMAKE_OSX_ARCHITECTURES=arm64 - cmake -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES} \ - -DCMAKE_C_COMPILER=/usr/bin/clang \ - -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ - -DCMAKE_BUILD_TYPE=Release \ - -DLauncher_NOTIFICATION_URL:STRING=${LAUNCHER_NOTIFICATION_URL} \ - -DCMAKE_INSTALL_PREFIX:PATH="/Users/runner/work/UltimMC/build/dist" \ - -DCMAKE_PREFIX_PATH:PATH="${QT_PREFIX}/lib/cmake" \ - -DQt5_DIR:PATH="${QT_PREFIX}/lib/cmake/Qt5" \ - -DLauncher_UPDATER_BASE=${LAUNCHER_UPDATER_BASE} \ - -DLauncher_PASTE_EE_API_KEY:STRING=${LAUNCHER_PASTE_EE_API_KEY} \ - -DLauncher_ANALYTICS_ID:STRING=${LAUNCHER_ANALYTICS_ID} \ - -DLauncher_LAYOUT=mac-bundle \ - -DLauncher_BUILD_PLATFORM=osx64-5.15.2 \ - -DLauncher_BUG_TRACKER_URL=${LAUNCHER_BUG_TRACKER_URL} \ - -DLauncher_EMBED_SECRETS=${LAUNCHER_EMBED_SECRETS} \ - $GITHUB_WORKSPACE 2>&1 | tee ../cmake_output.log - cmake -LAH . > ../cmake_cache_and_vars.txt || true - - - name: Build (make) - verbose - run: | - set -euo pipefail - cd build - make -j$(sysctl -n hw.logicalcpu) VERBOSE=1 2>&1 | tee ../build_output.log || (echo "make failed, see build_output.log" && exit 1) - - - name: Test (save logs) - run: | - set -e - cd build - make test 2>&1 | tee ../test_output.log || true - cmake -E remove_directory "/Users/runner/work/UltimMC/build/dist" || true - - - name: Install (save logs) + - name: Quick arm smoke run: | - set -e - cd build - make install 2>&1 | tee ../install_output.log || (echo "install failed" && exit 1) - chmod +x /Users/runner/work/UltimMC/build/dist/UltimMC.app/Contents/MacOS/UltimMC || true - - - name: Upload build artifacts and logs + echo "Running arm mac job" + uname -a + - name: Upload marker uses: actions/upload-artifact@v3 with: - name: mac-build-output-arm64 - path: | - cmake_output.log - cmake_cache_and_vars.txt - build_output.log - test_output.log - install_output.log - /Users/runner/work/UltimMC/build/dist + name: mac-arm-marker + path: .github/workflows/build-mac_test.yml From 1acf4a06e72fe0fbbb1f9a9107b86c67488d3544 Mon Sep 17 00:00:00 2001 From: WastoLord <104502339+WastoLord@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:38:55 -0300 Subject: [PATCH 28/28] Update README.md --- README.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 22fba0464b..24a7deb5a6 100644 --- a/README.md +++ b/README.md @@ -15,23 +15,15 @@ ## Downloading -- All the available downloads can be found [here](https://nightly.link/UltimMC/Launcher/workflows/main/develop). These builds are directly taken from our [GitHub Actions](https://github.com/UltimMC/Launcher/actions). +- All the available downloads can be found [here](https://github.com/WastoLord/UltimMC-Launcher/releases/tag/compilado). These builds are directly taken from our [GitHub Actions](https://github.com/WastoLord/UltimMC-Launcher/actions/workflows/build-win-simple.yml). Direct downloads for specific platforms can be found below. -- *[Windows \(32-bit and 64-bit\)](https://nightly.link/UltimMC/Launcher/workflows/main/develop/mmc-cracked-win32.zip)*. +- *[Windows \(32-bit and 64-bit\)](https://github.com/WastoLord/UltimMC-Launcher/releases/download/compilado/mmc-cracked-win32.zip)*. -- *[Linux (64-bit)](https://nightly.link/UltimMC/Launcher/workflows/main/develop/mmc-cracked-lin64.zip)*. +- *[Linux (64-bit)](https://github.com/WastoLord/UltimMC-Launcher/releases/download/compilado/mmc-cracked-lin64.zip)*. -- *[macOS (10.14 and newer)](https://nightly.link/UltimMC/Launcher/workflows/main/develop/mmc-cracked-osx64.zip)*. -> [!NOTE] -> In the case you're using macOS then another additional step you might need to do -> is to make `UltimMC` an executable by running the command `chmod +x UltimMC.app/Contents/MacOS/UltimMC` in the terminal. - -There's additionally a [.deb package](https://nightly.link/UltimMC/ultimmc-deb/workflows/ci/master/UltimMC.zip) for Debian/Ubuntu distributions. - -And an AUR package as [ultimmc-bin](https://aur.archlinux.org/packages/ultimmc-bin). [![ultimmc-bin](https://img.shields.io/badge/ultimmc--bin-1793D1?logo=archlinux&logoColor=white&label=AUR)](https://aur.archlinux.org/packages/ultimmc-bin) ## Installing and Using