-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'PolyMC:stable' into stable
- Loading branch information
Showing
154 changed files
with
5,977 additions
and
5,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
open_collective: polymc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ jobs: | |
INSTALL_PORTABLE_DIR: "install-portable" | ||
INSTALL_APPIMAGE_DIR: "install-appdir" | ||
BUILD_DIR: "build" | ||
CCACHE_VAR: "" | ||
|
||
steps: | ||
## | ||
|
@@ -62,6 +63,39 @@ jobs: | |
cmake:p | ||
ninja:p | ||
qt5:p | ||
ccache:p | ||
nsis:p | ||
- name: Setup ccache | ||
if: runner.os != 'Windows' && inputs.build_type == 'Debug' | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.os }}-${{ matrix.appimage }} | ||
|
||
- name: Setup ccache (Windows) | ||
if: runner.os == 'Windows' && inputs.build_type == 'Debug' | ||
shell: msys2 {0} | ||
run: | | ||
ccache --set-config=cache_dir='${{ github.workspace }}\.ccache' | ||
ccache --set-config=max_size='500M' | ||
ccache --set-config=compression=true | ||
ccache -p # Show config | ||
ccache -z # Zero stats | ||
- name: Use ccache on Debug builds only | ||
if: inputs.build_type == 'Debug' | ||
shell: bash | ||
run: | | ||
echo "CCACHE_VAR=ccache" >> $GITHUB_ENV | ||
- name: Retrieve ccache cache (Windows) | ||
if: runner.os == 'Windows' && inputs.build_type == 'Debug' | ||
uses: actions/[email protected] | ||
with: | ||
path: '${{ github.workspace }}\.ccache' | ||
key: ${{ matrix.os }}-${{ matrix.msystem }} | ||
restore-keys: | | ||
${{ matrix.os }}-${{ matrix.msystem }} | ||
- name: Set short version | ||
shell: bash | ||
|
@@ -74,7 +108,7 @@ jobs: | |
run: | | ||
brew update | ||
brew install qt@5 ninja | ||
- name: Update Qt (AppImage) | ||
if: runner.os == 'Linux' && matrix.appimage == true | ||
run: | | ||
|
@@ -102,18 +136,18 @@ jobs: | |
- name: Configure CMake (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DQt5_DIR=/usr/local/opt/qt@5 -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 -DLauncher_BUILD_PLATFORM=macOS -G Ninja | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DQt5_DIR=/usr/local/opt/qt@5 -DCMAKE_PREFIX_PATH=/usr/local/opt/qt@5 -DLauncher_BUILD_PLATFORM=macOS -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -G Ninja | ||
- name: Configure CMake (Windows) | ||
if: runner.os == 'Windows' | ||
shell: msys2 {0} | ||
run: | | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -G Ninja | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=${{ matrix.name }} -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -G Ninja | ||
- name: Configure CMake (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -G Ninja | ||
cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -DCMAKE_C_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CCACHE_VAR }} -G Ninja | ||
## | ||
# BUILD | ||
|
@@ -164,6 +198,13 @@ jobs: | |
cp -r ${{ env.INSTALL_DIR }} ${{ env.INSTALL_PORTABLE_DIR }} # cmake install on Windows is slow, let's just copy instead | ||
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_PORTABLE_DIR }} --component portable | ||
- name: Package (Windows, installer) | ||
if: runner.os == 'Windows' | ||
shell: msys2 {0} | ||
run: | | ||
cd ${{ env.INSTALL_DIR }} | ||
makensis -NOCD "-DVERSION=${{ env.VERSION }}" "-DMUI_ICON=${{ github.workspace }}/program_info/polymc.ico" "-XOutFile ${{ github.workspace }}/PolyMC-Setup.exe" "${{ github.workspace }}/program_info/win_install.nsi" | ||
- name: Package (Linux) | ||
if: runner.os == 'Linux' && matrix.appimage != true | ||
run: | | ||
|
@@ -231,6 +272,13 @@ jobs: | |
name: PolyMC-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }} | ||
path: ${{ env.INSTALL_PORTABLE_DIR }}/** | ||
|
||
- name: Upload installer (Windows) | ||
if: runner.os == 'Windows' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: PolyMC-${{ matrix.name }}-Setup-${{ env.VERSION }}-${{ inputs.build_type }} | ||
path: PolyMC-Setup.exe | ||
|
||
- name: Upload binary tarball (Linux) | ||
if: runner.os == 'Linux' && matrix.appimage != true | ||
uses: actions/upload-artifact@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// SPDX-License-Identifier: GPL-3.0-only | ||
/* | ||
* PolyMC - Minecraft Launcher | ||
* Copyright (c) 2022 Jamie Mansfield <[email protected]> | ||
* Copyright (C) 2022 Sefa Eyeoglu <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
|
@@ -142,13 +143,17 @@ class Config { | |
QString LEGACY_FTB_CDN_BASE_URL = "https://dist.creeper.host/FTB2/"; | ||
|
||
QString ATL_DOWNLOAD_SERVER_URL = "https://download.nodecdn.net/containers/atl/"; | ||
QString ATL_API_BASE_URL = "https://api.atlauncher.com/v1/"; | ||
|
||
QString TECHNIC_API_BASE_URL = "https://api.technicpack.net/"; | ||
/** | ||
* The build that is reported to the Technic API. | ||
*/ | ||
QString TECHNIC_API_BUILD = "multimc"; | ||
|
||
QString MODRINTH_STAGING_URL = "https://staging-api.modrinth.com/v2"; | ||
QString MODRINTH_PROD_URL = "https://api.modrinth.com/v2"; | ||
|
||
/** | ||
* \brief Converts the Version to a string. | ||
* \return The version number in string format (major.minor.revision.build). | ||
|
Oops, something went wrong.