mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 00:14:11 +09:00
iOS: initial release of iFreeRDP
This is the initial release of iFreeRDP the FreeRDP iOS client. Build instructions can be found in docs/README.ios.
This commit is contained in:
104
scripts/OpenSSL-DownloadAndBuild.command
Executable file
104
scripts/OpenSSL-DownloadAndBuild.command
Executable file
@@ -0,0 +1,104 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright 2013 Thinstuff Technologies GmbH
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
||||
# If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# This script will download and build openssl for iOS (armv7, armv7s) and i386
|
||||
#
|
||||
|
||||
OPENSSLVERSION="1.0.0e"
|
||||
MD5SUM="7040b89c4c58c7a1016c0dfa6e821c86"
|
||||
OPENSSLPATCH="../../scripts/OpenSSL-iFreeRDP.diff"
|
||||
CORES=`sysctl hw.ncpu | awk '{print $2}'`
|
||||
|
||||
MAKEOPTS="-j $CORES"
|
||||
# disable parallell builds since openssl build
|
||||
# fails sometimes
|
||||
MAKEOPTS=""
|
||||
|
||||
cd external
|
||||
if [ ! -d openssl ];then
|
||||
mkdir openssl
|
||||
fi
|
||||
cd openssl
|
||||
CS=`md5 -q "openssl-$OPENSSLVERSION.tar.gz" 2>/dev/null`
|
||||
if [ ! "$CS" = "$MD5SUM" ]; then
|
||||
echo "Downloading OpenSSL Version $OPENSSLVERSION ..."
|
||||
rm -f "openssl-$OPENSSLVERSION.tar.gz"
|
||||
curl -o "openssl-$OPENSSLVERSION.tar.gz" http://www.openssl.org/source/openssl-$OPENSSLVERSION.tar.gz
|
||||
|
||||
CS=`md5 -q "openssl-$OPENSSLVERSION.tar.gz" 2>/dev/null`
|
||||
if [ ! "$CS" = "$MD5SUM" ]; then
|
||||
echo "Download failed or invalid checksum. Have a nice day."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -rf openssltmp
|
||||
mkdir openssltmp
|
||||
cd openssltmp
|
||||
|
||||
echo "Unpacking OpenSSL ..."
|
||||
tar xfz "../openssl-$OPENSSLVERSION.tar.gz"
|
||||
if [ ! $? = 0 ]; then
|
||||
echo "Unpacking failed."
|
||||
exit 1
|
||||
fi
|
||||
echo
|
||||
|
||||
echo "Applying iFreeRDP patch ..."
|
||||
|
||||
cd "openssl-$OPENSSLVERSION"
|
||||
patch -p1 < "../../$OPENSSLPATCH"
|
||||
|
||||
if [ ! $? = 0 ]; then
|
||||
echo "Patch failed."
|
||||
exit 1
|
||||
fi
|
||||
echo
|
||||
|
||||
mkdir -p ../../include/openssl
|
||||
rm -f ../../include/openssl/*.h
|
||||
|
||||
mkdir -p ../../lib
|
||||
rm -f ../../lib/*.a
|
||||
|
||||
echo "Copying header hiles ..."
|
||||
cp include/openssl/*.h ../../include/openssl/
|
||||
echo
|
||||
|
||||
echo "Building sim version (for simulator). Please wait ..."
|
||||
./Configure darwin-sim-cc >BuildLog.darwin-sim.txt
|
||||
make ${MAKEOPTS} >>BuildLog.darwin-sim.txt 2>&1
|
||||
echo "Done. Build log saved in BuildLog.darwin-sim.txt"
|
||||
cp libcrypto.a ../../lib/libcrypto_sim.a
|
||||
cp libssl.a ../../lib/libssl_sim.a
|
||||
make clean >/dev/null 2>&1
|
||||
echo
|
||||
|
||||
echo "Building armv7 version (for iPhone). Please wait ..."
|
||||
./Configure darwin-armv7-cc >BuildLog.darwin-armv7.txt
|
||||
make ${MAKEOPTS} >>BuildLog.darwin-armv7.txt 2>&1
|
||||
echo "Done. Build log saved in BuildLog.darwin-armv7.txt"
|
||||
cp libcrypto.a ../../lib/libcrypto_armv7.a
|
||||
cp libssl.a ../../lib/libssl_armv7.a
|
||||
make clean >/dev/null 2>&1
|
||||
echo
|
||||
|
||||
echo "Building armv7s version (for iPhone). Please wait ..."
|
||||
./Configure darwin-armv7s-cc >BuildLog.darwin-armv7s.txt
|
||||
make ${MAKEOPTS} >>BuildLog.darwin-armv7s.txt 2>&1
|
||||
echo "Done. Build log saved in BuildLog.darwin-armv7s.txt"
|
||||
cp libcrypto.a ../../lib/libcrypto_armv7s.a
|
||||
cp libssl.a ../../lib/libssl_armv7s.a
|
||||
make clean >/dev/null 2>&1
|
||||
echo
|
||||
|
||||
echo "Combining to unversal binary"
|
||||
lipo -create ../../lib/libcrypto_sim.a ../../lib/libcrypto_armv7.a ../../lib/libcrypto_armv7s.a -o ../../lib/libcrypto.a
|
||||
lipo -create ../../lib/libssl_sim.a ../../lib/libssl_armv7.a ../../lib/libssl_armv7s.a -o ../../lib/libssl.a
|
||||
|
||||
echo "Finished. Please verify the contens of the openssl folder in your main project folder"
|
||||
|
||||
25
scripts/OpenSSL-iFreeRDP.diff
Normal file
25
scripts/OpenSSL-iFreeRDP.diff
Normal file
@@ -0,0 +1,25 @@
|
||||
diff -rupN openssl-1.0.0e-ori/Configure openssl-1.0.0e/Configure
|
||||
--- openssl-1.0.0e-ori/Configure 2012-02-06 14:44:42.000000000 +0100
|
||||
+++ openssl-1.0.0e/Configure 2012-02-06 14:45:31.000000000 +0100
|
||||
@@ -555,6 +555,9 @@ my %table=(
|
||||
"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
"debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
+"darwin-armv7s-cc","/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc:-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch armv4 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
+"darwin-armv7-cc","/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc:-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common:-arch armv4 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
+"darwin-sim-cc","/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc: -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}:dlfcn:darwin-shared:-fPIC -fno-common: -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
|
||||
|
||||
##### A/UX
|
||||
"aux3-gcc","gcc:-O2 -DTERMIO::(unknown):AUX:-lbsd:RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:::",
|
||||
diff -rupN openssl-1.0.0e-ori/crypto/ui/ui_openssl.c openssl-1.0.0e/crypto/ui/ui_openssl.c
|
||||
--- openssl-1.0.0e-ori/crypto/ui/ui_openssl.c 2012-02-06 14:44:43.000000000 +0100
|
||||
+++ openssl-1.0.0e/crypto/ui/ui_openssl.c 2012-02-06 14:46:10.000000000 +0100
|
||||
@@ -404,7 +404,7 @@ static int read_till_nl(FILE *in)
|
||||
return 1;
|
||||
}
|
||||
|
||||
-static volatile sig_atomic_t intr_signal;
|
||||
+static volatile int intr_signal;
|
||||
#endif
|
||||
|
||||
static int read_string_inner(UI *ui, UI_STRING *uis, int echo, int strip_nl)
|
||||
Reference in New Issue
Block a user