msix-packaging/makeios.sh

89 строки
2.6 KiB
Bash
Исходник Обычный вид История

#!/bin/bash
# script to build on mac for ios
build=MinSizeRel
arch=x86_64
dataCompressionLib=libcompression
bundle=off
2019-05-02 21:29:11 +03:00
xmlparser=applexml
validationParser=off
2019-10-15 04:11:19 +03:00
samples=on
tests=on
usage()
{
2019-05-02 21:29:11 +03:00
echo "usage: makemac [options]"
echo $'\t' "-b build_type Default MinSizeRel"
echo $'\t' "-arch arch OSX Architecture. Default x86_64 (simulator)"
2019-05-13 08:12:51 +03:00
echo $'\t' "-xzlib Use MSIX SDK Zlib instead of inbox libCompression api. Default on iOS is libCompression."
2019-05-02 21:29:11 +03:00
echo $'\t' "-sb Skip bundle support."
echo $'\t' "-parser-xerces Use xerces xml parser instead of default apple xml parser."
echo $'\t' "--validation-parser|-vp Enable XML schema validation."
2019-10-15 04:11:19 +03:00
echo $'\t' "--skip-samples Skip building samples."
echo $'\t' "--skip-tests Skip building tests."
}
printsetup()
{
echo "Build Type:" $build
echo "Architecture:" $arch
echo "Data Compression library:" $dataCompressionLib
echo "Skip bundle support:" $bundle
2019-05-02 21:29:11 +03:00
echo "Parser:" $xmlparser
echo "Validation parser:" $validationParser
2019-10-15 04:11:19 +03:00
echo "Build samples:" $samples
echo "Build tests:" $tests
}
while [ "$1" != "" ]; do
case $1 in
-b ) shift
build=$1
;;
-arch ) shift
arch=$1
;;
-xzlib )dataCompressionLib=MSIX_SDK_zlib
zlib="-DUSE_MSIX_SDK_ZLIB=on"
;;
-parser-xerces ) xmlparserLib=xerces
2019-05-02 21:29:11 +03:00
xmlparser=xerces
;;
-sb ) bundle="on"
;;
--validation-parser ) validationParser=on
;;
-vp ) validationParser=on
;;
-h ) usage
exit
;;
2019-10-15 04:11:19 +03:00
--skip-samples ) samples=off
;;
--skip-tests ) tests=off
;;
* ) usage
exit 1
esac
shift
done
printsetup
mkdir .vs
cd .vs
# clean up any old builds of msix modules
2019-03-07 22:46:10 +03:00
find . -name *msix* -d | xargs rm -r
2019-05-02 21:29:11 +03:00
echo "cmake -DCMAKE_BUILD_TYPE="$build $zlib "-DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake -DCMAKE_OSX_ARCHITECTURES="$arch
2019-10-15 04:11:19 +03:00
echo "-DXML_PARSER="$xmlparser "-DUSE_VALIDATION_PARSER="$validationParser "-DSKIP_BUNDLES="$bundle "-DMSIX_SAMPLES="$samples "-DMSIX_TESTS="$tests "-DIOS=on .."
2019-05-02 21:29:11 +03:00
cmake -DCMAKE_BUILD_TYPE=$build \
-DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake \
-DCMAKE_OSX_ARCHITECTURES=$arch \
-DXML_PARSER=$xmlparser \
-DUSE_VALIDATION_PARSER=$validationParser \
-DSKIP_BUNDLES=$bundle \
2019-10-15 04:11:19 +03:00
-DMSIX_SAMPLES=$samples \
-DMSIX_TESTS=$tests \
2019-05-02 21:29:11 +03:00
$zlib -DIOS=on ..
make