mirror of https://github.com/procxx/kepka.git
Using custom build of libc++ for old OS X version.
This will allow us to use C++14 library on all platforms. Patches for macold versions got bigger and are now different for crashpad and mini_chromium, so they were moved to a separate folder.
This commit is contained in:
parent
228e2f7031
commit
27f015561a
|
@ -0,0 +1,20 @@
|
||||||
|
diff --git a/build/crashpad.gypi b/build/crashpad.gypi
|
||||||
|
index 027c7b6..4bfdfb5 100644
|
||||||
|
--- a/build/crashpad.gypi
|
||||||
|
+++ b/build/crashpad.gypi
|
||||||
|
@@ -25,5 +25,15 @@
|
||||||
|
4201, # nonstandard extension used : nameless struct/union.
|
||||||
|
4324, # structure was padded due to __declspec(align()).
|
||||||
|
],
|
||||||
|
+ 'xcode_settings': {
|
||||||
|
+ 'OTHER_CPLUSPLUSFLAGS': [ '-nostdinc++' ],
|
||||||
|
+ 'OTHER_LDFLAGS': [
|
||||||
|
+ '/usr/local/macold/lib/libc++.a',
|
||||||
|
+ '/usr/local/macold/lib/libc++abi.a',
|
||||||
|
+ ],
|
||||||
|
+ },
|
||||||
|
+ 'include_dirs': [
|
||||||
|
+ '/usr/local/macold/include/c++/v1',
|
||||||
|
+ ],
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/build/common.gypi b/build/common.gypi
|
||||||
|
index 1affc70..c0d2f6a 100644
|
||||||
|
--- a/build/common.gypi
|
||||||
|
+++ b/build/common.gypi
|
||||||
|
@@ -66,6 +66,11 @@
|
||||||
|
'conditions': [
|
||||||
|
['clang!=0', {
|
||||||
|
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
|
||||||
|
+ 'OTHER_CPLUSPLUSFLAGS': [ '-nostdinc++' ],
|
||||||
|
+ 'OTHER_LDFLAGS': [
|
||||||
|
+ '/usr/local/macold/lib/libc++.a',
|
||||||
|
+ '/usr/local/macold/lib/libc++abi.a',
|
||||||
|
+ ],
|
||||||
|
|
||||||
|
# Don't link in libarclite_macosx.a, see http://crbug.com/156530.
|
||||||
|
'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
|
||||||
|
@@ -116,6 +121,9 @@
|
||||||
|
],
|
||||||
|
|
||||||
|
},
|
||||||
|
+ 'include_dirs': [
|
||||||
|
+ '/usr/local/macold/include/c++/v1',
|
||||||
|
+ ],
|
||||||
|
}],
|
||||||
|
|
||||||
|
['OS=="linux"', {
|
|
@ -13,16 +13,21 @@ index cb8d78f..cadb3f0 100755
|
||||||
echo " Xcode not set up properly. You may need to confirm the license" >&2
|
echo " Xcode not set up properly. You may need to confirm the license" >&2
|
||||||
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
|
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
|
||||||
diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf
|
diff --git a/mkspecs/common/g++-macx.conf b/mkspecs/common/g++-macx.conf
|
||||||
index 086510d..ae4f81a 100644
|
index 086510d..c485967 100644
|
||||||
--- a/mkspecs/common/g++-macx.conf
|
--- a/mkspecs/common/g++-macx.conf
|
||||||
+++ b/mkspecs/common/g++-macx.conf
|
+++ b/mkspecs/common/g++-macx.conf
|
||||||
@@ -14,7 +14,8 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
|
@@ -14,7 +14,13 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
|
||||||
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
|
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -gdwarf-2
|
||||||
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2
|
QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2
|
||||||
|
|
||||||
-QMAKE_LFLAGS_STATIC_LIB += -all_load
|
-QMAKE_LFLAGS_STATIC_LIB += -all_load
|
||||||
+# Patch: Don't remember :(
|
+# Patch: Don't remember :(
|
||||||
+#QMAKE_LFLAGS_STATIC_LIB += -all_load
|
+#QMAKE_LFLAGS_STATIC_LIB += -all_load
|
||||||
|
+
|
||||||
|
+# Patch: Use C++14 with custom libc++ build.
|
||||||
|
+QMAKE_CXXFLAGS_CXX11 = -std=c++1y
|
||||||
|
+QMAKE_CXXFLAGS += -nostdinc++ -I/usr/local/macold/include/c++/v1
|
||||||
|
+QMAKE_LFLAGS += /usr/local/macold/lib/libc++.a /usr/local/macold/lib/libc++abi.a
|
||||||
|
|
||||||
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
|
QMAKE_XCODE_GCC_VERSION = com.apple.compilers.llvmgcc42
|
||||||
|
|
||||||
|
@ -238,6 +243,19 @@ index 92358ec..694fee7 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
|
- (void)appleEventQuit:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent
|
||||||
|
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm
|
||||||
|
index b81b9a0..4e59e83 100644
|
||||||
|
--- a/src/plugins/platforms/cocoa/qcocoacursor.mm
|
||||||
|
+++ b/src/plugins/platforms/cocoa/qcocoacursor.mm
|
||||||
|
@@ -81,7 +81,7 @@ void QCocoaCursor::setPos(const QPoint &position)
|
||||||
|
pos.x = position.x();
|
||||||
|
pos.y = position.y();
|
||||||
|
|
||||||
|
- CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, 0);
|
||||||
|
+ CGEventRef e = CGEventCreateMouseEvent(0, kCGEventMouseMoved, pos, kCGMouseButtonLeft);
|
||||||
|
CGEventPost(kCGHIDEventTap, e);
|
||||||
|
CFRelease(e);
|
||||||
|
}
|
||||||
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
|
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm
|
||||||
index 9fd05a6..dea6072 100644
|
index 9fd05a6..dea6072 100644
|
||||||
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
|
--- a/src/plugins/platforms/cocoa/qcocoaintegration.mm
|
|
@ -41,7 +41,13 @@
|
||||||
'qtharfbuzzng',
|
'qtharfbuzzng',
|
||||||
],
|
],
|
||||||
'qt_version%': '<(qt_version)',
|
'qt_version%': '<(qt_version)',
|
||||||
|
'conditions': [
|
||||||
|
[ 'build_macold', {
|
||||||
|
'linux_path_qt%': '/usr/local/macold/Qt-<(qt_version)',
|
||||||
|
}, {
|
||||||
'linux_path_qt%': '/usr/local/tdesktop/Qt-<(qt_version)',
|
'linux_path_qt%': '/usr/local/tdesktop/Qt-<(qt_version)',
|
||||||
|
}]
|
||||||
|
]
|
||||||
},
|
},
|
||||||
'qt_version%': '<(qt_version)',
|
'qt_version%': '<(qt_version)',
|
||||||
'qt_loc_unix': '<(linux_path_qt)',
|
'qt_loc_unix': '<(linux_path_qt)',
|
||||||
|
|
|
@ -32,17 +32,13 @@
|
||||||
'-lcrypto',
|
'-lcrypto',
|
||||||
'/usr/local/lib/liblzma.a',
|
'/usr/local/lib/liblzma.a',
|
||||||
'/usr/local/lib/libopus.a',
|
'/usr/local/lib/libopus.a',
|
||||||
'/usr/local/lib/libexif.a',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'/usr/local/include',
|
'/usr/local/include',
|
||||||
'<(libs_loc)/openssl-xcode/include'
|
|
||||||
],
|
],
|
||||||
'library_dirs': [
|
'library_dirs': [
|
||||||
'/usr/local/lib',
|
'/usr/local/lib',
|
||||||
'<(libs_loc)/libexif-0.6.20/libexif/.libs',
|
|
||||||
'<(libs_loc)/openssl-xcode',
|
|
||||||
],
|
],
|
||||||
'configurations': {
|
'configurations': {
|
||||||
'Debug': {
|
'Debug': {
|
||||||
|
@ -66,33 +62,43 @@
|
||||||
}], [ 'build_macold', {
|
}], [ 'build_macold', {
|
||||||
'xcode_settings': {
|
'xcode_settings': {
|
||||||
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.Telegram',
|
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.Telegram',
|
||||||
|
'OTHER_CPLUSPLUSFLAGS': [ '-nostdinc++' ],
|
||||||
'OTHER_LDFLAGS': [
|
'OTHER_LDFLAGS': [
|
||||||
'/usr/local/openal_old/lib/libopenal.a',
|
'-lbase',
|
||||||
'/usr/local/zlib_old/lib/libz.a',
|
'-lcrashpad_client',
|
||||||
|
'-lcrashpad_util',
|
||||||
|
'/usr/local/macold/lib/libz.a',
|
||||||
|
'/usr/local/macold/lib/libopenal.a',
|
||||||
'/usr/local/iconv_old/lib/libiconv.a',
|
'/usr/local/iconv_old/lib/libiconv.a',
|
||||||
'/usr/local/ffmpeg_old/lib/libavcodec.a',
|
'/usr/local/ffmpeg_old/lib/libavcodec.a',
|
||||||
'/usr/local/ffmpeg_old/lib/libavformat.a',
|
'/usr/local/ffmpeg_old/lib/libavformat.a',
|
||||||
'/usr/local/ffmpeg_old/lib/libavutil.a',
|
'/usr/local/ffmpeg_old/lib/libavutil.a',
|
||||||
'/usr/local/ffmpeg_old/lib/libswscale.a',
|
'/usr/local/ffmpeg_old/lib/libswscale.a',
|
||||||
'/usr/local/ffmpeg_old/lib/libswresample.a',
|
'/usr/local/ffmpeg_old/lib/libswresample.a',
|
||||||
'-lbase',
|
'/usr/local/macold/lib/libexif.a',
|
||||||
'-lcrashpad_client',
|
'/usr/local/macold/lib/libc++.a',
|
||||||
'-lcrashpad_util',
|
'/usr/local/macold/lib/libc++abi.a',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(libs_loc)/crashpad_oldmac/crashpad',
|
'/usr/local/macold',
|
||||||
'<(libs_loc)/crashpad_oldmac/crashpad/third_party/mini_chromium/mini_chromium',
|
'/usr/local/macold/include/c++/v1',
|
||||||
|
'<(libs_loc)/macold/openssl-1.0.1h/include',
|
||||||
|
'<(libs_loc)/macold/crashpad',
|
||||||
|
'<(libs_loc)/macold/crashpad/third_party/mini_chromium/mini_chromium',
|
||||||
|
],
|
||||||
|
'library_dirs': [
|
||||||
|
'<(libs_loc)/macold/openssl-1.0.1h',
|
||||||
],
|
],
|
||||||
'configurations': {
|
'configurations': {
|
||||||
'Debug': {
|
'Debug': {
|
||||||
'library_dirs': [
|
'library_dirs': [
|
||||||
'<(libs_loc)/crashpad_oldmac/crashpad/out/Debug',
|
'<(libs_loc)/macold/crashpad/out/Debug',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'Release': {
|
'Release': {
|
||||||
'library_dirs': [
|
'library_dirs': [
|
||||||
'<(libs_loc)/crashpad_oldmac/crashpad/out/Release',
|
'<(libs_loc)/macold/crashpad/out/Release',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -137,6 +143,10 @@
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(libs_loc)/crashpad/crashpad',
|
'<(libs_loc)/crashpad/crashpad',
|
||||||
'<(libs_loc)/crashpad/crashpad/third_party/mini_chromium/mini_chromium',
|
'<(libs_loc)/crashpad/crashpad/third_party/mini_chromium/mini_chromium',
|
||||||
|
'<(libs_loc)/openssl-xcode/include'
|
||||||
|
],
|
||||||
|
'library_dirs': [
|
||||||
|
'<(libs_loc)/openssl-xcode',
|
||||||
],
|
],
|
||||||
'configurations': {
|
'configurations': {
|
||||||
'Debug': {
|
'Debug': {
|
||||||
|
|
|
@ -14,7 +14,15 @@ By git – in Terminal go to **/Users/user/TBuild** and run
|
||||||
|
|
||||||
then go to **/Users/user/TBuild/tdesktop** and run
|
then go to **/Users/user/TBuild/tdesktop** and run
|
||||||
|
|
||||||
git checkout mac32
|
git checkout dev
|
||||||
|
|
||||||
|
####Prepare latest cmake
|
||||||
|
|
||||||
|
Download the [latest sources](https://cmake.org/download/) and unpack to **/Users/user/TBuild/Libraries/macold**
|
||||||
|
|
||||||
|
./bootstrap
|
||||||
|
make -j4
|
||||||
|
sudo make install
|
||||||
|
|
||||||
###Prepare libraries
|
###Prepare libraries
|
||||||
|
|
||||||
|
@ -24,34 +32,53 @@ In your build Terminal run
|
||||||
|
|
||||||
to set minimal supported OS version to 10.6 for future console builds.
|
to set minimal supported OS version to 10.6 for future console builds.
|
||||||
|
|
||||||
|
####custom build of libc++
|
||||||
|
|
||||||
|
From **/Users/user/TBuild/Libraries/macold** run
|
||||||
|
|
||||||
|
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
|
||||||
|
cd llvm/projects
|
||||||
|
svn co http://llvm.org/svn/llvm-project/libcxx/trunk libcxx
|
||||||
|
svn co http://llvm.org/svn/llvm-project/libcxxabi/trunk libcxxabi
|
||||||
|
|
||||||
|
cd ../../
|
||||||
|
mkdir libcxxabi
|
||||||
|
cd libcxxabi
|
||||||
|
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -DCMAKE_BUILD_TYPE:STRING=Release -DLIBCXX_ENABLE_SHARED:BOOL=NO -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/macold -DLLVM_PATH=../llvm -DLIBCXXABI_LIBCXX_PATH=../llvm/projects/libcxx ../llvm/projects/libcxxabi/
|
||||||
|
make -j4
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
cd ../
|
||||||
|
mkdir libcxx
|
||||||
|
cd libcxx
|
||||||
|
|
||||||
|
cmake -G "Unix Makefiles" -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/macold -DLIBCXX_ENABLE_SHARED:BOOL=NO -DLIBCXX_CXX_ABI:STRING=libstdc++ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1/" -DLLVM_PATH=../llvm/ ../llvm/projects/libcxx/
|
||||||
|
make -j4
|
||||||
|
sudo make install
|
||||||
|
|
||||||
####zlib 1.2.8
|
####zlib 1.2.8
|
||||||
|
|
||||||
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip)
|
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8**](http://www.zlib.net/fossils/zlib-1.2.8.tar.gz)
|
||||||
|
|
||||||
Extract to **/Users/user/TBuild/Libraries**
|
Extract to **/Users/user/TBuild/Libraries/macold**
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run:
|
In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run:
|
||||||
|
|
||||||
prefix=/usr/local/zlib_old CFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure
|
prefix=/usr/local/macold CFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
####OpenSSL 1.0.1g
|
####OpenSSL 1.0.1g
|
||||||
|
|
||||||
Get sources from https://github.com/telegramdesktop/openssl-xcode, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run
|
|
||||||
|
|
||||||
git clone https://github.com/telegramdesktop/openssl-xcode.git
|
|
||||||
|
|
||||||
http://www.openssl.org/source/ > Download [**openssl-1.0.1h.tar.gz**](http://www.openssl.org/source/openssl-1.0.1h.tar.gz) (4.3 Mb)
|
http://www.openssl.org/source/ > Download [**openssl-1.0.1h.tar.gz**](http://www.openssl.org/source/openssl-1.0.1h.tar.gz) (4.3 Mb)
|
||||||
|
|
||||||
Extract openssl-1.0.1h.tar.gz and copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** to have **/Users/user/TBuild/Libraries/openssl-xcode/include**
|
Extract openssl-1.0.1h.tar.gz to **/Users/user/TBuild/Libraries/macold/openssl-1.0.1h**
|
||||||
|
|
||||||
#####Building library
|
./Configure --install_prefix=/usr/local/macold darwin64-x86_64-cc -static -mmacosx-version-min=10.6
|
||||||
|
make build_crypto build_ssl -j4
|
||||||
* Open **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj** with Xcode
|
|
||||||
* Product > Build
|
|
||||||
|
|
||||||
####liblzma
|
####liblzma
|
||||||
|
|
||||||
|
@ -67,37 +94,33 @@ In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
####zlib 1.2.8
|
|
||||||
|
|
||||||
Using se system lib
|
|
||||||
|
|
||||||
####libexif 0.6.20
|
####libexif 0.6.20
|
||||||
|
|
||||||
Get sources from https://github.com/telegramdesktop/libexif-0.6.20, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run
|
Get sources from https://github.com/telegramdesktop/libexif-0.6.20, by git – in Terminal go to **/Users/user/TBuild/Libraries/macold** and run
|
||||||
|
|
||||||
git clone https://github.com/telegramdesktop/libexif-0.6.20.git
|
git clone https://github.com/telegramdesktop/libexif-0.6.20.git
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
In Terminal go to **/Users/user/TBuild/Libraries/libexif-0.6.20** and there run
|
In Terminal go to **/Users/user/TBuild/Libraries/macold/libexif-0.6.20** and there run
|
||||||
|
|
||||||
./configure
|
CFLAGS="-mmacosx-version-min=10.6" CPPFLAGS="-mmacosx-version-min=10.6 -nostdinc++" LDFLAGS="-mmacosx-version-min=10.6" ./configure --prefix=/usr/local/macold
|
||||||
make
|
make -j4
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
####OpenAL Soft
|
####OpenAL Soft
|
||||||
|
|
||||||
Get sources by git – in Terminal go to **/Users/user/TBuild/Libraries** and run
|
Get sources by git – in Terminal go to **/Users/user/TBuild/Libraries/macold** and run
|
||||||
|
|
||||||
git clone git://repo.or.cz/openal-soft.git
|
git clone git://repo.or.cz/openal-soft.git
|
||||||
|
|
||||||
to have **/Users/user/TBuild/Libraries/openal-soft/CMakeLists.txt**
|
to have **/Users/user/TBuild/Libraries/macold/openal-soft/CMakeLists.txt**
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there run
|
In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there run
|
||||||
|
|
||||||
cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -D CMAKE_INSTALL_PREFIX:STRING=/usr/local/openal_old ..
|
cmake -DLIBTYPE:STRING=STATIC -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -DCMAKE_INSTALL_PREFIX:STRING=/usr/local/macold ..
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
|
@ -123,7 +146,7 @@ then go to **/Users/user/TBuild/Libraries/opus** and there run
|
||||||
|
|
||||||
####FFmpeg
|
####FFmpeg
|
||||||
|
|
||||||
In Terminal go to **/Users/user/TBuild/Libraries** and run:
|
In Terminal go to **/Users/user/TBuild/Libraries/macold** and run:
|
||||||
|
|
||||||
git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
|
git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
|
||||||
cd ffmpeg
|
cd ffmpeg
|
||||||
|
@ -131,15 +154,15 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run:
|
||||||
|
|
||||||
#####Building libraries
|
#####Building libraries
|
||||||
|
|
||||||
Download [libiconv-1.14](http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz) from http://www.gnu.org/software/libiconv/#downloading, extract it to **/Users/user/TBuild/Libraries**
|
Download [libiconv-1.14](http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz) from http://www.gnu.org/software/libiconv/#downloading, extract it to **/Users/user/TBuild/Libraries/macold**
|
||||||
|
|
||||||
In Termianl go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run
|
In Termianl go to **/Users/user/TBuild/Libraries/macold/libiconv-1.14** and run
|
||||||
|
|
||||||
CFLAGS="-mmacosx-version-min=10.6" CPPFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure --enable-static --prefix=/usr/local/iconv_old
|
CFLAGS="-mmacosx-version-min=10.6" CPPFLAGS="-mmacosx-version-min=10.6 -nostdinc++" LDFLAGS="-mmacosx-version-min=10.6" ./configure --enable-static --prefix=/usr/local/macold
|
||||||
make
|
make -j4
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg** and run
|
Then in Terminal go to **/Users/user/TBuild/Libraries/macold/ffmpeg** and run
|
||||||
|
|
||||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
|
||||||
|
@ -149,7 +172,7 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg** and run
|
||||||
LDFLAGS=`freetype-config --libs`
|
LDFLAGS=`freetype-config --libs`
|
||||||
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
|
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig
|
||||||
|
|
||||||
./configure --prefix=/usr/local/ffmpeg_old --disable-programs --disable-doc --disable-everything --enable-protocol=file --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=flac --enable-decoder=gif --enable-decoder=h264 --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=mpeg4 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=opus --enable-decoder=vorbis --enable-decoder=wavpack --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-parser=aac --enable-parser=aac_latm --enable-parser=flac --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=flac --enable-demuxer=gif --enable-demuxer=h264 --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=wav --enable-muxer=ogg --enable-muxer=opus --extra-cflags="-mmacosx-version-min=10.6" --extra-cxxflags="-mmacosx-version-min=10.6" --extra-ldflags="-mmacosx-version-min=10.6"
|
./configure --prefix=/usr/local/macold --disable-programs --disable-doc --disable-everything --enable-protocol=file --enable-libopus --enable-decoder=aac --enable-decoder=aac_latm --enable-decoder=aasc --enable-decoder=flac --enable-decoder=gif --enable-decoder=h264 --enable-decoder=mp1 --enable-decoder=mp1float --enable-decoder=mp2 --enable-decoder=mp2float --enable-decoder=mp3 --enable-decoder=mp3adu --enable-decoder=mp3adufloat --enable-decoder=mp3float --enable-decoder=mp3on4 --enable-decoder=mp3on4float --enable-decoder=mpeg4 --enable-decoder=msmpeg4v2 --enable-decoder=msmpeg4v3 --enable-decoder=opus --enable-decoder=vorbis --enable-decoder=wavpack --enable-decoder=wmalossless --enable-decoder=wmapro --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=wmavoice --enable-encoder=libopus --enable-parser=aac --enable-parser=aac_latm --enable-parser=flac --enable-parser=h264 --enable-parser=mpeg4video --enable-parser=mpegaudio --enable-parser=opus --enable-parser=vorbis --enable-demuxer=aac --enable-demuxer=flac --enable-demuxer=gif --enable-demuxer=h264 --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=ogg --enable-demuxer=wav --enable-muxer=ogg --enable-muxer=opus --extra-cflags="-mmacosx-version-min=10.6" --extra-cxxflags="-mmacosx-version-min=10.6 -nostdinc++" --extra-ldflags="-mmacosx-version-min=10.6"
|
||||||
|
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
@ -169,24 +192,56 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run:
|
||||||
|
|
||||||
#####Apply the patch
|
#####Apply the patch
|
||||||
|
|
||||||
From **/Users/user/TBuild/Libraries/qt5_3_2/qtbase**, run:
|
From **/Users/user/TBuild/Libraries/macold/qt5_3_2/qtbase**, run:
|
||||||
|
|
||||||
git apply ../../../tdesktop/Telegram/Patches/qtbase_5_3_2.diff
|
git apply ../../../../tdesktop/Telegram/Patches/macold/qtbase_5_3_2.diff
|
||||||
|
|
||||||
From **/Users/user/TBuild/Libraries/qt5_3_2/qtimageformats**, run:
|
From **/Users/user/TBuild/Libraries/macold/qt5_3_2/qtimageformats**, run:
|
||||||
|
|
||||||
git apply ../../../tdesktop/Telegram/Patches/qtimageformats_5_3_2.diff
|
git apply ../../../../tdesktop/Telegram/Patches/macold/qtimageformats_5_3_2.diff
|
||||||
|
|
||||||
#####Building library
|
#####Building library
|
||||||
|
|
||||||
Go to **/Users/user/TBuild/Libraries/qt5_3_2** and run:
|
Go to **/Users/user/TBuild/Libraries/macold/qt5_3_2** and run:
|
||||||
|
|
||||||
OPENSSL_LIBS="/Users/user/TBuild/Libraries/openssl-xcode_oldmac/libssl.a /Users/user/TBuild/Libraries/openssl-xcode_oldmac/libcrypto.a" ./configure -prefix "/usr/local/tdesktop/Qt-5.3.2" -debug-and-release -force-debug-info -opensource -confirm-license -static -opengl desktop -openssl-linked -I "/Users/user/TBuild/Libraries/openssl-xcode_oldmac/include" -nomake examples -nomake tests -platform macx-g++
|
OPENSSL_LIBS="/Users/user/TBuild/Libraries/macold/openssl-1.0.1h/libssl.a /Users/user/TBuild/Libraries/macold/openssl-1.0.1h/libcrypto.a" ./configure -prefix "/usr/local/macold/Qt-5.3.2" -debug-and-release -force-debug-info -opensource -confirm-license -static -opengl desktop -openssl-linked -I "/Users/user/TBuild/Libraries/macold/openssl-1.0.1h/include" -nomake examples -nomake tests -platform macx-g++
|
||||||
make -j4
|
make -j4
|
||||||
sudo make -j4 install
|
sudo make -j4 install
|
||||||
|
|
||||||
building (**make** command) will take really long time.
|
building (**make** command) will take really long time.
|
||||||
|
|
||||||
|
####Google Crashpad
|
||||||
|
|
||||||
|
#####Install gyp
|
||||||
|
|
||||||
|
.. the same as modern ..
|
||||||
|
|
||||||
|
#####Build crashpad
|
||||||
|
|
||||||
|
In Terminal go to **/Users/user/TBuild/Libraries/macold** and run:
|
||||||
|
|
||||||
|
git clone https://chromium.googlesource.com/crashpad/crashpad.git
|
||||||
|
cd crashpad
|
||||||
|
git checkout feb3aa3923
|
||||||
|
git apply ../../../tdesktop/Telegram/Patches/macold/crashpad.diff
|
||||||
|
cd third_party/mini_chromium
|
||||||
|
git clone https://chromium.googlesource.com/chromium/mini_chromium
|
||||||
|
cd mini_chromium
|
||||||
|
git checkout 7c5b0c1ab4
|
||||||
|
git apply ../../../../../../tdesktop/Telegram/Patches/macold/mini_chromium.diff
|
||||||
|
cd ../../gtest
|
||||||
|
git clone https://chromium.googlesource.com/external/github.com/google/googletest gtest
|
||||||
|
cd gtest
|
||||||
|
git checkout d62d6c6556
|
||||||
|
|
||||||
|
build/gyp_crashpad.py -Dmac_deployment_target=10.6
|
||||||
|
ninja -C out/Debug
|
||||||
|
ninja -C out/Release
|
||||||
|
|
||||||
|
####Prepare GYP
|
||||||
|
|
||||||
|
.. the same as modern ..
|
||||||
|
|
||||||
###Building Telegram Desktop
|
###Building Telegram Desktop
|
||||||
|
|
||||||
* Launch Xcode, all projects will be taken from **/Users/user/TBuild/tdesktop/Telegram**
|
* Launch Xcode, all projects will be taken from **/Users/user/TBuild/tdesktop/Telegram**
|
||||||
|
|
|
@ -24,7 +24,7 @@ to set minimal supported OS version to 10.8 for future console builds.
|
||||||
|
|
||||||
####zlib 1.2.8
|
####zlib 1.2.8
|
||||||
|
|
||||||
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip)
|
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8**](http://www.zlib.net/fossils/zlib-1.2.8.tar.gz)
|
||||||
|
|
||||||
Extract to **/Users/user/TBuild/Libraries**
|
Extract to **/Users/user/TBuild/Libraries**
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue