Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Linux build #2505

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,8 @@ else()
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
# TODO: move them to data dir
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_BINDIR}/translations" OPTIONAL)
install(FILES ${VX_EXTRA_RESOURCE_FILES_RCC} DESTINATION ${CMAKE_INSTALL_DATADIR})
install(FILES ${VX_QM_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/translations" OPTIONAL)

set(desktop.path applications)
set(desktop.files data/core/vnote.desktop)
Expand All @@ -166,8 +165,8 @@ else()
set(iconsvg.files data/core/logo/vnote.svg)
foreach(item IN ITEMS desktop icon16 icon32 icon48 icon64 icon128 icon256 iconsvg)
install(FILES ${CMAKE_CURRENT_LIST_DIR}/${${item}.files}
DESTINATION share/${${item}.path}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
DESTINATION ${CMAKE_INSTALL_DATADIR}/${${item}.path}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
endforeach()
endif()

Expand Down
7 changes: 6 additions & 1 deletion src/core/configmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,15 @@ void ConfigMgr::initAppPrefixPath()
#if defined(Q_OS_LINUX)
QDir localBinDir(app_dir_path);
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;
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)
QDir localBinDir(app_dir_path);
if (localBinDir.exists("../Resources")) {
Expand Down
Loading