update version to 3.0.0.4, prepare for new CTP-Release.

pull/105/head
Apex Lu 2018-04-08 17:28:17 +08:00
parent 3aa873d41e
commit 917ecbd9f1
15 changed files with 40 additions and 126 deletions

View File

@ -233,10 +233,8 @@ class BuilderWin(BuilderBase):
# fix source file
utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'include', 'mbedtls', 'config.h'))
utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'include', 'mbedtls'), os.path.join(self.MBEDTLS_PATH_SRC, 'include', 'mbedtls'), 'config.h')
# After upgrade to mbedtls-v2.6.1, the bug have been fixed. so we do not need fix it ourselves.
# utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library', 'rsa.c'))
# utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library'), os.path.join(self.MBEDTLS_PATH_SRC, 'library'), 'rsa.c')
utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library', 'rsa.c'))
utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library'), os.path.join(self.MBEDTLS_PATH_SRC, 'library'), 'rsa.c')
def _build_libuv(self, file_name):
cc.n('prepare libuv source code... ', end='')
@ -295,22 +293,6 @@ class BuilderLinux(BuilderBase):
def _build_openssl(self, file_name):
pass # we do not need build openssl anymore, because first time run build.sh we built Python, it include openssl.
# if not os.path.exists(self.OPENSSL_PATH_SRC):
# os.system('tar -zxvf "{}/{}" -C "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))
#
# cc.n('build openssl static...')
# if os.path.exists(os.path.join(self.PATH_RELEASE, 'lib', 'libssl.a')):
# cc.w('already exists, skip.')
# return
#
# old_p = os.getcwd()
# os.chdir(self.OPENSSL_PATH_SRC)
# #os.system('./config --prefix={} --openssldir={}/openssl no-zlib no-shared'.format(self.PATH_RELEASE, self.PATH_RELEASE))
# os.system('./config --prefix={} --openssldir={}/openssl -fPIC no-zlib no-shared'.format(self.PATH_RELEASE, self.PATH_RELEASE))
# os.system('make')
# os.system('make install')
# os.chdir(old_p)
def _build_libuv(self, file_name):
if not os.path.exists(self.LIBUV_PATH_SRC):
# os.system('tar -zxvf "{}/{}" -C "{}"'.format(PATH_DOWNLOAD, file_name, PATH_TMP))
@ -633,52 +615,11 @@ class BuilderMacOS(BuilderBase):
f.writelines(fl)
f.close()
# # fix config.h
# mkfile = os.path.join(self.MBEDTLS_PATH_SRC, 'include', 'mbedtls', 'config.h')
# f = open(mkfile)
# fl = f.readlines()
# f.close()
#
# for i in range(len(fl)):
# if fl[i].find('#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED') >= 0:
# fl[i] = '//#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED\n'
# elif fl[i].find('#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED') >= 0:
# fl[i] = '//#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED\n'
# elif fl[i].find('#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED') >= 0:
# fl[i] = '//#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED\n'
# elif fl[i].find('#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED') >= 0:
# fl[i] = '//#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED\n'
# elif fl[i].find('#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED') >= 0:
# fl[i] = '//#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED\n'
# elif fl[i].find('#define MBEDTLS_SELF_TEST') >= 0:
# fl[i] = '//#define MBEDTLS_SELF_TEST\n'
# elif fl[i].find('#define MBEDTLS_SSL_RENEGOTIATION') >= 0:
# fl[i] = '//#define MBEDTLS_SSL_RENEGOTIATION\n'
# elif fl[i].find('#define MBEDTLS_ECDH_C') >= 0:
# fl[i] = '//#define MBEDTLS_ECDH_C\n'
# elif fl[i].find('#define MBEDTLS_ECDSA_C') >= 0:
# fl[i] = '//#define MBEDTLS_ECDSA_C\n'
# elif fl[i].find('#define MBEDTLS_ECP_C') >= 0:
# fl[i] = '//#define MBEDTLS_ECP_C\n'
# elif fl[i].find('#define MBEDTLS_NET_C') >= 0:
# fl[i] = '//#define MBEDTLS_NET_C\n'
#
# elif fl[i].find('#define MBEDTLS_RSA_NO_CRT') >= 0:
# fl[i] = '#define MBEDTLS_RSA_NO_CRT\n'
# elif fl[i].find('#define MBEDTLS_SSL_PROTO_SSL3') >= 0:
# fl[i] = '#define MBEDTLS_SSL_PROTO_SSL3\n'
#
# f = open(mkfile, 'w')
# f.writelines(fl)
# f.close()
# fix source file
utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'include', 'mbedtls', 'config.h'))
utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'include', 'mbedtls'), os.path.join(self.MBEDTLS_PATH_SRC, 'include', 'mbedtls'), 'config.h')
# After upgrade to mbedtls-v2.6.1, the bug have been fixed. so we do not need fix it ourselves.
# utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library', 'rsa.c'))
# utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library'), os.path.join(self.MBEDTLS_PATH_SRC, 'library'), 'rsa.c')
utils.ensure_file_exists(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library', 'rsa.c'))
utils.copy_file(os.path.join(PATH_EXTERNAL, 'fix-external', 'mbedtls', 'library'), os.path.join(self.MBEDTLS_PATH_SRC, 'library'), 'rsa.c')
old_p = os.getcwd()
os.chdir(self.MBEDTLS_PATH_SRC)

View File

@ -14,9 +14,6 @@ with_rdp = os.path.exists(os.path.join(env.root_path, 'server', 'tp_core', 'prot
with_telnet = os.path.exists(os.path.join(env.root_path, 'server', 'tp_core', 'protocol', 'telnet'))
# COMMON_MODULES = ['paste', 'pyasn1', 'pymemcache', 'pymysql', 'rsa', 'tornado', 'six.py']
class BuilderBase:
def __init__(self):
self.out_dir = ''
@ -75,6 +72,7 @@ class BuilderWin(BuilderBase):
utils.copy_ex(out_path, bin_path, 'tp_web.exe')
utils.copy_ex(out_path, bin_path, 'tp_core.exe')
utils.copy_ex(out_path, bin_path, 'tpssh.dll')
utils.copy_ex(out_path, bin_path, 'tptelnet.dll')
if with_rdp:
utils.copy_ex(out_path, bin_path, 'tprdp.dll')
@ -105,11 +103,6 @@ class BuilderLinux(BuilderBase):
self.path_tmp = os.path.join(self.base_tmp, self.name)
self.path_tmp_data = os.path.join(self.path_tmp, 'data')
# self.server_path = os.path.join(env.root_path, 'dist', 'installer', ctx.dist, 'server')
# self.script_path = self.tmp_path = os.path.join(self.server_path, 'script')
# self.src_path = os.path.join(env.root_path, 'source')
# self.out_tmp_path = os.path.join(self.tmp_path, self.name, 'server')
def build_installer(self):
cc.n('make teleport installer package...')
@ -126,50 +119,18 @@ class BuilderLinux(BuilderBase):
utils.fix_new_line_flag(os.path.join(self.path_tmp_data, 'tmp', 'etc', 'web.ini'))
utils.fix_new_line_flag(os.path.join(self.path_tmp_data, 'tmp', 'etc', 'core.ini'))
# out_path = os.path.join(env.root_path, 'out', 'eom_ts', ctx.target_path, ctx.dist_path)
# out_path = os.path.join(env.root_path, 'out', 'eom_ts', ctx.bits_path, 'bin')
# bin_path = os.path.join(self.tmp_path, 'bin')
# utils.copy_file(out_path, bin_path, 'eom_ts')
out_path = os.path.join(env.root_path, 'out', 'server', ctx.bits_path, 'bin')
bin_path = os.path.join(self.path_tmp_data, 'bin')
utils.copy_ex(out_path, bin_path, 'tp_web')
utils.copy_ex(out_path, bin_path, 'tp_core')
utils.copy_ex(out_path, bin_path, 'libtpssh.so')
utils.copy_ex(out_path, bin_path, 'libtptelnet.so')
if with_rdp:
utils.copy_ex(out_path, bin_path, 'libtprdp.so')
utils.copy_ex(os.path.join(env.root_path, 'out', 'pysrt'), bin_path, (ctx.dist_path, 'pysrt'))
# utils.copy_file(os.path.join(env.root_path, 'share', 'etc'), os.path.join(self.tmp_path, 'tmp', 'etc'), 'eom_ts.ini')
# utils.copy_file(os.path.join(env.root_path, 'share', 'etc'), os.path.join(self.tmp_path, 'tmp', 'etc'), 'license.key')
# utils.copy_ex(os.path.join(env.root_path, 'share', 'etc'), os.path.join(self.tmp_path, 'tmp', 'etc'), 'ssl')
# utils.copy_ex(os.path.join(env.root_path, 'share', 'data'), os.path.join(self.tmp_path, 'tmp', 'data'), ('ts_db_release.db', 'ts_db.db'))
# utils.copy_ex(os.path.join(env.root_path, 'server', 'share', 'data'), os.path.join(self.tmp_path, 'tmp', 'data'), 'main.sql')
# utils.make_zip(self.tmp_path, os.path.join(self.tmp_path, '..', 'eom_ts.zip'))
# utils.make_targz(os.path.join(self.tmp_path, '..'), 'teleport', 'teleport.tar.gz')
# utils.remove(self.tmp_path)
# make final installer.
# cc.n('pack final server installer...')
# out_file = os.path.join(env.root_path, 'dist', '{}.zip'.format(self.name))
# out_file = os.path.join(env.root_path, 'out', 'installer', '{}.tar.gz'.format(self.name))
# if os.path.exists(out_file):
# utils.remove(out_file)
# # copy installer scripts.
# for i in ['daemon', 'start.sh', 'stop.sh', 'status.sh']:
# # for i in ['daemon_web', 'daemon_core', 'teleport.sh']:
# shutil.copy(os.path.join(self.dist_path, 'script', i), os.path.abspath(os.path.join(self.tmp_path, '..', i)))
# for i in ['install.sh', 'uninst.sh']:
# shutil.copy(os.path.join(self.dist_path, 'script', i), os.path.abspath(os.path.join(self.tmp_path, '..', '..', i)))
# 复制安装所需的脚本
# utils.copy_ex(os.path.join(self.dist_path, 'script'), self.path_tmp, 'install.sh')
# utils.copy_ex(os.path.join(self.dist_path, 'script'), self.path_tmp, 'uninst.sh')
utils.copy_ex(os.path.join(self.dist_path), self.path_tmp, 'setup.sh')
utils.copy_ex(os.path.join(self.dist_path), self.path_tmp, 'script')
utils.copy_ex(os.path.join(self.dist_path), self.path_tmp, 'daemon')

View File

@ -50,6 +50,14 @@ class BuilderWin(BuilderBase):
utils.msvc_build(sln_file, 'tpssh', ctx.target_path, ctx.bits_path, False)
utils.ensure_file_exists(out_file)
cc.n('build TELNET protocol ...')
sln_file = os.path.join(env.root_path, 'server', 'tp_core', 'protocol', 'telnet', 'tptelnet.vs2015.sln')
out_file = os.path.join(env.root_path, 'out', 'server', ctx.bits_path, ctx.target_path, 'tptelnet.dll')
if os.path.exists(out_file):
utils.remove(out_file)
utils.msvc_build(sln_file, 'tptelnet', ctx.target_path, ctx.bits_path, False)
utils.ensure_file_exists(out_file)
if with_rdp:
cc.n('build RDP protocol ...')
sln_file = os.path.join(env.root_path, 'server', 'tp_core', 'protocol', 'rdp', 'tprdp.vs2015.sln')
@ -65,13 +73,14 @@ class BuilderLinux(BuilderBase):
super().__init__()
def build_server(self):
cc.n('build server app (tp_core/libtpssh/tp_web)...')
cc.n('build server app (tp_core/libtpssh/libtelnet/librdp/tp_web)...')
out_path = os.path.join(env.root_path, 'out', 'server', ctx.bits_path, 'bin')
out_files = list()
out_files.append(os.path.join(out_path, 'tp_core'))
out_files.append(os.path.join(out_path, 'tp_web'))
out_files.append(os.path.join(out_path, 'libtpssh.so'))
out_files.append(os.path.join(out_path, 'libtptelnet.so'))
if with_rdp:
out_files.append(os.path.join(out_path, 'libtprdp.so'))
@ -94,16 +103,16 @@ class BuilderMacOS(BuilderBase):
super().__init__()
def build_server(self):
cc.n('build server app (tp_core/libtpssh/tp_web)...')
cc.n('build server app (tp_core/libtpssh/libtelnet/librdp/tp_web)...')
out_path = os.path.join(env.root_path, 'out', 'server', ctx.bits_path, 'bin')
out_files = list()
out_files.append(os.path.join(out_path, 'tp_core'))
out_files.append(os.path.join(out_path, 'tp_web'))
out_files.append(os.path.join(out_path, 'libtpssh.so'))
out_files.append(os.path.join(out_path, 'libtptelnet.so'))
if with_rdp:
out_files.append(os.path.join(out_path, 'libtprdp.so'))
# out_files.extend(os.path.join(out_path, 'libtptelnet.so'))
for f in out_files:
if os.path.exists(f):

View File

@ -1,3 +1,3 @@
# -*- coding: utf8 -*-
VER_TP_SERVER = "3.0.0.3"
VER_TP_ASSIST = "3.0.0.3"
VER_TP_SERVER = "3.0.0.4"
VER_TP_ASSIST = "3.0.0.4"

View File

@ -1,6 +1,6 @@
#ifndef __TS_ASSIST_VER_H__
#define __TS_ASSIST_VER_H__
#define TP_ASSIST_VER L"3.0.0.3"
#define TP_ASSIST_VER L"3.0.0.4"
#endif // __TS_ASSIST_VER_H__

View File

@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0.3</string>
<string>3.0.0.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.0.0.3</string>
<string>3.0.0.4</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>

Binary file not shown.

View File

@ -1,6 +1,6 @@
#ifndef __TS_ASSIST_VER_H__
#define __TS_ASSIST_VER_H__
#define TP_ASSIST_VER L"3.0.0.3"
#define TP_ASSIST_VER L"3.0.0.4"
#endif // __TS_ASSIST_VER_H__

Binary file not shown.

View File

@ -23,6 +23,7 @@ ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_subdirectory(tp_core/core)
add_subdirectory(tp_core/protocol/ssh)
add_subdirectory(tp_core/protocol/telnet)
#add_subdirectory(testssh/testssh)
IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tp_core/protocol/rdp")

Binary file not shown.

View File

@ -1,6 +1,6 @@
#ifndef __TS_SERVER_VER_H__
#define __TS_SERVER_VER_H__
#define TP_SERVER_VER L"3.0.0.3"
#define TP_SERVER_VER L"3.0.0.4"
#endif // __TS_SERVER_VER_H__

View File

@ -6,12 +6,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Project_SOURCE_DIR}/../out/server/x64/bin")
aux_source_directory(. DIR_RDP_SRCS)
aux_source_directory(../../common DIR_RDP_SRCS)
aux_source_directory(../../../../common/libex/src DIR_RDP_SRCS)
aux_source_directory(. DIR_TELNET_SRCS)
aux_source_directory(../../common DIR_TELNET_SRCS)
aux_source_directory(../../../../common/libex/src DIR_TELNET_SRCS)
list(REMOVE_ITEM DIR_RDP_SRCS "./dllmain.cpp")
list(REMOVE_ITEM DIR_RDP_SRCS "./stdafx.cpp")
list(REMOVE_ITEM DIR_TELNET_SRCS "./dllmain.cpp")
list(REMOVE_ITEM DIR_TELNET_SRCS "./stdafx.cpp")
include_directories(
@ -32,11 +32,13 @@ ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_library(tptelnet SHARED ${DIR_RDP_SRCS})
add_library(tptelnet SHARED ${DIR_TELNET_SRCS})
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(tptelnet uv mbedx509 mbedtls mbedcrypto dl pthread rt util)
#target_link_libraries(tptelnet uv mbedx509 mbedtls mbedcrypto dl pthread rt util)
target_link_libraries(tptelnet uv dl pthread rt util)
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
target_link_libraries(tptelnet uv mbedx509 mbedtls mbedcrypto dl pthread util)
#target_link_libraries(tptelnet uv mbedx509 mbedtls mbedcrypto dl pthread util)
target_link_libraries(tptelnet uv dl pthread util)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")

View File

@ -1,2 +1,2 @@
# -*- coding: utf8 -*-
TP_SERVER_VER = "3.0.0.3"
TP_SERVER_VER = "3.0.0.4"

View File

@ -13,7 +13,7 @@ Revision 修订号。主版本号和次版本号都相同但修订号不同
Build 构建号。构建号用于表明此版本发布之前进行了多少次构建及测试。某些情况下此版本号可以省略。
TP_SERVER 3.0.0.3 # 整个服务端打包的版本
TP_TPCORE 3.0.0.3 # 核心服务 tp_core 的版本
TP_SERVER 3.0.0.4 # 整个服务端打包的版本
TP_TPCORE 3.0.0.4 # 核心服务 tp_core 的版本
TP_TPWEB 3.0.0.1 # web服务 tp_web 的版本一般除非升级Python否则不会变化
TP_ASSIST 3.0.0.3 # 助手版本
TP_ASSIST 3.0.0.4 # 助手版本