From d58b9dc9545ebc4452f6b007ec39faa6d2494ffd Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 31 Oct 2021 16:49:44 +0400 Subject: [PATCH] Re-enable -pie along with AppImage-like format hack. Fixes #1112. This allows the binary to be launched even when compiled with -pie. --- Telegram/build/build.sh | 12 +++++++++++- cmake | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Telegram/build/build.sh b/Telegram/build/build.sh index b982a3f5e..20994240d 100755 --- a/Telegram/build/build.sh +++ b/Telegram/build/build.sh @@ -164,8 +164,18 @@ if [ "$BuildTarget" == "linux" ]; then strip -s "$ReleasePath/$BinaryName" echo "Done!" - echo "Preparing version $AppVersionStrFull, executing Packer.." + echo "Appending an icon.." + rm -rf "$ReleasePath/$BinaryName.AppDir" + rm -rf "$ReleasePath/$BinaryName.squashfs" + mkdir "$ReleasePath/$BinaryName.AppDir" + cp "$HomePath/Resources/art/logo_256.png" "$ReleasePath/$BinaryName.AppDir/.DirIcon" cd "$ReleasePath" + mksquashfs "$BinaryName.AppDir" "$BinaryName.squashfs" -root-owned -noappend + cat "$BinaryName.squashfs" >> "$BinaryName" + echo "8: 414902" | xxd -r - "$BinaryName" + echo "Done!" + + echo "Preparing version $AppVersionStrFull, executing Packer.." "./Packer" -path "$BinaryName" -path Updater -version $VersionForPacker $AlphaBetaParam echo "Packer done!" diff --git a/cmake b/cmake index a976e43aa..13331633e 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit a976e43aab70508a276b42c035aef730380d2be8 +Subproject commit 13331633e5c2db1eeae045dd44de4f3ac7bdea3d