mirror of https://github.com/tp4a/teleport
解决助手程序只有安装后第一次运行时可以保存配置的问题(安装到Program Files目录下,普通用户没有写权限),现在将配置文件移动到%APPDATA%/Roaming/eomsoft/teleport/assist/cfg目录下了,日志文件在%APPDATA%/Roaming/eomsoft/teleport/assist/log目录下。
parent
e4985c467c
commit
772fcf4537
|
@ -62,3 +62,4 @@ __pycache__
|
|||
/config.ini
|
||||
/build.bat
|
||||
/dist/windows/client/assist/apps
|
||||
/dist/windows/client/assist/cfg
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$/builder" />
|
||||
<orderEntry type="jdk" jdkName="3.4 x64" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="py34-x86" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="TestRunnerService">
|
||||
|
|
|
@ -40,8 +40,8 @@ class BuilderWin(BuilderBase):
|
|||
|
||||
# def build_rdp(self):
|
||||
# cc.n('build tp_rdp...')
|
||||
# sln_file = os.path.join(ROOT_PATH, 'tp_rdp', 'tp_rdp.2015.sln')
|
||||
# out_file = os.path.join(ROOT_PATH, 'out', 'tp_rdp', ctx.bits_path, ctx.target_path, 'tp_rdp.exe')
|
||||
# sln_file = os.path.join(ROOT_PATH, 'client', 'tp_rdp', 'tp_rdp.2015.sln')
|
||||
# out_file = os.path.join(ROOT_PATH, 'out', 'client', ctx.bits_path, ctx.target_path, 'tp_rdp.exe')
|
||||
# if os.path.exists(out_file):
|
||||
# utils.remove(out_file)
|
||||
# utils.msvc_build(sln_file, 'tp_rdp', ctx.target_path, ctx.bits_path, False)
|
||||
|
@ -50,15 +50,16 @@ class BuilderWin(BuilderBase):
|
|||
def build_installer(self):
|
||||
cc.i('build assist package for website...')
|
||||
|
||||
name = 'teleport-assist-windows-{}-{}'.format(ctx.bits_path, VER_TELEPORT_ASSIST)
|
||||
utils.remove(os.path.join(ROOT_PATH, 'dist', '{}.zip'.format(name)))
|
||||
self._build_installer(name)
|
||||
name = 'tp-assist-{}'.format(VER_TELEPORT_ASSIST)
|
||||
out_file = os.path.join(ROOT_PATH, 'dist', '{}.exe'.format(name))
|
||||
utils.remove(out_file)
|
||||
self._build_installer()
|
||||
|
||||
last_ver = 'teleport-assist-last-win.zip'
|
||||
if os.path.exists(os.path.join(ROOT_PATH, 'dist', last_ver)):
|
||||
utils.remove(os.path.join(ROOT_PATH, 'dist', last_ver))
|
||||
# last_ver = 'teleport-assist-last-win.zip'
|
||||
# if os.path.exists(os.path.join(ROOT_PATH, 'dist', last_ver)):
|
||||
# utils.remove(os.path.join(ROOT_PATH, 'dist', last_ver))
|
||||
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'dist'), os.path.join(ROOT_PATH, 'dist'), ('{}.zip'.format(name), last_ver))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'dist'), os.path.join(ROOT_PATH, 'dist'), ('{}.zip'.format(name), last_ver))
|
||||
|
||||
# cc.n('build assist package for backend...')
|
||||
# name = 'teleport-assist-last-win'
|
||||
|
@ -67,40 +68,86 @@ class BuilderWin(BuilderBase):
|
|||
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'dist'), os.path.join(ROOT_PATH, 'web', 'site', 'teleport', 'static', 'download'), 'teleport-assist-win.zip')
|
||||
|
||||
utils.ensure_file_exists(out_file)
|
||||
|
||||
# @staticmethod
|
||||
# def _build_installer(name):
|
||||
# base_path = os.path.join(ROOT_PATH, 'out', 'client')
|
||||
# base_tmp = os.path.join(base_path, '_tmp_')
|
||||
# tmp_path = os.path.join(base_tmp, name)
|
||||
#
|
||||
# if os.path.exists(base_tmp):
|
||||
# utils.remove(base_tmp)
|
||||
#
|
||||
# utils.makedirs(tmp_path)
|
||||
#
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'out', 'client', ctx.bits_path, ctx.target_path), tmp_path, 'tp_assist.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_path, ('ssh_client.ini', 'ssh_client.ini'))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_path, ('scp_client.ini', 'scp_client.ini'))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_path, ('telnet_client.ini', 'telnet_client.ini'))
|
||||
#
|
||||
# utils.copy_ex(os.path.join(ROOT_PATH, 'client', 'tp_assist'), tmp_path, 'site')
|
||||
#
|
||||
# # utils.makedirs(os.path.join(tmp_path, 'tools', 'tprdp'))
|
||||
# utils.makedirs(os.path.join(tmp_path, 'tools', 'putty'))
|
||||
# utils.makedirs(os.path.join(tmp_path, 'tools', 'winscp'))
|
||||
# # utils.copy_file(os.path.join(ROOT_PATH, 'out', 'tp_rdp', ctx.bits_path, ctx.target_path), os.path.join(tmp_path, 'tools', 'tprdp'), 'tp_rdp.exe')
|
||||
# # utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_path, 'tools', 'tprdp'), 'tprdp-client.exe')
|
||||
# # utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_path, 'tools', 'tprdp'), 'tprdp-replay.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'putty'), os.path.join(tmp_path, 'tools', 'putty'), 'putty.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'winscp'), os.path.join(tmp_path, 'tools', 'winscp'), 'WinSCP.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'winscp'), os.path.join(tmp_path, 'tools', 'winscp'), 'license.txt')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools'), os.path.join(tmp_path, 'tools'), 'securecrt-telnet.vbs')
|
||||
#
|
||||
# # utils.makedirs(os.path.join(tmp_path, 'data'))
|
||||
# # utils.copy_file(os.path.join(ROOT_PATH, 'tp_assist'), os.path.join(tmp_path, 'data'), 'ssl.cert')
|
||||
#
|
||||
# out_file = os.path.join(ROOT_PATH, 'dist', '{}.zip'.format(name))
|
||||
# utils.make_zip(base_tmp, out_file)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def _build_installer(name):
|
||||
base_path = os.path.join(ROOT_PATH, 'out', 'tp_assist')
|
||||
base_tmp = os.path.join(base_path, '_tmp_')
|
||||
tmp_path = os.path.join(base_tmp, name)
|
||||
def _build_installer():
|
||||
# base_path = os.path.join(ROOT_PATH, 'out', 'client')
|
||||
# base_tmp = os.path.join(base_path, '_tmp_')
|
||||
tmp_path = os.path.join(ROOT_PATH, 'dist', 'windows', 'client', 'assist')
|
||||
tmp_app_path = os.path.join(tmp_path, 'apps')
|
||||
tmp_cfg_path = os.path.join(tmp_path, 'cfg')
|
||||
# E:\work\eomsoft\teleport - github\dist\windows\client\assist\apps
|
||||
|
||||
if os.path.exists(base_tmp):
|
||||
utils.remove(base_tmp)
|
||||
if os.path.exists(tmp_app_path):
|
||||
utils.remove(tmp_app_path)
|
||||
if os.path.exists(tmp_cfg_path):
|
||||
utils.remove(tmp_cfg_path)
|
||||
|
||||
utils.makedirs(tmp_path)
|
||||
utils.makedirs(tmp_app_path)
|
||||
utils.makedirs(tmp_cfg_path)
|
||||
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'out', 'tp_assist', ctx.bits_path, ctx.target_path), tmp_path, 'tp_assist.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tp_assist'), tmp_path, ('ssh_client.orig.ini', 'ssh_client.ini'))
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tp_assist'), tmp_path, ('scp_client.orig.ini', 'scp_client.ini'))
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tp_assist'), tmp_path, ('telnet_client.orig.ini', 'telnet_client.ini'))
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'out', 'client', ctx.bits_path, ctx.target_path), tmp_app_path, 'tp_assist.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'ssh.ini')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'scp.ini')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'telnet.ini')
|
||||
|
||||
utils.copy_ex(os.path.join(ROOT_PATH, 'tp_assist'), tmp_path, 'site')
|
||||
utils.copy_ex(os.path.join(ROOT_PATH, 'client', 'tp_assist'), tmp_app_path, 'site')
|
||||
|
||||
utils.makedirs(os.path.join(tmp_path, 'tools', 'tprdp'))
|
||||
utils.makedirs(os.path.join(tmp_path, 'tools', 'putty'))
|
||||
utils.makedirs(os.path.join(tmp_path, 'tools', 'winscp'))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'out', 'tp_rdp', ctx.bits_path, ctx.target_path), os.path.join(tmp_path, 'tools', 'tprdp'), 'tp_rdp.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_path, 'tools', 'tprdp'), 'tprdp-client.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_path, 'tools', 'tprdp'), 'tprdp-replay.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'putty'), os.path.join(tmp_path, 'tools', 'putty'), 'putty.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'winscp'), os.path.join(tmp_path, 'tools', 'winscp'), 'WinSCP.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'winscp'), os.path.join(tmp_path, 'tools', 'winscp'), 'license.txt')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'tools'), os.path.join(tmp_path, 'tools'), 'securecrt-telnet.vbs')
|
||||
# utils.makedirs(os.path.join(tmp_app_path, 'tools', 'tprdp'))
|
||||
utils.makedirs(os.path.join(tmp_app_path, 'tools', 'putty'))
|
||||
utils.makedirs(os.path.join(tmp_app_path, 'tools', 'winscp'))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'out', 'tp_rdp', ctx.bits_path, ctx.target_path), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'tp_rdp.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'tprdp-client.exe')
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'tools', 'tprdp'), os.path.join(tmp_app_path, 'tools', 'tprdp'), 'tprdp-replay.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'putty'), os.path.join(tmp_app_path, 'tools', 'putty'), 'putty.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'winscp'), os.path.join(tmp_app_path, 'tools', 'winscp'), 'WinSCP.exe')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools', 'winscp'), os.path.join(tmp_app_path, 'tools', 'winscp'), 'license.txt')
|
||||
utils.copy_file(os.path.join(ROOT_PATH, 'client', 'tools'), os.path.join(tmp_app_path, 'tools'), 'securecrt-telnet.vbs')
|
||||
|
||||
# utils.makedirs(os.path.join(tmp_path, 'data'))
|
||||
# utils.copy_file(os.path.join(ROOT_PATH, 'tp_assist'), os.path.join(tmp_path, 'data'), 'ssl.cert')
|
||||
|
||||
out_file = os.path.join(ROOT_PATH, 'dist', '{}.zip'.format(name))
|
||||
utils.make_zip(base_tmp, out_file)
|
||||
# out_file = os.path.join(ROOT_PATH, 'dist', '{}.zip'.format(name))
|
||||
# utils.make_zip(base_tmp, out_file)
|
||||
# E:\work\eomsoft\teleport - github\dist\windows\client\assist
|
||||
utils.nsis_build(os.path.join(ROOT_PATH, 'dist', 'windows', 'client', 'assist', 'installer.nsi'))
|
||||
|
||||
|
||||
class BuilderLinux(BuilderBase):
|
||||
|
|
|
@ -19,7 +19,7 @@ class Builder:
|
|||
self.VER_TELEPORT_SERVER = ''
|
||||
self.VER_TELEPORT_ASSIST = ''
|
||||
self.VER_TELEPORT_ASSIST_REQUIRE = ''
|
||||
self.VER_TELEPORT_MAKECERT = ''
|
||||
# self.VER_TELEPORT_MAKECERT = ''
|
||||
|
||||
def build(self):
|
||||
cc.n('update version...')
|
||||
|
@ -38,26 +38,28 @@ class Builder:
|
|||
elif l.startswith('TELEPORT_ASSIST_REQUIRE '):
|
||||
x = l.split(' ')
|
||||
self.VER_TELEPORT_ASSIST_REQUIRE = x[1].strip()
|
||||
elif l.startswith('TELEPORT_MAKECERT '):
|
||||
x = l.split(' ')
|
||||
self.VER_TELEPORT_MAKECERT = x[1].strip()
|
||||
# elif l.startswith('TELEPORT_MAKECERT '):
|
||||
# x = l.split(' ')
|
||||
# self.VER_TELEPORT_MAKECERT = x[1].strip()
|
||||
|
||||
#
|
||||
cc.v('new version:')
|
||||
cc.v(' TELEPORT-Server : ', self.VER_TELEPORT_SERVER)
|
||||
cc.v(' TELEPORT-Assist : ', self.VER_TELEPORT_ASSIST)
|
||||
cc.v(' TELEPORT-Assist-require : ', self.VER_TELEPORT_ASSIST_REQUIRE)
|
||||
cc.v(' TELEPORT-MakeCert : ', self.VER_TELEPORT_MAKECERT)
|
||||
# cc.v(' TELEPORT-MakeCert : ', self.VER_TELEPORT_MAKECERT)
|
||||
cc.v('')
|
||||
|
||||
self.make_build_ver()
|
||||
self.make_assist_ver()
|
||||
self.make_eom_ts_ver()
|
||||
self.make_tp_core_ver()
|
||||
self.make_tp_web_ver()
|
||||
self.make_web_ver()
|
||||
|
||||
def make_build_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'build', 'builder', 'core', 'ver.py')
|
||||
ver_content = '# -*- coding: utf8 -*-\nVER_TELEPORT_SERVER = "{}"\nVER_TELEPORT_ASSIST = "{}"\nVER_TELEPORT_MAKECERT = "{}"\n'.format(self.VER_TELEPORT_SERVER, self.VER_TELEPORT_ASSIST, self.VER_TELEPORT_MAKECERT)
|
||||
# ver_content = '# -*- coding: utf8 -*-\nVER_TELEPORT_SERVER = "{}"\nVER_TELEPORT_ASSIST = "{}"\nVER_TELEPORT_MAKECERT = "{}"\n'.format(self.VER_TELEPORT_SERVER, self.VER_TELEPORT_ASSIST, self.VER_TELEPORT_MAKECERT)
|
||||
ver_content = '# -*- coding: utf8 -*-\nVER_TELEPORT_SERVER = "{}"\nVER_TELEPORT_ASSIST = "{}"\n'.format(self.VER_TELEPORT_SERVER, self.VER_TELEPORT_ASSIST)
|
||||
|
||||
rewrite = False
|
||||
if not os.path.exists(ver_file):
|
||||
|
@ -75,7 +77,7 @@ class Builder:
|
|||
f.write(ver_content)
|
||||
|
||||
def make_web_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'web', 'site', 'teleport', 'app', 'eom_ver.py')
|
||||
ver_file = os.path.join(ROOT_PATH, 'server', 'www', 'teleport', 'app', 'eom_ver.py')
|
||||
# ver_content = '# -*- coding: utf8 -*-\n\nTS_VER = "{}"\n'.format(self.VER_TELEPORT_SERVER)
|
||||
ver_content = '# -*- coding: utf8 -*-\nTS_VER = "{}"\nTP_ASSIST_LAST_VER = "{}"\nTP_ASSIST_REQUIRE = "{}"\n'.format(self.VER_TELEPORT_SERVER, self.VER_TELEPORT_ASSIST, self.VER_TELEPORT_ASSIST_REQUIRE)
|
||||
|
||||
|
@ -95,7 +97,7 @@ class Builder:
|
|||
f.write(ver_content)
|
||||
|
||||
def make_assist_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'tp_assist', 'ts_ver.h')
|
||||
ver_file = os.path.join(ROOT_PATH, 'client', 'tp_assist', 'ts_ver.h')
|
||||
ver_content = '#ifndef __TS_ASSIST_VER_H__\n#define __TS_ASSIST_VER_H__\n\n#define TP_ASSIST_VER\tL"{}"\n\n#endif // __TS_ASSIST_VER_H__\n'.format(self.VER_TELEPORT_ASSIST)
|
||||
|
||||
rewrite = False
|
||||
|
@ -113,11 +115,14 @@ class Builder:
|
|||
with open(ver_file, 'w') as f:
|
||||
f.write(ver_content)
|
||||
|
||||
rc_file = os.path.join(ROOT_PATH, 'tp_assist', 'tp_assist.rc')
|
||||
rc_file = os.path.join(ROOT_PATH, 'client', 'tp_assist', 'tp_assist.rc')
|
||||
self._update_vs_rc(rc_file, self.VER_TELEPORT_ASSIST)
|
||||
|
||||
def make_eom_ts_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'teleport-server', 'src', 'ts_ver.h')
|
||||
nsi_file = os.path.join(ROOT_PATH, 'dist', 'windows', 'client', 'assist', 'installer.nsi')
|
||||
self._update_nsi_rc(nsi_file, self.VER_TELEPORT_ASSIST)
|
||||
|
||||
def make_tp_core_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'server', 'tp_core', 'core', 'ts_ver.h')
|
||||
ver_content = '#ifndef __TS_SERVER_VER_H__\n#define __TS_SERVER_VER_H__\n\n#define TP_SERVER_VER\tL"{}"\n\n#endif // __TS_SERVER_VER_H__\n'.format(self.VER_TELEPORT_SERVER)
|
||||
|
||||
rewrite = False
|
||||
|
@ -135,7 +140,29 @@ class Builder:
|
|||
with open(ver_file, 'w') as f:
|
||||
f.write(ver_content)
|
||||
|
||||
rc_file = os.path.join(ROOT_PATH, 'teleport-server', 'src', 'eom_ts.rc')
|
||||
rc_file = os.path.join(ROOT_PATH, 'server', 'tp_core', 'core', 'tp_core.rc')
|
||||
self._update_vs_rc(rc_file, self.VER_TELEPORT_SERVER)
|
||||
|
||||
def make_tp_web_ver(self):
|
||||
ver_file = os.path.join(ROOT_PATH, 'server', 'tp_web', 'src', 'ts_ver.h')
|
||||
ver_content = '#ifndef __TS_SERVER_VER_H__\n#define __TS_SERVER_VER_H__\n\n#define TP_SERVER_VER\tL"{}"\n\n#endif // __TS_SERVER_VER_H__\n'.format(self.VER_TELEPORT_SERVER)
|
||||
|
||||
rewrite = False
|
||||
if not os.path.exists(ver_file):
|
||||
rewrite = True
|
||||
else:
|
||||
old_content = ''
|
||||
with open(ver_file, 'r') as f:
|
||||
old_content = f.read()
|
||||
if old_content != ver_content:
|
||||
rewrite = True
|
||||
|
||||
if rewrite:
|
||||
cc.v(' update {}...'.format(ver_file))
|
||||
with open(ver_file, 'w') as f:
|
||||
f.write(ver_content)
|
||||
|
||||
rc_file = os.path.join(ROOT_PATH, 'server', 'tp_web', 'src', 'tp_web.rc')
|
||||
self._update_vs_rc(rc_file, self.VER_TELEPORT_SERVER)
|
||||
|
||||
def _update_vs_rc(self, rcFilePath, ver):
|
||||
|
@ -249,6 +276,80 @@ class Builder:
|
|||
except IOError:
|
||||
raise RuntimeError('can not open rc file.')
|
||||
|
||||
def _update_nsi_rc(self, nsiFilePath, ver):
|
||||
""" update nsis file version info """
|
||||
# nver = ver.split('.')
|
||||
t_ver = ver.split('.')
|
||||
if len(t_ver) != 4:
|
||||
raise RuntimeError('Invalid version for assist.')
|
||||
|
||||
bOK = False
|
||||
try:
|
||||
# open nsis file
|
||||
nsiFile = open(nsiFilePath, 'r', encoding='utf-16-le')
|
||||
# read out all lines of nsi file
|
||||
nsiLines = nsiFile.readlines()
|
||||
nsiFile.close()
|
||||
|
||||
# for nsiline in nsiLines:
|
||||
for x in range(len(nsiLines)):
|
||||
nsiline = nsiLines[x]
|
||||
if nsiline.find('\n') != -1:
|
||||
nsiline = nsiline[:-1]
|
||||
|
||||
if nsiline.find(" FILE_VER") != -1 or nsiline.find(" STR_FILE_VER") != -1:
|
||||
# cc.v('[ver] old ver: %s' % nsiLines[x])
|
||||
pos1 = nsiline.find('"')
|
||||
pos2 = nsiline.rfind('"')
|
||||
_ver = nsiline[pos1 + 1: pos2]
|
||||
|
||||
nsiSplitList = _ver.split(".")
|
||||
if (len(nsiSplitList) != 4):
|
||||
raise RuntimeError('Invalid .nsi file (1).')
|
||||
if '.'.join(nsiSplitList) == ver:
|
||||
continue
|
||||
|
||||
# nsiline = '%s\"%d.%d.%d.%d\"\n' % (nsiline[0:pos1], self.major, self.minor, self.revision, self.build)
|
||||
nsiline = '%s\"%s.%s.%s.%s\"\n' % (nsiline[0:pos1], t_ver[0], t_ver[1], t_ver[2], t_ver[3])
|
||||
|
||||
nsiLines[x] = ""
|
||||
nsiLines[x] = nsiline
|
||||
# cc.v('[ver] new ver: %s' % nsiLines[x])
|
||||
bOK = True
|
||||
|
||||
elif nsiline.find(" PRODUCT_VER") != -1:
|
||||
# cc.v('[ver] old ver: %s' % nsiLines[x])
|
||||
pos1 = nsiline.find('"')
|
||||
pos2 = nsiline.rfind('"')
|
||||
_ver = nsiline[pos1 + 1: pos2]
|
||||
|
||||
nsiSplitList = _ver.split(".")
|
||||
if (len(nsiSplitList) != 2):
|
||||
raise RuntimeError('Invalid .nsi file (2).')
|
||||
if '.'.join(nsiSplitList) == '%s.%s' % (t_ver[0], t_ver[1]):
|
||||
continue
|
||||
|
||||
# nsiline = '%s\"%d.%d\"\n' % (nsiline[0:pos1], self.major, self.minor)
|
||||
nsiline = '%s\"%s.%s\"\n' % (nsiline[0:pos1], t_ver[0], t_ver[1])
|
||||
|
||||
nsiLines[x] = ""
|
||||
nsiLines[x] = nsiline
|
||||
# cc.v('[ver] new ver: %s' % nsiLines[x])
|
||||
bOK = True
|
||||
|
||||
else:
|
||||
continue
|
||||
|
||||
if bOK:
|
||||
cc.v(' update {}...'.format(nsiFilePath))
|
||||
wnsiFile = open(nsiFilePath, 'w', encoding='utf-16-le')
|
||||
wnsiFile.writelines(nsiLines)
|
||||
wnsiFile.close()
|
||||
return bOK
|
||||
|
||||
except IOError:
|
||||
raise RuntimeError('can not open nsi file.')
|
||||
|
||||
|
||||
def main():
|
||||
builder = Builder()
|
||||
|
|
|
@ -220,8 +220,8 @@ def python_exec():
|
|||
|
||||
|
||||
def msbuild_path():
|
||||
if cfg.msbuild is not None:
|
||||
return cfg.msbuild
|
||||
if cfg.toolchain.msbuild is not None:
|
||||
return cfg.toolchain.msbuild
|
||||
|
||||
# 14.0 = VS2015
|
||||
# 12.0 = VS2012
|
||||
|
@ -241,13 +241,13 @@ def msbuild_path():
|
|||
if not os.path.exists(msb):
|
||||
raise RuntimeError('Can not locate MSBuild at {}'.format(msp))
|
||||
|
||||
cfg.msbuild = msb
|
||||
cfg.toolchain.msbuild = msb
|
||||
return msb
|
||||
|
||||
|
||||
def nsis_path():
|
||||
if cfg.nsis is not None:
|
||||
return cfg.nsis
|
||||
if cfg.toolchain.nsis is not None:
|
||||
return cfg.toolchain.nsis
|
||||
|
||||
p = winreg_read_wow64_32(r'SOFTWARE\NSIS\Unicode', '')
|
||||
if p is None:
|
||||
|
@ -257,7 +257,7 @@ def nsis_path():
|
|||
if not os.path.exists(p):
|
||||
raise RuntimeError('Can not locate NSIS at {}'.format(p))
|
||||
|
||||
cfg.nsis = p
|
||||
cfg.toolchain.nsis = p
|
||||
return p
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# -*- coding: utf8 -*-
|
||||
VER_TELEPORT_SERVER = "1.6.225.1"
|
||||
VER_TELEPORT_ASSIST = "1.5.46.5"
|
||||
VER_TELEPORT_MAKECERT = "1.0.1"
|
||||
VER_TELEPORT_SERVER = "2.0.0.1"
|
||||
VER_TELEPORT_ASSIST = "2.0.0.1"
|
||||
|
|
Binary file not shown.
|
@ -4,6 +4,7 @@
|
|||
#include <time.h>
|
||||
#ifdef EX_OS_WIN32
|
||||
# include <direct.h>
|
||||
# include <ShlObj.h>
|
||||
#endif
|
||||
|
||||
TsEnv g_env;
|
||||
|
@ -27,17 +28,20 @@ bool TsEnv::init(void)
|
|||
if (!ex_dirname(m_exec_path))
|
||||
return false;
|
||||
|
||||
m_ssh_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_ssh_client_conf_file, false, _T("ssh_client.ini"), NULL);
|
||||
TCHAR szBuf[PATH_MAX] = { 0 };
|
||||
SHGetSpecialFolderPathW(NULL, szBuf, CSIDL_APPDATA, FALSE);
|
||||
|
||||
m_scp_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_scp_client_conf_file, false, _T("scp_client.ini"), NULL);
|
||||
m_ssh_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_ssh_client_conf_file, false, _T("eomsoft"), _T("teleport"), _T("assist"), _T("cfg"), _T("ssh.ini"), NULL);
|
||||
|
||||
m_scp_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_scp_client_conf_file, false, _T("eomsoft"), _T("teleport"), _T("assist"), _T("cfg"), _T("scp.ini"), NULL);
|
||||
|
||||
m_telnet_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_telnet_client_conf_file, false, _T("telnet_client.ini"), NULL);
|
||||
m_telnet_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_telnet_client_conf_file, false, _T("eomsoft"), _T("teleport"), _T("assist"), _T("cfg"), _T("telnet.ini"), NULL);
|
||||
|
||||
m_log_path = m_exec_path;
|
||||
ex_path_join(m_log_path, false, _T("log"), NULL);
|
||||
m_log_path = szBuf;// m_exec_path;
|
||||
ex_path_join(m_log_path, false, _T("eomsoft"), _T("teleport"), _T("assist"), _T("log"), NULL);
|
||||
|
||||
m_site_path = m_exec_path;
|
||||
ex_path_join(m_site_path, false, _T("site"), NULL);
|
||||
|
|
|
@ -100,12 +100,12 @@ void http_rpc_main_loop(void)
|
|||
return;
|
||||
}
|
||||
|
||||
EXLOGV("======================================================\n");
|
||||
EXLOGV("[rpc] TeleportAssist-HTTP-RPC ready on %s:%d\n", TS_HTTP_RPC_HOST, TS_HTTP_RPC_PORT);
|
||||
EXLOGW("======================================================\n");
|
||||
EXLOGW("[rpc] TeleportAssist-HTTP-RPC ready on %s:%d\n", TS_HTTP_RPC_HOST, TS_HTTP_RPC_PORT);
|
||||
|
||||
g_http_interface.run();
|
||||
|
||||
EXLOGV("[prc] main loop end.\n");
|
||||
EXLOGW("[prc] main loop end.\n");
|
||||
}
|
||||
|
||||
#define HEXTOI(x) (isdigit(x) ? x - '0' : x - 'W')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef __TS_ASSIST_VER_H__
|
||||
#define __TS_ASSIST_VER_H__
|
||||
|
||||
#define TP_ASSIST_VER L"1.5.46.5"
|
||||
#define TP_ASSIST_VER L"2.0.0.1"
|
||||
|
||||
#endif // __TS_ASSIST_VER_H__
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
#ifndef __TS_SERVER_VER_H__
|
||||
#define __TS_SERVER_VER_H__
|
||||
|
||||
#define TP_SERVER_VER L"1.6.225.1"
|
||||
#define TP_SERVER_VER L"2.0.0.1"
|
||||
|
||||
#endif // __TS_SERVER_VER_H__
|
||||
|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
#ifndef __TS_SERVER_VER_H__
|
||||
#define __TS_SERVER_VER_H__
|
||||
|
||||
#define TP_SERVER_VER L"1.6.225.1"
|
||||
#define TP_SERVER_VER L"2.0.0.1"
|
||||
|
||||
#endif // __TS_SERVER_VER_H__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: utf8 -*-
|
||||
TS_VER = "1.6.225.1"
|
||||
TP_ASSIST_LAST_VER = "1.5.46.5"
|
||||
TS_VER = "2.0.0.1"
|
||||
TP_ASSIST_LAST_VER = "2.0.0.1"
|
||||
TP_ASSIST_REQUIRE = "1.5.46.5"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
版本号说明:Major.Minor.Revision.Build
|
||||
例如:2.12.1027.7
|
||||
|
||||
Major : 主版本号。具有相同名称但不同主版本号的程序集不可互换。
|
||||
例如,这适用于对产品的大量重写,这些重写使得无法实现向后兼容性。
|
||||
|
||||
Minor : 次版本号。如果两个程序集的名称和主版本号相同,而次版本号不同,这指示显著增强,但照顾到了向后兼容性。
|
||||
例如,这适用于产品的修正版或完全向后兼容的新版本。
|
||||
|
||||
Revision : 修订号。名称、主版本号和次版本号都相同但修订号不同的程序集应是完全可互换的。
|
||||
这适用于修复以前发布的程序集中的错误或安全漏洞。修订号总是递增的,是唯一的。
|
||||
|
||||
Build : 构建号。构建号用于表明此版本发布之前进行了多少次构建及测试。某些情况下此版本号可以省略。
|
||||
|
||||
|
||||
|
||||
TELEPORT_SERVER 2.0.0.1
|
||||
TELEPORT_ASSIST 2.0.0.1
|
||||
TELEPORT_ASSIST_REQUIRE 1.5.46.5
|
Loading…
Reference in New Issue