mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
fix Linux build (#2505)
This commit is contained in:
parent
898c82ec8f
commit
f461c706d1
@ -144,9 +144,8 @@ else()
|
|||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
# TODO: move them to data dir
|
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_DATADIR})
|
||||||
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/translations" OPTIONAL)
|
||||||
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/translations" OPTIONAL)
|
|
||||||
|
|
||||||
set(desktop.path applications)
|
set(desktop.path applications)
|
||||||
set(desktop.files data/core/vnote.desktop)
|
set(desktop.files data/core/vnote.desktop)
|
||||||
@ -166,7 +165,7 @@ else()
|
|||||||
set(iconsvg.files data/core/logo/vnote.svg)
|
set(iconsvg.files data/core/logo/vnote.svg)
|
||||||
foreach(item IN ITEMS desktop icon16 icon32 icon48 icon64 icon128 icon256 iconsvg)
|
foreach(item IN ITEMS desktop icon16 icon32 icon48 icon64 icon128 icon256 iconsvg)
|
||||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/${${item}.files}
|
install(FILES ${CMAKE_CURRENT_LIST_DIR}/${${item}.files}
|
||||||
DESTINATION share/${${item}.path}
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/${${item}.path}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
@ -581,10 +581,15 @@ void ConfigMgr::initAppPrefixPath()
|
|||||||
#if defined(Q_OS_LINUX)
|
#if defined(Q_OS_LINUX)
|
||||||
QDir localBinDir(app_dir_path);
|
QDir localBinDir(app_dir_path);
|
||||||
if (localBinDir.exists("../local/bin/vnote")) {
|
if (localBinDir.exists("../local/bin/vnote")) {
|
||||||
auto app_dir_path2 = localBinDir.cleanPath(localBinDir.filePath("../local/bin"));
|
auto app_dir_path2 = localBinDir.cleanPath(localBinDir.filePath("../local/share"));
|
||||||
qInfo() << "app prefix path: " << app_dir_path2;
|
qInfo() << "app prefix path: " << app_dir_path2;
|
||||||
potential_dirs << app_dir_path2;
|
potential_dirs << app_dir_path2;
|
||||||
}
|
}
|
||||||
|
if (localBinDir.exists("../share")) {
|
||||||
|
auto app_dir_path3 = localBinDir.cleanPath(localBinDir.filePath("../share"));
|
||||||
|
qInfo() << "app prefix path: " << app_dir_path3;
|
||||||
|
potential_dirs << app_dir_path3;
|
||||||
|
}
|
||||||
#elif defined(Q_OS_MACOS)
|
#elif defined(Q_OS_MACOS)
|
||||||
QDir localBinDir(app_dir_path);
|
QDir localBinDir(app_dir_path);
|
||||||
if (localBinDir.exists("../Resources")) {
|
if (localBinDir.exists("../Resources")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user