Add Windows portable auto-update from Forgejo continuous releases.
Some checks failed
Windows Release / windows-x86_64 (push) Failing after 1h12m0s
Some checks failed
Windows Release / windows-x86_64 (push) Failing after 1h12m0s
Poll windows-continuous by git SHA, download the matching zip, and apply it in place so friends stay current without manual installs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
7f34283537
commit
cdc4c5cb30
13 changed files with 371 additions and 22 deletions
|
|
@ -54,6 +54,7 @@ set(sources "src/main.cpp"
|
|||
"src/WorldScreenshot.cpp"
|
||||
"src/FileHelpers.cpp"
|
||||
"src/VersionConstants.cpp"
|
||||
"src/WindowsPortableUpdater.cpp"
|
||||
"src/ScaleUpCanvas.cpp"
|
||||
"src/WorldUndoManager.cpp"
|
||||
"src/GUIHolder.cpp"
|
||||
|
|
@ -200,6 +201,30 @@ else()
|
|||
add_executable(main ${sources})
|
||||
endif()
|
||||
|
||||
# Short git SHA for continuous-release identity (Windows auto-update, About).
|
||||
set(INFINIPAINT_GIT_SHA "unknown")
|
||||
find_package(Git QUIET)
|
||||
if(GIT_FOUND)
|
||||
execute_process(
|
||||
COMMAND "${GIT_EXECUTABLE}" rev-parse --short=7 HEAD
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE INFINIPAINT_GIT_SHA
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
endif()
|
||||
if(NOT INFINIPAINT_GIT_SHA)
|
||||
set(INFINIPAINT_GIT_SHA "unknown")
|
||||
endif()
|
||||
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/generated")
|
||||
configure_file(
|
||||
"${CMAKE_SOURCE_DIR}/src/BuildCommit.hpp.in"
|
||||
"${CMAKE_BINARY_DIR}/generated/BuildCommit.hpp"
|
||||
@ONLY
|
||||
)
|
||||
target_include_directories(main PRIVATE "${CMAKE_BINARY_DIR}/generated")
|
||||
message(STATUS "InfiniPaint build commit: ${INFINIPAINT_GIT_SHA}")
|
||||
|
||||
# Get libraries
|
||||
|
||||
if(NO_CONAN_BUILD)
|
||||
|
|
@ -382,7 +407,8 @@ else()
|
|||
endif()
|
||||
|
||||
if((NOT EMSCRIPTEN) AND WIN32)
|
||||
target_link_libraries(main dwrite)
|
||||
target_link_libraries(main dwrite shell32)
|
||||
# shell32: ShellExecuteA for portable auto-update helper script
|
||||
# Clip library for retrieving images from windows clipboard
|
||||
set(CLIP_EXAMPLES OFF CACHE BOOL "Compile clip examples")
|
||||
set(CLIP_TESTS OFF CACHE BOOL "Compile clip tests")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue