FreeRDP
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
Functions
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Functions
a
c
d
e
f
g
i
o
r
s
t
Variables
a
b
c
d
e
g
i
l
m
n
o
p
r
s
t
u
v
Files
File List
Globals
All
Typedefs
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Modules
Pages
Loading...
Searching...
No Matches
toolchains_path.py
1
#!/usr/bin/env python3
2
"""
3
Get the toolchains path
4
https://proandroiddev.com/tutorial-compile-openssl-to-1-1-1-for-android-application-87137968fee
5
"""
6
import
argparse
7
import
atexit
8
import
inspect
9
import
os
10
import
shutil
11
import
stat
12
import
sys
13
import
textwrap
14
15
def
get_host_tag_or_die
():
16
"""Return the host tag for this platform. Die if not supported."""
17
if
sys.platform.startswith(
'linux'
):
18
return
'linux-x86_64'
19
elif
sys.platform ==
'darwin'
:
20
return
'darwin-x86_64'
21
elif
sys.platform ==
'win32'
or
sys.platform ==
'cygwin'
:
22
host_tag =
'windows-x86_64'
23
if
not
os.path.exists(os.path.join(NDK_DIR,
'prebuilt'
, host_tag)):
24
host_tag =
'windows'
25
return
host_tag
26
sys.exit(
'Unsupported platform: '
+ sys.platform)
27
28
15
def
get_host_tag_or_die
():
…
29
def
get_toolchain_path_or_die
(ndk, host_tag):
30
"""Return the toolchain path or die."""
31
toolchain_path = os.path.join(ndk,
'toolchains/llvm/prebuilt'
,
32
host_tag,
'bin'
)
33
if
not
os.path.exists(toolchain_path):
34
sys.exit(
'Could not find toolchain: {}'
.format(toolchain_path))
35
return
toolchain_path
36
29
def
get_toolchain_path_or_die
(ndk, host_tag):
…
37
def
main
():
38
"""Program entry point."""
39
parser = argparse.ArgumentParser(description=
'Optional app description'
)
40
parser.add_argument(
'--ndk'
, required=
True
,
41
help=
'The NDK Home directory'
)
42
args = parser.parse_args()
43
44
host_tag =
get_host_tag_or_die
()
45
toolchain_path =
get_toolchain_path_or_die
(args.ndk, host_tag)
46
print(toolchain_path)
47
37
def
main
():
…
48
if
__name__ ==
'__main__'
:
49
main
()
toolchains_path.get_host_tag_or_die
get_host_tag_or_die()
Definition
toolchains_path.py:15
toolchains_path.main
main()
Definition
toolchains_path.py:37
toolchains_path.get_toolchain_path_or_die
get_toolchain_path_or_die(ndk, host_tag)
Definition
toolchains_path.py:29
scripts
toolchains_path.py
Generated by
1.9.8