mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Also support X11 icon for minetest copies installed via make install (#4407)
Fixes #4323.
This commit is contained in:
parent
6590140260
commit
f092dac979
@ -175,6 +175,9 @@ if(UNIX AND NOT APPLE)
|
|||||||
install(FILES "misc/minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
|
install(FILES "misc/minetest.desktop" DESTINATION "${XDG_APPS_DIR}")
|
||||||
install(FILES "misc/minetest.appdata.xml" DESTINATION "${APPDATADIR}")
|
install(FILES "misc/minetest.appdata.xml" DESTINATION "${APPDATADIR}")
|
||||||
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
install(FILES "misc/minetest.svg" DESTINATION "${ICONDIR}/hicolor/scalable/apps")
|
||||||
|
install(FILES "misc/minetest-xorg-icon-128.png"
|
||||||
|
DESTINATION "${ICONDIR}/hicolor/128x128/apps"
|
||||||
|
RENAME "minetest.png")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
@ -114,8 +114,7 @@ bool ClientLauncher::run(GameParams &game_params, const Settings &cmd_args)
|
|||||||
|
|
||||||
porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME_C);
|
porting::setXorgClassHint(video_driver->getExposedVideoData(), PROJECT_NAME_C);
|
||||||
|
|
||||||
porting::setXorgWindowIcon(device,
|
porting::setXorgWindowIcon(device);
|
||||||
porting::path_share + "/misc/minetest-xorg-icon-128.png");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This changes the minimum allowed number of vertices in a VBO.
|
This changes the minimum allowed number of vertices in a VBO.
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#define STATIC_SHAREDIR "@SHAREDIR@"
|
#define STATIC_SHAREDIR "@SHAREDIR@"
|
||||||
#define STATIC_LOCALEDIR "@LOCALEDIR@"
|
#define STATIC_LOCALEDIR "@LOCALEDIR@"
|
||||||
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||||
|
#define ICON_DIR "@ICONDIR@"
|
||||||
#cmakedefine01 RUN_IN_PLACE
|
#cmakedefine01 RUN_IN_PLACE
|
||||||
#cmakedefine01 USE_GETTEXT
|
#cmakedefine01 USE_GETTEXT
|
||||||
#cmakedefine01 USE_CURL
|
#cmakedefine01 USE_CURL
|
||||||
|
@ -611,7 +611,24 @@ void setXorgClassHint(const video::SExposedVideoData &video_data,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool setXorgWindowIcon(IrrlichtDevice *device,
|
bool setXorgWindowIcon(IrrlichtDevice *device)
|
||||||
|
{
|
||||||
|
#if RUN_IN_PLACE
|
||||||
|
return setXorgWindowIconFromPath(device,
|
||||||
|
path_share + "/misc/" PROJECT_NAME "-xorg-icon-128.png");
|
||||||
|
#else
|
||||||
|
// We have semi-support for reading in-place data if we are
|
||||||
|
// compiled with RUN_IN_PLACE. Don't break with this and
|
||||||
|
// also try the path_share location.
|
||||||
|
return
|
||||||
|
setXorgWindowIconFromPath(device,
|
||||||
|
ICON_DIR "/hicolor/128x128/apps/" PROJECT_NAME ".png") ||
|
||||||
|
setXorgWindowIconFromPath(device,
|
||||||
|
path_share + "/misc/" PROJECT_NAME "-xorg-icon-128.png");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool setXorgWindowIconFromPath(IrrlichtDevice *device,
|
||||||
const std::string &icon_file)
|
const std::string &icon_file)
|
||||||
{
|
{
|
||||||
#ifdef XORG_USED
|
#ifdef XORG_USED
|
||||||
|
@ -367,7 +367,9 @@ inline const char *getPlatformName()
|
|||||||
void setXorgClassHint(const video::SExposedVideoData &video_data,
|
void setXorgClassHint(const video::SExposedVideoData &video_data,
|
||||||
const std::string &name);
|
const std::string &name);
|
||||||
|
|
||||||
bool setXorgWindowIcon(IrrlichtDevice *device,
|
bool setXorgWindowIcon(IrrlichtDevice *device);
|
||||||
|
|
||||||
|
bool setXorgWindowIconFromPath(IrrlichtDevice *device,
|
||||||
const std::string &icon_file);
|
const std::string &icon_file);
|
||||||
|
|
||||||
// This only needs to be called at the start of execution, since all future
|
// This only needs to be called at the start of execution, since all future
|
||||||
|
Loading…
Reference in New Issue
Block a user