Skip to content

Commit

Permalink
Move tmp package out of package root directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayla Khan committed Jun 29, 2017
1 parent ce6bfdb commit c753545
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/CMake/Scripts/repair_package.sh.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

seg3dbuild_dir=@CMAKE_BINARY_DIR@
productbuild_dir=@PKG_BUILD_DIR@
productroot_dir=@PKG_ROOT_DIR@

if [[ ! -e $productroot_dir ]]; then
Expand All @@ -13,9 +14,9 @@ fi
--component-plist $seg3dbuild_dir/@CPACK_PACKAGE_NAME@.plist \
--install-location /Applications $seg3dbuild_dir/@CPACK_PACKAGE_NAME@.pkg
@PRODUCTBUILD_EXE@ --distribution $seg3dbuild_dir/CPack.Distribution.dist \
--package-path $productroot_dir $productroot_dir/tmp.pkg
--package-path $productroot_dir $productbuild_dir/tmp.pkg
# Tip: pkgutil --expand can be used to debug package building
@PKGUTIL_EXE@ --expand $productroot_dir/tmp.pkg $productroot_dir/tmp
@PKGUTIL_EXE@ --flatten $productroot_dir/tmp $seg3dbuild_dir/@PKG_FILE_NAME@.pkg
@PKGUTIL_EXE@ --expand $productbuild_dir/tmp.pkg $productbuild_dir/tmp
@PKGUTIL_EXE@ --flatten $productbuild_dir/tmp $seg3dbuild_dir/@PKG_FILE_NAME@.pkg
rm -f $seg3dbuild_dir/@CPACK_PACKAGE_NAME@.pkg $seg3dbuild_dir/@CPACK_PACKAGE_NAME@.plist
rm -Rf $productroot_dir/tmp
rm -Rf $productbuild_dir/tmp

0 comments on commit c753545

Please sign in to comment.