Skip to content

Commit

Permalink
Temporary workaround for developing NanaZip.Codecs.dll for solving is…
Browse files Browse the repository at this point in the history
…sue mentioned in #379. (Thanks to dinhngtu.)
  • Loading branch information
MouriNaruto committed Feb 9, 2024
1 parent 2db50de commit 62278f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// LoadCodecs.cpp
// LoadCodecs.cpp

/*
EXTERNAL_CODECS
Expand Down Expand Up @@ -781,6 +781,11 @@ HRESULT CCodecs::Load()
#ifdef EXTERNAL_CODECS
const FString baseFolder = GetBaseFolderPrefixFromRegistry();
{
// ******** NanaZip.Codecs.dll development workaround start ********
// For workaround https://github.com/M2Team/NanaZip/pull/379
if (!::LoadLibraryW(baseFolder + L"NanaZip.Codecs.dll"))
MainDll_ErrorPath = L"NanaZip.Codecs.dll";
// ******** NanaZip.Codecs.dll development workaround end ********
bool loadedOK;
RINOK(LoadDll(baseFolder + kMainDll, false, &loadedOK));
if (!loadedOK)
Expand Down
7 changes: 6 additions & 1 deletion NanaZip.UI.Modern/SevenZip/CPP/7zip/UI/Common/LoadCodecs.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// LoadCodecs.cpp
// LoadCodecs.cpp

/*
EXTERNAL_CODECS
Expand Down Expand Up @@ -781,6 +781,11 @@ HRESULT CCodecs::Load()
#ifdef EXTERNAL_CODECS
const FString baseFolder = GetBaseFolderPrefixFromRegistry();
{
// ******** NanaZip.Codecs.dll development workaround start ********
// For workaround https://github.com/M2Team/NanaZip/pull/379
if (!::LoadLibraryW(baseFolder + L"NanaZip.Codecs.dll"))
MainDll_ErrorPath = L"NanaZip.Codecs.dll";
// ******** NanaZip.Codecs.dll development workaround end ********
bool loadedOK;
RINOK(LoadDll(baseFolder + kMainDll, false, &loadedOK));
if (!loadedOK)
Expand Down

0 comments on commit 62278f2

Please sign in to comment.