X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=build.sh;h=7adf1085e47026032f7be94c3aabddb84fb180f1;hb=e502b2a83cdb78162317807da2120de3a6df8704;hp=05ca8ada75e3c6dd55f93eb7be75e969f00e60aa;hpb=5a6d63e3382ca6c49a03e0af34e53badea0b2acc;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/build.sh b/build.sh index 05ca8ad..7adf108 100755 --- a/build.sh +++ b/build.sh @@ -5,34 +5,25 @@ SCRIPT_DIR=$(dirname $SCRIPT_FILE) # Properties OUTDIR=$SCRIPT_DIR/Artifacts + NUGET_CMD="mono $SCRIPT_DIR/tools/NuGet.exe" +MSBUILD_CMD="dotnet msbuild" + +RUN_BUILD="$MSBUILD_CMD $SCRIPT_DIR/build/build.proj" usage() { echo "Usage: $0 [options] [args]" echo " Options:" echo " -h, --help Show this usages message" echo " -b, --build [module] Build a module" - echo " -f, --full Build all modules in src/ directory. (pkg/Tizen.NET.Private.sln)" + echo " -f, --full Build all modules in src/ directory" echo " -d, --dummy Build dummy modules" echo " -p, --pack Make nuget packages" echo " -c, --clean Clean all artifacts" } -dotnet_build() { - if [ -d /nuget ]; then - NUGET_SOURCE_OPT="--source /nuget" - fi - PROJ=$1; shift - dotnet restore $PROJ $NUGET_SOURCE_OPT - dotnet build $PROJ --no-restore --configuration=Release $@ -} - cmd_clean() { - rm -fr $OUTDIR - LIST=$(find $SCRIPT_DIR -type d -a -name bin -o -name obj) - for d in $LIST; do - rm -fr $d - done + $RUN_BUILD /t:clean } cmd_build() { @@ -40,11 +31,17 @@ cmd_build() { echo "No module specified." exit 1 fi - dotnet_build $SCRIPT_DIR/src/$1 --output=$OUTDIR/bin + if [ -d /nuget ]; then + NUGET_SOURCE_OPT="/p:RestoreSources=/nuget" + fi + $RUN_BUILD /t:build /p:Project=$1 $NUGET_SOURCE_OPT } cmd_full_build() { - dotnet_build $SCRIPT_DIR/pkg/Tizen.NET.Private.sln --output=$OUTDIR/bin + if [ -d /nuget ]; then + NUGET_SOURCE_OPT="/p:RestoreSources=/nuget" + fi + $RUN_BUILD /t:build $NUGET_SOURCE_OPT } cmd_pack() { @@ -59,7 +56,10 @@ cmd_pack() { } cmd_dummy_build() { - dotnet_build $SCRIPT_DIR/pkg/Tizen.NET.Dummy.csproj + if [ -d /nuget ]; then + NUGET_SOURCE_OPT="/p:RestoreSources=/nuget" + fi + $RUN_BUILD /t:builddummy $NUGET_SOURCE_OPT } OPTS=`getopt -o hcbfpd --long help,clean,build,full,pack,dummy -n 'build' -- "$@"`