@@ -10,7 +10,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
1010elseif (CMAKE_SYSTEM_NAME MATCHES "Linux" )
1111 set (CPACK_GENERATOR "TGZ" )
1212elseif (WIN32 )
13- set (CPACK_GENERATOR "ZIP" "NSIS " )
13+ set (CPACK_GENERATOR "ZIP" "External " )
1414 # Overwrite CMAKE_SYSTEM_PROCESSOR for Windows (visual)
1515 if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "AMD64" )
1616 set (CMAKE_SYSTEM_PROCESSOR "x64" )
@@ -52,8 +52,9 @@ endif()
5252string (REPLACE "+" "." HYPERION_PACKAGE_VERSION ${HYPERION_VERSION} )
5353set (CPACK_PACKAGE_FILE_NAME "Hyperion-${HYPERION_PACKAGE_VERSION} -${CMAKE_SYSTEM_NAME} -${CMAKE_SYSTEM_PROCESSOR} " )
5454
55- set (CPACK_PACKAGE_CONTACT "packages @hyperion-project.org" )
55+ set (CPACK_PACKAGE_CONTACT "admin @hyperion-project.org" )
5656set (CPACK_PACKAGE_VENDOR "hyperion-project" )
57+ set (CPACK_PACKAGE_HOMEPAGE_URL "https://hyperion-project.org" )
5758set (CPACK_PACKAGE_EXECUTABLES "hyperiond;Hyperion" )
5859set (CPACK_PACKAGE_INSTALL_DIRECTORY "Hyperion" )
5960set (CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR} /resources/icons/hyperion-32px.png" )
@@ -104,42 +105,10 @@ if(CPACK_GENERATOR MATCHES "DragNDrop")
104105endif ()
105106
106107# NSIS (Windows only)
107- # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators#nsis
108108if (WIN32 )
109- # Use custom script based on cpack nsis template
110- set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake/nsis/template ${CMAKE_MODULE_PATH} )
111-
112- # Some path transformations
113- file (TO_NATIVE_PATH ${CPACK_PACKAGE_ICON} CPACK_PACKAGE_ICON)
114- string (REGEX REPLACE "\\\\ " "\\\\\\\\ " CPACK_PACKAGE_ICON ${CPACK_PACKAGE_ICON} )
115-
116- file (TO_NATIVE_PATH "${CMAKE_SOURCE_DIR} /cmake/windows/nsis/installer.ico" NSIS_HYP_ICO)
117- file (TO_NATIVE_PATH "${CMAKE_SOURCE_DIR} /cmake/windows/nsis/header.bmp" NSIS_HYP_LOGO_HORI)
118- file (TO_NATIVE_PATH "${CMAKE_SOURCE_DIR} /cmake/windows/nsis/logo.bmp" NSIS_HYP_LOGO_VERT)
119-
120- string (REGEX REPLACE "\\\\ " "\\\\\\\\ " NSIS_HYP_ICO "${NSIS_HYP_ICO} " )
121- string (REGEX REPLACE "\\\\ " "\\\\\\\\ " NSIS_HYP_LOGO_VERT "${NSIS_HYP_LOGO_VERT} " )
122- string (REGEX REPLACE "\\\\ " "\\\\\\\\ " NSIS_HYP_LOGO_HORI "${NSIS_HYP_LOGO_HORI} " )
123-
124- set (CPACK_NSIS_MODIFY_PATH ON )
125- set (CPACK_NSIS_MUI_ICON ${NSIS_HYP_ICO} )
126- set (CPACK_NSIS_MUI_UNIICON ${NSIS_HYP_ICO} )
127- set (CPACK_NSIS_MUI_HEADERIMAGE ${NSIS_HYP_LOGO_HORI} )
128- set (CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP ${NSIS_HYP_LOGO_VERT} )
129- set (CPACK_NSIS_DISPLAY_NAME "Hyperion Ambient Light" )
130- set (CPACK_NSIS_PACKAGE_NAME "Hyperion" )
131- set (CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\ hyperiond.exe" )
132- set (CPACK_NSIS_HELP_LINK "https://www.hyperion-project.org" )
133- set (CPACK_NSIS_URL_INFO_ABOUT "https://www.hyperion-project.org" )
134- set (CPACK_NSIS_MUI_FINISHPAGE_RUN "hyperiond.exe" )
135- set (CPACK_NSIS_BRANDING_TEXT "Hyperion-${HYPERION_VERSION} " )
136-
137- # custom nsis plugin directory
138- set (CPACK_NSIS_EXTRA_DEFS "!addplugindir ${CMAKE_SOURCE_DIR} /cmake/windows/nsis/plugins" )
139-
140- # additional hyperiond startmenu link, won't be created ifthe user disables startmenu links
141- set (CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\ $STARTMENU_FOLDER\\\\ Hyperion (Console).lnk' '$INSTDIR\\\\ bin\\\\ hyperiond.exe' '-d -c'" )
142- set (CPACK_NSIS_DELETE_ICONS_EXTRA "Delete '$SMPROGRAMS\\\\ $MUI_TEMP\\\\ Hyperion (Console).lnk'" )
109+ set (CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR} /cmake/windows/inno/innosetup.cmake)
110+ set (CPACK_EXTERNAL_ENABLE_STAGING ON )
111+ set (CPACK_BUILD_CONFIG "${CMAKE_BUILD_TYPE} " )
143112endif ()
144113
145114# Define the install components
@@ -153,40 +122,44 @@ set(CPACK_COMPONENTS_ALL "Hyperion")
153122# Optional compiled
154123
155124if (ENABLE_REMOTE_CTL)
156- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_remote" )
125+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_remote" )
157126endif ()
158127
159128# only include standalone grabber with build was with flatbuffer client
160129if (ENABLE_FLATBUF_CONNECT)
161130 if (ENABLE_QT)
162- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_qt" )
131+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_qt" )
163132 endif ()
164133 if (ENABLE_AMLOGIC)
165- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_aml" )
134+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_aml" )
166135 endif ()
167136 if (ENABLE_V4L2)
168- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_v4l2" )
137+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_v4l2" )
169138 endif ()
170139 if (ENABLE_AUDIO)
171- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_audio" )
140+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_audio" )
172141 endif ()
173142 if (ENABLE_X11)
174- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_x11" )
143+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_x11" )
175144 endif ()
176145 if (ENABLE_XCB)
177- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_xcb" )
146+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_xcb" )
178147 endif ()
179148 if (ENABLE_DISPMANX)
180- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_dispmanx" )
149+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_dispmanx" )
181150 endif ()
182151 if (ENABLE_FB)
183- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_framebuffer" )
152+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_framebuffer" )
184153 endif ()
185154 if (ENABLE_OSX)
186- set (CPACK_COMPONENTS_ALL ${ CPACK_COMPONENTS_ALL} "hyperion_osx" )
155+ list ( APPEND CPACK_COMPONENTS_ALL "hyperion_osx" )
187156 endif ()
188157endif ()
189158
159+ if (ENABLE_DEPLOY_DEPENDENCIES)
160+ list (APPEND CPACK_COMPONENTS_ALL "dependencies" )
161+ endif ()
162+
190163# Only include Hyperion to macOS dmg package (without standalone programs)
191164if (CPACK_GENERATOR MATCHES "DragNDrop" )
192165 list (REMOVE_ITEM CPACK_COMPONENTS_ALL "hyperion_remote" "hyperion_qt" "hyperion_osx" )
@@ -200,105 +173,3 @@ set(CPACK_STRIP_FILES ON)
200173
201174# no code after following line!
202175include (CPack)
203-
204- cpack_add_install_type(Full DISPLAY_NAME "Full" )
205- cpack_add_install_type(Min DISPLAY_NAME "Minimal" )
206- cpack_add_component_group(Runtime EXPANDED DESCRIPTION "Hyperion runtime" )
207-
208- # Components base
209- cpack_add_component(Hyperion
210- DISPLAY_NAME "Hyperion"
211- DESCRIPTION "Hyperion runtime"
212- INSTALL_TYPES Full Min
213- GROUP Runtime
214- REQUIRED
215- )
216-
217- # optional components
218- if (ENABLE_REMOTE_CTL)
219- cpack_add_component_group(Remote DESCRIPTION "hyperion-remote commandline tool" )
220- cpack_add_component(hyperion_remote
221- DISPLAY_NAME "Hyperion Remote"
222- DESCRIPTION "Hyperion remote cli tool"
223- INSTALL_TYPES Full
224- GROUP Remote
225- DEPENDS Hyperion
226- )
227- endif ()
228-
229- # only include standalone grabber with build was with flatbuffer client
230- if (ENABLE_FLATBUF_CONNECT)
231- cpack_add_component_group(Screencapture EXPANDED DESCRIPTION "Standalone Screencapture commandline programs" )
232- if (ENABLE_QT)
233- cpack_add_component(hyperion_qt
234- DISPLAY_NAME "Qt Standalone Screencap"
235- DESCRIPTION "Qt based standalone screen capture"
236- INSTALL_TYPES Full
237- GROUP Screencapture
238- DEPENDS Hyperion
239- )
240- endif ()
241- if (ENABLE_AMLOGIC)
242- cpack_add_component(hyperion_aml
243- DISPLAY_NAME "Amlogic Standalone Screencap"
244- DESCRIPTION "Amlogic based standalone screen capture"
245- INSTALL_TYPES Full
246- GROUP Screencapture
247- DEPENDS Hyperion
248- )
249- endif ()
250- if (ENABLE_V4L2)
251- cpack_add_component(hyperion_v4l2
252- DISPLAY_NAME "V4l2 Standalone Screencap"
253- DESCRIPTION "Video for Linux 2 based standalone screen capture"
254- INSTALL_TYPES Full
255- GROUP Screencapture
256- DEPENDS Hyperion
257- )
258- endif ()
259- if (ENABLE_X11)
260- cpack_add_component(hyperion_x11
261- DISPLAY_NAME "X11 Standalone Screencap"
262- DESCRIPTION "X11 based standalone screen capture"
263- INSTALL_TYPES Full
264- GROUP Screencapture
265- DEPENDS Hyperion
266- )
267- endif ()
268- if (ENABLE_XCB)
269- cpack_add_component(hyperion_xcb
270- DISPLAY_NAME "XCB Standalone Screencap"
271- DESCRIPTION "XCB based standalone screen capture"
272- INSTALL_TYPES Full
273- GROUP Screencapture
274- DEPENDS Hyperion
275- )
276- endif ()
277- if (ENABLE_DISPMANX)
278- cpack_add_component(hyperion_dispmanx
279- DISPLAY_NAME "RPi dispmanx Standalone Screencap"
280- DESCRIPTION "Raspbery Pi dispmanx based standalone screen capture"
281- INSTALL_TYPES Full
282- GROUP Screencapture
283- DEPENDS Hyperion
284- )
285- endif ()
286- if (ENABLE_FB)
287- cpack_add_component(hyperion_framebuffer
288- DISPLAY_NAME "Framebuffer Standalone Screencap"
289- DESCRIPTION "Framebuffer based standalone screen capture"
290- INSTALL_TYPES Full
291- GROUP Screencapture
292- DEPENDS Hyperion
293- )
294- endif ()
295- if (ENABLE_OSX)
296- cpack_add_component(hyperion_osx
297- DISPLAY_NAME "Mac osx Standalone Screencap"
298- DESCRIPTION "Mac osx based standalone screen capture"
299- INSTALL_TYPES Full
300- GROUP Screencapture
301- DEPENDS Hyperion
302- )
303- endif ()
304- endif ()
0 commit comments