external repo will be cloned beforehand

visualizer
Ken 2020-11-10 18:55:33 -05:00
parent 4a790284b4
commit 9e7ded24a5
1 changed files with 7 additions and 14 deletions

21
scripts/build_tincan.sh 100644 → 100755
View File

@ -44,28 +44,21 @@ elif [[ "$target_os" == "raspberry-pi" ]]; then
fi fi
#assuming this script runs from a place a directory where all three -evio, tools,external exist #assuming this script runs from a place a directory where all three -evio, tools,external exist
WrkspaceRoot=$(pwd)
Workspace_root=`pwd` cd "$WrkspaceRoot"/EdgeVPNio/evio/tincan
cd "$Workspace_root"/EdgeVPNio GN="$WrkspaceRoot"/EdgeVPNio/tools/bin/gn
#mkdir -p ~/workspace
#cd ~/workspace
#assuming this script runs from a place a directory where all three -evio, tools,external exist
git clone -b "$platform" --single-branch https://github.com/EdgeVPNio/external.git
export PATH="$Workspace_root"/EdgeVPNio/tools/bin:"$PATH"
#ubuntu debug build #ubuntu debug build
if [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = true ]; then if [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" use_debug_fission=false clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin"\" $GN gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$WrkspaceRoot\"/EdgeVPNio/external\" use_debug_fission=false clang_base_path=\"\"$WrkspaceRoot\"/EdgeVPNio/tools/llvm/bin"\"
#ubuntu release build #ubuntu release build
elif [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = false ]; then elif [ "$target_os" == "ubuntu" ] && [ "$debug_flag" = false ]; then
gn gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin"\" $GN gen out/"$platform"/"$build_type" "--args=is_debug=$debug_flag target_sysroot_dir=\"\"$WrkspaceRoot\"/EdgeVPNio/external\" clang_base_path=\"\"$WrkspaceRoot\"/EdgeVPNio/tools/llvm/bin"\"
#raspberry-pi debug build #raspberry-pi debug build
elif [ "$target_os" == "raspberry-pi" ] && [ "$debug_flag" = true ]; then elif [ "$target_os" == "raspberry-pi" ] && [ "$debug_flag" = true ]; then
gn gen out/"$platform"/"$build_type" "--args=target_cpu=\"arm\" use_lld=true use_debug_fission=false target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin\"" $GN gen out/"$platform"/"$build_type" "--args=target_cpu=\"arm\" use_lld=true use_debug_fission=false target_sysroot_dir=\"\"$WrkspaceRoot\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$WrkspaceRoot\"/EdgeVPNio/tools/llvm/bin\""
else else
#raspberry-pi release build #raspberry-pi release build
gn gen out/"$platform"/"$build_type" "--args=target_cpu=\"arm\" use_lld=true target_sysroot_dir=\"\"$Workspace_root\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$Workspace_root\"/EdgeVPNio/tools/llvm/bin\"" $GN gen out/"$platform"/"$build_type" "--args=target_cpu=\"arm\" use_lld=true target_sysroot_dir=\"\"$WrkspaceRoot\"/EdgeVPNio/external\" is_debug=$debug_flag clang_base_path=\"\"$WrkspaceRoot\"/EdgeVPNio/tools/llvm/bin\""
fi fi
ninja -C out/"$platform"/"$build_type" ninja -C out/"$platform"/"$build_type"