Copies word lists directory to the location of the executable
This commit is contained in:
parent
19b142ceb8
commit
26ea53d461
|
@ -41,7 +41,12 @@ file(GLOB_RECURSE SIMPLEWALLET simplewallet/*)
|
||||||
file(GLOB_RECURSE CONN_TOOL connectivity_tool/*)
|
file(GLOB_RECURSE CONN_TOOL connectivity_tool/*)
|
||||||
file(GLOB_RECURSE WALLET wallet/*)
|
file(GLOB_RECURSE WALLET wallet/*)
|
||||||
file(GLOB_RECURSE MINER miner/*)
|
file(GLOB_RECURSE MINER miner/*)
|
||||||
file(GLOB_RECURSE MNEMONICS mnemonics/*)
|
file(GLOB MNEMONICS mnemonics/*)
|
||||||
|
|
||||||
|
file(GLOB NEW_WORD_LISTS mnemonics/wordlists/languages/*)
|
||||||
|
file(GLOB OLD_WORD_LIST mnemonics/wordlists/*)
|
||||||
|
file(COPY ${NEW_WORD_LISTS} DESTINATION "${CMAKE_SOURCE_DIR}/build/release/src/wordlists/languages")
|
||||||
|
file(COPY ${OLD_WORD_LIST} DESTINATION "${CMAKE_SOURCE_DIR}/build/release/src/wordlists")
|
||||||
|
|
||||||
source_group(common FILES ${COMMON})
|
source_group(common FILES ${COMMON})
|
||||||
source_group(crypto FILES ${CRYPTO})
|
source_group(crypto FILES ${CRYPTO})
|
||||||
|
|
|
@ -49,8 +49,9 @@ namespace
|
||||||
std::map<std::string,uint32_t> words_map;
|
std::map<std::string,uint32_t> words_map;
|
||||||
std::vector<std::string> words_array;
|
std::vector<std::string> words_array;
|
||||||
|
|
||||||
|
const std::string WORD_LISTS_DIRECTORY = "wordlists";
|
||||||
|
const std::string LANGUAGES_DIRECTORY = "languages";
|
||||||
const std::string OLD_WORD_FILE = "old-word-list";
|
const std::string OLD_WORD_FILE = "old-word-list";
|
||||||
const std::string WORD_LIST_DIRECTORY = "wordlists";
|
|
||||||
|
|
||||||
bool is_first_use()
|
bool is_first_use()
|
||||||
{
|
{
|
||||||
|
@ -85,11 +86,11 @@ namespace crypto
|
||||||
{
|
{
|
||||||
if (old_word_list)
|
if (old_word_list)
|
||||||
{
|
{
|
||||||
create_data_structures(OLD_WORD_FILE);
|
create_data_structures(WORD_LISTS_DIRECTORY + '/' + OLD_WORD_FILE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
create_data_structures(WORD_LIST_DIRECTORY + '/' + language);
|
create_data_structures(WORD_LISTS_DIRECTORY + '/' + LANGUAGES_DIRECTORY + '/' + language);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include "crypto/crypto.h" // for crypto::secret_key definition
|
#include "crypto/crypto.h" // for crypto::secret_key definition
|
||||||
#include "mnemonics/electrum-words.h"
|
#include "mnemonics/electrum-words.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue