Skip to content
Snippets Groups Projects
Commit 0c7849f9 authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[*] Massive build fixes

parent 7ba25ae9
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ set(CMAKE_C_STANDARD 11)
SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET( CPACK_PACKAGE_VERSION_MAJOR 4)
SET( CPACK_PACKAGE_VERSION_MINOR 1)
SET( CPACK_PACKAGE_VERSION_PATCH 21)
SET( CPACK_PACKAGE_VERSION_PATCH 22)
# init CellFrame SDK
add_definitions("-DDAP_VERSION=\"${CPACK_PACKAGE_VERSION_MAJOR}\"")
......@@ -126,8 +126,8 @@ if(UNIX AND NOT WIN32)
if (SUPPORT_PYTHON_PLUGINS)
add_definitions("-DDAP_SUPPORT_PYTHON_PLUGINS")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDAP_SUPPORT_PYTHON_PLUGINS")
message("[+] Build with support python plugins")
set(Python_ADDITIONAL_VERSION 3.7 3.6 3.5 3.4)
message("[+] Build with python plugins support")
set(Python_ADDITIONAL_VERSION 3.9 3.8 3.7 3.6 3.5 3.4)
find_package(PythonLibs REQUIRED)
include_directories(${PYTHON_INCLUDE_DIR} include/)
......
Subproject commit 06f41ecb7117e05bf56622dd60037ac278140413
Subproject commit 100b5f93376c5e162e969c22079796039763a3fe
Subproject commit 87709ff3aecc5bccdc6e5a4961b8adeb80e10b8c
Subproject commit 85c90bee9afbde616c12b5cbf59a5007e2cb0e42
Subproject commit db050039980452d37f52c79081368114e507b943
Subproject commit 25c1913eb6224a3eb7592438a977365501593a6f
......@@ -164,11 +164,10 @@ int main( int argc, const char **argv )
#endif
{
char l_log_path[MAX_PATH] = {'\0'};
int l_pos = dap_sprintf(l_log_path, "%s/var/log", g_sys_dir_path);
dap_mkdir_with_parents(l_log_path);
dap_sprintf(l_log_path + l_pos, "/%s.log", dap_get_appname());
if (dap_common_init(dap_get_appname(), l_log_path) != 0) {
char *l_log_dir = dap_strdup_printf("%s/var/log", g_sys_dir_path);
dap_mkdir_with_parents(l_log_dir);
char * l_log_file = dap_strdup_printf( "%s/%s.log", l_log_dir, dap_get_appname());
if (dap_common_init(dap_get_appname(), l_log_file, l_log_dir) != 0) {
printf("Fatal Error: Can't init common functions module");
return -2;
}
......
......@@ -204,7 +204,7 @@ int main(int argc, const char *argv[])
#elif DAP_OS_UNIX
g_sys_dir_path = dap_strdup_printf("/opt/%s", dap_get_appname());
#endif
if (dap_common_init(dap_get_appname(), NULL) != 0) {
if (dap_common_init(dap_get_appname(), NULL, NULL) != 0) {
printf("Fatal Error: Can't init common functions module");
return -2;
}
......
......@@ -377,17 +377,21 @@ int main(int argc, const char **argv)
static int s_init( int argc, const char **argv )
{
dap_set_appname("cellframe-node");
#ifdef _WIN32
g_sys_dir_path = dap_strdup_printf("%s/%s", regGetUsrPath(), dap_get_appname());
char * s_log_dir_path = dap_strdup_printf("%s/var/log", g_sys_dir_path) ;
#elif DAP_OS_MAC
g_sys_dir_path = dap_strdup_printf("/Applications/%s.app/Contents/Resources", dap_get_appname());
char * s_log_dir_path = dap_strdup_printf("/Library/%s.app/Logs", dap_get_appname() ) ;
#elif DAP_OS_ANDROID
g_sys_dir_path = dap_strdup_printf("/storage/emulated/0/opt/%s",dap_get_appname());
char * s_log_dir_path = dap_strdup_printf("%s/var/log", g_sys_dir_path) ;
#elif DAP_OS_UNIX
g_sys_dir_path = dap_strdup_printf("/opt/%s", dap_get_appname());
char * s_log_dir_path = dap_strdup_printf("%s/var/log", g_sys_dir_path) ;
#endif
if (dap_common_init(dap_get_appname(), NULL) != 0) {
char * s_log_file_path = dap_strdup_printf("%s/%s.log",s_log_dir_path, dap_get_appname());
if (dap_common_init(dap_get_appname(), s_log_file_path, s_log_dir_path ) != 0) {
printf("Fatal Error: Can't init common functions module");
return -2;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment