mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-10 00:29:31 +00:00
merged with master
This commit is contained in:
commit
200073b826
@ -569,6 +569,8 @@ bool checkReadyUpdate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp
|
||||
if (cBetaPrivateKey().isEmpty()) {
|
||||
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');
|
||||
return QString::fromUtf8(signature.mid(19, 32));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -66,6 +66,6 @@ private:
|
||||
|
||||
bool checkReadyUpdate();
|
||||
|
||||
QString countBetaVersionSignature(uint64 version);
|
||||
|
||||
#endif
|
||||
|
||||
QString countBetaVersionSignature(uint64 version);
|
||||
|
@ -223,7 +223,9 @@ void logsInit() {
|
||||
#ifdef _DEBUG
|
||||
cForceWorkingDir(cExeDir());
|
||||
#else
|
||||
cForceWorkingDir(psAppDataPath());
|
||||
if(cWorkingDir().isEmpty()){
|
||||
cForceWorkingDir(psAppDataPath());
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version
|
||||
|
@ -89,7 +89,7 @@ SOURCES += \
|
||||
./SourceFiles/autoupdater.cpp \
|
||||
./SourceFiles/dialogswidget.cpp \
|
||||
./SourceFiles/dropdown.cpp \
|
||||
./SourceFiles/facades.cpp \
|
||||
./SourceFiles/facades.cpp \
|
||||
./SourceFiles/fileuploader.cpp \
|
||||
./SourceFiles/history.cpp \
|
||||
./SourceFiles/historywidget.cpp \
|
||||
@ -176,7 +176,7 @@ HEADERS += \
|
||||
./SourceFiles/countries.h \
|
||||
./SourceFiles/dialogswidget.h \
|
||||
./SourceFiles/dropdown.h \
|
||||
./SourceFiles/facades.h \
|
||||
./SourceFiles/facades.h \
|
||||
./SourceFiles/fileuploader.h \
|
||||
./SourceFiles/history.h \
|
||||
./SourceFiles/historywidget.h \
|
||||
|
107
XCODE.md
107
XCODE.md
@ -2,35 +2,59 @@
|
||||
|
||||
###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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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.
|
||||
|
||||
####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:
|
||||
|
||||
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)
|
||||
git clone https://github.com/telegramdesktop/openssl-xcode.git
|
||||
|
||||
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**
|
||||
or:
|
||||
|
||||
* 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
|
||||
|
||||
@ -38,14 +62,15 @@ Extract openssl-1.0.1h.tar.gz and copy everything from **openssl-1.0.1h** to **/
|
||||
* Product > Build
|
||||
|
||||
####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**
|
||||
|
||||
#####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
|
||||
make
|
||||
@ -53,15 +78,26 @@ In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run
|
||||
|
||||
####zlib 1.2.8
|
||||
|
||||
Using se system lib
|
||||
Using the system lib
|
||||
|
||||
####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
|
||||
|
||||
@ -88,40 +124,46 @@ In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there r
|
||||
sudo make install
|
||||
|
||||
####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
|
||||
make
|
||||
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
|
||||
make
|
||||
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**
|
||||
|
||||
In Termianl go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run
|
||||
#####Building library
|
||||
In Terminal go to **/Users/user/TBuild/Libraries/libiconv-1.14** and run:
|
||||
|
||||
./configure --enable-static
|
||||
make
|
||||
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)"
|
||||
|
||||
@ -137,8 +179,9 @@ Then in Terminal go to **/Users/user/TBuild/Libraries/ffmpeg-2.6.3** and run
|
||||
sudo make install
|
||||
|
||||
####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
|
||||
cd QtStatic
|
||||
@ -149,16 +192,18 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run
|
||||
cd qtbase && git checkout v5.5.1 && cd ..
|
||||
|
||||
#####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
|
||||
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
|
||||
make -j4
|
||||
sudo make -j4 install
|
||||
|
||||
building (**make** command) will take really long time.
|
||||
Building (**make** command) will take a really long time.
|
||||
|
||||
###Building Telegram Desktop
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user