Add an icon and executable information to the colobot.exe when build in MXE

dev-ui
Didier 'OdyX' Raboud 2013-10-29 14:30:58 +01:00
parent 70af33e45d
commit ee90f02bc4
5 changed files with 108 additions and 74 deletions

View File

@ -321,12 +321,8 @@ add_subdirectory(src)
add_subdirectory(po)
if(DESKTOP)
if(PLATFORM_WINDOWS)
message("Desktop files ignored on Windows")
else()
add_subdirectory(desktop)
endif()
endif()
##

View File

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 2.8)
if(NOT PLATFORM_WINDOWS)
# Install Desktop Entry file
set(COLOBOT_DESKTOP_FILE colobot.desktop)
add_custom_command(
@ -72,6 +73,11 @@ if(POD2MAN)
endif()
else() # if(NOT PLATFORM_WINDOWS)
set(COLOBOT_VERSION_4COMMAS "${COLOBOT_VERSION_MAJOR},${COLOBOT_VERSION_MINOR},${COLOBOT_VERSION_REVISION},0")
configure_file(colobot.rc.cmake ${CMAKE_CURRENT_BINARY_DIR}/colobot.rc)
endif()
# Translate translatable material
find_program(PO4A po4a)

BIN
desktop/colobot.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

25
desktop/colobot.rc.cmake Normal file
View File

@ -0,0 +1,25 @@
id ICON "@CMAKE_CURRENT_SOURCE_DIR@/colobot.ico"
1 VERSIONINFO
FILEVERSION @COLOBOT_VERSION_4COMMAS@
PRODUCTVERSION @COLOBOT_VERSION_4COMMAS@
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "OriginalFilename", "colobot.exe\0"
VALUE "InternalName", "colobot\0"
VALUE "FileDescription", "Colobot - Colonize with Bots\0"
VALUE "ProductName", "Colobot\0"
VALUE "CompanyName", "Polish Portal of Colobot\0"
VALUE "LegalCopyright", "Copyright (c) 2012-2013 Polish Portal of Colobot\0"
VALUE "FileVersion", "@COLOBOT_VERSION_FULL@\0"
VALUE "ProductVersion", "@COLOBOT_VERSION_FULL@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View File

@ -50,6 +50,12 @@ if(OPENAL_SOUND)
)
endif()
set(RES_FILES "")
if(PLATFORM_WINDOWS)
set(RES_FILES "../desktop/colobot.rc")
endif()
# Platform-dependent implementation of system.h
if(PLATFORM_WINDOWS)
set(SYSTEM_CPP_MODULE "system_windows.cpp")
@ -182,6 +188,7 @@ ui/studio.cpp
ui/target.cpp
ui/window.cpp
${OPENAL_SRC}
${RES_FILES}
)