mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 11:14:58 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
34
CPP/7zip/Archive/Common/CodecsPath.cpp
Executable file
34
CPP/7zip/Archive/Common/CodecsPath.cpp
Executable file
@@ -0,0 +1,34 @@
|
||||
// CodecsPath.cpp
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "../../../Common/String.h"
|
||||
|
||||
extern HINSTANCE g_hInstance;
|
||||
|
||||
static CSysString GetLibraryPath()
|
||||
{
|
||||
TCHAR fullPath[MAX_PATH + 1];
|
||||
::GetModuleFileName(g_hInstance, fullPath, MAX_PATH);
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
static CSysString GetLibraryFolderPrefix()
|
||||
{
|
||||
CSysString path = GetLibraryPath();
|
||||
int pos = path.ReverseFind(TEXT(CHAR_PATH_SEPARATOR));
|
||||
return path.Left(pos + 1);
|
||||
}
|
||||
|
||||
CSysString GetBaseFolderPrefix()
|
||||
{
|
||||
CSysString libPrefix = GetLibraryFolderPrefix();
|
||||
CSysString temp = libPrefix;
|
||||
temp.Delete(temp.Length() - 1);
|
||||
int pos = temp.ReverseFind(TEXT(CHAR_PATH_SEPARATOR));
|
||||
return temp.Left(pos + 1);
|
||||
}
|
||||
|
||||
CSysString GetCodecsFolderPrefix()
|
||||
{
|
||||
return GetBaseFolderPrefix() + (CSysString)(TEXT("Codecs")) + (CSysString)(TEXT(STRING_PATH_SEPARATOR));
|
||||
}
|
||||
Reference in New Issue
Block a user