mirror of https://github.com/tp4a/teleport
temp.
parent
4af43622d7
commit
61512f287c
|
@ -4,10 +4,9 @@
|
||||||
# import shutil
|
# import shutil
|
||||||
# import time
|
# import time
|
||||||
from core import colorconsole as cc
|
from core import colorconsole as cc
|
||||||
# from core import makepyo
|
|
||||||
from core import utils
|
from core import utils
|
||||||
from core.env import env
|
|
||||||
from core.context import *
|
from core.context import *
|
||||||
|
from core.env import env
|
||||||
|
|
||||||
ctx = BuildContext()
|
ctx = BuildContext()
|
||||||
|
|
||||||
|
@ -61,32 +60,24 @@ class BuilderLinux(BuilderBase):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def build_server(self):
|
def build_server(self):
|
||||||
cc.n('build tp_web...')
|
cc.n('build server app (tp_core/libtpssh/tp_web)...')
|
||||||
|
|
||||||
###################
|
|
||||||
# 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', 'server', ctx.bits_path, 'bin')
|
out_path = os.path.join(env.root_path, 'out', 'server', ctx.bits_path, 'bin')
|
||||||
out_file = os.path.join(out_path, 'tp_web')
|
out_files = [os.path.join(out_path, 'tp_core'), os.path.join(out_path, 'libtpssh.so'),
|
||||||
|
os.path.join(out_path, 'tp_web')]
|
||||||
|
|
||||||
if os.path.exists(out_file):
|
for f in out_files:
|
||||||
utils.remove(out_file)
|
if os.path.exists(f):
|
||||||
|
utils.remove(f)
|
||||||
|
|
||||||
utils.makedirs(out_path)
|
utils.makedirs(out_path)
|
||||||
|
|
||||||
utils.cmake(os.path.join(env.root_path, 'server', 'cmake-build'), ctx.target_path, False)
|
utils.cmake(os.path.join(env.root_path, 'server', 'cmake-build'), ctx.target_path, False)
|
||||||
utils.strip(out_file)
|
# utils.strip(out_file)
|
||||||
|
|
||||||
|
|
||||||
# wscript_file = os.path.join(env.root_path, 'wscript')
|
|
||||||
# utils.waf_build(wscript_file, ctx.target_path, False)
|
|
||||||
|
|
||||||
# chk_file = os.path.join(env.root_path, 'waf_build', ctx.target_path, 'eom_ts')
|
|
||||||
# utils.ensure_file_exists(chk_file)
|
|
||||||
# os.chmod(chk_file, 0o777)
|
|
||||||
|
|
||||||
# shutil.copy(chk_file, out_file)
|
|
||||||
utils.ensure_file_exists(out_file)
|
|
||||||
|
|
||||||
|
for f in out_files:
|
||||||
|
if os.path.exists(f):
|
||||||
|
utils.ensure_file_exists(f)
|
||||||
|
|
||||||
|
|
||||||
def gen_builder(dist):
|
def gen_builder(dist):
|
||||||
|
@ -125,14 +116,14 @@ def main():
|
||||||
if 'server' in argv:
|
if 'server' in argv:
|
||||||
builder.build_server()
|
builder.build_server()
|
||||||
|
|
||||||
# if 'app' in argv:
|
# if 'app' in argv:
|
||||||
# builder.build_app()
|
# builder.build_app()
|
||||||
|
|
||||||
# if 'installer' in argv:
|
# if 'installer' in argv:
|
||||||
# builder.build_installer()
|
# builder.build_installer()
|
||||||
|
|
||||||
# if 'runtime' in argv:
|
# if 'runtime' in argv:
|
||||||
# builder.build_runtime()
|
# builder.build_runtime()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue