Skip to content

Commit a5bd975

Browse files
committed
Fix
1 parent 82926e5 commit a5bd975

File tree

6 files changed

+34
-27
lines changed

6 files changed

+34
-27
lines changed

Diff for: .ci/ci_build.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ if [ "$SYSTEM_COLLECTIONID" != "" ]; then
66
echo "Azure detected"
77
CI_NAME="$(echo "$AGENT_OS" | tr '[:upper:]' '[:lower:]')"
88
CI_BUILD_DIR="$BUILD_SOURCESDIRECTORY"
9+
CI_TYPE="azure"
910
elif [ "$HOME" != "" ]; then
1011
# GitHub Actions
1112
echo "Github Actions detected"
1213
CI_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')"
1314
CI_BUILD_DIR="$GITHUB_WORKSPACE"
15+
CI_TYPE="github_action"
1416
else
1517
# for executing in non ci environment
1618
CI_NAME="$(uname -s | tr '[:upper:]' '[:lower:]')"
19+
CI_TYPE="other"
1720
fi
1821

1922
if [ ${BUILD_ARCHIVES} = true ]; then
@@ -80,12 +83,20 @@ elif [[ $CI_NAME == *"mingw64_nt"* || "$CI_NAME" == 'windows_nt' ]]; then
8083
BUILD_OPTION="-DUSE_CCACHE_CACHING=OFF ${IS_ARCHIVE_SKIPPED}"
8184
fi
8285

86+
if [[ $CI_TYPE == "github_action" ]]; then
87+
export CCACHE_COMPILERCHECK=content
88+
export CCACHE_NOCOMPRESS=true
89+
BUILD_OPTION="${BUILD_OPTION} -DCMAKE_GITHUB_ACTION=ON"
90+
else
91+
BUILD_OPTION="${BUILD_OPTION} -DCMAKE_GITHUB_ACTION=OFF"
92+
fi
93+
8394
echo "Build option: ${BUILD_OPTION}"
8495

8596
mkdir -p build/.ccache
8697

8798
cd build
88-
cmake -G "Visual Studio 17 2022" ${BUILD_OPTION} -A x64 -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_GITHUB_ACTION=1 ../ || exit 2
99+
cmake -G "Visual Studio 17 2022" ${BUILD_OPTION} -A x64 -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ../ || exit 2
89100
./ccache.exe -zp || true
90101
cmake --build . --target package --config Release -- -nologo -v:m -maxcpucount || exit 3
91102
./ccache.exe -sv || true

Diff for: CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (USE_CCACHE_CACHING)
6161
if (DEFINED ENV{CCACHE_DIR})
6262
set (CCACHE_DIR_CACHE_LOCATION $ENV{CCACHE_DIR})
6363
message ( STATUS "Found CCache (${CCACHE_FOUND}) and its env settings: ${CCACHE_DIR_CACHE_LOCATION}. Will try to use it." )
64-
elseif (WIN32 AND NOT CMAKE_GITHUB_ACTION)
64+
elseif (WIN32 AND (NOT CMAKE_GITHUB_ACTION))
6565
set (CCACHE_DIR_CACHE_LOCATION "$ENV{AppData}/.ccache")
6666
message ( STATUS "Found CCache (${CCACHE_FOUND}) and set ccache dir: ${CCACHE_DIR_CACHE_LOCATION}. Will try to use it." )
6767
else()
@@ -81,6 +81,7 @@ if (USE_CCACHE_CACHING)
8181
else()
8282
set(HYPERHDR_CCACHE_PARAMS
8383
CCACHE_MAXSIZE=600M
84+
CCACHE_NOCOMPRESS=true
8485
CCACHE_DIR=${CCACHE_DIR_CACHE_LOCATION}
8586
CCACHE_SLOPPINESS=pch_defines,time_macros
8687
CCACHE_INODECACHE=true

Diff for: cmake/installers.cmake

+3-25
Original file line numberDiff line numberDiff line change
@@ -586,32 +586,10 @@ macro(DeployWindows TARGET)
586586
FILES "${CMAKE_BINARY_DIR}/qt.conf"
587587
DESTINATION "bin"
588588
COMPONENT "HyperHDR"
589-
)
590-
591-
execute_process(
592-
COMMAND ${SEVENZIP_BIN} e ${PROJECT_SOURCE_DIR}/resources/lut/lut_lin_tables.tar.xz -o${CMAKE_CURRENT_BINARY_DIR} -aoa -y
593-
RESULT_VARIABLE STATUS
594-
OUTPUT_VARIABLE OUTPUT1
595-
)
596-
if(STATUS AND NOT STATUS EQUAL 0)
597-
message( FATAL_ERROR "LUT tar.xz Bad exit status: ${STATUS} ${OUTPUT1}")
598-
else()
599-
message( STATUS "LUT tar.xz tar extracted")
600-
endif()
601-
602-
execute_process(
603-
COMMAND ${SEVENZIP_BIN} e ${CMAKE_CURRENT_BINARY_DIR}/lut_lin_tables.tar -o${CMAKE_CURRENT_BINARY_DIR} -aoa -y
604-
RESULT_VARIABLE STATUS
605-
OUTPUT_VARIABLE OUTPUT1
606-
)
607-
if(STATUS AND NOT STATUS EQUAL 0)
608-
message( FATAL_ERROR "LUT tar Bad exit status")
609-
else()
610-
message( STATUS "LUT tar extracted")
611-
endif()
589+
)
612590

613591
install(
614-
FILES ${CMAKE_CURRENT_BINARY_DIR}/lut_lin_tables.3d
592+
FILES ${PROJECT_SOURCE_DIR}/resources/lut/lut_lin_tables.tar.xz
615593
DESTINATION "bin"
616594
COMPONENT "HyperHDR"
617595
)
@@ -659,7 +637,7 @@ macro(DeployWindows TARGET)
659637
endif()
660638
endif()
661639

662-
if (WINDEPLOYQT_EXECUTABLE AND NOT CMAKE_GITHUB_ACTION)
640+
if (WINDEPLOYQT_EXECUTABLE AND (NOT CMAKE_GITHUB_ACTION))
663641
set(WINDEPLOYQT_PARAMS_RUNTIME --verbose 0 --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler)
664642
message(STATUS "Found windeployqt: ${WINDEPLOYQT_EXECUTABLE} PATH_HINT:${My_Qt6Core_EXECUTABLE_DIR}${QT_BIN_DIR}")
665643
add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} ${WINDEPLOYQT_PARAMS_RUNTIME} "$<TARGET_FILE:${TARGET}>")

Diff for: cmake/packages.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ STRING(REGEX REPLACE "\\\\" "\\\\\\\\" NSIS_HYP_LOGO_VERT "${NSIS_HYP_LOGO_VERT}
174174
STRING(REGEX REPLACE "\\\\" "\\\\\\\\" NSIS_HYP_LOGO_HORI "${NSIS_HYP_LOGO_HORI}")
175175

176176
SET ( CPACK_NSIS_MODIFY_PATH ON )
177+
if(DO_NOT_BUILD_ARCHIVES)
178+
SET ( CPACK_NSIS_COMPRESSOR "" )
179+
else()
180+
SET ( CPACK_NSIS_COMPRESSOR "/SOLID lzma" )
181+
endif()
177182
SET ( CPACK_NSIS_MUI_ICON ${NSIS_HYP_ICO})
178183
SET ( CPACK_NSIS_MUI_UNIICON ${NSIS_HYP_ICO})
179184
SET ( CPACK_NSIS_MUI_HEADERIMAGE ${NSIS_HYP_LOGO_HORI} )

Diff for: cmake/windows/plugins/ExtractLut.dll

176 KB
Binary file not shown.

Diff for: cmake/windows/template/NSIS.template.in

+12
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
;Set compression
3838
SetCompressor @CPACK_NSIS_COMPRESSOR@
39+
SetCompress off
3940

4041
;Require administrator access
4142
RequestExecutionLevel admin
@@ -792,6 +793,16 @@ Section "-Core installation"
792793
; Install Visual c++ Redistributable
793794
ExecWait '"$INSTDIR\bin\vc_redist.x64.exe" /install /quiet /norestart'
794795

796+
Push "$INSTDIR\bin\lut_lin_tables.tar.xz"
797+
Push "$INSTDIR\bin\lut_lin_tables.3d"
798+
799+
ExtractLut::extract
800+
Pop $0
801+
StrCmp $0 success SUCCESS
802+
MessageBox MB_OK|MB_ICONSTOP "$0"
803+
MessageBox MB_OK|MB_ICONSTOP "Please extract $INSTDIR\bin\lut_lin_tables.tar.xz manually using 7-zip"
804+
SUCCESS:
805+
795806
SectionEnd
796807

797808
Section "-Add to path"
@@ -914,6 +925,7 @@ Section "Uninstall"
914925
;Remove files we installed.
915926
;Keep the list of directories here in sync with the File commands above.
916927
@CPACK_NSIS_DELETE_FILES@
928+
Delete "$INSTDIR\bin\lut_lin_tables.3d"
917929
@CPACK_NSIS_DELETE_DIRECTORIES@
918930

919931
!ifdef CPACK_NSIS_ADD_REMOVE

0 commit comments

Comments
 (0)