Skip to content

Commit

Permalink
fix script for builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
apexliu committed Sep 23, 2018
1 parent a6f03f3 commit 051b1fe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 35 deletions.
45 changes: 11 additions & 34 deletions build.sh.in
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
#!/bin/bash

#---------------------------------------------------------------
# README
#
# pleas copy build.sh.in to build.sh and change the following
# two lines to fit your env.
#
# Recommend to download miniconda from
# https://conda.io/miniconda.html
# and install it, root priviledge is not necessary.
#---------------------------------------------------------------
PATH_PYTHON_LINUX=/path/of/your/miniconda/installation
PATH_PYTHON_MACOS=/path/of/your/miniconda/installation

################################################################
# DO NOT TOUCH FOLLOWING CODE
################################################################

PATH_ROOT=$(cd "$(dirname "$0")"; pwd)

function on_error()
Expand All @@ -31,33 +14,27 @@ function on_error()
exit 1
}

function check_python
function build_linux
{
PYEXEC=${PATH_ROOT}/external/linux/release/bin/python3.7
PYSTATIC=${PATH_ROOT}/external/linux/release/lib/libpython3.7m.a

if [ ! -f "${PYSTATIC}" ]; then
on_error "python not found."
fi
}
echo "python static not found, now build it..."
"${PATH_ROOT}/build/build-py-static.sh"

function build_linux
{
PATH_PYTHON=${PATH_PYTHON_LINUX}
PYEXEC=${PATH_PYTHON}/bin/python3.7
PYSTATIC=${PATH_PYTHON}/lib/libpython3.7m.a
if [ ! -f "${PYSTATIC}" ]; then
on_error "can not build python static."
fi
fi

check_python

${PYEXEC} -B "${PATH_ROOT}/build/build.py" $@
}

function build_macos
{
PATH_PYTHON=${PATH_PYTHON_LINUX}
PYEXEC=${PATH_PYTHON}/bin/python3.7
PYSTATIC=${PATH_PYTHON}/lib/libpython3.7m.a

check_python

${PYEXEC} -B "${PATH_ROOT}/build/build.py" $@
python3 -B "${PATH_ROOT}/build/build.py" $@
}

SYSTEM=`uname -s`
Expand Down
2 changes: 1 addition & 1 deletion build/builder/build-external.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _build_openssl(self, file_name):
break

if not need_build:
cc.n('build openssl static library from source code... ', end='')
cc.n('build openssl static library from source code... ', end='')
cc.w('already exists, skip.')
return
cc.v('')
Expand Down
Binary file modified dist/client/windows/assist/installer.nsi
Binary file not shown.

0 comments on commit 051b1fe

Please sign in to comment.