rename files

This commit is contained in:
ohyzha
2024-12-21 16:14:33 +02:00
parent f66ae66234
commit 9d6756bbad
6 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "ExeAppendedZipLoader.hpp"
#include "ExeAppendedZipResourceLoader.hpp"
#include "Base/Logger.hpp"
#include "IO/Archive/ArchiveReader.hpp"
#include <filesystem>
@@ -12,12 +12,12 @@
namespace OpenVulkano
{
std::string ExeAppendedZipLoader::GetResourcePath(const std::string& resourceName)
std::string ExeAppendedZipResourceLoader::GetResourcePath(const std::string& resourceName)
{
return GetCurrentExecutablePath();
}
Array<char> ExeAppendedZipLoader::GetResource(const std::string& exeName)
Array<char> ExeAppendedZipResourceLoader::GetResource(const std::string& exeName)
{
std::string ext = std::filesystem::path(exeName).extension().string();
if (ext != ".exe" && ext != "")
@@ -41,7 +41,7 @@ namespace OpenVulkano
return zipData;
}
std::vector<std::pair<FileDescription, Array<char>>> ExeAppendedZipLoader::GetZipArchiveFiles(const std::string& exePath)
std::vector<std::pair<FileDescription, Array<char>>> ExeAppendedZipResourceLoader::GetZipArchiveFiles(const std::string& exePath)
{
Array<char> zipData = GetResource(exePath);
ArchiveReader reader(zipData.Data(), zipData.Size(), nullptr, ArchiveType::ZIP);

View File

@@ -13,7 +13,7 @@
namespace OpenVulkano
{
class ExeAppendedZipLoader : public ResourceLoader
class ExeAppendedZipResourceLoader : public ResourceLoader
{
public:
std::string GetResourcePath(const std::string& resourceName) override;

View File

@@ -4,17 +4,17 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "ExeAppendedZipLoaderWindows.hpp"
#include "ExeAppendedZipResourceLoaderWindows.hpp"
#include <Windows.h>
namespace OpenVulkano
{
namespace
{
void* HANDLE = ResourceLoader::RegisterResourceLoader(std::make_unique<ExeAppendedZipLoaderWindows>());
void* HANDLE = ResourceLoader::RegisterResourceLoader(std::make_unique<ExeAppendedZipResourceLoaderWindows>());
}
std::string OpenVulkano::ExeAppendedZipLoaderWindows::GetCurrentExecutablePath() const
std::string OpenVulkano::ExeAppendedZipResourceLoaderWindows::GetCurrentExecutablePath() const
{
CHAR nameBuf[MAX_PATH] = {};
DWORD len = GetModuleFileNameA(NULL, nameBuf, MAX_PATH);

View File

@@ -6,11 +6,11 @@
#pragma once
#include "Host/ExeAppendedZipLoader.hpp"
#include "Host/ExeAppendedZipResourceLoader.hpp"
namespace OpenVulkano
{
class ExeAppendedZipLoaderWindows final : public ExeAppendedZipLoader
class ExeAppendedZipResourceLoaderWindows final : public ExeAppendedZipResourceLoader
{
public:
std::string GetCurrentExecutablePath() const override;