Skip to content

Commit

Permalink
CMake: Install translations in PACKAGE MODE
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenderus authored and F0bes committed Sep 10, 2024
1 parent 11caae4 commit 4963ea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcsx2-qt/Translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ void QtHost::InstallTranslator(QWidget* dialog_parent)
s_current_collator = QCollator(s_current_locale);

// Install the base qt translation first.
#ifdef __APPLE__
#if defined(__APPLE__)
const QString base_dir = QStringLiteral("%1/../Resources/translations").arg(qApp->applicationDirPath());
#elif defined(PCSX2_APP_DATADIR)
const QString base_dir = QStringLiteral("%1/%2/translations").arg(qApp->applicationDirPath()).arg(PCSX2_APP_DATADIR);
#else
const QString base_dir = QStringLiteral("%1/translations").arg(qApp->applicationDirPath());
#endif
Expand Down
1 change: 1 addition & 0 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,7 @@ function(setup_main_executable target)
if (PACKAGE_MODE)
install(TARGETS pcsx2-qt DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/resources DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
install(DIRECTORY ${CMAKE_BINARY_DIR}/bin/translations DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/PCSX2)
else()
install(TARGETS pcsx2-qt DESTINATION ${CMAKE_SOURCE_DIR}/bin)
endif()
Expand Down

0 comments on commit 4963ea9

Please sign in to comment.