From 1cd23bc80c64d5e0e6c33e1d4f2b6cf1e2d53a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 26 Jul 2021 21:29:33 +0200 Subject: code rewriting --- README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 15 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index d429f27..8812cb1 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,7 @@ an alternative client for the discord messaging platform, written in the C programming language. -## requirements - -* a POSIX system -* GNU C library -* GNU compiler collection -* GNU Make -* libcurl 7.17.0 or newer with HTTPS support -* ncursesw6 -* libcjson-dev +code rewrite in 0.0.4 brings a lot of new features and marks the 0.0.3 release obsolete, though it still kind of works for terminal users, although it is very bad. rewritten version is better because it does not reach ratelimits due to using a socket connection and not polling for messages via HTTP. it also has voice support and a GUI frontend. ## screenshots @@ -27,20 +19,30 @@ sudo apt install discord.c you need to add [my apt repository](https://prog.sijanec.eu/). -built packages only exist for the `amd64` and `arm64`. for i386 grab the source package: +built packages only exist for `amd64`, `arm64` and `i386`. for other architectures grab the source package: ``` -apt source discord.c -# untar and follow install from source +apt-get --install build discord.c ``` ### caveman style install ``` make -./discord.c -e email@address.example -p password +./discord.c ``` +#### building requirements + +* a POSIX system - app is cross platform and should also be able to be compiled to all major OSes +* `gcc` +* GNU `make` +* `libwebsockets-dev` for faster bidirectional connections to the server +* `libgtk-3-dev` for the GUI +* `libcjson-dev` for parsing server responses +* `libsoundio-dev` for crossplatform sound output +* `xxd` for embedding XML GtkBuilder UI definitions directly in the binary + ## automatic building automatic building is done on two servers, one for `arm64` and the other for `amd64`. @@ -52,8 +54,44 @@ check the build badge before downloading: * `amd64`: [https://cargova.sijanec.eu/prog/discord.c/](https://cargova.sijanec.eu/prog/discord.c/) * `arm64`: [https://of.sijanec.eu/prog/discord.c/](https://of.sijanec.eu/prog/discord.c/) -there deb packages and binaries. +there are deb packages and binaries. + +## using discord.c as a library (libdiscord.c/discord.c-dev) + +discord.c is programmed in two separate sections, the ui section, that was previously made in ncurses, and the API section, that can, as of the code rewrite, be used independently in other applications. It is useful to write alternative frontends for accessing content available using discord.c by using the discord.c library, since that allows breaking API changes to be fixed in one place instead of fixing it for each individual program. There is no documentation provided for the library, but reading discord.c source code you will get the idea. Expect a Doxygen soon. + +to your surprise, you can use the ui section, as of the code rewrite, as a library as well and integrate other platforms into it. No docs yet here either. + +The package for Debian comes with include header files and compiled shared objects so it can be used as a dependency, but beware, this dependency will depend on GTK+3.0, which would be, in case you are doing a GUI with a different widget toolkit, useless. + +the program is, as of the code rewrite, single threaded, for increased stability and performance. it used to have separated network and ui threads, but now the threading model is abstracted with an event-based programming. + +## android port? + +it would be useful to have an android port, and luckily this is possible with little effort due to the GTK broadway backend that interfaces with a HTML renderer, WebView for example. + + -- cgit v1.2.3