1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Merge pull request #1032 from kambala-decapitator/ios-flat-libs-dir

switch to flat libs directory structure
This commit is contained in:
Andrii Danylchenko 2022-10-01 17:57:33 +03:00 committed by GitHub
commit b2ea2eaba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View File

@ -402,8 +402,14 @@ else()
add_definitions(-DM_LIB_DIR="${CMAKE_INSTALL_PREFIX}/${LIB_DIR}")
endif()
set(AI_LIB_DIR "${LIB_DIR}/AI")
set(SCRIPTING_LIB_DIR "${LIB_DIR}/scripting")
# iOS has flat libs directory structure
if(APPLE_IOS)
set(AI_LIB_DIR "${LIB_DIR}")
set(SCRIPTING_LIB_DIR "${LIB_DIR}")
else()
set(AI_LIB_DIR "${LIB_DIR}/AI")
set(SCRIPTING_LIB_DIR "${LIB_DIR}/scripting")
endif()
#######################################
# Add subdirectories #

View File

@ -92,7 +92,8 @@ MainWindow::MainWindow(QWidget * parent)
connect(ui->tabSelectList, &QListWidget::currentRowChanged, [this](int i) {
#ifdef Q_OS_IOS
qApp->focusWidget()->clearFocus();
if(auto widget = qApp->focusWidget())
widget->clearFocus();
#endif
ui->tabListWidget->setCurrentIndex(i);
});

View File

@ -391,6 +391,7 @@ public:
std::vector<bfs::path> dataPaths() const override;
bfs::path libraryPath() const override;
bfs::path fullLibraryPath(const std::string & desiredFolder, const std::string & baseLibName) const override;
bfs::path binaryPath() const override;
};
@ -411,6 +412,12 @@ std::vector<bfs::path> VCMIDirsIOS::dataPaths() const
return paths;
}
bfs::path VCMIDirsIOS::fullLibraryPath(const std::string & desiredFolder, const std::string & baseLibName) const
{
// iOS has flat libs directory structure
return libraryPath() / libraryName(baseLibName);
}
bfs::path VCMIDirsIOS::libraryPath() const { return {iOS_utils::frameworksPath()}; }
bfs::path VCMIDirsIOS::binaryPath() const { return {iOS_utils::bundlePath()}; }
#elif defined(VCMI_MAC)