Build: Enable separate iOS pkg/DMG w/ sim support

Refer to #406
This commit is contained in:
DRC
2020-02-11 13:41:43 -06:00
parent 6aabca86d3
commit 9a2cf32317
6 changed files with 24 additions and 34 deletions

View File

@@ -645,26 +645,23 @@ installing Xcode 3.2.6 (with the "Unix Development" option) on OS X 10.6.
Packages built in this manner can be installed on OS X 10.5 and later, but they
must be built on OS X 10.6 or later.
make udmg
In order to create a Mac package/disk image that contains universal
x86-64/i386/ARM binaries, set any of the following CMake variables:
This creates a Mac package/disk image that contains universal x86-64/i386/ARM
binaries. The following CMake variables control which architectures are
included in the universal binaries. Setting any of these variables to an empty
string excludes that architecture from the package.
* `OSX_32BIT_BUILD`: Directory containing an i386 (32-bit) Mac build of
libjpeg-turbo (default: *{source_directory}*/osxx86)
* `OSX_32BIT_BUILD`: Directory containing an i386 (32-bit) Mac or iOS build of
libjpeg-turbo to include in the universal binaries
* `IOS_ARMV8_BUILD`: Directory containing an ARMv8 (64-bit) iOS build of
libjpeg-turbo (default: *{source_directory}*/iosarmv8)
libjpeg-turbo to include in the universal binaries
You should first use CMake to configure i386 and/or ARMv8 sub-builds of
libjpeg-turbo (see "Build Recipes" and "Building libjpeg-turbo for iOS" above)
in build directories that match those specified in the aforementioned CMake
variables. Next, configure the primary build of libjpeg-turbo as an
out-of-tree build, and build it. Once the primary build has been built, run
`make udmg` from the build directory. The packaging system will build the
out-of-tree build, specifying one or more of the aforementioned CMake
variables, and build it. Once the primary build has been built, run
`make dmg` from the build directory. The packaging system will build the
sub-builds, use lipo to combine them into a single set of universal binaries,
then package the universal binaries in the same manner as `make dmg`.
then package the universal binaries.
Cygwin

View File

@@ -82,7 +82,9 @@ if(WIN32)
set(CMAKE_INSTALL_DEFAULT_PREFIX "${CMAKE_INSTALL_DEFAULT_PREFIX}64")
endif()
else()
set(CMAKE_INSTALL_DEFAULT_PREFIX /opt/${CMAKE_PROJECT_NAME})
if(NOT CMAKE_INSTALL_DEFAULT_PREFIX)
set(CMAKE_INSTALL_DEFAULT_PREFIX /opt/${CMAKE_PROJECT_NAME})
endif()
endif()
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_DEFAULT_PREFIX}" CACHE PATH

View File

@@ -132,12 +132,10 @@ endif() # CYGWIN
if(APPLE)
set(DEFAULT_OSX_32BIT_BUILD ${CMAKE_SOURCE_DIR}/osxx86)
set(OSX_32BIT_BUILD ${DEFAULT_OSX_32BIT_BUILD} CACHE PATH
"Directory containing 32-bit (i386) Mac build to include in universal binaries (default: ${DEFAULT_OSX_32BIT_BUILD})")
set(DEFAULT_IOS_ARMV8_BUILD ${CMAKE_SOURCE_DIR}/iosarmv8)
set(IOS_ARMV8_BUILD ${DEFAULT_IOS_ARMV8_BUILD} CACHE PATH
"Directory containing ARMv8 iOS build to include in universal binaries (default: ${DEFAULT_IOS_ARMV8_BUILD})")
set(OSX_32BIT_BUILD "" CACHE PATH
"Directory containing 32-bit (i386) Mac build to include in universal binaries")
set(IOS_ARMV8_BUILD "" CACHE PATH
"Directory containing ARMv8 iOS build to include in universal binaries")
set(OSX_APP_CERT_NAME "" CACHE STRING
"Name of the Developer ID Application certificate (in the macOS keychain) that should be used to sign the libjpeg-turbo DMG. Leave this blank to generate an unsigned DMG.")
@@ -146,14 +144,12 @@ set(OSX_INST_CERT_NAME "" CACHE STRING
configure_file(release/makemacpkg.in pkgscripts/makemacpkg)
configure_file(release/Distribution.xml.in pkgscripts/Distribution.xml)
configure_file(release/Welcome.rtf.in pkgscripts/Welcome.rtf)
configure_file(release/uninstall.in pkgscripts/uninstall)
add_custom_target(dmg sh pkgscripts/makemacpkg
SOURCES pkgscripts/makemacpkg)
add_custom_target(udmg sh pkgscripts/makemacpkg universal
SOURCES pkgscripts/makemacpkg)
endif() # APPLE

View File

@@ -9,9 +9,9 @@
\
\pard\pardeftab720\ql\qnatural
\f1 \cf0 /opt/libjpeg-turbo/bin/uninstall\
\f1 \cf0 @CMAKE_INSTALL_FULL_BINDIR@/uninstall\
\pard\pardeftab720\ql\qnatural
\f0 \cf0 \
from the command line.\
}
}

View File

@@ -43,12 +43,10 @@ safedirmove ()
usage()
{
echo "$0 [universal] [-lipo [path to lipo]]"
echo "$0 [-lipo [path to lipo]]"
exit 1
}
UNIVERSAL=0
PKGNAME=@PKGNAME@
VERSION=@VERSION@
BUILD=@BUILD@
@@ -80,9 +78,6 @@ while [ $# -gt 0 ]; do
fi
fi
;;
universal)
UNIVERSAL=1
;;
esac
shift
done
@@ -104,7 +99,7 @@ if [ "$PREFIX" = "@CMAKE_INSTALL_DEFAULT_PREFIX@" -a "$DOCDIR" = "@CMAKE_INSTALL
ln -fs /Library/Documentation/$PKGNAME $PKGROOT$DOCDIR
fi
if [ $UNIVERSAL = 1 -a "$BUILDDIR32" != "" ]; then
if [ "$BUILDDIR32" != "" ]; then
if [ ! -d $BUILDDIR32 ]; then
echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
exit 1
@@ -220,7 +215,7 @@ install_ios()
-output $PKGROOT/$BINDIR/wrjpgcom
}
if [ $UNIVERSAL = 1 -a "$BUILDDIRARMV8" != "" ]; then
if [ "$BUILDDIRARMV8" != "" ]; then
install_ios $BUILDDIRARMV8 ARMv8 armv8 arm64
fi
@@ -245,7 +240,7 @@ install -m 755 pkgscripts/uninstall $PKGROOT/$BINDIR/
find $PKGROOT -type f | while read file; do xattr -c $file; done
cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf $SRCDIR/release/ReadMe.txt $TMPDIR/pkg/
cp $SRCDIR/release/License.rtf pkgscripts/Welcome.rtf $SRCDIR/release/ReadMe.txt $TMPDIR/pkg/
mkdir $TMPDIR/dmg
pkgbuild --root $PKGROOT --version $VERSION.$BUILD --identifier @PKGID@ \

View File

@@ -90,7 +90,7 @@ fi
if [ -d $MANDIR ]; then
rmdir $MANDIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $JAVADIR ]; then
if [ -d "$JAVADIR" ]; then
rmdir $JAVADIR 2>&1 || EXITSTATUS=-1
fi
if [ -d $DATAROOTDIR -a "$DATAROOTDIR" != "$PREFIX" ]; then