mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-07-06 13:08:00 -05:00
MacOSX: First native Apple M1 support
This commit is contained in:
+11
-14
@@ -14,16 +14,17 @@
|
||||
#include "Platform/Platform.h"
|
||||
#include "Resources.h"
|
||||
|
||||
#ifdef TC_LINUX
|
||||
#ifdef TC_WINDOWS
|
||||
#include "Main/resource.h"
|
||||
#else
|
||||
#ifdef TC_MACOSX
|
||||
#include "Application.h"
|
||||
#endif
|
||||
#include "Platform/File.h"
|
||||
#include "Platform/StringConverter.h"
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
#include "Main/resource.h"
|
||||
#endif
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
|
||||
@@ -54,13 +55,17 @@ namespace VeraCrypt
|
||||
strBuf.Zero();
|
||||
strBuf.CopyFrom (res);
|
||||
return string (reinterpret_cast <char *> (strBuf.Ptr()));
|
||||
#elif TC_LINUX
|
||||
#else
|
||||
// get language from env LANG
|
||||
// support: C,POSIX,
|
||||
// support for e.g. german: de_DE.UTF-8, de.UTF8, de_DE, de
|
||||
// not support e.g.: de@Euro
|
||||
string defaultLang("en");
|
||||
#if defined (TC_MACOSX)
|
||||
string filenamePrefix = StringConverter::ToSingle (Application::GetExecutableDirectory()) + "/../Resources/languages/Language.";
|
||||
#else
|
||||
string filenamePrefix("/usr/share/veracrypt/languages/Language.");
|
||||
#endif
|
||||
string filenamePost(".xml");
|
||||
string filename = filenamePrefix + defaultLang + filenamePost;
|
||||
if(const char* env_p = getenv("LANG")){
|
||||
@@ -126,14 +131,6 @@ namespace VeraCrypt
|
||||
, 0
|
||||
};
|
||||
|
||||
return string ((const char*) LanguageXml);
|
||||
#else
|
||||
static byte LanguageXml[] =
|
||||
{
|
||||
# include "Common/Language.xml.h"
|
||||
, 0
|
||||
};
|
||||
|
||||
return string ((const char*) LanguageXml);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user