Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/Linux-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ jobs:
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
#DOCKER_ARCH: ${{ matrix.dist.arch }}
## I cannot see if ARCH is used anywhere. Should we remove it?
#ARCH: ${{ matrix.dist.arch }}
PRESERVE_ENVVARS: "GIT_HASH"
run: |
cp -r $GITHUB_WORKSPACE/packaging/debian $GITHUB_WORKSPACE
bash $GITHUB_WORKSPACE/tools/packpack
Expand Down Expand Up @@ -204,6 +202,7 @@ jobs:
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
PRESERVE_ENVVARS: "GIT_HASH"

- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
if: matrix.dist.os == 'opensuse-leap'
Expand Down
22 changes: 11 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
endif ()

if (NOT USE_OPENSSL)
message(WARNING "OpenSSL is required to upload screenshots")

Check warning on line 276 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-installer

OpenSSL is required to upload screenshots

Check warning on line 276 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-portable

OpenSSL is required to upload screenshots

Check warning on line 276 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-installer

OpenSSL is required to upload screenshots

Check warning on line 276 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-portable

OpenSSL is required to upload screenshots
endif ()
endif ()

Expand All @@ -286,23 +286,23 @@
message("Flameshot predefined color palette large: " ${FLAMESHOT_PREDEFINED_COLOR_PALETTE_LARGE})
target_compile_definitions(flameshot PRIVATE PREDEFINED_COLOR_PALETTE_LARGE=${FLAMESHOT_PREDEFINED_COLOR_PALETTE_LARGE})


find_package (Git)
if( DEFINED ENV{GIT_HASH})
message("Using provided git_commit_hash: $ENV{GIT_HASH}")
set(FLAMESHOT_GIT_HASH $ENV{GIT_HASH})
target_compile_definitions(flameshot PRIVATE FLAMESHOT_GIT_HASH="${FLAMESHOT_GIT_HASH}")
elseif (GIT_FOUND)
message("git found: ${GIT_EXECUTABLE} in version ${GIT_VERSION_STRING}")
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD OUTPUT_VARIABLE FLAMESHOT_GIT_HASH)
string(REGEX REPLACE "\r*\n$" "" FLAMESHOT_GIT_HASH "${FLAMESHOT_GIT_HASH}")
target_compile_definitions(flameshot PRIVATE FLAMESHOT_GIT_HASH="${FLAMESHOT_GIT_HASH}")
message("FLAMESHOT_GIT_HASH: ${FLAMESHOT_GIT_HASH}")
else()
find_package (Git)
if (GIT_FOUND)
message("git found: ${GIT_EXECUTABLE} in version ${GIT_VERSION_STRING}")
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD OUTPUT_VARIABLE FLAMESHOT_GIT_HASH)
string(REGEX REPLACE "\r*\n$" "" FLAMESHOT_GIT_HASH "${FLAMESHOT_GIT_HASH}")
target_compile_definitions(flameshot PRIVATE FLAMESHOT_GIT_HASH="${FLAMESHOT_GIT_HASH}")
message("FLAMESHOT_GIT_HASH: ${FLAMESHOT_GIT_HASH}")
else()
target_compile_definitions(flameshot PRIVATE FLAMESHOT_GIT_HASH="-")
message("git command is not found")
endif ()
target_compile_definitions(flameshot PRIVATE FLAMESHOT_GIT_HASH="-")
message(WARNING "Compiling without git commit hash")
endif ()

target_compile_definitions(flameshot PRIVATE APP_PREFIX="${CMAKE_INSTALL_PREFIX}")
target_compile_definitions(flameshot PRIVATE APP_VERSION="v${PROJECT_VERSION}")
#target_compile_definitions(flameshot PRIVATE QAPPLICATION_CLASS=QApplication)
Expand Down Expand Up @@ -448,7 +448,7 @@
FILES_MATCHING
PATTERN "*.dll")
else ()
message(WARNING "Unable to find OpenSSL dlls.")

Check warning on line 451 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-installer

Unable to find OpenSSL dlls.

Check warning on line 451 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-portable

Unable to find OpenSSL dlls.

Check warning on line 451 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-installer

Unable to find OpenSSL dlls.

Check warning on line 451 in src/CMakeLists.txt

View workflow job for this annotation

GitHub Actions / VS 2022 x64-portable

Unable to find OpenSSL dlls.
endif ()
endif ()

Expand Down
Loading