diff --git a/build/builder/build-external.py b/build/builder/build-external.py index da42f578..2f407c91 100644 --- a/build/builder/build-external.py +++ b/build/builder/build-external.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- +import time + from core import colorconsole as cc from core import utils from core.context import * @@ -141,7 +143,7 @@ def _prepare_python(self): utils.copy_ex(_header_path, os.path.join(PATH_EXTERNAL, 'python', 'include')) def _build_openssl(self, file_name): - cc.n('build openssl static library from source code... ', end='') + cc.n('build openssl static library from source code... ') _alt_ver = '_'.join(env.ver_ossl.split('.')) if not utils.download_file('openssl source tarball', 'https://github.com/openssl/openssl/archive/OpenSSL_{}.zip'.format(_alt_ver), PATH_DOWNLOAD, file_name): @@ -160,6 +162,7 @@ def _build_openssl(self, file_name): break if not need_build: + cc.n('build openssl static library from source code... ', end='') cc.w('already exists, skip.') return cc.v('') @@ -207,26 +210,8 @@ def _build_libssh(self, file_name): return cc.v('') - # cc.n('prepare libssh source code... ', end='') - # _include = os.path.join(self.LIBSSH_PATH_SRC, 'include', 'libssh') - # _src = os.path.join(self.LIBSSH_PATH_SRC, 'src') - # - # if not os.path.exists(_include) or not os.path.exists(_src): - # utils.unzip(os.path.join(PATH_DOWNLOAD, file_name), PATH_EXTERNAL) - # # os.rename(os.path.join(PATH_EXTERNAL, 'openssl-OpenSSL_{}'.format(_alt_ver)), self.OPENSSL_PATH_SRC) - # - # _unzipped_path = os.path.join(PATH_EXTERNAL, 'libssh-{}'.format(env.ver_libssh)) - # - # utils.copy_ex(os.path.join(_unzipped_path, 'include', 'libssh'), _include) - # utils.copy_ex(os.path.join(_unzipped_path, 'src'), _src) - # - # utils.remove(_unzipped_path) - # - # if not os.path.exists(_include) or not os.path.exists(_src): - # raise RuntimeError('\ncan not prepare libssh source code.') - # else: - # cc.w('already exists, skip.') - + cc.w('On Windows, when build libssh, need you use cmake-gui.exe to generate solution file') + cc.w('for Visual Studio 2015. Visit https://docs.tp4a.com for more details.') cc.w('\nOnce the libssh.sln generated, press Enter to continue or Q to quit...', end='') try: x = env.input() @@ -285,6 +270,7 @@ def _build_libuv(self, file_name): if not os.path.exists(self.LIBUV_PATH_SRC): cc.v('') utils.unzip(os.path.join(PATH_DOWNLOAD, file_name), PATH_EXTERNAL) + time.sleep(1) # wait for a while, otherwise rename may fail. os.rename(os.path.join(PATH_EXTERNAL, 'libuv-{}'.format(env.ver_libuv)), self.LIBUV_PATH_SRC) else: cc.w('already exists, skip.') diff --git a/external/libssh-win-static/include/config.h b/external/libssh-win-static/include/config.h deleted file mode 100644 index b18c7e1b..00000000 --- a/external/libssh-win-static/include/config.h +++ /dev/null @@ -1,196 +0,0 @@ -#ifdef _DEBUG -#include -#endif - -/* Name of package */ -#define PACKAGE "libssh" - -/* Version number of package */ -#define VERSION "0.7.5" - -/* #undef LOCALEDIR */ -/* #undef DATADIR */ -//#define LIBDIR "lib" -//#define PLUGINDIR "plugins-4" -/* #undef SYSCONFDIR */ -//#define BINARYDIR "E:/work/tp4a/teleport/external/_download_/libssh-0.7.5/build" -//#define SOURCEDIR "E:/work/tp4a/teleport/external/_download_/libssh-0.7.5" - -/************************** HEADER FILES *************************/ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARGP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_ARPA_INET_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTY_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTMP_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UTIL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_LIBUTIL_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_TIME_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_TERMIOS_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_UNISTD_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_AES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_WSPIAPI_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_BLOWFISH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_DES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_ECDH_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_EC_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_OPENSSL_ECDSA_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_PTHREAD_H */ - -/* Define to 1 if you have eliptic curve cryptography in openssl */ -#define HAVE_OPENSSL_ECC 1 - -/* Define to 1 if you have eliptic curve cryptography in gcrypt */ -/* #undef HAVE_GCRYPT_ECC */ - -/* Define to 1 if you have eliptic curve cryptography */ -#define HAVE_ECC 1 - -/*************************** FUNCTIONS ***************************/ - -/* Define to 1 if you have the `EVP_aes128_ctr' function. */ -//#define HAVE_OPENSSL_EVP_AES_CTR 1 - -/* Define to 1 if you have the `EVP_aes128_cbc' function. */ -//#define HAVE_OPENSSL_EVP_AES_CBC 1 - -/* Define to 1 if you have the `snprintf' function. */ -#define HAVE_SNPRINTF 1 - -/* Define to 1 if you have the `_snprintf' function. */ -#define HAVE__SNPRINTF 1 - -/* Define to 1 if you have the `_snprintf_s' function. */ -#define HAVE__SNPRINTF_S 1 - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 if you have the `_vsnprintf' function. */ -#define HAVE__VSNPRINTF 1 - -/* Define to 1 if you have the `_vsnprintf_s' function. */ -#define HAVE__VSNPRINTF_S 1 - -/* Define to 1 if you have the `isblank' function. */ -#define HAVE_ISBLANK 1 - -/* Define to 1 if you have the `strncpy' function. */ -#define HAVE_STRNCPY 1 - -/* Define to 1 if you have the `cfmakeraw' function. */ -/* #undef HAVE_CFMAKERAW */ - -/* Define to 1 if you have the `getaddrinfo' function. */ -#define HAVE_GETADDRINFO 1 - -/* Define to 1 if you have the `poll' function. */ -/* #undef HAVE_POLL */ - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -/* #undef HAVE_CLOCK_GETTIME */ - -/* Define to 1 if you have the `ntohll' function. */ -//#define HAVE_NTOHLL 1 - -/* Define to 1 if you have the `htonll' function. */ -//#define HAVE_HTONLL 1 - -/* Define to 1 if you have the `strtoull' function. */ -/* #undef HAVE_STRTOULL */ - -/* Define to 1 if you have the `__strtoull' function. */ -/* #undef HAVE___STRTOULL */ - -/* Define to 1 if you have the `_strtoui64' function. */ -#define HAVE__STRTOUI64 1 - -/*************************** LIBRARIES ***************************/ - -/* Define to 1 if you have the `crypto' library (-lcrypto). */ -#define HAVE_LIBCRYPTO 1 - -/* Define to 1 if you have the `gcrypt' library (-lgcrypt). */ -/* #undef HAVE_LIBGCRYPT */ - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -/* #undef HAVE_PTHREAD */ - -/**************************** OPTIONS ****************************/ - -/* #undef HAVE_GCC_THREAD_LOCAL_STORAGE */ -#define HAVE_MSC_THREAD_LOCAL_STORAGE 1 - -/* #undef HAVE_GCC_VOLATILE_MEMORY_PROTECTION */ -/*#define HAVE_GCC_NARG_MACRO 1*/ - -/* #undef HAVE_COMPILER__FUNC__ */ -#define HAVE_COMPILER__FUNCTION__ 1 - -/* Define to 1 if you want to enable GSSAPI */ -/* #undef WITH_GSSAPI */ - -/* Define to 1 if you want to enable ZLIB */ -/*#define WITH_ZLIB 1*/ - -/* Define to 1 if you want to enable SFTP */ -#define WITH_SFTP 1 - -/* Define to 1 if you want to enable SSH1 */ -#define WITH_SSH1 1 - -/* Define to 1 if you want to enable server support */ -#define WITH_SERVER 1 - -/* Define to 1 if you want to enable debug output for crypto functions */ -/* #undef DEBUG_CRYPTO */ - -/* Define to 1 if you want to enable pcap output support (experimental) */ -/* #undef WITH_PCAP */ - -/* Define to 1 if you want to enable calltrace debug output */ -/* #undef DEBUG_CALLTRACE */ - -/* Define to 1 if you want to enable NaCl support */ -/* #undef WITH_NACL */ - -/*************************** ENDIAN *****************************/ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -/* #undef WORDS_BIGENDIAN */ diff --git a/external/libssh-win-static/libssh.vs2015.sln b/external/libssh-win-static/libssh.vs2015.sln deleted file mode 100644 index 9b4e11f8..00000000 --- a/external/libssh-win-static/libssh.vs2015.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh", "libssh.vs2015.vcxproj", "{228F651A-4726-41CE-89B3-5D07CF55909B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {228F651A-4726-41CE-89B3-5D07CF55909B}.Debug|x86.ActiveCfg = Debug|Win32 - {228F651A-4726-41CE-89B3-5D07CF55909B}.Debug|x86.Build.0 = Debug|Win32 - {228F651A-4726-41CE-89B3-5D07CF55909B}.Release|x86.ActiveCfg = Release|Win32 - {228F651A-4726-41CE-89B3-5D07CF55909B}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/external/libssh-win-static/libssh.vs2015.vcxproj b/external/libssh-win-static/libssh.vs2015.vcxproj deleted file mode 100644 index e1bb799b..00000000 --- a/external/libssh-win-static/libssh.vs2015.vcxproj +++ /dev/null @@ -1,222 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {228F651A-4726-41CE-89B3-5D07CF55909B} - Win32Proj - libssh - 8.1 - libssh - - - - StaticLibrary - true - v140_xp - MultiByte - - - StaticLibrary - false - v140_xp - true - MultiByte - - - StaticLibrary - true - v140 - Unicode - - - StaticLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - $(ProjectDir)lib\ - ..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\ - - - ..\..\out\_tmp_\$(ProjectName)\$(PlatformTarget)\$(Configuration)\ - $(ProjectDir)lib\ - - - - - - Level3 - Disabled - WIN32;_DEBUG;LIBSSH_STATIC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) - .\include;..\openssl\inc32;%(AdditionalIncludeDirectories) - MultiThreadedDebug - - - Windows - true - - - $(OutDir)$(TargetName)MTd$(TargetExt) - - - - - - - Level3 - Disabled - _DEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;LIBSSH_STATIC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) - .\include;..\openssl\inc32 - MultiThreaded - - - Windows - true - true - true - - - $(OutDir)$(TargetName)MT$(TargetExt) - - - - - Level3 - - - MaxSpeed - true - true - NDEBUG;_LIB;%(PreprocessorDefinitions) - - - Windows - true - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/external/libssh-win-static/libssh.vs2015.vcxproj.filters b/external/libssh-win-static/libssh.vs2015.vcxproj.filters deleted file mode 100644 index 481aeab9..00000000 --- a/external/libssh-win-static/libssh.vs2015.vcxproj.filters +++ /dev/null @@ -1,213 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {8ec876c8-97fa-4f69-a5aa-7c59b5107ca1} - - - {0f864866-f75b-4063-baf2-63c1c0134342} - - - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files\external - - - Source Files\external - - - Source Files\external - - - Source Files\external - - - Source Files\external - - - Source Files\external - - - Source Files\external - - - Source Files\threads - - - - - Header Files - - - \ No newline at end of file diff --git a/server/tp_core/protocol/ssh/tpssh.vs2015.vcxproj b/server/tp_core/protocol/ssh/tpssh.vs2015.vcxproj index ec6de51a..afc56b19 100644 --- a/server/tp_core/protocol/ssh/tpssh.vs2015.vcxproj +++ b/server/tp_core/protocol/ssh/tpssh.vs2015.vcxproj @@ -68,7 +68,7 @@ Level3 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;TPP_EXPORTS;LIBSSH_STATIC;%(PreprocessorDefinitions) - ../../../../common/teleport;../../../../common/libex/include;../../../../external/jsoncpp/include;../../../../external/libssh-win-static/include;%(AdditionalIncludeDirectories) + ../../../../common/teleport;../../../../common/libex/include;../../../../external/jsoncpp/include;../../../../external/libssh/include;%(AdditionalIncludeDirectories) MultiThreadedDebug @@ -86,7 +86,7 @@ true true WIN32;NDEBUG;_WINDOWS;_USRDLL;TPP_EXPORTS;LIBSSH_STATIC;%(PreprocessorDefinitions) - ../../../../common/teleport;../../../../common/libex/include;../../../../external/jsoncpp/include;../../../../external/libssh-win-static/include;%(AdditionalIncludeDirectories) + ../../../../common/teleport;../../../../common/libex/include;../../../../external/jsoncpp/include;../../../../external/libssh/include;%(AdditionalIncludeDirectories) MultiThreaded