Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/cant-reproduce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ on:
schedule:
- cron: '0 3 * * *'

permissions:
contents: read
issues: write

jobs:
cant-reproduce:
runs-on: ubuntu-slim
steps:
- uses: lee-dohm/no-response@v0.5.0
- uses: godofredoc/no-response@v0.5.1
with:
token: ${{ github.token }}
responseRequiredLabel: cant reproduce
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.ref_name == github.event.repository.default_branch

env:
IMAGE_TAG: ghcr.io/${{ github.repository }}/centos_env:latest
IMAGE_TAG: ghcr.io/fmz200/64gram/centos_env:latest

steps:
- name: Clone.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo "ARTIFACT_NAME=Telegram ${{ matrix.defines }}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram ${{ matrix.defines }}" >> $GITHUB_ENV
else
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram" >> $GITHUB_ENV
fi

ccache -z
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
- name: Check.
if: env.ONLY_CACHE == 'false'
run: |
filePath="out/Debug/Telegram"
filePath="out/Debug/64Gram"
if test -f "$filePath"; then
echo "Build successfully done! :)"

Expand All @@ -205,7 +205,7 @@ jobs:
run: |
cd out/Debug
mkdir artifact
mv {Telegram,Updater} artifact/
mv {64Gram,Updater} artifact/
- uses: actions/upload-artifact@v7
if: env.UPLOAD_ARTIFACT == 'true'
name: Upload artifact.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo "ARTIFACT_NAME=Telegram ${{ matrix.defines }}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram ${{ matrix.defines }}" >> $GITHUB_ENV
else
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram" >> $GITHUB_ENV
fi

./configure.sh \
Expand All @@ -127,7 +127,7 @@ jobs:
run: |
cd $REPO_NAME/out/Debug
mkdir artifact
mv Telegram.app artifact/
mv 64Gram.app artifact/
mv Updater artifact/
- uses: actions/upload-artifact@v7
if: env.UPLOAD_ARTIFACT == 'true'
Expand Down
50 changes: 45 additions & 5 deletions .github/workflows/mac_packaged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,38 @@ jobs:
cmake --build build
cmake --install build

- name: Build tlottie.
run: |
cd $LibrariesPath

rm -rf tlottie
mkdir tlottie
cd tlottie

git init .
git remote add origin $GIT/dkaraush/tlottie.git
git fetch --depth=1 origin a9164a08318bec7451cb78b79ef1d8660e2f737e
git reset --hard FETCH_HEAD

RUST_TOOLCHAIN=1.96.1
export RUSTUP_HOME=$LibrariesPath/local/rust/rustup
export CARGO_HOME=$LibrariesPath/local/rust/cargo
export RUSTUP_TOOLCHAIN=$RUST_TOOLCHAIN
export PATH=$CARGO_HOME/bin:$PATH
wget -q -O rustup-init.sh https://sh.rustup.rs
sh rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain $RUST_TOOLCHAIN
rm rustup-init.sh
rustup target add aarch64-apple-darwin x86_64-apple-darwin

export RUSTFLAGS="-C linker=clang -C link-arg=-arch -C link-arg=arm64"
cargo rustc --lib --release --locked --features c-api --crate-type staticlib --target aarch64-apple-darwin -- --print native-static-libs
export RUSTFLAGS="-C linker=clang -C link-arg=-arch -C link-arg=x86_64"
cargo rustc --lib --release --locked --features c-api --crate-type staticlib --target x86_64-apple-darwin -- --print native-static-libs

mkdir -p $LibrariesPath/local/tlottie/lib $LibrariesPath/local/tlottie/include/tlottie
lipo -create target/aarch64-apple-darwin/release/libtlottie.a target/x86_64-apple-darwin/release/libtlottie.a -output $LibrariesPath/local/tlottie/lib/libtlottie.a
cp include/tlottie.h $LibrariesPath/local/tlottie/include/tlottie/tlottie.h

- name: Telegram Desktop build.
if: env.ONLY_CACHE == 'false'
run: |
Expand All @@ -165,22 +197,30 @@ jobs:
if [ -n "${{ matrix.defines }}" ]; then
DEFINE="-D ${{ matrix.defines }}=ON"
echo Define from matrix: $DEFINE
echo "ARTIFACT_NAME=Telegram ${{ matrix.defines }}" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram ${{ matrix.defines }}" >> $GITHUB_ENV
else
echo "ARTIFACT_NAME=Telegram" >> $GITHUB_ENV
echo "ARTIFACT_NAME=64Gram" >> $GITHUB_ENV
fi

cmake -Bbuild . -DTDESKTOP_API_TEST=ON $DEFINE
cmake --build build
macdeployqt build/Telegram.app
codesign --remove-signature build/Telegram.app
macdeployqt build/64Gram.app
codesign --remove-signature build/64Gram.app

- name: Move artifact.
if: env.UPLOAD_ARTIFACT == 'true'
run: |
cd $REPO_NAME/build
mkdir artifact
mv Telegram.app artifact/
mv 64Gram.app artifact/

- name: Create DMG.
if: env.UPLOAD_ARTIFACT == 'true'
run: |
cd $REPO_NAME/build/artifact
hdiutil create -volname "64Gram" -srcfolder 64Gram.app -ov -format UDZO 64Gram.dmg
rm -rf 64Gram.app

- uses: actions/upload-artifact@v7
if: env.UPLOAD_ARTIFACT == 'true'
name: Upload artifact.
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/needs-user-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
schedule:
- cron: '0 2 * * *'

permissions:
contents: read
issues: write

jobs:
needs-user-action:
runs-on: ubuntu-slim
steps:
- uses: lee-dohm/no-response@v0.5.0
- uses: godofredoc/no-response@v0.5.1
with:
token: ${{ github.token }}
responseRequiredLabel: needs user action
6 changes: 5 additions & 1 deletion .github/workflows/waiting-for-answer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
schedule:
- cron: '30 0 * * *'

permissions:
contents: read
issues: write

jobs:
waiting-for-answer:
runs-on: ubuntu-slim
steps:
- uses: lee-dohm/no-response@v0.5.0
- uses: godofredoc/no-response@v0.5.1
with:
token: ${{ github.token }}
responseRequiredLabel: waiting for answer
8 changes: 4 additions & 4 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ jobs:

windows:
name: Windows
runs-on: ${{ matrix.arch == 'arm64' && 'windows-11-arm' || ((github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/nightly') && 'depot-windows-latest-16' || 'windows-latest') }}
runs-on: ${{ matrix.arch == 'arm64' && 'windows-11-arm' || ((github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/nightly') && 'depot-windows-latest-16' || (matrix.arch == 'x64' && 'windows-2025' || 'windows-latest')) }}

strategy:
fail-fast: false
matrix:
arch: [x64_x86, x64, arm64]
qt: ["", qt6]
Expand Down Expand Up @@ -169,7 +170,7 @@ jobs:
- name: Read configuration matrix.
shell: bash
run: |
ARTIFACT_NAME="Telegram"
ARTIFACT_NAME="64Gram"

ARCH=""
if [ -n "${{ matrix.arch }}" ]; then
Expand Down Expand Up @@ -230,7 +231,6 @@ jobs:
%TDESKTOP_BUILD_API% ^
-D CMAKE_CONFIGURATION_TYPES=Debug ^
-D CMAKE_COMPILE_WARNING_AS_ERROR=ON ^
-D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT= ^
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF ^
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF ^
%TDESKTOP_BUILD_DEFINE%
Expand All @@ -242,7 +242,7 @@ jobs:
run: |
set OUT=%TBUILD%\%REPO_NAME%\out\Debug
mkdir artifact
move %OUT%\Telegram.exe artifact/
move %OUT%\64Gram.exe artifact/
move %OUT%\Updater.exe artifact/
- uses: actions/upload-artifact@v7
name: Upload artifact.
Expand Down
8 changes: 4 additions & 4 deletions Telegram/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ endif()
if (build_macstore)
set(bundle_identifier "io.github.tdesktop_x64.TDesktop")
set(bundle_entitlements "Telegram Lite.entitlements")
set(output_name "Telegram Lite")
set(output_name "64Gram")
target_link_options(Telegram
PRIVATE
-F${libs_loc}/breakpad/src/client/mac/build/Release
Expand All @@ -2400,12 +2400,12 @@ if (build_macstore)
)
else()
if (CMAKE_GENERATOR STREQUAL Xcode)
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_identifier "io.github.tdesktop_x64.TDesktop$<$<CONFIG:Debug>:Debug>")
else()
set(bundle_identifier "com.tdesktop.Telegram")
set(bundle_identifier "io.github.tdesktop_x64.TDesktop")
endif()
set(bundle_entitlements "Telegram.entitlements")
set(output_name "Telegram")
set(output_name "64Gram")
endif()

if (CMAKE_GENERATOR STREQUAL Xcode)
Expand Down
5 changes: 2 additions & 3 deletions Telegram/SourceFiles/_other/updater_osx.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#include <sys/xattr.h>

NSString *appName = @"Telegram.app";
NSString *appName = @"64Gram.app";
NSString *appDir = nil;
NSString *workDir = nil;

Expand Down Expand Up @@ -56,7 +56,7 @@ void RemoveQuarantineAttribute(NSString *path) {

void RemoveQuarantineFromBundle(NSString *path) {
RemoveQuarantineAttribute(path);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Telegram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/64Gram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
}
Expand Down Expand Up @@ -282,4 +282,3 @@ int main(int argc, const char * argv[]) {
closeLog();
return -1;
}

2 changes: 1 addition & 1 deletion Telegram/SourceFiles/core/update_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2309,7 +2309,7 @@ bool checkReadyUpdate() {
QFileInfo updater(cWorkingDir() + u"tupdates/temp/Updater.exe"_q);
#elif defined Q_OS_MAC // Q_OS_WIN
QString curUpdater = (cExeDir() + cExeName() + u"/Contents/Frameworks/Updater"_q);
QFileInfo updater(cWorkingDir() + u"tupdates/temp/Telegram.app/Contents/Frameworks/Updater"_q);
QFileInfo updater(cWorkingDir() + u"tupdates/temp/64Gram.app/Contents/Frameworks/Updater"_q);
#else // Q_OS_MAC
QString curUpdater = (cExeDir() + u"Updater"_q);
QFileInfo updater(cWorkingDir() + u"tupdates/temp/Updater"_q);
Expand Down
2 changes: 1 addition & 1 deletion Telegram/SourceFiles/platform/mac/specific_mac_p.mm
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ QString objc_documentsPath() {
QString objc_appDataPath() {
NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
if (url) {
return QString::fromUtf8([[url path] fileSystemRepresentation]) + "/Telegram Desktop/";
return QString::fromUtf8([[url path] fileSystemRepresentation]) + "/64Gram/";
}
return QString();
}
Expand Down
2 changes: 1 addition & 1 deletion Telegram/Telegram.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleExecutable</key>
<string>@output_name@</string>
<key>CFBundleGetInfoString</key>
<string>Telegram Desktop messaging app</string>
<string>64Gram Desktop messaging app</string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
<key>CFBundleIconName</key>
Expand Down
4 changes: 2 additions & 2 deletions Telegram/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ elif [ "$BuildTarget" == "mac" ] ; then
fi
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram"
BinaryName="64Gram"
if [ "$MacArch" != "" ]; then
BundleName="$BinaryName.$MacArch.app"
if [ "$MacArch" == "arm64" ]; then
Expand All @@ -181,7 +181,7 @@ elif [ "$BuildTarget" == "macstore" ]; then
echo "Building version $AppVersionStrFull for Mac App Store.."
ProjectPath="$HomePath/../out"
ReleasePath="$ProjectPath/Release"
BinaryName="Telegram Lite"
BinaryName="64Gram"
BundleName="$BinaryName.app"
else
Error "Invalid target!"
Expand Down
3 changes: 3 additions & 0 deletions Telegram/cmake/td_iv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ target_compile_options(td_iv_reorder_warning_off
INTERFACE
$<$<CXX_COMPILER_ID:Clang,AppleClang>:-Wno-reorder-ctor>
$<$<CXX_COMPILER_ID:GNU>:-Wno-reorder>
$<$<CXX_COMPILER_ID:MSVC>:/wd5038>
$<$<CXX_COMPILER_ID:MSVC>:/wd4265>
$<$<CXX_COMPILER_ID:MSVC>:/wd4005>
)

if (MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio ")
Expand Down
23 changes: 14 additions & 9 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ compression: lzo
apps:
telegram-desktop:
command: usr/bin/telegram-desktop
common-id: org.telegram.desktop
desktop: usr/share/applications/org.telegram.desktop.desktop
common-id: io.github.tdesktop_x64.TDesktop
desktop: usr/share/applications/io.github.tdesktop_x64.TDesktop.desktop
autostart: telegram-desktop_telegram-desktop.desktop
extensions: [gnome]
plugs:
Expand All @@ -38,7 +38,7 @@ parts:
plugin: cmake
source: .
source-type: git
parse-info: [usr/share/metainfo/org.telegram.desktop.metainfo.xml]
parse-info: [usr/share/metainfo/io.github.tdesktop_x64.TDesktop.metainfo.xml]
build-environment:
- LDFLAGS: ${LDFLAGS:+$LDFLAGS} -Wl,--push-state,--no-as-needed,-ldav1d,--pop-state
build-packages:
Expand Down Expand Up @@ -70,13 +70,18 @@ parts:
craftctl set version="$version"
override-build: |
craftctl default
"$CRAFT_PART_SRC/Telegram/build/minidebug.sh" "$CRAFT_PART_INSTALL/usr/bin/Telegram"
mv "$CRAFT_PART_INSTALL"/usr/bin/{Telegram,telegram-desktop}
"$CRAFT_PART_SRC/Telegram/build/minidebug.sh" "$CRAFT_PART_INSTALL/usr/bin/64Gram"
mv "$CRAFT_PART_INSTALL"/usr/bin/{64Gram,telegram-desktop}

APP_ID=org.telegram.desktop
sed -i "s/^Icon=$APP_ID$/Icon=snap.$CRAFT_PROJECT_NAME./g" "$CRAFT_PART_INSTALL/usr/share/applications/$APP_ID.desktop"
for i in $(find "$CRAFT_PART_INSTALL/usr/share/icons" -name "$APP_ID*.svg" -o -name "$APP_ID*.png"); do
PREFIXED="$(dirname "$i")/snap.$CRAFT_PROJECT_NAME.$(basename "$i" | sed "s/$APP_ID//")"
APP_ID=io.github.tdesktop_x64.TDesktop
ICON_ID=org.telegram.desktop
desktop="$CRAFT_PART_INSTALL/usr/share/applications/$APP_ID.desktop"
service="$CRAFT_PART_INSTALL/usr/share/dbus-1/services/$APP_ID.service"
sed -i "s/^Icon=$ICON_ID$/Icon=snap.$CRAFT_PROJECT_NAME./g" "$desktop"
sed -i 's/^TryExec=Telegram$/TryExec=telegram-desktop/; s/^Exec=Telegram /Exec=telegram-desktop /' "$desktop"
sed -i 's|/Telegram$|/telegram-desktop|' "$service"
for i in $(find "$CRAFT_PART_INSTALL/usr/share/icons" -name "$ICON_ID*.svg" -o -name "$ICON_ID*.png"); do
PREFIXED="$(dirname "$i")/snap.$CRAFT_PROJECT_NAME.$(basename "$i" | sed "s/$ICON_ID//")"
mv "$i" "$PREFIXED"
DEST="$(echo "$PREFIXED" | sed 's@usr/share@meta/gui@')"
DESTDIR="$(dirname "$DEST")"
Expand Down