Comments (8)
wow even tvos
I surely think someone uses openssl on tv I literally can imagine how you open your pentium tv and generate pgp crypto keys on it for watching youtube
from openssl.
I've made it #216
from openssl.
why
from openssl.
why even visionos but no watchos
from openssl.
I'll briefly describe steps for future reference:
- add
build_watchos
function to scripts/build.sh with call in the end of this script
build_watchos() {
local TMP_BUILD_DIR=$( mktemp -d )
# Clean up whatever was left from our previous build
rm -rf "${SCRIPT_DIR}"/../{watchsimulator/include,watchsimulator/lib}
mkdir -p "${SCRIPT_DIR}"/../{watchsimulator/include,watchsimulator/lib}
build "x86_64" "WatchSimulator" ${TMP_BUILD_DIR} "watchsimulator"
build "arm64" "WatchSimulator" ${TMP_BUILD_DIR} "watchsimulator"
rm -rf "${SCRIPT_DIR}"/../{watchos/include,watchos/lib}
mkdir -p "${SCRIPT_DIR}"/../{watchos/include,watchos/lib}
build "arm64" "WatchOS" ${TMP_BUILD_DIR} "watchos"
ditto "${TMP_BUILD_DIR}/${OPENSSL_VERSION}-WatchOS-arm64/include/openssl" "${SCRIPT_DIR}/../watchos/include/${FWNAME}"
cp -f "${SCRIPT_DIR}/../shim/shim.h" "${SCRIPT_DIR}/../watchos/include/${FWNAME}/shim.h"
# Copy headers
ditto "${TMP_BUILD_DIR}/${OPENSSL_VERSION}-WatchSimulator-arm64/include/openssl" "${SCRIPT_DIR}/../watchsimulator/include/${FWNAME}"
cp -f "${SCRIPT_DIR}/../shim/shim.h" "${SCRIPT_DIR}/../watchsimulator/include/${FWNAME}/shim.h"
# fix inttypes.h
# find "${SCRIPT_DIR}/../appletvos/include/${FWNAME}" -type f -name "*.h" -exec sed -i "" -e "s/include <inttypes\.h>/include <sys\/types\.h>/g" {} \;
# find "${SCRIPT_DIR}/../appletvsimulator/include/${FWNAME}" -type f -name "*.h" -exec sed -i "" -e "s/include <inttypes\.h>/include <sys\/types\.h>/g" {} \;
local OPENSSLCONF_PATH="${SCRIPT_DIR}/../watchsimulator/include/${FWNAME}/opensslconf.h"
echo "#if defined(__APPLE__) && defined (__x86_64__)" >> ${OPENSSLCONF_PATH}
cat ${TMP_BUILD_DIR}/${OPENSSL_VERSION}-WatchSimulator-x86_64/include/openssl/opensslconf.h >> ${OPENSSLCONF_PATH}
echo "#elif defined(__APPLE__) && defined (__arm64__)" >> ${OPENSSLCONF_PATH}
cat ${TMP_BUILD_DIR}/${OPENSSL_VERSION}-WatchSimulator-arm64/include/openssl/opensslconf.h >> ${OPENSSLCONF_PATH}
echo "#endif" >> ${OPENSSLCONF_PATH}
OPENSSLCONF_PATH="${SCRIPT_DIR}/../watchos/include/${FWNAME}/opensslconf.h"
echo "#if defined(__APPLE__) && defined (__x86_64__)" >> ${OPENSSLCONF_PATH}
echo "#elif defined(__APPLE__) && defined (__arm64__)" >> ${OPENSSLCONF_PATH}
cat ${TMP_BUILD_DIR}/${OPENSSL_VERSION}-WatchOS-arm64/include/openssl/opensslconf.h >> ${OPENSSLCONF_PATH}
echo "#endif" >> ${OPENSSLCONF_PATH}
# Update include "openssl/" to "OpenSSL/"
grep -rl '#\s*include\s*<openssl' --include \*.h ${SCRIPT_DIR}/../watchos/include | xargs -I@ sed -i '' -e 's/#[[:space:]]*include[[:space:]]*<openssl/#include <OpenSSL/gi' @
grep -rl '#\s*include\s*<openssl' --include \*.h ${SCRIPT_DIR}/../watchsimulator/include | xargs -I@ sed -i '' -e 's/#[[:space:]]*include[[:space:]]*<openssl/#include <OpenSSL/gi' @
rm -rf ${TMP_BUILD_DIR}
}
- add section to scripts/create-frameworks.sh
# watchOS
DERIVED_DATA_PATH=$( mktemp -d )
xcrun xcodebuild build \
$COMMON_SETUP \
-scheme "${FWNAME} (watchOS)" \
-derivedDataPath "${DERIVED_DATA_PATH}" \
-destination 'generic/platform=watchOS'
rm -rf "${OUTPUT_DIR}/watchos"
mkdir -p "${OUTPUT_DIR}/watchos"
ditto "${DERIVED_DATA_PATH}/Build/Products/Release-watchos/${FWNAME}.framework" "${OUTPUT_DIR}/watchos/${FWNAME}.framework"
rm -rf "${DERIVED_DATA_PATH}"
# watchOS Simulator
DERIVED_DATA_PATH=$( mktemp -d )
xcrun xcodebuild build \
$COMMON_SETUP \
-scheme "${FWNAME} (watchOS Simulator)" \
-derivedDataPath "${DERIVED_DATA_PATH}" \
-destination 'generic/platform=watchOS Simulator'
rm -rf "${OUTPUT_DIR}/watchsimulator"
mkdir -p "${OUTPUT_DIR}/watchsimulator"
ditto "${DERIVED_DATA_PATH}/Build/Products/Release-watchsimulator/${FWNAME}.framework" "${OUTPUT_DIR}/watchsimulator/${FWNAME}.framework"
rm -rf "${DERIVED_DATA_PATH}"
- add configurations to conf/20-apple.conf otherwise you'll get
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]
andpick os/compiler from:
andUsing os-specific seed configuration
'watchos-cross-base' => {
template => 1,
cflags => combine('-isysroot $(CROSS_TOP)/SDKs/$(CROSS_SDK) -fno-common',
sub { defined($ENV{'WATCHOS_DEPLOYMENT_VERSION'}) ? '-mwatchos-version-min=$(WATCHOS_DEPLOYMENT_VERSION)' : '-mwatchos-version-min=4.0'; }),
disable => [ 'engine', 'async' ],
defines => [ "HAVE_FORK=0" ]
},
'watchos-sim-cross-base' => {
inherit_from => [ 'watchos-cross-base' ],
template => 1,
cflags => add(sub { defined($ENV{'WATCHOS_DEPLOYMENT_VERSION'}) ? '-mwatchos-simulator-version-min=$(WATCHOS_DEPLOYMENT_VERSION)' : '-mwatchos-simulator-version-min=4.0'; }),
},
'watchos-sim-cross-x86_64' => {
inherit_from => [ 'darwin-common', 'watchos-sim-cross-base' ],
CC => 'xcrun -sdk watchsimulator cc',
cflags => add('-arch x86_64'),
lib_cppflags => add('-DL_ENDIAN'),
bn_ops => 'SIXTY_FOUR_BIT_LONG',
sys_id => 'watchOS',
perlasm_scheme => 'watchos64',
},
'watchos-sim-cross-arm64' => {
inherit_from => [ 'darwin-common', 'watchos-sim-cross-base' ],
CC => 'xcrun -sdk watchsimulator cc',
cflags => add('-arch arm64'),
asm_arch => 'aarch64',
lib_cppflags => add('-DL_ENDIAN'),
bn_ops => 'SIXTY_FOUR_BIT_LONG RC4_CHAR',
perlasm_scheme => 'watchos64',
sys_id => 'watchOS',
},
'watchos-cross-arm64' => {
inherit_from => [ 'darwin-common', 'watchos-cross-base' ],
cflags => add('-arch arm64'),
asm_arch => 'aarch64',
bn_ops => 'SIXTY_FOUR_BIT_LONG RC4_CHAR',
lib_cppflags => add('-DL_ENDIAN'),
perlasm_scheme => 'watchos64',
sys_id => 'watchOS',
},
'watchos-cross-armv7k' => {
inherit_from => [ 'darwin-common', 'watchos-cross-base' ],
cflags => add('-arch armv7k'),
asm_arch => 'arm',
bn_ops => 'BN_LLONG RC4_INT',
lib_cppflags => add('-DL_ENDIAN'),
perlasm_scheme => 'ios32',
sys_id => 'watchOS',
},
we're also having defines => [ "HAVE_FORK=0" ]
in base config because watchos does not support fork()
then run make
and it should create watchos and watchsimulator directories in repo root, after than figure out on your own how to add these to frameworks in xcode project
from openssl.
There's always a way to make a PR. This may be an inspiration how to make it: #205
from openssl.
I've made it #216
from openssl.
thx #216
from openssl.
Related Issues (20)
- Require Apple Release - Privacy Manifest and Signature for third-party frameworks HOT 1
- Apple Silicon (arm64) and iphone-simulator builds HOT 2
- Missing type definitions when building for simulator HOT 1
- ERROR ITMS-90711: "Invalid executable permissions" HOT 5
- 3.1.5 Signing error HOT 1
- 3.1.5 s.ios.deployment_target = '14.0' is too heigh HOT 2
- OpenSSL 3.2.1 is available HOT 4
- 1.1.0e support privacy agreement and sign HOT 6
- 3.1.5 Needs to incorporate Privacy Manifest in Podspec HOT 3
- Privacy Manifest in 3.1.5000 is invalid HOT 5
- Error when importing 3.1.5002 with SPM HOT 3
- Unexpected behaviour with pbxproj when import library with cocoapods HOT 1
- [Carthage] Not building in xcode 15.3 to platform iOS HOT 2
- Can not archive application due to signature HOT 4
- Build failed when using xcode 16 HOT 7
- Problem with build with SPM and interoperabilityMode HOT 3
- Compile error on OpenSSL HOT 4
- Can't build latest version (5006) with Xcode 15.4 HOT 2
- EVP_CMAC_init fails but no errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openssl.