implemented recommended changes -reverted .icns file instellation
Signed-off-by: Richard Voigtmann <richard.v.voigtmann@gmail.com>
This commit is contained in:
@@ -414,15 +414,16 @@ if(UNIX AND APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add the icon
|
# Add the icon
|
||||||
|
install(FILES ${Launcher_Branding_ICNS} DESTINATION ${RESOURCES_DEST_DIR} RENAME ${Launcher_Name}.icns)
|
||||||
|
|
||||||
find_program(ACTOOL_EXE actool DOC "Path to the apple asset catalog compiler")
|
find_program(ACTOOL_EXE actool DOC "Path to the apple asset catalog compiler")
|
||||||
if(ACTOOL_EXE)
|
if(ACTOOL_EXE)
|
||||||
set(ASSETS_OUT_DIR "${CMAKE_BINARY_DIR}/program_info")
|
set(ASSETS_OUT_DIR "${CMAKE_BINARY_DIR}/program_info")
|
||||||
set(GENERATED_ASSETS_CAR "${ASSETS_OUT_DIR}/Assets.car")
|
set(GENERATED_ASSETS_CAR "${ASSETS_OUT_DIR}/Assets.car")
|
||||||
set(GENERATED_LAUNCHER_ICNS "${ASSETS_OUT_DIR}/${Launcher_Name}.icns")
|
set(ICON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_Branding_MAC_ICON}")
|
||||||
set(ICON_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_Branding_macos_ICON}")
|
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${GENERATED_ASSETS_CAR}" "${GENERATED_LAUNCHER_ICNS}"
|
OUTPUT "${GENERATED_ASSETS_CAR}"
|
||||||
COMMAND ${ACTOOL_EXE} "${ICON_SOURCE}"
|
COMMAND ${ACTOOL_EXE} "${ICON_SOURCE}"
|
||||||
--compile "${ASSETS_OUT_DIR}"
|
--compile "${ASSETS_OUT_DIR}"
|
||||||
--output-partial-info-plist /dev/null
|
--output-partial-info-plist /dev/null
|
||||||
@@ -430,18 +431,14 @@ if(UNIX AND APPLE)
|
|||||||
--include-all-app-icons
|
--include-all-app-icons
|
||||||
--enable-on-demand-resources NO
|
--enable-on-demand-resources NO
|
||||||
--target-device mac
|
--target-device mac
|
||||||
--minimum-deployment-target 10.13
|
--minimum-deployment-target ${CMAKE_OSX_DEPLOYMENT_TARGET}
|
||||||
--platform macosx
|
--platform macosx
|
||||||
> /dev/null
|
|
||||||
DEPENDS "${ICON_SOURCE}"
|
DEPENDS "${ICON_SOURCE}"
|
||||||
COMMENT "Compiling asset catalog (${ICON_SOURCE})"
|
COMMENT "Compiling asset catalog (${ICON_SOURCE})"
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_target(compile_assets ALL DEPENDS "${GENERATED_ASSETS_CAR}" "${GENERATED_LAUNCHER_ICNS}")
|
add_custom_target(compile_assets ALL DEPENDS "${GENERATED_ASSETS_CAR}")
|
||||||
install(
|
install(FILES "${GENERATED_ASSETS_CAR}" DESTINATION "${RESOURCES_DEST_DIR}")
|
||||||
FILES "${GENERATED_ASSETS_CAR}" "${GENERATED_LAUNCHER_ICNS}"
|
|
||||||
DESTINATION "${RESOURCES_DEST_DIR}"
|
|
||||||
)
|
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "actool not found. Cannot compile macOS app icons.\n"
|
message(FATAL_ERROR "actool not found. Cannot compile macOS app icons.\n"
|
||||||
"Install Xcode command line tools: 'xcode-select --install'")
|
"Install Xcode command line tools: 'xcode-select --install'")
|
||||||
|
|||||||
@@ -30,7 +30,8 @@ set(Launcher_Desktop "program_info/${Launcher_AppID}.desktop" PARENT_SCOPE)
|
|||||||
set(Launcher_mrpack_MIMEInfo "program_info/modrinth-mrpack-mime.xml" PARENT_SCOPE)
|
set(Launcher_mrpack_MIMEInfo "program_info/modrinth-mrpack-mime.xml" PARENT_SCOPE)
|
||||||
set(Launcher_MetaInfo "program_info/${Launcher_AppID}.metainfo.xml" PARENT_SCOPE)
|
set(Launcher_MetaInfo "program_info/${Launcher_AppID}.metainfo.xml" PARENT_SCOPE)
|
||||||
set(Launcher_SVG "program_info/${Launcher_SVGFileName}" PARENT_SCOPE)
|
set(Launcher_SVG "program_info/${Launcher_SVGFileName}" PARENT_SCOPE)
|
||||||
set(Launcher_Branding_macos_ICON "program_info/PrismLauncher.icon" PARENT_SCOPE)
|
set(Launcher_Branding_ICNS "program_info/prismlauncher.icns" PARENT_SCOPE)
|
||||||
|
set(Launcher_Branding_MAC_ICON "program_info/PrismLauncher.icon" PARENT_SCOPE)
|
||||||
set(Launcher_Branding_ICO "program_info/prismlauncher.ico")
|
set(Launcher_Branding_ICO "program_info/prismlauncher.ico")
|
||||||
set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
|
set(Launcher_Branding_ICO "${Launcher_Branding_ICO}" PARENT_SCOPE)
|
||||||
set(Launcher_Branding_WindowsRC "program_info/prismlauncher.rc" PARENT_SCOPE)
|
set(Launcher_Branding_WindowsRC "program_info/prismlauncher.rc" PARENT_SCOPE)
|
||||||
|
|||||||
Reference in New Issue
Block a user