From 27dbcd8b4dd040d646770dfd4c4a248ff15c341a Mon Sep 17 00:00:00 2001 From: king Date: Wed, 23 Sep 2026 16:59:46 +0800 Subject: [PATCH 1/2] Configure 64Gram identity and build workflows --- .github/workflows/cant-reproduce.yml | 6 ++- .github/workflows/docker.yml | 2 +- .github/workflows/linux.yml | 8 +-- .github/workflows/mac.yml | 6 +-- .github/workflows/mac_packaged.yml | 50 +++++++++++++++++-- .github/workflows/needs-user-action.yml | 6 ++- .github/workflows/waiting-for-answer.yml | 6 ++- .github/workflows/win.yml | 4 +- Telegram/CMakeLists.txt | 8 +-- Telegram/SourceFiles/_other/updater_osx.m | 5 +- Telegram/SourceFiles/core/update_checker.cpp | 2 +- .../platform/mac/specific_mac_p.mm | 2 +- Telegram/Telegram.plist | 2 +- Telegram/build/build.sh | 4 +- Telegram/cmake/td_iv.cmake | 3 ++ snap/snapcraft.yaml | 23 +++++---- 16 files changed, 98 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cant-reproduce.yml b/.github/workflows/cant-reproduce.yml index 8e20e07349..32c28cf06e 100644 --- a/.github/workflows/cant-reproduce.yml +++ b/.github/workflows/cant-reproduce.yml @@ -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 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9582334f94..54c2e3e57c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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. diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7d8034eac9..13a8056388 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 @@ -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! :)" @@ -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. diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 184a94b091..82a21770ae 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -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 \ @@ -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' diff --git a/.github/workflows/mac_packaged.yml b/.github/workflows/mac_packaged.yml index 24d2f2c4b6..a40f41fbc8 100644 --- a/.github/workflows/mac_packaged.yml +++ b/.github/workflows/mac_packaged.yml @@ -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: | @@ -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. diff --git a/.github/workflows/needs-user-action.yml b/.github/workflows/needs-user-action.yml index 55ad7891ce..8f4486427d 100644 --- a/.github/workflows/needs-user-action.yml +++ b/.github/workflows/needs-user-action.yml @@ -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 diff --git a/.github/workflows/waiting-for-answer.yml b/.github/workflows/waiting-for-answer.yml index 0cccca6b2d..ff3fda0865 100644 --- a/.github/workflows/waiting-for-answer.yml +++ b/.github/workflows/waiting-for-answer.yml @@ -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 diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 219c42ebf6..5981b5a578 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -169,7 +169,7 @@ jobs: - name: Read configuration matrix. shell: bash run: | - ARTIFACT_NAME="Telegram" + ARTIFACT_NAME="64Gram" ARCH="" if [ -n "${{ matrix.arch }}" ]; then @@ -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. diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index e3a23be8d3..6142b9d750 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -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 @@ -2400,12 +2400,12 @@ if (build_macstore) ) else() if (CMAKE_GENERATOR STREQUAL Xcode) - set(bundle_identifier "com.tdesktop.Telegram$<$:Debug>") + set(bundle_identifier "io.github.tdesktop_x64.TDesktop$<$: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) diff --git a/Telegram/SourceFiles/_other/updater_osx.m b/Telegram/SourceFiles/_other/updater_osx.m index 62aedabc32..a07edf351d 100644 --- a/Telegram/SourceFiles/_other/updater_osx.m +++ b/Telegram/SourceFiles/_other/updater_osx.m @@ -8,7 +8,7 @@ #import #include -NSString *appName = @"Telegram.app"; +NSString *appName = @"64Gram.app"; NSString *appDir = nil; NSString *workDir = nil; @@ -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"]); } @@ -282,4 +282,3 @@ int main(int argc, const char * argv[]) { closeLog(); return -1; } - diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp index 33a533e356..b576b9857f 100644 --- a/Telegram/SourceFiles/core/update_checker.cpp +++ b/Telegram/SourceFiles/core/update_checker.cpp @@ -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); diff --git a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm index 63b0c5bd04..e12024791c 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac_p.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac_p.mm @@ -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(); } diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 6755657992..cb6b75b6c7 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -5,7 +5,7 @@ CFBundleExecutable @output_name@ CFBundleGetInfoString - Telegram Desktop messaging app + 64Gram Desktop messaging app CFBundleIconFile Icon.icns CFBundleIconName diff --git a/Telegram/build/build.sh b/Telegram/build/build.sh index 8d12316829..56cbe2d83c 100755 --- a/Telegram/build/build.sh +++ b/Telegram/build/build.sh @@ -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 @@ -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!" diff --git a/Telegram/cmake/td_iv.cmake b/Telegram/cmake/td_iv.cmake index 0cfa639306..5e401e2f56 100644 --- a/Telegram/cmake/td_iv.cmake +++ b/Telegram/cmake/td_iv.cmake @@ -13,6 +13,9 @@ target_compile_options(td_iv_reorder_warning_off INTERFACE $<$:-Wno-reorder-ctor> $<$:-Wno-reorder> + $<$:/wd5038> + $<$:/wd4265> + $<$:/wd4005> ) if (MSVC AND CMAKE_GENERATOR MATCHES "^Visual Studio ") diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index f112e2c470..c138513089 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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: @@ -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: @@ -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")" From 06673c35a929693fd5a0ff7285c033f2895abe31 Mon Sep 17 00:00:00 2001 From: king Date: Wed, 23 Sep 2026 21:45:54 +0800 Subject: [PATCH 2/2] Fix Windows CI disk exhaustion --- .github/workflows/win.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 5981b5a578..fcf872cdd6 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -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] @@ -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%