[macos] 在助手程序中使用mebedtls取代openssl。

pull/236/head
Apex Liu 2019-11-29 20:35:47 +08:00
parent 0b10a1b1aa
commit 7902a3b958
7 changed files with 123 additions and 57 deletions

View File

@ -23,7 +23,7 @@ class BuilderBase:
self._init_path()
def _init_path(self):
cc.e("this is a pure-virtual function.")
cc.e("_init_path() pure-virtual function.")
def build_jsoncpp(self):
file_name = 'jsoncpp-{}.zip'.format(env.ver_jsoncpp)
@ -33,7 +33,7 @@ class BuilderBase:
return utils.download_file('jsoncpp source tarball', 'https://github.com/open-source-parsers/jsoncpp/archive/{}.zip'.format(env.ver_jsoncpp), PATH_DOWNLOAD, file_name)
def _build_jsoncpp(self, file_name):
cc.e("this is a pure-virtual function.")
cc.e("_build_jsoncpp() pure-virtual function.")
def build_mongoose(self):
file_name = 'mongoose-{}.zip'.format(env.ver_mongoose)
@ -43,7 +43,7 @@ class BuilderBase:
return utils.download_file('mongoose source tarball', 'https://github.com/cesanta/mongoose/archive/{}.zip'.format(env.ver_mongoose), PATH_DOWNLOAD, file_name)
def _build_mongoose(self, file_name):
cc.e("this is a pure-virtual function.")
cc.e("_build_mongoose() pure-virtual function.")
def build_openssl(self):
file_name = 'openssl-{}.zip'.format(env.ver_ossl)
@ -54,7 +54,7 @@ class BuilderBase:
return utils.download_file('openssl source tarball', 'https://github.com/openssl/openssl/archive/OpenSSL_{}.zip'.format(_alt_ver), PATH_DOWNLOAD, file_name)
def _build_openssl(self, file_name):
cc.e("this is a pure-virtual function.")
cc.e("_build_openssl() pure-virtual function.")
# _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):
# cc.e("can not download openssl source tarball.")
@ -90,7 +90,7 @@ class BuilderBase:
return utils.download_file('mbedtls source tarball', 'https://www.zlib.net/zlib{}.zip'.format(env.ver_zlib_number), PATH_DOWNLOAD, file_name)
def _build_zlib(self, file_name):
cc.e("this is a pure-virtual function.")
cc.e("_build_zlib() pure-virtual function.")
def build_libssh(self):
file_name = 'libssh-{}.zip'.format(env.ver_libssh)
@ -100,13 +100,13 @@ class BuilderBase:
return utils.download_file('libssh source tarball', 'https://git.libssh.org/projects/libssh.git/snapshot/libssh-{}.zip'.format(env.ver_libssh), PATH_DOWNLOAD, file_name)
def _build_libssh(self, file_name):
cc.e("this is a pure-virtual function.")
cc.e("_build_libssh() pure-virtual function.")
def prepare_python(self):
self._prepare_python()
def _prepare_python(self):
cc.e("this is a pure-virtual function.")
cc.e("_prepare_python() pure-virtual function.")
def fix_output(self):
pass
@ -611,6 +611,7 @@ class BuilderMacOS(BuilderBase):
self.LIBUV_PATH_SRC = os.path.join(self.PATH_TMP, 'libuv-{}'.format(env.ver_libuv))
self.MBEDTLS_PATH_SRC = os.path.join(self.PATH_TMP, 'mbedtls-mbedtls-{}'.format(env.ver_mbedtls))
self.LIBSSH_PATH_SRC = os.path.join(self.PATH_TMP, 'libssh-{}'.format(env.ver_libssh))
self.ZLIB_PATH_SRC = os.path.join(self.PATH_TMP, 'zlib-{}'.format(env.ver_zlib))
self.JSONCPP_PATH_SRC = os.path.join(PATH_EXTERNAL, 'jsoncpp')
self.MONGOOSE_PATH_SRC = os.path.join(PATH_EXTERNAL, 'mongoose')
@ -619,6 +620,8 @@ class BuilderMacOS(BuilderBase):
utils.makedirs(self.PATH_TMP)
def _build_jsoncpp(self, file_name):
if not self._download_jsoncpp(file_name):
return
cc.n('prepare jsoncpp source code...', end='')
if not os.path.exists(self.JSONCPP_PATH_SRC):
cc.v('')
@ -628,6 +631,8 @@ class BuilderMacOS(BuilderBase):
cc.w('already exists, skip.')
def _build_mongoose(self, file_name):
if not self._download_mongoose(file_name):
return
cc.n('prepare mongoose source code...', end='')
if not os.path.exists(self.MONGOOSE_PATH_SRC):
cc.v('')
@ -637,7 +642,10 @@ class BuilderMacOS(BuilderBase):
cc.w('already exists, skip.')
def _build_openssl(self, file_name):
if not super()._build_openssl(file_name):
cc.w('skip build openssl again.')
return
if not self._download_openssl(file_name):
return
cc.n('prepare openssl source code...', end='')
@ -665,6 +673,8 @@ class BuilderMacOS(BuilderBase):
os.chdir(old_p)
def _build_libuv(self, file_name):
if not self._download_libuv(file_name):
return
cc.n('prepare libuv source code...', end='')
if not os.path.exists(self.LIBUV_PATH_SRC):
os.system('unzip "{}/{}" -d "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))
@ -687,6 +697,8 @@ class BuilderMacOS(BuilderBase):
os.chdir(old_p)
def _build_mbedtls(self, file_name):
if not self._download_mbedtls(file_name):
return
if not os.path.exists(self.MBEDTLS_PATH_SRC):
os.system('unzip "{}/{}" -d "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))
@ -731,6 +743,11 @@ class BuilderMacOS(BuilderBase):
os.chdir(old_p)
def _build_libssh(self, file_name):
cc.n('skip build libssh on macOS.')
return
if not self._download_libssh(file_name):
return
if not os.path.exists(self.LIBSSH_PATH_SRC):
os.system('unzip "{}/{}" -d "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))
@ -748,7 +765,6 @@ class BuilderMacOS(BuilderBase):
' -DOPENSSL_LIBRARIES={path_release}/lib' \
' -DWITH_SFTP=ON' \
' -DWITH_SERVER=ON' \
' -DWITH_STATIC_LIB=ON' \
' -DWITH_GSSAPI=OFF' \
' -DWITH_ZLIB=OFF' \
' -DWITH_PCAP=OFF' \
@ -758,6 +774,8 @@ class BuilderMacOS(BuilderBase):
' -DWITH_NACL=OFF' \
''.format(path_release=self.PATH_RELEASE)
# ' -DWITH_STATIC_LIB=ON'
try:
utils.cmake(build_path, 'Release', False, cmake_define)
except:
@ -771,6 +789,41 @@ class BuilderMacOS(BuilderBase):
# utils.copy_file(os.path.join(self.LIBSSH_PATH_SRC, 'build', 'src', 'threads'), os.path.join(self.PATH_RELEASE, 'lib'), 'libssh_threads.a')
utils.copy_ex(os.path.join(self.LIBSSH_PATH_SRC, 'include'), os.path.join(self.PATH_RELEASE, 'include'), 'libssh')
def _build_zlib(self, file_name):
# cc.w('skip build zlib again.')
if not self._download_zlib(file_name):
return
if not os.path.exists(self.ZLIB_PATH_SRC):
os.system('unzip "{}/{}" -d "{}"'.format(PATH_DOWNLOAD, file_name, self.PATH_TMP))
cc.n('build zlib...', end='')
out_file = os.path.join(self.PATH_RELEASE, 'lib', 'libz.a')
if os.path.exists(out_file):
cc.w('already exists, skip.')
return
cc.v('')
build_path = os.path.join(self.ZLIB_PATH_SRC, 'build')
cmake_define = ' -DCMAKE_INSTALL_PREFIX={path_release}' \
' ..'.format(path_release=self.PATH_RELEASE)
old_p = os.getcwd()
try:
utils.cmake(build_path, 'Release', False, cmake_define=cmake_define, cmake_pre_define='CFLAGS="-fPIC"')
os.chdir(build_path)
utils.sys_exec('make install')
except:
pass
os.chdir(old_p)
utils.ensure_file_exists(out_file)
files = os.listdir(os.path.join(self.PATH_RELEASE, 'lib'))
for i in files:
if i.startswith('libz.so'):
# use os.unlink() because some file should be a link.
os.unlink(os.path.join(self.PATH_RELEASE, 'lib', i))
def _prepare_python(self):
pass

View File

@ -47,6 +47,18 @@ else:win32:CONFIG(debug, debug|release): {
DESTDIR = $$PWD/../../out/client/x86/Debug
}
macx:CONFIG(release, debug|release): {
DEFINES += QT_NO_DEBUG_OUTPUT
LIBS += -L$$PWD/../../external/zlib/build/release/ -lzlib
DESTDIR = $$PWD/../../out/client/x86/Release
}
else:macx:CONFIG(debug, debug|release): {
LIBS += -L$$PWD/../../external/zlib/build/debug/ -lzlibd
DESTDIR = $$PWD/../../out/client/x86/Debug
}
INCLUDEPATH += $$PWD/../../external/zlib
INCLUDEPATH += $$PWD/../../external/zlib/build
DEPENDPATH += $$PWD/../../external/zlib

View File

@ -37,8 +37,9 @@
7AA2CD541F6AB9F10074C92B /* json_writer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AA2CD501F6AB9F10074C92B /* json_writer.cpp */; };
7AA2CD571F6ABA2E0074C92B /* mongoose.c in Sources */ = {isa = PBXBuildFile; fileRef = 7AA2CD561F6ABA2E0074C92B /* mongoose.c */; };
7AA2CD591F6AC0DA0074C92B /* site in Resources */ = {isa = PBXBuildFile; fileRef = 7AA2CD581F6AC0DA0074C92B /* site */; };
7AF9BF272199E3DE00BE5DBC /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF9BF1F2199E31A00BE5DBC /* libssl.a */; };
7AF9BF292199E3DF00BE5DBC /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF9BF282199E3DF00BE5DBC /* libcrypto.a */; };
7AAE4B242390EE5C007EDDE7 /* libmbedtls.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF9BF222199E32B00BE5DBC /* libmbedtls.a */; };
7AAE4B252390EE7D007EDDE7 /* libmbedcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF9BF232199E32B00BE5DBC /* libmbedcrypto.a */; };
7AAE4B262390EE7D007EDDE7 /* libmbedx509.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7AF9BF212199E32B00BE5DBC /* libmbedx509.a */; };
A1B7B9DD1DB53ED200809327 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A1B7B9DF1DB53ED200809327 /* Localizable.strings */; };
A1D700071A5DCE8D003563E4 /* AboutWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1D700061A5DCE8D003563E4 /* AboutWindowController.m */; };
C149EBFE15D5214600B1F558 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C149EBFD15D5214600B1F558 /* Cocoa.framework */; };
@ -107,11 +108,10 @@
7AA2CD501F6AB9F10074C92B /* json_writer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = json_writer.cpp; path = ../../../../external/jsoncpp/src/lib_json/json_writer.cpp; sourceTree = "<group>"; };
7AA2CD561F6ABA2E0074C92B /* mongoose.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mongoose.c; path = ../../../../external/mongoose/mongoose.c; sourceTree = "<group>"; };
7AA2CD581F6AC0DA0074C92B /* site */ = {isa = PBXFileReference; lastKnownFileType = folder; path = site; sourceTree = "<group>"; };
7AF9BF1F2199E31A00BE5DBC /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = ../../external/macos/release/lib/libssl.a; sourceTree = "<group>"; };
7AAE4B232390E642007EDDE7 /* mongoose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mongoose.h; path = ../../../../external/mongoose/mongoose.h; sourceTree = "<group>"; };
7AF9BF212199E32B00BE5DBC /* libmbedx509.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedx509.a; path = ../../external/macos/release/lib/libmbedx509.a; sourceTree = "<group>"; };
7AF9BF222199E32B00BE5DBC /* libmbedtls.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedtls.a; path = ../../external/macos/release/lib/libmbedtls.a; sourceTree = "<group>"; };
7AF9BF232199E32B00BE5DBC /* libmbedcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmbedcrypto.a; path = ../../external/macos/release/lib/libmbedcrypto.a; sourceTree = "<group>"; };
7AF9BF282199E3DF00BE5DBC /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = ../../external/macos/release/lib/libcrypto.a; sourceTree = "<group>"; };
A1B7B9D31DB5361700809327 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
A1B7B9DE1DB53ED200809327 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
A1B7B9E01DB53ED700809327 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
@ -143,8 +143,9 @@
buildActionMask = 2147483647;
files = (
C149EBFE15D5214600B1F558 /* Cocoa.framework in Frameworks */,
7AF9BF292199E3DF00BE5DBC /* libcrypto.a in Frameworks */,
7AF9BF272199E3DE00BE5DBC /* libssl.a in Frameworks */,
7AAE4B262390EE7D007EDDE7 /* libmbedx509.a in Frameworks */,
7AAE4B252390EE7D007EDDE7 /* libmbedcrypto.a in Frameworks */,
7AAE4B242390EE5C007EDDE7 /* libmbedtls.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -225,6 +226,7 @@
7AA2CD551F6ABA000074C92B /* mongoose */ = {
isa = PBXGroup;
children = (
7AAE4B232390E642007EDDE7 /* mongoose.h */,
7AA2CD561F6ABA2E0074C92B /* mongoose.c */,
);
name = mongoose;
@ -248,13 +250,6 @@
path = csrc;
sourceTree = "<group>";
};
7AF9BF1E2199E0DD00BE5DBC /* mbedtls */ = {
isa = PBXGroup;
children = (
);
name = mbedtls;
sourceTree = "<group>";
};
A12D9BE61BCF2C72004F52A6 /* apple-scpt */ = {
isa = PBXGroup;
children = (
@ -286,11 +281,9 @@
C149EBFC15D5214600B1F558 /* Frameworks */ = {
isa = PBXGroup;
children = (
7AF9BF282199E3DF00BE5DBC /* libcrypto.a */,
7AF9BF232199E32B00BE5DBC /* libmbedcrypto.a */,
7AF9BF222199E32B00BE5DBC /* libmbedtls.a */,
7AF9BF212199E32B00BE5DBC /* libmbedx509.a */,
7AF9BF1F2199E31A00BE5DBC /* libssl.a */,
C149EBFD15D5214600B1F558 /* Cocoa.framework */,
C149EBFF15D5214600B1F558 /* Other Frameworks */,
);
@ -310,7 +303,6 @@
C149EC0315D5214600B1F558 /* src */ = {
isa = PBXGroup;
children = (
7AF9BF1E2199E0DD00BE5DBC /* mbedtls */,
7A45423D2196E32800FEB5B4 /* cfg */,
7AD3E8741F6A7CC600D2EB48 /* csrc */,
A12D9BE61BCF2C72004F52A6 /* apple-scpt */,
@ -367,7 +359,7 @@
C149EBF015D5214600B1F558 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0930;
LastUpgradeCheck = 1120;
ORGANIZATIONNAME = TP4A;
TargetAttributes = {
C149EBF815D5214600B1F558 = {
@ -606,13 +598,14 @@
C149EC1815D5214600B1F558 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "src/TP-Assist-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
MG_ENABLE_SSL,
"MG_SSL_IF=MG_SSL_IF_MBEDTLS",
);
HEADER_SEARCH_PATHS = (
../../common/teleport,
@ -634,7 +627,7 @@
C149EC1915D5214600B1F558 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "src/TP-Assist-Prefix.pch";

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="15505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14460.31"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="15505"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@ -19,61 +19,61 @@
<window title="About Teleport Assist" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="F0z-JX-Cv5">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="750" y="574" width="315" height="204"/>
<rect key="screenRect" x="0.0" y="0.0" width="2048" height="1129"/>
<rect key="contentRect" x="750" y="574" width="329" height="217"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1057"/>
<view key="contentView" id="se5-gp-TjO">
<rect key="frame" x="0.0" y="0.0" width="315" height="204"/>
<rect key="frame" x="0.0" y="0.0" width="329" height="217"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="6kW-hd-spe">
<rect key="frame" x="125" y="126" width="64" height="64"/>
<rect key="frame" x="125" y="133" width="64" height="64"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageAlignment="top" imageScaling="proportionallyDown" image="teleport" id="VBv-EA-L5r"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="APf-vF-1w0">
<rect key="frame" x="18" y="99" width="279" height="17"/>
<rect key="frame" x="18" y="91" width="293" height="28"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Program Name and Tag Line" id="tb3-eK-HAT">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="Program Name and Tag Line" id="tb3-eK-HAT">
<font key="font" metaFont="system" size="18"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="LTk-GB-fgJ">
<rect key="frame" x="18" y="73" width="279" height="17"/>
<rect key="frame" x="18" y="76" width="293" height="19"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Version" id="6fl-Xm-UPS">
<font key="font" metaFont="system"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rfT-bT-B7g">
<rect key="frame" x="18" y="40" width="293" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Copyright" id="Cmu-CQ-3V9">
<font key="font" metaFont="system" size="10"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="soF-wq-5hG">
<rect key="frame" x="14" y="13" width="287" height="32"/>
<rect key="frame" x="14" y="13" width="301" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Homepage" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uUM-88-32s">
<buttonCell key="cell" type="push" title="url" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="uUM-88-32s">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="smallSystem"/>
<font key="font" metaFont="system" size="12"/>
</buttonCell>
<connections>
<action selector="btnHomepage:" target="-2" id="ZGb-bg-pCR"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rfT-bT-B7g">
<rect key="frame" x="18" y="51" width="279" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Copyright" id="Cmu-CQ-3V9">
<font key="font" metaFont="system" size="10"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<connections>
<outlet property="delegate" destination="-2" id="0bl-1N-AYu"/>
</connections>
<point key="canvasLocation" x="50.5" y="233"/>
<point key="canvasLocation" x="57.5" y="239.5"/>
</window>
</objects>
<resources>

View File

@ -8,7 +8,7 @@
//=============================================
// for About Window
//=============================================
"version" = "Version: ";
"app_full_name" = "Teleport Assist for macOS";
"version" = "";
"app_full_name" = "Teleport Assist";
"copyright" = "Copyright © 2017~2019, tp4a.com. All rights reserved.";
"visit_tp4a_website" = "Visit Teleport Website"

View File

@ -32,3 +32,11 @@ bool TsEnv::init(const char* cfg_file, const char* res_path)
return true;
}
extern "C" {
int mg_ssl_if_mbed_random(void *ctx, unsigned char *buf, size_t len) {
(void) ctx;
while (len--) *buf++ = (arc4random() % 255);
return 0;
}
}

View File

@ -13,7 +13,7 @@
// for About Window
//=============================================
"about " = "关于 ";
"version" = "版本:";
"app_full_name" = "Teleport助手 - macOS";
"version" = "";
"app_full_name" = "Teleport助手";
"copyright" = "© 2017~2019tp4a.com。保留所有权利。";
"visit_tp4a_website" = "访问 Teleport 网站";