chore: update packer for macOS

This commit is contained in:
AlexeyZavar 2024-10-05 02:47:20 +03:00
parent 87808ef317
commit 1fc230624d
3 changed files with 11 additions and 9 deletions

3
.gitignore vendored
View file

@ -51,3 +51,6 @@ stage
*.*~
.idea/
cmake-build-debug/
# Project specific
Telegram/SourceFiles/_other/packer_private.h

View file

@ -13,9 +13,9 @@ bool OnlyAlphaKey = false;
const char *PublicKey = "\
-----BEGIN RSA PUBLIC KEY-----\n\
MIGJAoGBAMA4ViQrjkPZ9xj0lrer3r23JvxOnrtE8nI69XLGSr+sRERz9YnUptnU\n\
BZpkIfKaRcl6XzNJiN28cVwO1Ui5JSa814UAiDHzWUqCaXUiUEQ6NmNTneiGx2sQ\n\
+9PKKlb8mmr3BB9A45ZNwLT6G9AK3+qkZLHojeSA+m84/a6GP4svAgMBAAE=\n\
MIGJAoGBAOIENxe1sfT2t7b+HUMpnT6RnN/sCqY0JjK7/1A/59daDc6i/K4023jw\n\
Us+187Pa2VSaPh3kDywp9PfLDFgFiPTD9BsBvpaSK9p3zyG8k6an3+GbUTlUgmFv\n\
eI0pg7vmceIl0Lcy9nndfEx27UQId3Y3dQTMuwwFYGtjJAMHNNq5AgMBAAE=\n\
-----END RSA PUBLIC KEY-----\
";
@ -29,8 +29,7 @@ w/CVnbwQOw0g5GBwwFV3r0uTTvy44xx8XXxk+Qknu4eBCsmrAFNnAgMBAAE=\n\
extern const char *PrivateKey;
extern const char *PrivateBetaKey;
#include "../../../../DesktopPrivate/packer_private.h" // RSA PRIVATE KEYS for update signing
#include "../../../../DesktopPrivate/alpha_private.h" // private key for alpha version file generation
#include "packer_private.h" // RSA PRIVATE KEYS for update signing
QString countAlphaVersionSignature(quint64 version);

View file

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#import <Cocoa/Cocoa.h>
#include <sys/xattr.h>
NSString *appName = @"Telegram.app";
NSString *appName = @"AyuGram.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/AyuGram"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
}
@ -163,9 +163,9 @@ int main(int argc, const char * argv[]) {
writeLog([@"Starting update files iteration, path: " stringByAppendingString: srcEnum]);
// Take the Updater (this currently running binary) from the place where it was placed by Telegram
// Take the Updater (this currently running binary) from the place where it was placed by AyuGram
// and copy it to the folder with the new version of the app (ready),
// so it won't be deleted when we will clear the "Telegram.app/Contents" folder.
// so it won't be deleted when we will clear the "AyuGram.app/Contents" folder.
NSString *oldVersionUpdaterPath = [appDirFull stringByAppendingString: @"/Contents/Frameworks/Updater" ];
NSString *newVersionUpdaterPath = [srcEnum stringByAppendingString:[[NSArray arrayWithObjects:@"/", appName, @"/Contents/Frameworks/Updater", nil] componentsJoinedByString:@""]];
writeLog([[NSArray arrayWithObjects: @"Copying Updater from old path ", oldVersionUpdaterPath, @" to new path ", newVersionUpdaterPath, nil] componentsJoinedByString:@""]);