mirror of
https://github.com/fastogt/fastocloud.git
synced 2025-03-09 23:18:50 +00:00
Init FastoCloud on Github
This commit is contained in:
parent
d0d234101d
commit
d0d6551903
359 changed files with 32676 additions and 23 deletions
38
build/build.py
Normal file
38
build/build.py
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env python3
|
||||
import sys
|
||||
from pyfastogt import build_utils, system_info
|
||||
|
||||
|
||||
class BuildRequest(build_utils.BuildRequest):
|
||||
def __init__(self, platform, arch_name, dir_path, prefix_path):
|
||||
build_utils.BuildRequest.__init__(self, platform, arch_name, dir_path, prefix_path)
|
||||
|
||||
def build(self, build_type):
|
||||
cmake_flags = []
|
||||
self._build_via_cmake_double(cmake_flags, build_type)
|
||||
|
||||
|
||||
def print_usage():
|
||||
print("Usage:\n"
|
||||
"[required] argv[1] build type(release/debug)\n"
|
||||
"[optional] argv[2] prefix\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
argc = len(sys.argv)
|
||||
|
||||
if argc > 1:
|
||||
build_type = sys.argv[1]
|
||||
else:
|
||||
print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
prefix = '/usr/local'
|
||||
if argc > 2:
|
||||
prefix = sys.argv[2]
|
||||
|
||||
host_os = system_info.get_os()
|
||||
arch_host_os = system_info.get_arch_name()
|
||||
|
||||
request = BuildRequest(host_os, arch_host_os, 'build_' + host_os, prefix)
|
||||
request.build(build_type)
|
||||
Loading…
Add table
Add a link
Reference in a new issue