-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to cmake for builds #25
Conversation
…cotire subrepo: subdir: "cotire" merged: "516d78476" upstream: origin: "https://github.com/procxx/cotire.git" branch: "stable" commit: "516d78476" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
…am/ThirdParty/libtgvoip subrepo: subdir: "Telegram/ThirdParty/libtgvoip" merged: "651594b3" upstream: origin: "https://github.com/telegramdesktop/libtgvoip" branch: "tdesktop" commit: "651594b3" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
…ty/variant subrepo: subdir: "Telegram/ThirdParty/variant" merged: "237f83ca" upstream: origin: "https://github.com/mapbox/variant" branch: "master" commit: "237f83ca" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
…Party/GSL subrepo: subdir: "Telegram/ThirdParty/GSL" merged: "1c95f943" upstream: origin: "https://github.com/Microsoft/GSL.git" branch: "master" commit: "1c95f943" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
…Party/Catch subrepo: subdir: "Telegram/ThirdParty/Catch" merged: "63c097a07" upstream: origin: "https://github.com/philsquared/Catch" branch: "master" commit: "63c097a07" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
subrepo: subdir: "modules" merged: "b6fbaff17" upstream: origin: "https://github.com/procxx/cmake-modules.git" branch: "master" commit: "b6fbaff17" git-subrepo: version: "0.3.1" origin: "???" commit: "???"
Telegram/SourceFiles/apiwrap.cpp
Outdated
QMap<uint64, int32> msgsIds; // copied from feedMsgs | ||
for (int32 i = 0, l = v->size(); i < l; ++i) { | ||
QMap<uint64_t, int32_t> msgsIds; // copied from feedMsgs | ||
for (int32_t i = 0, l = v->size(); i < l; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Range-based for? size_t -> int32_t?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #35 as follow-up.
✅
@@ -28,7 +39,6 @@ The source code is published under GPLv3 with OpenSSL exception, the license is | |||
* liblzma ([public domain](http://tukaani.org/xz/)) | |||
* Google Breakpad ([License](https://chromium.googlesource.com/breakpad/breakpad/+/master/LICENSE)) | |||
* Google Crashpad ([Apache License 2.0](https://chromium.googlesource.com/crashpad/crashpad/+/master/LICENSE)) | |||
* GYP ([BSD License](https://github.com/bnoordhuis/gyp/blob/master/LICENSE)) | |||
* Ninja ([Apache License 2.0](https://github.com/ninja-build/ninja/blob/master/COPYING)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still ever required for building?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gyp? no
✅
@@ -104,7 +104,7 @@ void BoxContent::onDraggingScrollDelta(int delta) { | |||
} | |||
|
|||
void BoxContent::onDraggingScrollTimer() { | |||
auto delta = (_draggingScrollDelta > 0) ? qMin(_draggingScrollDelta * 3 / 20 + 1, int32(MaxScrollSpeed)) : qMax(_draggingScrollDelta * 3 / 20 - 1, -int32(MaxScrollSpeed)); | |||
auto delta = (_draggingScrollDelta > 0) ? qMin(_draggingScrollDelta * 3 / 20 + 1, int32_t(MaxScrollSpeed)) : qMax(_draggingScrollDelta * 3 / 20 - 1, -int32_t(MaxScrollSpeed)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be use std::clamp or similar func?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #36 as a follow-up.
✅
Telegram/SourceFiles/config.h
Outdated
@@ -247,7 +247,7 @@ w/CVnbwQOw0g5GBwwFV3r0uTTvy44xx8XXxk+Qknu4eBCsmrAFNnAgMBAAE=\n\ | |||
#ifdef CUSTOM_API_ID | |||
#include "../../../TelegramPrivate/custom_api_id.h" // Custom API id and API hash | |||
#else | |||
static const int32 ApiId = 17349; | |||
static const int32_t ApiId = 17349; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Just a note: this is an App ID. We will use your own here after moving from legacy)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leha-bot, please file an issue for that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed #37 as follow-up item.
✅
|
||
#define BETA_VERSION_MACRO (0ULL) | ||
|
||
constexpr int AppVersion = 1001023; | ||
constexpr str_const AppVersionStr = "1.1.23"; | ||
constexpr str_const AppVersionStr = "1.1.23-procxx"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: use the CMake as a source for version number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #34 as follow-up.
✅
@@ -1396,7 +1396,7 @@ void InnerWidget::performDrag() { | |||
// ) { | |||
// uponSelected = false; | |||
// } else { | |||
// uint16 selFrom = _selected.cbegin().value().from, selTo = _selected.cbegin().value().to; | |||
// uint16_t selFrom = _selected.cbegin().value().from, selTo = _selected.cbegin().value().to; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we should remove the whole commented piece of code
Telegram/SourceFiles/mainwindow.h
Outdated
|
||
signals: | ||
|
||
void saved(QString host, quint32 port, QString username, QString password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fucked pass by value!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine
void play(const AudioMsgId &audio, int64 position = 0); | ||
void play(const AudioMsgId &audio, std::unique_ptr<VideoSoundData> videoData, int64 position = 0); | ||
void play(const AudioMsgId &audio, int64_t position = 0); | ||
void play(const AudioMsgId &audio, std::unique_ptr<VideoSoundData> videoData, int64_t position = 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unique_ptr by value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if it's moved?
@@ -22,23 +22,24 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org | |||
|
|||
#include "core/basic_types.h" | |||
#include "base/flags.h" | |||
#include <cstdint> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it need? I saw the in core/basic_types.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to get rid of basic_types.h
✅
<key>CFBundleGetInfoString</key> | ||
<string>Telegram Desktop messaging app</string> | ||
<string>pro.cxx Telegram messaging app</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: I think that we should use the CMake features for app naming on each platform build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #34 as follow-up.
✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool. @crackedmind , @xvitaly , @mymedia2 , please check build on Windows, Fedora, Debian respectively
Closes: #3196
* Do not do redundant copying of numbers.
c6e7f60
to
dae5543
Compare
Obsoletes #22 - this one is ready to merge once tested successfully.