diff --git a/.github/workflows/build-emscripten.yml b/.github/workflows/build-emscripten.yml index d10ef04162..7ed8c56a4a 100644 --- a/.github/workflows/build-emscripten.yml +++ b/.github/workflows/build-emscripten.yml @@ -44,7 +44,7 @@ jobs: uses: DiligentGraphics/github-action/configure-cmake@v1 with: build-type: ${{ matrix.build_type }} - cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON" + cmake-args: "-DDILIGENT_BUILD_CORE_TESTS=ON" - name: Build if: success() diff --git a/Platforms/Emscripten/interface/EmscriptenFileSystem.hpp b/Platforms/Emscripten/interface/EmscriptenFileSystem.hpp index 084746871a..5ee01b1df0 100644 --- a/Platforms/Emscripten/interface/EmscriptenFileSystem.hpp +++ b/Platforms/Emscripten/interface/EmscriptenFileSystem.hpp @@ -46,10 +46,16 @@ struct EmscriptenFileSystem : public BasicFileSystem static bool PathExists(const Char* strPath); static bool CreateDirectory(const Char* strPath); - static void ClearDirectory(const Char* strPath); + static void ClearDirectory(const Char* strPath, bool Recursive = false); static void DeleteFile(const Char* strPath); + static bool DeleteDirectory(const Char* strPath); + static bool IsDirectory(const Char* strPath); - static std::vector> Search(const Char* SearchPattern); + static SearchFilesResult Search(const Char* SearchPattern); + static SearchFilesResult SearchRecursive(const Char* Dir, const Char* SearchPattern); + + static std::string GetCurrentDirectory(); + static std::string GetLocalAppDataDirectory(const char* AppName = nullptr, bool Create = true); }; } // namespace Diligent diff --git a/Platforms/Emscripten/src/EmscriptenFileSystem.cpp b/Platforms/Emscripten/src/EmscriptenFileSystem.cpp index 42b2e9e36d..f319ecdd88 100644 --- a/Platforms/Emscripten/src/EmscriptenFileSystem.cpp +++ b/Platforms/Emscripten/src/EmscriptenFileSystem.cpp @@ -28,9 +28,12 @@ #include #include + #include "EmscriptenFileSystem.hpp" #include "Errors.hpp" -#include "DebugUtilities.hpp" +//#include "DebugUtilities.hpp" +#include "../../Common/interface/StringTools.hpp" +#include "../../Basic/include/SearchRecursive.inl" namespace Diligent { @@ -73,7 +76,7 @@ bool EmscriptenFileSystem::CreateDirectory(const Char* strPath) return false; } -void EmscriptenFileSystem::ClearDirectory(const Char* strPath) +void EmscriptenFileSystem::ClearDirectory(const Char* strPath, bool Recursive) { UNSUPPORTED("Not implemented"); } @@ -83,10 +86,40 @@ void EmscriptenFileSystem::DeleteFile(const Char* strPath) remove(strPath); } -std::vector> EmscriptenFileSystem::Search(const Char* SearchPattern) +bool EmscriptenFileSystem::DeleteDirectory(const Char* strPath) +{ + UNSUPPORTED("Not implemented"); + return false; +} + +bool EmscriptenFileSystem::IsDirectory(const Char* strPath) +{ + UNSUPPORTED("Not implemented"); + return false; +} + +EmscriptenFileSystem::SearchFilesResult EmscriptenFileSystem::Search(const Char* SearchPattern) +{ + UNSUPPORTED("Not implemented"); + return EmscriptenFileSystem::SearchFilesResult{}; +} + +EmscriptenFileSystem::SearchFilesResult EmscriptenFileSystem::SearchRecursive(const Char* Dir, const Char* SearchPattern) +{ + UNSUPPORTED("Not implemented"); + return EmscriptenFileSystem::SearchFilesResult{}; +} + +std::string EmscriptenFileSystem::GetCurrentDirectory() +{ + UNSUPPORTED("Not implemented"); + return std::string(); +} + +std::string EmscriptenFileSystem::GetLocalAppDataDirectory(const char* AppName, bool Create) { UNSUPPORTED("Not implemented"); - return std::vector>(); + return std::string(); } } // namespace Diligent diff --git a/Tests/DiligentCoreAPITest/CMakeLists.txt b/Tests/DiligentCoreAPITest/CMakeLists.txt index 6976a97bbe..c40a3c489e 100644 --- a/Tests/DiligentCoreAPITest/CMakeLists.txt +++ b/Tests/DiligentCoreAPITest/CMakeLists.txt @@ -27,6 +27,8 @@ endif() if(NOT ARCHIVER_SUPPORTED) list(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/ArchiveTest.cpp) + list(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/GenerateArchiveDotNetTest.cpp) + list(REMOVE_ITEM SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/RenderStateCacheTest.cpp) endif() if(D3D11_SUPPORTED)