mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-17 05:41:41 +02:00
Merge pull request #306 from psychocrypt/topic-noWaitWindows
add environment variable `XMRSTAK_NOWIT`
This commit is contained in:
@@ -20,6 +20,9 @@ The number of files depends on the available backends.
|
||||
1) Double click the `xmr-stak.exe` file
|
||||
2) Fill in the pool url, username and password
|
||||
|
||||
`set XMRSTAK_NOWAIT=1` disable the dialog `Press any key to exit.` for non UAC execution.
|
||||
|
||||
|
||||
## Usage on Linux & MacOS
|
||||
1) Open a terminal within the folder with the binary
|
||||
2) Start the miner with `./xmr-stak`
|
||||
|
||||
@@ -87,6 +87,12 @@ void help()
|
||||
cout<<" -u, --user USERNAME pool user name or wallet address"<<endl;
|
||||
cout<<" -p, --pass PASSWD pool password, in the most cases x or empty \"\""<<endl;
|
||||
cout<<" \n"<<endl;
|
||||
#ifdef _WIN32
|
||||
cout<<"Environment variables:\n"<<endl;
|
||||
cout<<" XMRSTAK_NOWAIT disable the dialog `Press any key to exit."<<std::endl;
|
||||
cout<<" for non UAC execution"<<endl;
|
||||
cout<<" \n"<<endl;
|
||||
#endif
|
||||
cout<< "Version: " << get_version_str_short() << endl;
|
||||
cout<<"Brought to by fireice_uk and psychocrypt under GPLv3."<<endl;
|
||||
}
|
||||
|
||||
@@ -222,8 +222,13 @@ void printer::print_str(const char* str)
|
||||
#ifdef _WIN32
|
||||
void win_exit(size_t code)
|
||||
{
|
||||
printer::inst()->print_str("Press any key to exit.");
|
||||
get_key();
|
||||
size_t envSize = 0;
|
||||
getenv_s(&envSize, nullptr, 0, "XMRSTAK_NOWAIT");
|
||||
if(envSize == 0)
|
||||
{
|
||||
printer::inst()->print_str("Press any key to exit.");
|
||||
get_key();
|
||||
}
|
||||
std::exit(code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user