More logo and name replacements
|
|
@ -372,7 +372,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
}
|
||||
if (exeName.empty() || exeName.find('/') != string::npos) {
|
||||
exeName = "Telegram";
|
||||
exeName = "Kotatogram";
|
||||
}
|
||||
openLog();
|
||||
|
||||
|
|
@ -403,19 +403,19 @@ int main(int argc, char *argv[]) {
|
|||
customWorkingDir = false;
|
||||
|
||||
writeLog("No workdir, trying to figure it out");
|
||||
struct passwd *pw = getpwuid(getuid());
|
||||
if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
|
||||
string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
|
||||
struct stat statbuf;
|
||||
writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
|
||||
if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
|
||||
writeLog("Stat got");
|
||||
if (S_ISDIR(statbuf.st_mode)) {
|
||||
writeLog("It is directory, using home work dir");
|
||||
workDir = tryDir;
|
||||
}
|
||||
}
|
||||
}
|
||||
// struct passwd *pw = getpwuid(getuid());
|
||||
// if (pw && pw->pw_dir && strlen(pw->pw_dir)) {
|
||||
// string tryDir = pw->pw_dir + string("/.TelegramDesktop/");
|
||||
// struct stat statbuf;
|
||||
// writeLog("Trying to use '%s' as workDir, getting stat() for tupdates/ready", tryDir.c_str());
|
||||
// if (!stat((tryDir + "tupdates/ready").c_str(), &statbuf)) {
|
||||
// writeLog("Stat got");
|
||||
// if (S_ISDIR(statbuf.st_mode)) {
|
||||
// writeLog("It is directory, using home work dir");
|
||||
// workDir = tryDir;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if (workDir.empty()) {
|
||||
workDir = exePath;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = @"Kotatogram.app";
|
||||
NSString *appDir = nil;
|
||||
NSString *workDir = nil;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ void RemoveQuarantineAttribute(NSString *path) {
|
|||
|
||||
void RemoveQuarantineFromBundle(NSString *path) {
|
||||
RemoveQuarantineAttribute(path);
|
||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Telegram"]);
|
||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/MacOS/Kotatogram"]);
|
||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Helpers/crashpad_handler"]);
|
||||
RemoveQuarantineAttribute([path stringByAppendingString:@"/Contents/Frameworks/Updater"]);
|
||||
}
|
||||
|
|
@ -167,7 +167,7 @@ int main(int argc, const char * argv[]) {
|
|||
|
||||
// Take the Updater (this currently running binary) from the place where it was placed by Telegram
|
||||
// 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 "Kotatogram.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:@""]);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ not_null<HistoryItem*> CreateUnsupportedMessage(
|
|||
UserId viaBotId,
|
||||
TimeId date,
|
||||
UserId from) {
|
||||
const auto siteLink = qsl("https://desktop.telegram.org");
|
||||
const auto siteLink = qsl("https://kotatogram.github.io");
|
||||
auto text = TextWithEntities{
|
||||
tr::lng_message_unsupported(tr::now, lt_link, siteLink)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -187,16 +187,16 @@ QString getHomeDir() {
|
|||
} // namespace
|
||||
|
||||
QString psAppDataPath() {
|
||||
// Previously we used ~/.TelegramDesktop, so look there first.
|
||||
// If we find data there, we should still use it.
|
||||
auto home = getHomeDir();
|
||||
if (!home.isEmpty()) {
|
||||
auto oldPath = home + qsl(".TelegramDesktop/");
|
||||
auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
||||
if (QFile(oldSettingsBase + '0').exists() || QFile(oldSettingsBase + '1').exists()) {
|
||||
return oldPath;
|
||||
}
|
||||
}
|
||||
// We should not use ~/.TelegramDesktop, since it's a fork.
|
||||
|
||||
// auto home = getHomeDir();
|
||||
// if (!home.isEmpty()) {
|
||||
// auto oldPath = home + qsl(".TelegramDesktop/");
|
||||
// auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
||||
// if (QFile(oldSettingsBase + '0').exists() || QFile(oldSettingsBase + '1').exists()) {
|
||||
// return oldPath;
|
||||
// }
|
||||
// }
|
||||
|
||||
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + '/';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ NSString *const kTypePicker = @"picker";
|
|||
NSString *const kTypeFormatter = @"formatter";
|
||||
NSString *const kTypeFormatterSegment = @"formatterSegment";
|
||||
|
||||
const NSString *kCustomizationIdPlayer = @"telegram.touchbar";
|
||||
const NSString *kCustomizationIdMain = @"telegram.touchbarMain";
|
||||
const NSString *kCustomizationIdPlayer = @"kotatogram.touchbar";
|
||||
const NSString *kCustomizationIdMain = @"kotatogram.touchbarMain";
|
||||
const NSTouchBarItemIdentifier kSavedMessagesItemIdentifier = [NSString stringWithFormat:@"%@.savedMessages", kCustomizationIdMain];
|
||||
const NSTouchBarItemIdentifier kArchiveFolderItemIdentifier = [NSString stringWithFormat:@"%@.archiveFolder", kCustomizationIdMain];
|
||||
const NSTouchBarItemIdentifier kPinnedPanelItemIdentifier = [NSString stringWithFormat:@"%@.pinnedPanel", kCustomizationIdMain];
|
||||
|
|
|
|||
|
|
@ -664,8 +664,8 @@ void MainWindow::psFirstShow() {
|
|||
}
|
||||
|
||||
void MainWindow::createGlobalMenu() {
|
||||
auto main = psMainMenu.addMenu(qsl("Telegram"));
|
||||
auto about = main->addAction(tr::lng_mac_menu_about_telegram(tr::now, lt_telegram, qsl("Telegram")));
|
||||
auto main = psMainMenu.addMenu(qsl("Kotatogram"));
|
||||
auto about = main->addAction(tr::lng_mac_menu_about_telegram(tr::now, lt_telegram, qsl("Kotatogram")));
|
||||
connect(about, &QAction::triggered, about, [] {
|
||||
if (App::wnd() && App::wnd()->isHidden()) App::wnd()->showFromTray();
|
||||
Ui::show(Box<AboutBox>());
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ void PreviewWindowTitle(Painter &p, const style::palette &palette, QRect body, i
|
|||
p.setPen(st::titleFgActive[palette]);
|
||||
p.setFont(font);
|
||||
|
||||
p.drawText(titleRect, qsl("Telegram"), style::al_center);
|
||||
p.drawText(titleRect, qsl("Kotatogram"), style::al_center);
|
||||
|
||||
auto isGraphite = ([NSColor currentControlTint] == NSGraphiteControlTint);
|
||||
auto buttonSkip = 8;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ QIcon CreateOfficialIcon(Main::Account *account) {
|
|||
QIcon CreateIcon(Main::Account *account) {
|
||||
auto result = CreateOfficialIcon(account);
|
||||
if (Platform::IsLinux()) {
|
||||
return QIcon::fromTheme("telegram", result);
|
||||
return QIcon::fromTheme("kotatogram", result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 55 KiB |
|
|
@ -69,7 +69,7 @@
|
|||
'configurations': {
|
||||
'Debug': {
|
||||
'xcode_settings': {
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.TelegramDebugOld',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.github.KotatogramDebugOld',
|
||||
},
|
||||
'library_dirs': [
|
||||
'<(libs_loc)/macold/crashpad/out/Debug',
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
},
|
||||
'Release': {
|
||||
'xcode_settings': {
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.Telegram',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.github.Kotatogram',
|
||||
},
|
||||
'library_dirs': [
|
||||
'<(libs_loc)/macold/crashpad/out/Release',
|
||||
|
|
@ -87,26 +87,26 @@
|
|||
'postbuilds': [{
|
||||
'postbuild_name': 'Force Frameworks path',
|
||||
'action': [
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Frameworks/'
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Frameworks/'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Copy Updater to Frameworks',
|
||||
'action': [
|
||||
'cp',
|
||||
'${BUILT_PRODUCTS_DIR}/Updater',
|
||||
'${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Frameworks/',
|
||||
'${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Frameworks/',
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Force Helpers path',
|
||||
'action': [
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Helpers/'
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Helpers/'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Copy crashpad_handler to Helpers',
|
||||
'action': [
|
||||
'cp',
|
||||
'<(libs_loc)/macold/crashpad/out/${CONFIGURATION}/crashpad_handler',
|
||||
'${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Helpers/',
|
||||
'${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Helpers/',
|
||||
],
|
||||
}],
|
||||
}, {
|
||||
|
|
@ -150,43 +150,43 @@
|
|||
'configurations': {
|
||||
'Debug': {
|
||||
'xcode_settings': {
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.TelegramDebug',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.github.KotatogramDebug',
|
||||
},
|
||||
},
|
||||
'Release': {
|
||||
'xcode_settings': {
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'com.tdesktop.Telegram',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.github.Kotatogram',
|
||||
},
|
||||
},
|
||||
},
|
||||
'postbuilds': [{
|
||||
'postbuild_name': 'Force Frameworks path',
|
||||
'action': [
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Frameworks/'
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Frameworks/'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Copy Updater to Frameworks',
|
||||
'action': [
|
||||
'cp',
|
||||
'${BUILT_PRODUCTS_DIR}/Updater',
|
||||
'${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Frameworks/',
|
||||
'${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Frameworks/',
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Force Helpers path',
|
||||
'action': [
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Helpers/'
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Helpers/'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Copy crashpad_client to Helpers',
|
||||
'action': [
|
||||
'cp',
|
||||
'<(libs_loc)/crashpad/out/${CONFIGURATION}/crashpad_handler',
|
||||
'${BUILT_PRODUCTS_DIR}/Telegram.app/Contents/Helpers/',
|
||||
'${BUILT_PRODUCTS_DIR}/Kotatogram.app/Contents/Helpers/',
|
||||
],
|
||||
}],
|
||||
}], [ 'build_macstore', {
|
||||
'xcode_settings': {
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'org.telegram.desktop',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'io.github.kotatogram',
|
||||
'OTHER_LDFLAGS': [
|
||||
'-framework', 'Breakpad',
|
||||
],
|
||||
|
|
@ -201,19 +201,19 @@
|
|||
'postbuilds': [{
|
||||
'postbuild_name': 'Clear Frameworks path',
|
||||
'action': [
|
||||
'rm', '-rf', '${BUILT_PRODUCTS_DIR}/Telegram Desktop.app/Contents/Frameworks'
|
||||
'rm', '-rf', '${BUILT_PRODUCTS_DIR}/Kotatogram Desktop.app/Contents/Frameworks'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Force Frameworks path',
|
||||
'action': [
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Telegram Desktop.app/Contents/Frameworks/'
|
||||
'mkdir', '-p', '${BUILT_PRODUCTS_DIR}/Kotatogram Desktop.app/Contents/Frameworks/'
|
||||
],
|
||||
}, {
|
||||
'postbuild_name': 'Copy Breakpad.framework to Frameworks',
|
||||
'action': [
|
||||
'cp', '-a',
|
||||
'<(libs_loc)/breakpad/src/client/mac/build/Release/Breakpad.framework',
|
||||
'${BUILT_PRODUCTS_DIR}/Telegram Desktop.app/Contents/Frameworks/Breakpad.framework',
|
||||
'${BUILT_PRODUCTS_DIR}/Kotatogram Desktop.app/Contents/Frameworks/Breakpad.framework',
|
||||
],
|
||||
}]
|
||||
}]],
|
||||
|
|
|
|||