merged with master
This commit is contained in:
		
						commit
						200073b826
					
				
					 5 changed files with 85 additions and 38 deletions
				
			
		| 
						 | 
					@ -569,6 +569,8 @@ bool checkReadyUpdate() {
 | 
				
			||||||
	return true;
 | 
						return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp
 | 
					QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp
 | 
				
			||||||
	if (cBetaPrivateKey().isEmpty()) {
 | 
						if (cBetaPrivateKey().isEmpty()) {
 | 
				
			||||||
		LOG(("Error: Trying to count beta version signature without beta private key!"));
 | 
							LOG(("Error: Trying to count beta version signature without beta private key!"));
 | 
				
			||||||
| 
						 | 
					@ -612,5 +614,3 @@ QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp
 | 
				
			||||||
	signature = signature.replace('-', '8').replace('_', 'B');
 | 
						signature = signature.replace('-', '8').replace('_', 'B');
 | 
				
			||||||
	return QString::fromUtf8(signature.mid(19, 32));
 | 
						return QString::fromUtf8(signature.mid(19, 32));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,6 +66,6 @@ private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool checkReadyUpdate();
 | 
					bool checkReadyUpdate();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString countBetaVersionSignature(uint64 version);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QString countBetaVersionSignature(uint64 version);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -223,7 +223,9 @@ void logsInit() {
 | 
				
			||||||
#ifdef _DEBUG
 | 
					#ifdef _DEBUG
 | 
				
			||||||
		cForceWorkingDir(cExeDir());
 | 
							cForceWorkingDir(cExeDir());
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
		cForceWorkingDir(psAppDataPath());
 | 
							if(cWorkingDir().isEmpty()){
 | 
				
			||||||
 | 
								cForceWorkingDir(psAppDataPath());
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version
 | 
					#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +89,7 @@ SOURCES += \
 | 
				
			||||||
    ./SourceFiles/autoupdater.cpp \
 | 
					    ./SourceFiles/autoupdater.cpp \
 | 
				
			||||||
    ./SourceFiles/dialogswidget.cpp \
 | 
					    ./SourceFiles/dialogswidget.cpp \
 | 
				
			||||||
    ./SourceFiles/dropdown.cpp \
 | 
					    ./SourceFiles/dropdown.cpp \
 | 
				
			||||||
	./SourceFiles/facades.cpp \
 | 
					    ./SourceFiles/facades.cpp \
 | 
				
			||||||
    ./SourceFiles/fileuploader.cpp \
 | 
					    ./SourceFiles/fileuploader.cpp \
 | 
				
			||||||
    ./SourceFiles/history.cpp \
 | 
					    ./SourceFiles/history.cpp \
 | 
				
			||||||
    ./SourceFiles/historywidget.cpp \
 | 
					    ./SourceFiles/historywidget.cpp \
 | 
				
			||||||
| 
						 | 
					@ -176,7 +176,7 @@ HEADERS += \
 | 
				
			||||||
    ./SourceFiles/countries.h \
 | 
					    ./SourceFiles/countries.h \
 | 
				
			||||||
    ./SourceFiles/dialogswidget.h \
 | 
					    ./SourceFiles/dialogswidget.h \
 | 
				
			||||||
    ./SourceFiles/dropdown.h \
 | 
					    ./SourceFiles/dropdown.h \
 | 
				
			||||||
	./SourceFiles/facades.h \
 | 
					    ./SourceFiles/facades.h \
 | 
				
			||||||
    ./SourceFiles/fileuploader.h \
 | 
					    ./SourceFiles/fileuploader.h \
 | 
				
			||||||
    ./SourceFiles/history.h \
 | 
					    ./SourceFiles/history.h \
 | 
				
			||||||
    ./SourceFiles/historywidget.h \
 | 
					    ./SourceFiles/historywidget.h \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										107
									
								
								XCODE.md
									
										
									
									
									
								
							
							
						
						
									
										107
									
								
								XCODE.md
									
										
									
									
									
								
							| 
						 | 
					@ -2,35 +2,59 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###Prepare folder
 | 
					###Prepare folder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Choose a folder for the future build, for example **/Users/user/TBuild** There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app.
 | 
					Choose a folder for the future build, for example **/Users/user/TBuild**   
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					**You will need this hierarchy to be able to follow this README !** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###Clone source code
 | 
					###Clone source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
By git – in Terminal go to **/Users/user/TBuild** and run
 | 
					By git – in Terminal go to **/Users/user/TBuild** and run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    git clone https://github.com/telegramdesktop/tdesktop.git
 | 
					    git clone https://github.com/telegramdesktop/tdesktop.git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
or download in ZIP and extract to **/Users/user/TBuild** rename **tdesktop-master** to **tdesktop** to have **/Users/user/TBuild/tdesktop/Telegram/Telegram.xcodeproj** project
 | 
					or:
 | 
				
			||||||
 | 
					* download in ZIP and extract to **/Users/user/TBuild**   
 | 
				
			||||||
 | 
					* rename **tdesktop-master** to **tdesktop**.     
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The path to Telegram.xcodeproj should now be: **/Users/user/TBuild/tdesktop/Telegram/Telegram.xcodeproj**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###Prepare libraries
 | 
					###Prepare libraries
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In your build Terminal run
 | 
					In your build Terminal run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    MACOSX_DEPLOYMENT_TARGET=10.8
 | 
						MACOSX_DEPLOYMENT_TARGET=10.8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
to set minimal supported OS version to 10.8 for future console builds.
 | 
					to set minimal supported OS version to 10.8 for future console builds.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####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
 | 
					#####Get openssl-xcode project file 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    git clone https://github.com/telegramdesktop/openssl-xcode.git
 | 
					From https://github.com/telegramdesktop/openssl-xcode with git in Terminal:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
or download in ZIP and extract to **/Users/user/TBuild/Libraries**, rename **openssl-xcode-master** to **openssl-xcode** to have **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj** project
 | 
					* go to **/Users/user/TBuild/Libraries
 | 
				
			||||||
 | 
					* 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)
 | 
					or:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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**
 | 
					* download in ZIP and extract to **/Users/user/TBuild/Libraries**, 
 | 
				
			||||||
 | 
					* rename **openssl-xcode-master** to **openssl-xcode** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The path to openssl.xcodeproj should now be: **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#####Get the source code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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 
 | 
				
			||||||
 | 
					* Copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The folder include of openssl should be:
 | 
				
			||||||
 | 
					**/Users/user/TBuild/Libraries/openssl-xcode/include**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Building library
 | 
					#####Building library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,14 +62,15 @@ Extract openssl-1.0.1h.tar.gz and copy everything from **openssl-1.0.1h** to **/
 | 
				
			||||||
* Product > Build
 | 
					* Product > Build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####liblzma
 | 
					####liblzma
 | 
				
			||||||
 | 
					#####Get the source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
http://tukaani.org/xz/ > Download [**xz-5.0.5.tar.gz**](http://tukaani.org/xz/xz-5.0.5.tar.gz)
 | 
					Download [**xz-5.0.5.tar.gz**](http://tukaani.org/xz/xz-5.0.5.tar.gz)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Extract to **/Users/user/TBuild/Libraries**
 | 
					Extract to **/Users/user/TBuild/Libraries**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Building library
 | 
					#####Building library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run
 | 
					In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ./configure
 | 
					    ./configure
 | 
				
			||||||
    make
 | 
					    make
 | 
				
			||||||
| 
						 | 
					@ -53,15 +78,26 @@ In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####zlib 1.2.8
 | 
					####zlib 1.2.8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Using se system lib
 | 
					Using the system lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####libexif 0.6.20
 | 
					####libexif 0.6.20
 | 
				
			||||||
 | 
					#####Get the source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Get sources from https://github.com/telegramdesktop/libexif-0.6.20, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run
 | 
					From https://github.com/telegramdesktop/libexif-0.6.20 with git in Terminal:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    git clone https://github.com/telegramdesktop/libexif-0.6.20.git
 | 
					*  go to **/Users/user/TBuild/Libraries**
 | 
				
			||||||
 | 
					*  run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
or download in ZIP and extract to **/Users/user/TBuild/Libraries**, rename **libexif-0.6.20-master** to **libexif-0.6.20** to have **/Users/user/TBuild/Libraries/libexif-0.6.20/configure** script
 | 
					    	git clone https://github.com/telegramdesktop/libexif-0.6.20.git
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					or:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* download in ZIP 
 | 
				
			||||||
 | 
					* extract to **/Users/user/TBuild/Libraries**
 | 
				
			||||||
 | 
					* rename **libexif-0.6.20-master** to **libexif-0.6.20** 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The folder configure should have this path:
 | 
				
			||||||
 | 
					**/Users/user/TBuild/Libraries/libexif-0.6.20/configure**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Building library
 | 
					#####Building library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -88,40 +124,46 @@ In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there r
 | 
				
			||||||
    sudo make install
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####Opus codec
 | 
					####Opus codec
 | 
				
			||||||
 | 
					#####Get the source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/, extract to **/Users/user/TBuild/Libraries** and rename to have **/Users/user/TBuild/Libraries/opus/configure**
 | 
					* Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/ 
 | 
				
			||||||
 | 
					* Extract them to **/Users/user/TBuild/Libraries** 
 | 
				
			||||||
 | 
					* Rename opus-1.1 to opus to have **/Users/user/TBuild/Libraries/opus/configure**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Building libraries
 | 
					#####Building library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org, extract it to **/Users/user/TBuild/Libraries**
 | 
					* Download [pkg-config 0.28](http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz) from http://pkg-config.freedesktop.org
 | 
				
			||||||
 | 
					* Extract it to **/Users/user/TBuild/Libraries**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run
 | 
					In Terminal go to **/Users/user/TBuild/Libraries/pkg-config-0.28** and run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ./configure --with-internal-glib
 | 
					    ./configure --with-internal-glib
 | 
				
			||||||
    make
 | 
					    make
 | 
				
			||||||
    sudo make install
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
then go to **/Users/user/TBuild/Libraries/opus** and there run
 | 
					then go to **/Users/user/TBuild/Libraries/opus** and run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ./configure
 | 
					    ./configure
 | 
				
			||||||
    make
 | 
					    make
 | 
				
			||||||
    sudo make install
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####FFmpeg
 | 
					####FFmpeg and Libiconv
 | 
				
			||||||
 | 
					#####Get the source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Download sources [ffmpeg-2.6.3.tar.bz2](http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2) from https://www.ffmpeg.org/download.html, extract to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ffmpeg-2.6.3**
 | 
					* Download sources [ffmpeg-2.6.3.tar.bz2](http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2) from https://www.ffmpeg.org/download.html
 | 
				
			||||||
 | 
					* Extract to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ffmpeg-2.6.3**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####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 to **/Users/user/TBuild/Libraries** to have **/Users/user/TBuild/Libraries/ibiconv-1.14**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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**
 | 
					#####Building library
 | 
				
			||||||
 | 
					In Terminal go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run:
 | 
				
			||||||
In Termianl go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ./configure --enable-static
 | 
					    ./configure --enable-static
 | 
				
			||||||
    make
 | 
					    make
 | 
				
			||||||
    sudo make install
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run
 | 
					Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** 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)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -137,8 +179,9 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run
 | 
				
			||||||
    sudo make install
 | 
					    sudo make install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
####Qt 5.5.1, slightly patched
 | 
					####Qt 5.5.1, slightly patched
 | 
				
			||||||
 | 
					#####Get the source code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In Terminal go to **/Users/user/TBuild/Libraries** and run
 | 
					In Terminal go to **/Users/user/TBuild/Libraries** and run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    git clone git://code.qt.io/qt/qt5.git QtStatic
 | 
					    git clone git://code.qt.io/qt/qt5.git QtStatic
 | 
				
			||||||
    cd QtStatic
 | 
					    cd QtStatic
 | 
				
			||||||
| 
						 | 
					@ -149,16 +192,18 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run
 | 
				
			||||||
    cd qtbase && git checkout v5.5.1 && cd ..
 | 
					    cd qtbase && git checkout v5.5.1 && cd ..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Apply the patch
 | 
					#####Apply the patch
 | 
				
			||||||
 | 
					From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run:  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd ..
 | 
					    git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#####Building library
 | 
					#####Building library
 | 
				
			||||||
 | 
					Go to **/Users/user/TBuild/Libraries/QtStatic** and run:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang
 | 
					    ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang
 | 
				
			||||||
    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 a really long time.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###Building Telegram Desktop
 | 
					###Building Telegram Desktop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue