port to macOS.

pull/105/head
ApexLiu 2017-09-17 01:04:42 +08:00
parent 3e2f06a740
commit e1c74689d5
6 changed files with 13 additions and 8 deletions

3
.gitignore vendored
View File

@ -48,7 +48,7 @@ __pycache__
/external/libuv
/client/tools/putty
/client/tools/winscp
/client/tp_assist_macos/DerivedData
# for dist folder
**/_tmp_
@ -72,3 +72,4 @@ __pycache__
/client/tp_rdp
/server/tp_core/protocol/rdp
/client/tools/tprdp
/client/tp_assist_macos

View File

@ -1,9 +1,9 @@
#ifndef __LIB_EX_PATH_H__
#define __LIB_EX_PATH_H__
#include <ex/ex_platform.h>
#include <ex/ex_types.h>
#include <ex/ex_str.h>
#include "ex_platform.h"
#include "ex_types.h"
#include "ex_str.h"
// fix `in_path` for current platform.
// must use ex_free() to release returned value.

View File

@ -66,6 +66,9 @@
#endif
#ifdef EX_OS_MACOS
# include <mach-o/dyld.h> // for _NSGetExecutablePath
# ifndef _T
# define _T(x) L##x
# endif
#endif

View File

@ -1,7 +1,7 @@
#ifndef __EX_THREAD_H__
#define __EX_THREAD_H__
#include <ex/ex_str.h>
#include "ex_str.h"
#include <list>

View File

@ -1,8 +1,8 @@
#ifndef __LIB_EX_UTIL_H__
#define __LIB_EX_UTIL_H__
#include <ex/ex_types.h>
#include <ex/ex_str.h>
#include "ex_types.h"
#include "ex_str.h"
#ifdef EX_OS_WIN32
# include <time.h>

View File

@ -185,7 +185,8 @@ bool ex_exec_file(ex_wstr& out_filename)
if (!ex_astr2wstr(buffer, out_filename))
return false;
return ex_abspath(out_filename);
//return ex_abspath(out_filename);
return true;
#else
char buffer[EX_PATH_MAX];