File tree 6 files changed +34
-27
lines changed
6 files changed +34
-27
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,17 @@ if [ "$SYSTEM_COLLECTIONID" != "" ]; then
6
6
echo " Azure detected"
7
7
CI_NAME=" $( echo " $AGENT_OS " | tr ' [:upper:]' ' [:lower:]' ) "
8
8
CI_BUILD_DIR=" $BUILD_SOURCESDIRECTORY "
9
+ CI_TYPE=" azure"
9
10
elif [ " $HOME " != " " ]; then
10
11
# GitHub Actions
11
12
echo " Github Actions detected"
12
13
CI_NAME=" $( uname -s | tr ' [:upper:]' ' [:lower:]' ) "
13
14
CI_BUILD_DIR=" $GITHUB_WORKSPACE "
15
+ CI_TYPE=" github_action"
14
16
else
15
17
# for executing in non ci environment
16
18
CI_NAME=" $( uname -s | tr ' [:upper:]' ' [:lower:]' ) "
19
+ CI_TYPE=" other"
17
20
fi
18
21
19
22
if [ ${BUILD_ARCHIVES} = true ]; then
@@ -80,12 +83,20 @@ elif [[ $CI_NAME == *"mingw64_nt"* || "$CI_NAME" == 'windows_nt' ]]; then
80
83
BUILD_OPTION=" -DUSE_CCACHE_CACHING=OFF ${IS_ARCHIVE_SKIPPED} "
81
84
fi
82
85
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
+
83
94
echo " Build option: ${BUILD_OPTION} "
84
95
85
96
mkdir -p build/.ccache
86
97
87
98
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
89
100
./ccache.exe -zp || true
90
101
cmake --build . --target package --config Release -- -nologo -v:m -maxcpucount || exit 3
91
102
./ccache.exe -sv || true
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ if (USE_CCACHE_CACHING)
61
61
if (DEFINED ENV{CCACHE_DIR})
62
62
set (CCACHE_DIR_CACHE_LOCATION $ENV{CCACHE_DIR} )
63
63
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) )
65
65
set (CCACHE_DIR_CACHE_LOCATION "$ENV{AppData} /.ccache" )
66
66
message ( STATUS "Found CCache (${CCACHE_FOUND} ) and set ccache dir: ${CCACHE_DIR_CACHE_LOCATION} . Will try to use it." )
67
67
else ()
@@ -81,6 +81,7 @@ if (USE_CCACHE_CACHING)
81
81
else ()
82
82
set (HYPERHDR_CCACHE_PARAMS
83
83
CCACHE_MAXSIZE=600M
84
+ CCACHE_NOCOMPRESS=true
84
85
CCACHE_DIR=${CCACHE_DIR_CACHE_LOCATION}
85
86
CCACHE_SLOPPINESS=pch_defines,time_macros
86
87
CCACHE_INODECACHE=true
Original file line number Diff line number Diff line change @@ -586,32 +586,10 @@ macro(DeployWindows TARGET)
586
586
FILES "${CMAKE_BINARY_DIR} /qt.conf"
587
587
DESTINATION "bin"
588
588
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
+ )
612
590
613
591
install (
614
- FILES ${CMAKE_CURRENT_BINARY_DIR} / lut_lin_tables.3d
592
+ FILES ${PROJECT_SOURCE_DIR} /resources/lut/ lut_lin_tables.tar.xz
615
593
DESTINATION "bin"
616
594
COMPONENT "HyperHDR"
617
595
)
@@ -659,7 +637,7 @@ macro(DeployWindows TARGET)
659
637
endif ()
660
638
endif ()
661
639
662
- if (WINDEPLOYQT_EXECUTABLE AND NOT CMAKE_GITHUB_ACTION)
640
+ if (WINDEPLOYQT_EXECUTABLE AND ( NOT CMAKE_GITHUB_ACTION) )
663
641
set (WINDEPLOYQT_PARAMS_RUNTIME --verbose 0 --no -compiler-runtime --no -opengl-sw --no -system -d3d-compiler)
664
642
message (STATUS "Found windeployqt: ${WINDEPLOYQT_EXECUTABLE} PATH_HINT:${My_Qt6Core_EXECUTABLE_DIR}${QT_BIN_DIR} " )
665
643
add_custom_command (TARGET ${TARGET} POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} ${WINDEPLOYQT_PARAMS_RUNTIME} "$<TARGET_FILE:${TARGET} >" )
Original file line number Diff line number Diff line change @@ -174,6 +174,11 @@ STRING(REGEX REPLACE "\\\\" "\\\\\\\\" NSIS_HYP_LOGO_VERT "${NSIS_HYP_LOGO_VERT}
174
174
STRING (REGEX REPLACE "\\\\ " "\\\\\\\\ " NSIS_HYP_LOGO_HORI "${NSIS_HYP_LOGO_HORI} " )
175
175
176
176
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 ()
177
182
SET ( CPACK_NSIS_MUI_ICON ${NSIS_HYP_ICO} )
178
183
SET ( CPACK_NSIS_MUI_UNIICON ${NSIS_HYP_ICO} )
179
184
SET ( CPACK_NSIS_MUI_HEADERIMAGE ${NSIS_HYP_LOGO_HORI} )
Original file line number Diff line number Diff line change 36
36
37
37
;Set compression
38
38
SetCompressor @CPACK_NSIS_COMPRESSOR@
39
+ SetCompress off
39
40
40
41
;Require administrator access
41
42
RequestExecutionLevel admin
@@ -792,6 +793,16 @@ Section "-Core installation"
792
793
; Install Visual c++ Redistributable
793
794
ExecWait '"$INSTDIR\bin\vc_redist.x64.exe" /install /quiet /norestart'
794
795
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
+
795
806
SectionEnd
796
807
797
808
Section "-Add to path"
@@ -914,6 +925,7 @@ Section "Uninstall"
914
925
;Remove files we installed.
915
926
;Keep the list of directories here in sync with the File commands above.
916
927
@CPACK_NSIS_DELETE_FILES@
928
+ Delete "$INSTDIR\bin\lut_lin_tables.3d"
917
929
@CPACK_NSIS_DELETE_DIRECTORIES@
918
930
919
931
!ifdef CPACK_NSIS_ADD_REMOVE
You can’t perform that action at this time.
0 commit comments