mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-20 06:52:24 +00:00
Merge e86e916551 into ada0db62dc
This commit is contained in:
commit
66b6c401a4
4 changed files with 20 additions and 2 deletions
2
.github/workflows/validate-internal.yml
vendored
2
.github/workflows/validate-internal.yml
vendored
|
|
@ -10,3 +10,5 @@ jobs:
|
||||||
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
|
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
|
||||||
uses: ./.github/workflows/validate.yml
|
uses: ./.github/workflows/validate.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
cmake-flags: "-DUNLEASHED_RECOMP_CHECK_FOR_UPDATES=ON"
|
||||||
|
|
|
||||||
8
.github/workflows/validate.yml
vendored
8
.github/workflows/validate.yml
vendored
|
|
@ -6,6 +6,10 @@ on:
|
||||||
required: true
|
required: true
|
||||||
ASSET_REPO_TOKEN:
|
ASSET_REPO_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
|
inputs:
|
||||||
|
cmake-flags:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
@ -66,7 +70,7 @@ jobs:
|
||||||
- name: Configure Project
|
- name: Configure Project
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: /tmp/ccache
|
CCACHE_DIR: /tmp/ccache
|
||||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache ${{ inputs.cmake-flags }}
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
env:
|
env:
|
||||||
|
|
@ -130,7 +134,7 @@ jobs:
|
||||||
copy .\private\* .\UnleashedRecompLib\private
|
copy .\private\* .\UnleashedRecompLib\private
|
||||||
|
|
||||||
- name: Configure Project
|
- name: Configure Project
|
||||||
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache ${{ inputs.cmake-flags }}
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
option(UNLEASHED_RECOMP_FLATPAK "Configure the build for Flatpak compatibility." OFF)
|
option(UNLEASHED_RECOMP_FLATPAK "Configure the build for Flatpak compatibility." OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
option(UNLEASHED_RECOMP_CHECK_FOR_UPDATES "Enables the update checker." OFF)
|
||||||
|
|
||||||
function(BIN2C)
|
function(BIN2C)
|
||||||
cmake_parse_arguments(BIN2C_ARGS "" "TARGET_OBJ;SOURCE_FILE;DEST_FILE;ARRAY_NAME;COMPRESSION_TYPE" "" ${ARGN})
|
cmake_parse_arguments(BIN2C_ARGS "" "TARGET_OBJ;SOURCE_FILE;DEST_FILE;ARRAY_NAME;COMPRESSION_TYPE" "" ${ARGN})
|
||||||
|
|
||||||
|
|
@ -324,6 +326,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
target_compile_definitions(UnleashedRecomp PRIVATE SDL_VULKAN_ENABLED)
|
target_compile_definitions(UnleashedRecomp PRIVATE SDL_VULKAN_ENABLED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (UNLEASHED_RECOMP_CHECK_FOR_UPDATES)
|
||||||
|
target_compile_definitions(UnleashedRecomp PRIVATE -DCHECK_FOR_UPDATES)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(directx-dxc REQUIRED)
|
find_package(directx-dxc REQUIRED)
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ void UpdateChecker::initialize()
|
||||||
|
|
||||||
bool UpdateChecker::start()
|
bool UpdateChecker::start()
|
||||||
{
|
{
|
||||||
|
#ifdef CHECK_FOR_UPDATES
|
||||||
if (g_updateCheckerInProgress)
|
if (g_updateCheckerInProgress)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -139,12 +140,14 @@ bool UpdateChecker::start()
|
||||||
g_updateCheckerFinished = false;
|
g_updateCheckerFinished = false;
|
||||||
std::thread thread(&updateCheckerThread);
|
std::thread thread(&updateCheckerThread);
|
||||||
thread.detach();
|
thread.detach();
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateChecker::Result UpdateChecker::check()
|
UpdateChecker::Result UpdateChecker::check()
|
||||||
{
|
{
|
||||||
|
#ifdef CHECK_FOR_UPDATES
|
||||||
if (g_updateCheckerFinished)
|
if (g_updateCheckerFinished)
|
||||||
{
|
{
|
||||||
return g_updateCheckerResult;
|
return g_updateCheckerResult;
|
||||||
|
|
@ -157,6 +160,9 @@ UpdateChecker::Result UpdateChecker::check()
|
||||||
{
|
{
|
||||||
return UpdateChecker::Result::NotStarted;
|
return UpdateChecker::Result::NotStarted;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return UpdateChecker::Result::AlreadyUpToDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateChecker::visitWebsite()
|
void UpdateChecker::visitWebsite()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue