mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:37:27 +02:00
add icon to interface exec, icons in start menu
This commit is contained in:
parent
6f7663fbae
commit
f8f0b99a46
4 changed files with 27 additions and 12 deletions
|
@ -20,7 +20,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||||
set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe")
|
set(INSTALLER_NAME "interface-win64-${BUILD_SEQ}.exe")
|
||||||
set(INTERFACE_BUNDLE_NAME "High Fidelity")
|
set(INTERFACE_BUNDLE_NAME "High Fidelity")
|
||||||
set(INTERFACE_ICON "interface.ico")
|
set(INTERFACE_ICON_PREFIX "interface")
|
||||||
set(CONSOLE_ICON "console.ico")
|
set(CONSOLE_ICON "console.ico")
|
||||||
elseif (DEFINED ENV{ghprbPullId})
|
elseif (DEFINED ENV{ghprbPullId})
|
||||||
set(DEPLOY_PACKAGE TRUE)
|
set(DEPLOY_PACKAGE TRUE)
|
||||||
|
@ -30,7 +30,7 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}\\${BUILD_SEQ}")
|
||||||
set(INSTALLER_NAME "pr-interface-win64-${BUILD_SEQ}.exe")
|
set(INSTALLER_NAME "pr-interface-win64-${BUILD_SEQ}.exe")
|
||||||
set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}")
|
set(INTERFACE_BUNDLE_NAME "High Fidelity ${BUILD_SEQ}")
|
||||||
set(INTERFACE_ICON "interface-beta.ico")
|
set(INTERFACE_ICON_PREFIX "interface-beta")
|
||||||
set(CONSOLE_ICON "console-beta.ico")
|
set(CONSOLE_ICON "console-beta.ico")
|
||||||
else ()
|
else ()
|
||||||
set(BUILD_SEQ "dev")
|
set(BUILD_SEQ "dev")
|
||||||
|
@ -39,12 +39,13 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
set(INSTALLER_DIRECTORY "${INSTALLER_COMPANY}")
|
||||||
set(INSTALLER_NAME "dev-interface-win64.exe")
|
set(INSTALLER_NAME "dev-interface-win64.exe")
|
||||||
set(INTERFACE_BUNDLE_NAME "Interface")
|
set(INTERFACE_BUNDLE_NAME "Interface")
|
||||||
set(INTERFACE_ICON "interface-beta.ico")
|
set(INTERFACE_ICON_PREFIX "interface-beta")
|
||||||
set(CONSOLE_ICON "console-beta.ico")
|
set(CONSOLE_ICON "console-beta.ico")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(INTERFACE_EXEC_NAME "interface")
|
set(INTERFACE_EXEC_NAME "interface")
|
||||||
|
set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_NAME}.ico")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
|
@ -54,6 +55,8 @@ macro(SET_PACKAGING_PARAMETERS)
|
||||||
|
|
||||||
set(INTERFACE_INSTALL_DIR ".")
|
set(INTERFACE_INSTALL_DIR ".")
|
||||||
set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_BUNDLE_NAME}.app")
|
set(INTERFACE_INSTALL_APP_PATH "${INTERFACE_BUNDLE_NAME}.app")
|
||||||
|
|
||||||
|
set(INTERFACE_ICON_FILENAME "${INTERFACE_ICON_NAME}.icns")
|
||||||
else ()
|
else ()
|
||||||
set(CONSOLE_INSTALL_DIR ".")
|
set(CONSOLE_INSTALL_DIR ".")
|
||||||
set(INTERFACE_INSTALL_DIR ".")
|
set(INTERFACE_INSTALL_DIR ".")
|
||||||
|
|
1
cmake/templates/Icon.rc.in
Normal file
1
cmake/templates/Icon.rc.in
Normal file
|
@ -0,0 +1 @@
|
||||||
|
IDI_ICON1 ICON DISCARDABLE "@ICON_FILENAME@"
|
|
@ -5,8 +5,10 @@
|
||||||
|
|
||||||
!define INTERFACE_SHORTCUT_NAME "High Fidelity"
|
!define INTERFACE_SHORTCUT_NAME "High Fidelity"
|
||||||
!define INTERFACE_EXEC_NAME "interface.exe"
|
!define INTERFACE_EXEC_NAME "interface.exe"
|
||||||
|
!define INTERFACE_ICON_NAME "interface.ico"
|
||||||
!define CONSOLE_SHORTCUT_NAME "Server Console"
|
!define CONSOLE_SHORTCUT_NAME "Server Console"
|
||||||
!define CONSOLE_EXEC_NAME "server-console.exe"
|
!define CONSOLE_EXEC_NAME "server-console.exe"
|
||||||
|
!define CONSOLE_ICON_INDEX "1"
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
; You must define these values
|
; You must define these values
|
||||||
|
@ -706,12 +708,16 @@ Section "-Core installation"
|
||||||
|
|
||||||
; Conditional handling for interface shortcut
|
; Conditional handling for interface shortcut
|
||||||
${If} ${SectionIsSelected} ${client}
|
${If} ${SectionIsSelected} ${client}
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${INTERFACE_SHORTCUT_NAME}.lnk" "$INSTDIR\${INTERFACE_EXEC_NAME}"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${INTERFACE_SHORTCUT_NAME}.lnk" \
|
||||||
|
"$INSTDIR\${INTERFACE_EXEC_NAME}" \
|
||||||
|
"$INSTDIR\${INTERFACE_EXEC_NAME}" ${INTERFACE_ICON_INDEX}
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
; Conditional handling for server console shortcut
|
; Conditional handling for server console shortcut
|
||||||
${If} ${SectionIsSelected} ${server}
|
${If} ${SectionIsSelected} ${server}
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${CONSOLE_SHORTCUT_NAME}.lnk" "$INSTDIR\${CONSOLE_EXEC_NAME}"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\${CONSOLE_SHORTCUT_NAME}.lnk" \
|
||||||
|
"$INSTDIR\${CONSOLE_EXEC_NAME}" \
|
||||||
|
"$INSTDIR\${CONSOLE_EXEC_NAME}" ${CONSOLE_ICON_INDEX}\
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
|
|
|
@ -67,22 +67,19 @@ if (APPLE)
|
||||||
|
|
||||||
if (PRODUCTION_BUILD)
|
if (PRODUCTION_BUILD)
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface)
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface)
|
||||||
set(ICON_FILENAME "interface.icns")
|
|
||||||
else ()
|
else ()
|
||||||
if (DEV_BUILD)
|
if (DEV_BUILD)
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-dev)
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-dev)
|
||||||
elseif (PR_BUILD)
|
elseif (PR_BUILD)
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-pr)
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER com.highfidelity.interface-pr)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(ICON_FILENAME "interface-beta.icns")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# set how the icon shows up in the Info.plist file
|
# set how the icon shows up in the Info.plist file
|
||||||
SET(MACOSX_BUNDLE_ICON_FILE "${ICON_FILENAME}")
|
set(MACOSX_BUNDLE_ICON_FILE "${INTERfACE_ICON_FILENAME}")
|
||||||
|
|
||||||
# set where in the bundle to put the resources file
|
# set where in the bundle to put the resources file
|
||||||
SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/icon/${ICON_FILENAME} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
|
|
||||||
set(DISCOVERED_RESOURCES "")
|
set(DISCOVERED_RESOURCES "")
|
||||||
|
|
||||||
|
@ -92,7 +89,7 @@ if (APPLE)
|
||||||
# append the discovered resources to our list of interface sources
|
# append the discovered resources to our list of interface sources
|
||||||
list(APPEND INTERFACE_SRCS ${DISCOVERED_RESOURCES})
|
list(APPEND INTERFACE_SRCS ${DISCOVERED_RESOURCES})
|
||||||
|
|
||||||
set(INTERFACE_SRCS ${INTERFACE_SRCS} "${CMAKE_CURRENT_SOURCE_DIR}/icon/${ICON_FILENAME}")
|
set(INTERFACE_SRCS ${INTERFACE_SRCS} "${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# create the executable, make it a bundle on OS X
|
# create the executable, make it a bundle on OS X
|
||||||
|
@ -102,7 +99,15 @@ if (APPLE)
|
||||||
# make sure the output name for the .app bundle is correct
|
# make sure the output name for the .app bundle is correct
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${INTERFACE_BUNDLE_NAME})
|
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${INTERFACE_BUNDLE_NAME})
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_executable(${TARGET_NAME} WIN32 ${INTERFACE_SRCS} ${QM})
|
# configure an rc file for the chosen icon
|
||||||
|
set(CONFIGURE_ICON_FILENAME ${INTERFACE_ICON_FILENAME})
|
||||||
|
set(CONFIGURE_ICON_RC_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Icon.rc")
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/templates/Icon.rc.in" ${CONFIGURE_ICON_RC_OUTPUT})
|
||||||
|
|
||||||
|
# add an executable that also has the icon itself and the configured rc file as resources
|
||||||
|
add_executable(${TARGET_NAME} WIN32
|
||||||
|
${INTERFACE_SRCS} ${QM} ${CONFIGURE_ICON_RC_OUTPUT} "${CMAKE_CURRENT_SOURCE_DIR}/icon/${INTERFACE_ICON_FILENAME}"
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
|
add_executable(${TARGET_NAME} ${INTERFACE_SRCS} ${QM})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue