From 820c4bf31dd38a273c0f75a24fcccbcefd510fed Mon Sep 17 00:00:00 2001 From: Minsoo Kim Date: Fri, 14 Apr 2017 12:06:35 +0900 Subject: [PATCH] =?UTF-8?q?gui=20build=20script=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/.gitignore | 1 + app/gui/make.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100755 app/gui/make.sh diff --git a/app/gui/.gitignore b/app/gui/.gitignore index dd07bff..dc0dba4 100644 --- a/app/gui/.gitignore +++ b/app/gui/.gitignore @@ -1 +1,2 @@ build-* +/release diff --git a/app/gui/make.sh b/app/gui/make.sh new file mode 100755 index 0000000..e04e9fe --- /dev/null +++ b/app/gui/make.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +PRJ=oven_control +TARGET=app-prime-gui +if [ -n "$1" ] +then + PRJ=$(basename $1) +fi + +if [ -z "$CP_DIR" ] +then + CP_DIR=/nfs/prime-oven +fi + +image_filename=${TARGET} +target_filename=${image_filename} +QMAKE=/opt/toolchain/${FA_CHIPSET}/${FA_PRODUCT}/usr/bin/qmake + +case $1 in + debug) + OUTPUT_DIR=debug${TAG} + DEBUG_OPTION=" CONFIG+=debug" + ;; + *) + OUTPUT_DIR=release${TAG} + DEBUG_OPTION="" + ;; +esac + +rm -Rf release${TAG} && mkdir -p release${TAG} && cd release${TAG} && ${QMAKE} ../${PRJ}/${PRJ}.pro -r ${SPEC} ${DEBUG_OPTION} && make && cd .. + +if [ $? -ne 0 ] +then + exit $? +fi + +for DEST_DIR in ${CP_DIR} +do + echo "copy from ${OUTPUT_DIR}/${image_filename} to ${DEST_DIR}/$target_filename" + mkdir -p ${DEST_DIR}/ + cp ${OUTPUT_DIR}/${image_filename} ${DEST_DIR}/${target_filename} +done -- 2.1.4