2018-02-06 21:51:14 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# script to build on mac
|
|
|
|
build=MinSizeRel
|
2018-08-18 00:46:38 +03:00
|
|
|
dataCompressionLib=libcompression
|
Merged PR 2308191: [MSIX SDK] add a c-make switch to exclude bundles from unpack
Enable the user to disable bundle support for the SDK by specifying -DSKIP_BUNDLES=on on CMake. If the user tries to unpack a bundle or create a bundle factory they will get 0x80070032 (E_NOTSUPPORTED). The binary size decreases ~60k.
Win x64
- bundle: 464 k
- no bundle: 413 k
Win x86
- bundle: 330 k
- no bundle: 293 k
Linux
- bundle: 5,424 k
- no bundle: 5,330 k
AOSP arm
- bundle: 4,381 k
- no bundle: 4,313 k
AOSP arm v7a
- bundle: 4,288 k
- no bundle: 4,220 k
MacOS
- bundle: 4,487 k
- no bundle: 4,413 k
iOS arm64
- bundle: 4,516 k
- no bundle: 4,458 k
Related work items: #18753331
2018-09-06 21:45:34 +03:00
|
|
|
bundle=off
|
2019-05-02 21:29:11 +03:00
|
|
|
xmlparser=applexml
|
|
|
|
addressSanitizer=off
|
2019-04-11 00:59:39 +03:00
|
|
|
validationParser=off
|
2019-07-16 03:13:34 +03:00
|
|
|
pack=off
|
2019-10-15 04:11:19 +03:00
|
|
|
samples=on
|
|
|
|
tests=on
|
2020-07-10 22:09:56 +03:00
|
|
|
arch=x86_64
|
2018-02-06 21:51:14 +03:00
|
|
|
|
|
|
|
usage()
|
|
|
|
{
|
2019-05-02 21:29:11 +03:00
|
|
|
echo "usage: makemac [options]"
|
|
|
|
echo $'\t' "-b build_type Default MinSizeRel"
|
2019-07-16 03:13:34 +03:00
|
|
|
echo $'\t' "-xzlib Use MSIX SDK Zlib instead of inbox libCompression api. Default on MacOS 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' "-asan Turn on address sanitizer for memory corruption detection."
|
|
|
|
echo $'\t' "--validation-parser|-vp Enable XML schema validation."
|
2019-07-17 01:49:49 +03:00
|
|
|
echo $'\t' "--pack Include packaging features. Uses MSIX SDK Zlib and Xerces with validation parser on."
|
2019-10-15 04:11:19 +03:00
|
|
|
echo $'\t' "--skip-samples Skip building samples."
|
|
|
|
echo $'\t' "--skip-tests Skip building tests."
|
2020-07-10 22:09:56 +03:00
|
|
|
echo $'\t' "-arch arch Architecture. Default x86_64"
|
2018-02-06 21:51:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
printsetup()
|
|
|
|
{
|
|
|
|
echo "Build Type:" $build
|
2018-08-18 00:46:38 +03:00
|
|
|
echo "Data Compression library:" $dataCompressionLib
|
Merged PR 2308191: [MSIX SDK] add a c-make switch to exclude bundles from unpack
Enable the user to disable bundle support for the SDK by specifying -DSKIP_BUNDLES=on on CMake. If the user tries to unpack a bundle or create a bundle factory they will get 0x80070032 (E_NOTSUPPORTED). The binary size decreases ~60k.
Win x64
- bundle: 464 k
- no bundle: 413 k
Win x86
- bundle: 330 k
- no bundle: 293 k
Linux
- bundle: 5,424 k
- no bundle: 5,330 k
AOSP arm
- bundle: 4,381 k
- no bundle: 4,313 k
AOSP arm v7a
- bundle: 4,288 k
- no bundle: 4,220 k
MacOS
- bundle: 4,487 k
- no bundle: 4,413 k
iOS arm64
- bundle: 4,516 k
- no bundle: 4,458 k
Related work items: #18753331
2018-09-06 21:45:34 +03:00
|
|
|
echo "Skip bundle support:" $bundle
|
2019-07-17 01:49:49 +03:00
|
|
|
echo "parser:" $xmlparser
|
2019-02-22 09:36:46 +03:00
|
|
|
echo "Address Sanitizer:" $addressSanitizerFlag
|
2019-04-11 00:59:39 +03:00
|
|
|
echo "Validation parser:" $validationParser
|
2019-05-02 21:29:11 +03:00
|
|
|
echo "Pack support:" $pack
|
2019-10-15 04:11:19 +03:00
|
|
|
echo "Build samples:" $samples
|
|
|
|
echo "Build tests:" $tests
|
2018-02-06 21:51:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
while [ "$1" != "" ]; do
|
|
|
|
case $1 in
|
|
|
|
-b ) shift
|
|
|
|
build=$1
|
|
|
|
;;
|
2018-09-05 19:26:51 +03:00
|
|
|
-xzlib )dataCompressionLib=MSIX_SDK_zlib
|
|
|
|
zlib="-DUSE_MSIX_SDK_ZLIB=on"
|
2018-08-18 00:46:38 +03:00
|
|
|
;;
|
2019-05-02 21:29:11 +03:00
|
|
|
-parser-xerces ) xmlparser=xerces
|
|
|
|
;;
|
|
|
|
-asan ) addressSanitizer=on
|
2019-02-22 09:36:46 +03:00
|
|
|
;;
|
Merged PR 2308191: [MSIX SDK] add a c-make switch to exclude bundles from unpack
Enable the user to disable bundle support for the SDK by specifying -DSKIP_BUNDLES=on on CMake. If the user tries to unpack a bundle or create a bundle factory they will get 0x80070032 (E_NOTSUPPORTED). The binary size decreases ~60k.
Win x64
- bundle: 464 k
- no bundle: 413 k
Win x86
- bundle: 330 k
- no bundle: 293 k
Linux
- bundle: 5,424 k
- no bundle: 5,330 k
AOSP arm
- bundle: 4,381 k
- no bundle: 4,313 k
AOSP arm v7a
- bundle: 4,288 k
- no bundle: 4,220 k
MacOS
- bundle: 4,487 k
- no bundle: 4,413 k
iOS arm64
- bundle: 4,516 k
- no bundle: 4,458 k
Related work items: #18753331
2018-09-06 21:45:34 +03:00
|
|
|
-sb ) bundle="on"
|
|
|
|
;;
|
2019-04-11 00:59:39 +03:00
|
|
|
--validation-parser ) validationParser=on
|
|
|
|
;;
|
|
|
|
-vp ) validationParser=on
|
|
|
|
;;
|
2019-07-16 03:13:34 +03:00
|
|
|
--pack ) pack=on
|
2019-07-17 01:49:49 +03:00
|
|
|
dataCompressionLib=MSIX_SDK_zlib
|
|
|
|
zlib="-DUSE_MSIX_SDK_ZLIB=on"
|
|
|
|
xmlparser=xerces
|
|
|
|
validationParser=on
|
2019-05-02 21:29:11 +03:00
|
|
|
;;
|
2019-10-15 04:11:19 +03:00
|
|
|
--skip-samples ) samples=off
|
|
|
|
;;
|
|
|
|
--skip-tests ) tests=off
|
|
|
|
;;
|
2018-02-06 21:51:14 +03:00
|
|
|
-h ) usage
|
|
|
|
exit
|
|
|
|
;;
|
2020-07-10 22:09:56 +03:00
|
|
|
-arch ) shift
|
|
|
|
arch=$1
|
|
|
|
;;
|
2018-02-06 21:51:14 +03:00
|
|
|
* ) usage
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
printsetup
|
|
|
|
|
|
|
|
mkdir .vs
|
|
|
|
cd .vs
|
|
|
|
|
2018-02-14 00:25:38 +03:00
|
|
|
# clean up any old builds of msix modules
|
2019-03-07 22:46:10 +03:00
|
|
|
find . -name *msix* -d | xargs rm -r
|
2018-02-06 21:51:14 +03:00
|
|
|
|
2019-05-02 21:29:11 +03:00
|
|
|
echo "cmake -DCMAKE_BUILD_TYPE="$build $zlib "-DSKIP_BUNDLES="$bundle
|
|
|
|
echo "-DXML_PARSER="$xmlparser "-DASAN="$addressSanitizer "-DUSE_VALIDATION_PARSER="$validationParser
|
2020-07-10 22:09:56 +03:00
|
|
|
echo "-DMSIX_PACK="$pack "-DMSIX_SAMPLES="$samples "-DMSIX_TESTS="$tests "-DCMAKE_OSX_ARCHITECTURES="$arch "-DMACOS=on .."
|
2019-05-02 21:29:11 +03:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=$build \
|
|
|
|
-DXML_PARSER=$xmlparser \
|
|
|
|
-DSKIP_BUNDLES=$bundle \
|
|
|
|
-DASAN=$addressSanitizer \
|
|
|
|
-DUSE_VALIDATION_PARSER=$validationParser \
|
|
|
|
-DMSIX_PACK=$pack \
|
2019-10-15 04:11:19 +03:00
|
|
|
-DMSIX_SAMPLES=$samples \
|
|
|
|
-DMSIX_TESTS=$tests \
|
2020-07-10 22:09:56 +03:00
|
|
|
-DCMAKE_OSX_ARCHITECTURES=$arch \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=../cmake/macos.cmake \
|
2019-05-02 21:29:11 +03:00
|
|
|
$zlib -DMACOS=on ..
|
2018-02-06 21:51:14 +03:00
|
|
|
make
|