instructions updated for zlib

This commit is contained in:
John Preston 2016-02-02 15:50:12 +03:00
parent 3e1362628f
commit f7f041f11d
7 changed files with 64 additions and 18 deletions

View File

@ -32,6 +32,20 @@ Install dev libraries
sudo apt-get install libexif-dev liblzma-dev libz-dev libssl-dev libappindicator-dev libunity-dev
####zlib 1.2.8
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip)
Extract to **/home/user/TBuild/Libraries**
#####Building library
In Terminal go to **/home/user/TBuild/Libraries/zlib-1.2.8** and run:
./configure
make
sudo make install
Install audio libraries
####Opus codec 1.1

View File

@ -715,7 +715,8 @@ namespace SignalHandlers {
if (!LoggingCrashHeaderWritten) {
LoggingCrashHeaderWritten = true;
for (AnnotationsMap::const_iterator i = ProcessAnnotations.cbegin(), e = ProcessAnnotations.cend(); i != e; ++i) {
const AnnotationsMap c_ProcessAnnotations(ProcessAnnotations);
for (AnnotationsMap::const_iterator i = c_ProcessAnnotations.begin(), e = c_ProcessAnnotations.end(); i != e; ++i) {
dump() << i->first.c_str() << ": " << i->second.c_str() << "\n";
}
psWriteDump();
@ -839,11 +840,11 @@ namespace SignalHandlers {
#endif
void StartBreakpad() {
ProcessAnnotations["Binary"] = cExeName().toUtf8().toStdString();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().toStdString();
ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cDevVersion() ? qsl("%1 dev") : qsl("%1")).arg(AppVersion)).toUtf8().toStdString();
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().toStdString();
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().toStdString();
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData();
ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cDevVersion() ? qsl("%1 dev") : qsl("%1")).arg(AppVersion)).toUtf8().constData();
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().constData();
QString dumpspath = cWorkingDir() + qsl("tdata/dumps");
QDir().mkpath(dumpspath);
@ -870,8 +871,8 @@ namespace SignalHandlers {
SetSignalHandlers = false;
#else
crashpad::CrashpadClient crashpad_client;
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().toStdString();
std::string database = dumpspath.toUtf8().toStdString();
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData();
std::string database = dumpspath.toUtf8().constData();
if (crashpad_client.StartHandler(base::FilePath(handler),
base::FilePath(database),
std::string(),

View File

@ -61,9 +61,7 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) {
return i.value();
}
InterfaceWrapStruct InterfaceWraps[64] = {
{ 0, 0, 0 }
};
InterfaceWrapStruct InterfaceWraps[64];
QAtomicInt InterfaceIndexLast(0);

View File

@ -25,6 +25,13 @@ typedef void(*InterfaceConstruct)(void *location, Interfaces *interfaces);
typedef void(*InterfaceDestruct)(void *location);
struct InterfaceWrapStruct {
InterfaceWrapStruct() : Size(0), Construct(0), Destruct(0) {
}
InterfaceWrapStruct(int size, InterfaceConstruct construct, InterfaceDestruct destruct)
: Size(size)
, Construct(construct)
, Destruct(destruct) {
}
int Size;
InterfaceConstruct Construct;
InterfaceDestruct Destruct;
@ -62,7 +69,7 @@ public:
if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) {
t_assert(last < 64);
if (_index.testAndSetOrdered(0, last + 1)) {
InterfaceWraps[last] = { InterfaceWrapTemplate<Type>::Size, InterfaceWrapTemplate<Type>::Construct, InterfaceWrapTemplate<Type>::Destruct };
InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate<Type>::Size, InterfaceWrapTemplate<Type>::Construct, InterfaceWrapTemplate<Type>::Destruct);
}
break;
}

View File

@ -46,7 +46,6 @@
07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D6C1C16D245002DC495 /* facades.cpp */; };
071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D11C5E8E6D008C9E90 /* zip.c */; };
071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8F71C5E99D6008C9E90 /* ioapi.c */; };
071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */; };
0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; };
0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */; };
074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074756181A1372C600CA07F7 /* moc_types.cpp */; };
@ -710,7 +709,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */,
0752F8751C2C89F40026D0BC /* VideoToolbox.framework in Link Binary With Libraries */,
0752F8731C2C89220026D0BC /* VideoDecodeAcceleration.framework in Link Binary With Libraries */,
07CAACD81AEA64F00058E508 /* AudioUnit.framework in Link Binary With Libraries */,
@ -1805,7 +1803,7 @@
DYLIB_COMPATIBILITY_VERSION = 0.9;
DYLIB_CURRENT_VERSION = 0.9.19;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
GCC_NO_COMMON_BLOCKS = YES;
@ -1947,7 +1945,7 @@
DYLIB_CURRENT_VERSION = 0.9.19;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
GCC_NO_COMMON_BLOCKS = YES;

View File

@ -28,6 +28,20 @@ In your build Terminal run:
to set minimal supported OS version to 10.8 for future console builds.
####zlib 1.2.8
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip)
Extract to **/Users/user/TBuild/Libraries**
#####Building library
In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run:
CFLAGS="-mmacosx-version-min=10.8" LDFLAGS="-mmacosx-version-min=10.8" ./configure
make
sudo make install
####OpenSSL 1.0.1g
#####Get openssl-xcode project file
@ -37,7 +51,7 @@ From https://github.com/telegramdesktop/openssl-xcode with git in Terminal:
* go to **/Users/user/TBuild/Libraries
* run:
git clone https://github.com/telegramdesktop/openssl-xcode.git
git clone https://github.com/telegramdesktop/openssl-xcode.git
or:

View File

@ -22,6 +22,20 @@ In your build Terminal run
to set minimal supported OS version to 10.6 for future console builds.
####zlib 1.2.8
http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip)
Extract to **/Users/user/TBuild/Libraries**
#####Building library
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
make
sudo make install
####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
@ -85,7 +99,7 @@ to have **/Users/user/TBuild/Libraries/openal-soft/CMakeLists.txt**
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 ..
cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -D CMAKE_INSTALL_PREFIX:STRING=/usr/local/openal_old ..
make
sudo make install