mirror of https://github.com/procxx/kepka.git
Closed alpha version 1.9.1.8: Fix macOS build.
This commit is contained in:
parent
240117b77e
commit
f1877641e5
|
@ -988,7 +988,7 @@ elseif (APPLE)
|
|||
set(strings_path ${res_loc}/langs/${lang}.lproj/Localizable.strings)
|
||||
set_source_files_properties(${strings_path} PROPERTIES
|
||||
MACOSX_PACKAGE_LOCATION
|
||||
Resources/${lang}.lproj/Localizable.strings
|
||||
Resources/${lang}.lproj
|
||||
)
|
||||
target_sources(Telegram PRIVATE ${strings_path})
|
||||
source_group(TREE ${res_loc} PREFIX Resources FILES ${strings_path})
|
||||
|
@ -1101,13 +1101,6 @@ PRIVATE
|
|||
AL_ALEXT_PROTOTYPES
|
||||
)
|
||||
|
||||
if (disable_autoupdate)
|
||||
target_compile_definitions(Telegram
|
||||
PRIVATE
|
||||
TDESKTOP_DISABLE_AUTOUPDATE
|
||||
)
|
||||
endif()
|
||||
|
||||
if (${CMAKE_GENERATOR} MATCHES "(Visual Studio|Xcode|Ninja)")
|
||||
set(output_folder ${CMAKE_BINARY_DIR})
|
||||
else()
|
||||
|
|
|
@ -9,11 +9,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#define TDESKTOP_REQUESTED_ALPHA_VERSION (1009001008ULL)
|
||||
|
||||
#ifdef TDESKTOP_OFFICIAL_TARGET
|
||||
#ifdef TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||
#define TDESKTOP_ALPHA_VERSION TDESKTOP_REQUESTED_ALPHA_VERSION
|
||||
#else // TDESKTOP_OFFICIAL_TARGET
|
||||
#else // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||
#define TDESKTOP_ALPHA_VERSION (0ULL)
|
||||
#endif // TDESKTOP_OFFICIAL_TARGET
|
||||
#endif // TDESKTOP_ALLOW_CLOSED_ALPHA
|
||||
|
||||
constexpr auto AppVersion = 1009001;
|
||||
constexpr auto AppVersionStr = "1.9.1";
|
||||
|
|
|
@ -12,9 +12,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include <QImage>
|
||||
|
||||
#ifdef TDESKTOP_OFFICIAL_TARGET
|
||||
#ifdef LIB_FFMPEG_USE_QT_PRIVATE_API
|
||||
#include <private/qdrawhelper_p.h>
|
||||
#endif // TDESKTOP_OFFICIAL_TARGET
|
||||
#endif // LIB_FFMPEG_USE_QT_PRIVATE_API
|
||||
|
||||
extern "C" {
|
||||
#include <libavutil/opt.h>
|
||||
|
@ -51,7 +51,7 @@ void UnPremultiplyLine(uchar *dst, const uchar *src, int intsCount) {
|
|||
[[maybe_unused]] const auto udst = reinterpret_cast<uint*>(dst);
|
||||
const auto usrc = reinterpret_cast<const uint*>(src);
|
||||
|
||||
#ifndef TDESKTOP_OFFICIAL_TARGET
|
||||
#ifndef LIB_FFMPEG_USE_QT_PRIVATE_API
|
||||
for (auto i = 0; i != intsCount; ++i) {
|
||||
udst[i] = qUnpremultiply(usrc[i]);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ void PremultiplyLine(uchar *dst, const uchar *src, int intsCount) {
|
|||
const auto udst = reinterpret_cast<uint*>(dst);
|
||||
[[maybe_unused]] const auto usrc = reinterpret_cast<const uint*>(src);
|
||||
|
||||
#ifndef TDESKTOP_OFFICIAL_TARGET
|
||||
#ifndef LIB_FFMPEG_USE_QT_PRIVATE_API
|
||||
for (auto i = 0; i != intsCount; ++i) {
|
||||
udst[i] = qPremultiply(usrc[i]);
|
||||
}
|
||||
|
|
|
@ -52,13 +52,15 @@ if [ "$BuildTarget" == "linux" ]; then
|
|||
echo "Building version $AppVersionStrFull for Linux 64bit.."
|
||||
UpdateFile="tlinuxupd$AppVersion"
|
||||
SetupFile="tsetup.$AppVersionStrFull.tar.xz"
|
||||
ReleasePath="$HomePath/../out/Release"
|
||||
ProjectPath="$HomePath/../out"
|
||||
ReleasePath="$ProjectPath/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "linux32" ]; then
|
||||
echo "Building version $AppVersionStrFull for Linux 32bit.."
|
||||
UpdateFile="tlinux32upd$AppVersion"
|
||||
SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
|
||||
ReleasePath="$HomePath/../out/Release"
|
||||
ProjectPath="$HomePath/../out"
|
||||
ReleasePath="$ProjectPath/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "mac" ]; then
|
||||
echo "Building version $AppVersionStrFull for macOS 10.12+.."
|
||||
|
@ -67,13 +69,15 @@ elif [ "$BuildTarget" == "mac" ]; then
|
|||
fi
|
||||
UpdateFile="tmacupd$AppVersion"
|
||||
SetupFile="tsetup.$AppVersionStrFull.dmg"
|
||||
ReleasePath="$HomePath/../out/Release"
|
||||
ProjectPath="$HomePath/../out"
|
||||
ReleasePath="$ProjectPath/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "osx" ]; then
|
||||
echo "Building version $AppVersionStrFull for OS X 10.10 and 10.11.."
|
||||
UpdateFile="tosxupd$AppVersion"
|
||||
SetupFile="tsetup-osx.$AppVersionStrFull.dmg"
|
||||
ReleasePath="$HomePath/../out/Release"
|
||||
ProjectPath="$HomePath/../out"
|
||||
ReleasePath="$ProjectPath/Release"
|
||||
BinaryName="Telegram"
|
||||
elif [ "$BuildTarget" == "macstore" ]; then
|
||||
if [ "$AlphaVersion" != "0" ]; then
|
||||
|
@ -81,7 +85,8 @@ elif [ "$BuildTarget" == "macstore" ]; then
|
|||
fi
|
||||
|
||||
echo "Building version $AppVersionStrFull for Mac App Store.."
|
||||
ReleasePath="$HomePath/../out/Release"
|
||||
ProjectPath="$HomePath/../out"
|
||||
ReleasePath="$ProjectPath/Release"
|
||||
BinaryName="Telegram Desktop"
|
||||
else
|
||||
Error "Invalid target!"
|
||||
|
@ -123,10 +128,12 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
|
|||
Error "Backup folder not found!"
|
||||
fi
|
||||
|
||||
gyp/refresh.sh
|
||||
./configure.sh
|
||||
|
||||
cd $ProjectPath
|
||||
cmake --build . --config Release --target Telegram -- -j8
|
||||
cd $ReleasePath
|
||||
make -j4
|
||||
|
||||
echo "$BinaryName build complete!"
|
||||
|
||||
if [ ! -f "$ReleasePath/$BinaryName" ]; then
|
||||
|
@ -253,8 +260,11 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "osx" ] || [ "$BuildTarget
|
|||
Error "Backup path not found!"
|
||||
fi
|
||||
|
||||
gyp/refresh.sh
|
||||
xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build
|
||||
./configure.sh
|
||||
|
||||
cd $ProjectPath
|
||||
cmake --build . --config Release --target Telegram
|
||||
cd $ReleasePath
|
||||
|
||||
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
|
||||
Error "$BinaryName.app not found!"
|
||||
|
|
|
@ -51,15 +51,16 @@ if building:
|
|||
if os.path.exists('../out/Debug/' + outputFolder):
|
||||
finish(1, 'Todays updates version exists.')
|
||||
|
||||
result = subprocess.call('gyp/refresh.sh', shell=True)
|
||||
result = subprocess.call('configure.sh', shell=True)
|
||||
if result != 0:
|
||||
finish(1, 'While calling GYP.')
|
||||
|
||||
result = subprocess.call('xcodebuild -project Telegram.xcodeproj -alltargets -configuration Debug build', shell=True)
|
||||
os.chdir('../out')
|
||||
result = subprocess.call('cmake --build . --config Debug --target Telegram', shell=True)
|
||||
if result != 0:
|
||||
finish(1, 'While building Telegram.')
|
||||
|
||||
os.chdir('../out/Debug')
|
||||
os.chdir('Debug')
|
||||
if not os.path.exists('Telegram.app'):
|
||||
finish(1, 'Telegram.app not found.')
|
||||
|
||||
|
|
|
@ -24,3 +24,7 @@ PUBLIC
|
|||
desktop-app::lib_base
|
||||
desktop-app::external_ffmpeg
|
||||
)
|
||||
|
||||
if (DESKTOP_APP_SPECIAL_TARGET)
|
||||
target_compile_definitions(lib_ffmpeg PRIVATE LIB_FFMPEG_USE_QT_PRIVATE_API)
|
||||
endif()
|
||||
|
|
|
@ -5,9 +5,17 @@
|
|||
# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
add_library(lib_tgvoip STATIC)
|
||||
init_target(lib_tgvoip)
|
||||
init_target(lib_tgvoip cxx_std_11)
|
||||
add_library(tdesktop::lib_tgvoip ALIAS lib_tgvoip)
|
||||
|
||||
if (NOT APPLE)
|
||||
# On macOS if you build libtgvoip with C++17 it uses std::optional
|
||||
# instead of absl::optional and when it uses optional::value, the
|
||||
# build fails, because optional::value is available starting with
|
||||
# macOS 10.14+. This way we force using absl::optional.
|
||||
target_compile_features(lib_tgvoip PUBLIC cxx_std_17)
|
||||
endif()
|
||||
|
||||
set(tgvoip_loc ${third_party_loc}/libtgvoip)
|
||||
|
||||
nice_target_sources(lib_tgvoip ${tgvoip_loc}
|
||||
|
|
|
@ -51,6 +51,14 @@ else()
|
|||
target_link_libraries(Telegram PRIVATE desktop-app::lib_spellcheck)
|
||||
endif()
|
||||
|
||||
if (disable_autoupdate)
|
||||
target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_AUTOUPDATE)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_SPECIAL_TARGET)
|
||||
target_compile_definitions(Telegram PRIVATE TDESKTOP_ALLOW_CLOSED_ALPHA)
|
||||
endif()
|
||||
|
||||
if (TDESKTOP_FORCE_GTK_FILE_DIALOG)
|
||||
target_compile_definitions(Telegram PRIVATE TDESKTOP_FORCE_GTK_FILE_DIALOG)
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
pushd `dirname $0` > /dev/null
|
||||
FullScriptPath=`pwd`
|
||||
popd > /dev/null
|
||||
|
||||
python $FullScriptPath/configure.py "$@"
|
||||
|
||||
exit
|
|
@ -130,7 +130,7 @@
|
|||
],
|
||||
}], [ '"<(special_build_target)" != ""', {
|
||||
'defines': [
|
||||
'TDESKTOP_OFFICIAL_TARGET=<(special_build_target)',
|
||||
'TDESKTOP_ALLOW_CLOSED_ALPHA',
|
||||
'TDESKTOP_FORCE_GTK_FILE_DIALOG',
|
||||
],
|
||||
'dependencies': [
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
],
|
||||
'conditions': [[ '"<(special_build_target)" != ""', {
|
||||
'defines': [
|
||||
'TDESKTOP_OFFICIAL_TARGET=<(special_build_target)',
|
||||
'LIB_FFMPEG_USE_QT_PRIVATE_API',
|
||||
],
|
||||
}]],
|
||||
}],
|
||||
|
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 632ed315b2054c65954b3d4818b4b5326a0933e8
|
||||
Subproject commit b1cf242c5f381defffcdd92f5044c33e8346ac8a
|
Loading…
Reference in New Issue