TeaSpeak-Client/jenkins/create_build.sh

62 lines
2.3 KiB
Bash
Raw Normal View History

2019-07-03 07:16:38 -04:00
#!/usr/bin/env bash
2019-07-03 07:32:39 -04:00
cd "$(dirname $0)/../"
2019-07-03 07:16:38 -04:00
project_name="__build_teaclient"
source ../scripts/build_helper.sh
function install_npm() {
begin_task "${project_name}_update" "Installing NPM"
npm install
check_err_exit ${project_name} "Failed to install nodejs files!"
npm update
check_err_exit ${project_name} "Failed to update nodejs files!"
2019-07-03 07:23:50 -04:00
end_task "${project_name}_update" "NPM installed"
2019-07-03 07:16:38 -04:00
}
function compile_scripts() {
begin_task "${project_name}_tsc_sass" "Compiling TypeScript & SASS"
npm run compile-tsc -- -p modules/tsconfig_main.json
npm run compile-tsc -- -p modules/tsconfig_renderer.json
npm run compile-tsc -- -p installer/tsconfig_linux.json
check_err_exit ${project_name} "Failed to compile typescript files!"
npm run compile-sass
check_err_exit ${project_name} "Failed to compile sass files!"
2019-07-03 07:23:50 -04:00
end_task "${project_name}_tsc_sass" "TypeScript & SASS compiled"
2019-07-03 07:16:38 -04:00
echo ""
}
function compile_native() {
begin_task "${project_name}_native" "Compiling native extensions"
local build_path="native/out/${build_os_type}_${build_os_arch}/"
[[ -d ${build_path} ]] && rm -r ${build_path}
mkdir -p ${build_path}
check_err_exit ${project_name} "Failed to create build directory!"
cd ${build_path}
check_err_exit ${project_name} "Failed to enter build directory!"
2019-07-03 07:23:50 -04:00
local _arguments=""
2019-07-03 07:25:03 -04:00
[[ ! -z "$tearoot_cmake_module" ]] && _arguments="${_arguments} -DCMAKE_MODULE_PATH=\"$tearoot_cmake_module\""
[[ ! -z "$tearoot_cmake_config" ]] && _arguments="${_arguments} -DCMAKE_PLATFORM_INCLUDE=\"$tearoot_cmake_config\""
[[ ! -z "$traroot_library" ]] && _arguments="${_arguments} -DLIBRARY_PATH=\"$traroot_library\""
2019-07-03 07:23:50 -04:00
cmake ../../ -DCMAKE_BUILD_TYPE=RelWithDebInfo ${_arguments}
2019-07-03 07:16:38 -04:00
check_err_exit ${project_name} "Failed create build targets!"
cmake --build `pwd` --target teaclient_connection -- -j 12
check_err_exit ${project_name} "Failed build teaclient connection!"
cmake --build `pwd` --target teaclient_crash_handler -- -j 12
check_err_exit ${project_name} "Failed build teaclient crash handler!"
cmake --build `pwd` --target teaclient_ppt -- -j 12
check_err_exit ${project_name} "Failed build teaclient ppt!"
2019-07-03 07:23:50 -04:00
end_task "${project_name}_native" "Native extensions compiled"
2019-07-03 07:16:38 -04:00
}
install_npm
compile_scripts
compile_native