Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit 88d773f

Browse files
committed
README update
1 parent d7d43b9 commit 88d773f

File tree

2 files changed

+32
-13
lines changed

2 files changed

+32
-13
lines changed

README.md

+7-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
# sakuragram
22

3-
Custom Telegram Desktop client based on TDLib ([tdsharp](https://github.com/egramtel/tdsharp)) and WinUI 3
3+
Custom Telegram Desktop client based on TDLib ([tdsharp](https://github.com/egramtel/tdsharp), [tdlib](https://github.com/tdlib/td)) and WinUI 3 ([WinUI](https://github.com/microsoft/microsoft-ui-xaml), [CommunityToolKit](https://github.com/CommunityToolkit/Windows))
44

55
[Telegram channel](https://t.me/sakuragram), [Telegram forum](https://t.me/sakuragramchat)
66

77
## Compilation Guide
8-
1. Clone sakuragram source code (`git clone https://github.com/cherryymerryy/sakuragram.git`)
9-
2. Download TDLib NuGet package (`dotnet add package TDLib --version 1.8.29`)
10-
3. Create Config directory and file Config.cs (`Config/Config.cs`)
11-
4. Fill out config file like this
12-
```c#
13-
namespace sakuragram.Config;
8+
1. Clone **sakuragram** source code (`git clone https://github.com/cherryymerryy/sakuragram.git`)
9+
2. Open **sakuraglam.sln**
10+
3. Open **Config_Example** and fill it in according to the comments
11+
4. After all the steps in the console, write `dotnet build`
1412

15-
public class Config
16-
{
17-
public const int ApiId = your_api_id;
18-
public const string ApiHash = "your_api_hash";
19-
}
20-
```
13+
## Contributing
14+
You can simply open a Pull Request with your idea or a ready-made function!

sakuragram/Config_Example.cs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
namespace sakuragram;
2+
3+
/** Rename file and class to Config */
4+
public class Config_Example
5+
{
6+
public const string AppName = "your_app_name";
7+
public static readonly string AppVersion = GetAppVersion();
8+
9+
/** You can get your Telegram API keys on the website my.telegram.org. I recommend updating the variable with its version every time TDLib is updated */
10+
public const int ApiId = 0;
11+
public const string ApiHash = "your_api_hash";
12+
public const string TdLibVersion = "1.8.37";
13+
14+
/** You need to create a GitHub Api Token for GitHub-related functions (in particular UpdateManager) to work correctly */
15+
public const string GitHubAuthToken = "your_github_auth_token";
16+
public const string GitHubRepoOwner = "your_github_repo_owner";
17+
public const string GitHubRepoName = "your_github_repo_name";
18+
public const string LinkForUpdate = $"https://api.github.com/repos/{GitHubRepoOwner}/{GitHubRepoName}/releases/latest";
19+
20+
private static string GetAppVersion() {
21+
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
22+
System.Diagnostics.FileVersionInfo fvi = System.Diagnostics.FileVersionInfo.GetVersionInfo(assembly.Location);
23+
return fvi.FileVersion;
24+
}
25+
}

0 commit comments

Comments
 (0)