mirror of https://github.com/tp4a/teleport
parent
9bce1dbe1d
commit
7608b6f94a
|
@ -65,17 +65,20 @@ class BuilderWin(BuilderBase):
|
|||
def _build_installer():
|
||||
tmp_path = os.path.join(env.root_path, 'dist', 'client', 'windows', 'assist')
|
||||
tmp_app_path = os.path.join(tmp_path, 'apps')
|
||||
tmp_cfg_path = os.path.join(tmp_path, 'cfg')
|
||||
tmp_cfg_path = os.path.join(tmp_app_path, 'cfg')
|
||||
|
||||
if os.path.exists(tmp_app_path):
|
||||
utils.remove(tmp_app_path)
|
||||
if os.path.exists(tmp_cfg_path):
|
||||
utils.remove(tmp_cfg_path)
|
||||
# if os.path.exists(tmp_cfg_path):
|
||||
# utils.remove(tmp_cfg_path)
|
||||
|
||||
utils.makedirs(tmp_app_path)
|
||||
utils.makedirs(tmp_cfg_path)
|
||||
|
||||
utils.copy_file(os.path.join(env.root_path, 'out', 'client', ctx.bits_path, ctx.target_path), tmp_app_path, 'tp_assist.exe')
|
||||
# utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'ssh.ini')
|
||||
# utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'scp.ini')
|
||||
# utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'telnet.ini')
|
||||
utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'ssh.ini')
|
||||
utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'scp.ini')
|
||||
utils.copy_file(os.path.join(env.root_path, 'client', 'tp_assist', 'cfg'), tmp_cfg_path, 'telnet.ini')
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <time.h>
|
||||
#ifdef EX_OS_WIN32
|
||||
# include <direct.h>
|
||||
# include <ShlObj.h>
|
||||
//# include <ShlObj.h>
|
||||
#endif
|
||||
|
||||
TsEnv g_env;
|
||||
|
@ -28,20 +28,31 @@ bool TsEnv::init(void)
|
|||
if (!ex_dirname(m_exec_path))
|
||||
return false;
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_ssh_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_ssh_client_conf_file, false, L"ssh.ini", NULL);
|
||||
ex_path_join(m_ssh_client_conf_file, false, L"cfg", L"ssh.ini", NULL);
|
||||
|
||||
m_scp_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_scp_client_conf_file, false, L"scp.ini", NULL);
|
||||
ex_path_join(m_scp_client_conf_file, false, L"cfg", L"scp.ini", NULL);
|
||||
|
||||
m_telnet_client_conf_file = m_exec_path;
|
||||
ex_path_join(m_telnet_client_conf_file, false, L"telnet.ini", NULL);
|
||||
ex_path_join(m_telnet_client_conf_file, false, L"cfg", L"telnet.ini", NULL);
|
||||
|
||||
m_log_path = m_exec_path;
|
||||
ex_path_join(m_log_path, false, L"log", NULL);
|
||||
|
||||
#ifdef _DEBUG
|
||||
// m_ssh_client_conf_file = m_exec_path;
|
||||
// ex_path_join(m_ssh_client_conf_file, false, L"ssh.ini", NULL);
|
||||
//
|
||||
// m_scp_client_conf_file = m_exec_path;
|
||||
// ex_path_join(m_scp_client_conf_file, false, L"scp.ini", NULL);
|
||||
//
|
||||
// m_telnet_client_conf_file = m_exec_path;
|
||||
// ex_path_join(m_telnet_client_conf_file, false, L"telnet.ini", NULL);
|
||||
//
|
||||
// m_log_path = m_exec_path;
|
||||
// ex_path_join(m_log_path, false, L"log", NULL);
|
||||
|
||||
m_site_path = m_exec_path;
|
||||
ex_path_join(m_site_path, true, L"..", L"..", L"..", L"..", L"client", L"tp_assist", L"site", NULL);
|
||||
|
||||
|
@ -49,20 +60,20 @@ bool TsEnv::init(void)
|
|||
ex_path_join(m_tools_path, true, L"..", L"..", L"..", L"..", L"client", L"tools", NULL);
|
||||
|
||||
#else
|
||||
TCHAR szBuf[PATH_MAX] = { 0 };
|
||||
SHGetSpecialFolderPathW(NULL, szBuf, CSIDL_APPDATA, FALSE);
|
||||
|
||||
m_ssh_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_ssh_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"ssh.ini", NULL);
|
||||
|
||||
m_scp_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_scp_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"scp.ini", NULL);
|
||||
|
||||
m_telnet_client_conf_file = szBuf;// m_exec_path;
|
||||
ex_path_join(m_telnet_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"telnet.ini", NULL);
|
||||
|
||||
m_log_path = szBuf;// m_exec_path;
|
||||
ex_path_join(m_log_path, false, L"eomsoft", L"teleport", L"assist", L"log", NULL);
|
||||
// TCHAR szBuf[PATH_MAX] = { 0 };
|
||||
// SHGetSpecialFolderPathW(NULL, szBuf, CSIDL_APPDATA, FALSE);
|
||||
//
|
||||
// m_ssh_client_conf_file = szBuf;// m_exec_path;
|
||||
// ex_path_join(m_ssh_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"ssh.ini", NULL);
|
||||
//
|
||||
// m_scp_client_conf_file = szBuf;// m_exec_path;
|
||||
// ex_path_join(m_scp_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"scp.ini", NULL);
|
||||
//
|
||||
// m_telnet_client_conf_file = szBuf;// m_exec_path;
|
||||
// ex_path_join(m_telnet_client_conf_file, false, L"eomsoft", L"teleport", L"assist", L"cfg", L"telnet.ini", NULL);
|
||||
//
|
||||
// m_log_path = szBuf;// m_exec_path;
|
||||
// ex_path_join(m_log_path, false, L"eomsoft", L"teleport", L"assist", L"log", NULL);
|
||||
|
||||
m_site_path = m_exec_path;
|
||||
ex_path_join(m_site_path, false, L"site", NULL);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue