Skip to content

Commit

Permalink
Install translations in PACKAGE MODE
Browse files Browse the repository at this point in the history
  • Loading branch information
Nenderus committed Sep 8, 2024
1 parent 7d6f740 commit 14cb56d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pcsx2-qt/Translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ void QtHost::InstallTranslator(QWidget* dialog_parent)
#ifdef __APPLE__
const QString base_dir = QStringLiteral("%1/../Resources/translations").arg(qApp->applicationDirPath());
#else
const QString base_dir = QStringLiteral("%1/translations").arg(qApp->applicationDirPath());
#ifdef 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
#endif

// Qt base uses underscores instead of hyphens.
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 14cb56d

Please sign in to comment.