diff --git a/2-build-cmake.sh b/2-build-cmake.sh new file mode 100755 index 0000000..0c34eb2 --- /dev/null +++ b/2-build-cmake.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# +# = Usage: = +# ./build-cmake.sh [OPTIONS] +# +# OPTIONS +# -d = Debug build (standard) +# -r = Release build +# -n = Don't write the run-portable.sh to the out dir +# -j NUMBER = Set parallel make jobs (1 <= NUMBER <= 999) (standard is 1) +# -p = Only print out the current active build settings and exit +# --data-prefix = The installed Synfig Studio looks for it's data (icons, sounds, etc) in [DATA_PREFIX]/share/. This option sets a custom DATA_PREFIX. (Standard is the out directory) +# +# = Examples = +# Make a debug build +# ./build-cmake -d +# +# Make a release build +# ./build-cmake -r +# +# Make a release build with two parallel make jobs +# ./build-cmake -r -j 2 + +#Define dir paths +pwd_dir="$PWD" +absolute_script_path="$(readlink -f "$0")" +absolute_base_dir="$(dirname "$absolute_script_path")" + +cd ${absolute_base_dir} + +# Include build folder names and build functions +source ./autobuild/build-cmake-common.sh + +if [ $? -ne 0 ] + then + echo "Failed to include: ./autobuild/build-cmake-common.sh" + cd "$pwd_dir" + exit +fi + +# Parse build options +parse_build_arguments "$@" + +# Print build settings +print_build_settings + +# Exec build steps +clean_build_dir +gen_dir_structure +build_etl +build_synfig_core +build_synfig_studio +write_portable_run_code + +# Print success, restore the current directory and exit +echo "Build successfull to: ${absolute_base_dir}/${cmake_build_dir}/${out_dir}" +cd "$pwd_dir" diff --git a/build-cmake.sh b/build-cmake.sh deleted file mode 100755 index 0c34eb2..0000000 --- a/build-cmake.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash -# -# = Usage: = -# ./build-cmake.sh [OPTIONS] -# -# OPTIONS -# -d = Debug build (standard) -# -r = Release build -# -n = Don't write the run-portable.sh to the out dir -# -j NUMBER = Set parallel make jobs (1 <= NUMBER <= 999) (standard is 1) -# -p = Only print out the current active build settings and exit -# --data-prefix = The installed Synfig Studio looks for it's data (icons, sounds, etc) in [DATA_PREFIX]/share/. This option sets a custom DATA_PREFIX. (Standard is the out directory) -# -# = Examples = -# Make a debug build -# ./build-cmake -d -# -# Make a release build -# ./build-cmake -r -# -# Make a release build with two parallel make jobs -# ./build-cmake -r -j 2 - -#Define dir paths -pwd_dir="$PWD" -absolute_script_path="$(readlink -f "$0")" -absolute_base_dir="$(dirname "$absolute_script_path")" - -cd ${absolute_base_dir} - -# Include build folder names and build functions -source ./autobuild/build-cmake-common.sh - -if [ $? -ne 0 ] - then - echo "Failed to include: ./autobuild/build-cmake-common.sh" - cd "$pwd_dir" - exit -fi - -# Parse build options -parse_build_arguments "$@" - -# Print build settings -print_build_settings - -# Exec build steps -clean_build_dir -gen_dir_structure -build_etl -build_synfig_core -build_synfig_studio -write_portable_run_code - -# Print success, restore the current directory and exit -echo "Build successfull to: ${absolute_base_dir}/${cmake_build_dir}/${out_dir}" -cd "$pwd_dir"