@@ -214,10 +214,12 @@ if(APPLE)
214214 set (WX_TOOLS_BUNDLE_VERSION ${WXT_VERSION} )
215215 set (WXT_SHORT_VERSION "${short_ver} " )
216216
217- string (TIMESTAMP CURRENT_YEAR "%Y" )
218- message (STATUS "Current year: ${CURRENT_YEAR} " )
217+ string (TIMESTAMP WXT_CURRENT_YEAR "%Y" )
218+ message (STATUS "Current year: ${WXT_CURRENT_YEAR} " )
219+ string (TIMESTAMP WXT_BUNDLE_VERSION "%Y%m%d%H%M" )
220+ message (STATUS "[wxTools] WXT_BUNDLE_VERSION: ${WXT_BUNDLE_VERSION} " )
219221 # cmake-format: off
220- set (WX_TOOLS_YYYY "${CURRENT_YEAR } " CACHE STRING "The current year" )
222+ set (WX_TOOLS_YYYY "${WXT_CURRENT_YEAR } " CACHE STRING "The current year" )
221223 # cmake-format: on
222224 set (wxt_entitlements "${CMAKE_SOURCE_DIR} /res/apple/macos/wxTools.entitlements" )
223225
@@ -234,6 +236,9 @@ if(APPLE)
234236 # * set(CMAKE_XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION
235237 set (CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${wxt_entitlements} " )
236238 # cmake-format: on
239+ else ()
240+ set_target_properties (wxTools PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS
241+ "${wxt_entitlements} " )
237242 endif ()
238243
239244 # cmake-format: off
@@ -259,7 +264,7 @@ if(APPLE)
259264 # * MACOSX_BUNDLE_LONG_VERSION_STRING "${WXT_VERSION}"
260265 # * MACOSX_BUNDLE_SHORT_VERSION_STRING "${WXT_SHORT_VERSION}"
261266 # * MACOSX_BUNDLE_INFO_STRING "${CMAKE_PROJECT_DESCRIPTION}"
262- # * MACOSX_BUNDLE_COPYRIGHT "Copyright (C) 2024-${CURRENT_YEAR } x-tools@outlook.com. All rights reserved."
267+ # * MACOSX_BUNDLE_COPYRIGHT "Copyright (C) 2024-${WXT_CURRENT_YEAR } x-tools@outlook.com. All rights reserved."
263268 # * )
264269 # cmake-format: on
265270
@@ -273,15 +278,25 @@ if(APPLE)
273278 # cmake-format: on
274279 add_dependencies (wxTools_pkg_dmg wxTools )
275280
276- if (FALSE )
277- # Create pak file
281+ if (TRUE )
282+
283+ if (EXISTS "${CMAKE_SOURCE_DIR} /private.cmake" )
284+ include (${CMAKE_SOURCE_DIR} /private.cmake )
285+ message (STATUS "[wxTools-apple] WX_TOOLS_DEV_ID_APP: ${WX_TOOLS_DEV_ID_APP} " )
286+ message (STATUS "[wxTools-apple] WX_TOOLS_DEV_ID_INSTALLER: ${WX_TOOLS_DEV_ID_INSTALLER} " )
287+ endif ()
288+
289+ if (NOT DEFINED WX_TOOLS_DEV_ID_APP OR NOT DEFINED WX_TOOLS_DEV_ID_INSTALLER)
290+ # cmake-format: off
291+ set (WX_TOOLS_DEV_ID_APP "xxx_id_developer" CACHE STRING "The app's developer ID" )
292+ set (WX_TOOLS_DEV_ID_INSTALLER "xxx_id_installer" CACHE STRING "The installer's developer ID" )
293+ # cmake-format: on
294+ endif ()
295+
278296 include (cmake/MacOS/MacOS.cmake )
279- # cmake-format: off
280- set (WXTOOLS_DEV_ID_APP "xxx_id_developer" CACHE STRING "The app's developer ID" )
281- set (WXTOOLS_DEV_ID_INSTALLER "xxx_id_installer" CACHE STRING "The installer's developer ID" )
282- wxt_make_pkg (wxTools ${WXTOOLS_DEV_ID_APP} ${WXTOOLS_DEV_ID_INSTALLER} )
283- wxt_make_dmg (wxTools ${WXTOOLS_DEV_ID_APP} ${WXTOOLS_DEV_ID_INSTALLER} )
284- # cmake-format: on
297+ wxt_make_pkg (wxTools ${WX_TOOLS_DEV_ID_APP} ${WX_TOOLS_DEV_ID_INSTALLER} )
298+ wxt_make_dmg (wxTools ${WX_TOOLS_DEV_ID_APP} ${WX_TOOLS_DEV_ID_INSTALLER} )
299+
285300 endif ()
286301endif ()
287302
0 commit comments