From d1036c85385a1c441674ea56094a03d623b9e418 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Tue, 25 Nov 2014 09:12:45 +0000 Subject: [PATCH 01/19] Darwin Build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explains/Better Enables building on the OS X Platform. I’ve written a Darwin.mk file for the purpose, given one is referenced in the Makefile but doesn’t actually exist yet. I presume this is due to Toxic’s recent move away from configure scripts? Anyhow. It’s not perfect, and it could be prettier, but it should fix --- README.md | 5 +++++ cfg/systems/Darwin.mk | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 cfg/systems/Darwin.mk diff --git a/README.md b/README.md index 699e7ae..8f7b666 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,11 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly * `DISABLE_SOUND_NOTIFY=1` → build toxic without sound notifications support * `DISABLE_DESKTOP_NOTIFY=1` → build toxic without desktop notifications support +### OS X Compile +Using [Homebrew](http://brew.sh): `brew install openal-soft freealut libconfig && brew install https://raw.githubusercontent.com/Tox/homebrew-tox/master/Formula/libtoxcore.rb && brew install https://raw.githubusercontent.com/Homebrew/homebrew-x11/master/libnotify.rb`. + +You can omit `libnotify` if you intend to build without desktop notifications enabled. + ### Packaging * For packaging purpose, you can use `DESTDIR=""` to specify a directory where to store installed files * `DESTDIR=""` can be used in addition to `PREFIX=""`: diff --git a/cfg/systems/Darwin.mk b/cfg/systems/Darwin.mk new file mode 100644 index 0000000..f33a4be --- /dev/null +++ b/cfg/systems/Darwin.mk @@ -0,0 +1,10 @@ +# Special options for OS X +# This assumes the use of Homebrew. Change the paths if using MacPorts or Fink. + +PKG_CONFIG_PATH = $(shell export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/opt/libconfig/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig) + +LIBS := $(filter-out ncursesw, $(LIBS)) + +# OS X ships a usable, recent version of ncurses, but calls it ncurses not ncursesw. +LDFLAGS += -lncurses -lalut -ltoxav -ltoxcore -ltoxdns -lresolv -lconfig -ltoxencryptsave -g +CFLAGS += -I/usr/local/opt/freealut/include/AL -I/usr/local/opt/glib/include/glib-2.0 -g From 61c50972e33fbc61d5fa95cce2cfbf4d5117b562 Mon Sep 17 00:00:00 2001 From: urras Date: Sun, 11 Jan 2015 14:06:33 -0500 Subject: [PATCH 02/19] Update DHT node list --- misc/DHTnodes | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/misc/DHTnodes b/misc/DHTnodes index 2b0ec3c..c686c92 100644 --- a/misc/DHTnodes +++ b/misc/DHTnodes @@ -1,22 +1,20 @@ -192.254.75.98 33445 951C88B7E75C867418ACDB5D273821372BB5BD652740BCDF623A4FA293E75D2F -31.7.57.236 443 2A4B50D1D525DA2E669592A20C327B5FAD6C7E5962DC69296F9FEC77C4436E4E -107.161.17.51 33445 7BE3951B97CA4B9ECDDA768E8C52BA19E9E2690AB584787BF4C90E04DBB75111 +192.254.75.102 33445 951C88B7E75C867418ACDB5D273821372BB5BD652740BCDF623A4FA293E75D2F 144.76.60.215 33445 04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F 23.226.230.47 33445 A09162D68618E742FFBCA1C2C70385E6679604B2D80EA6E84AD0996A1AC8A074 178.62.125.224 33445 10B20C49ACBD968D7C80F2E8438F92EA51F189F4E70CFBBB2C2C8C799E97F03E -37.187.46.132 33445 5EB67C51D3FF5A9D528D242B669036ED2A30F8A60E674C45E7D43010CB2E1331 178.21.112.187 33445 4B2C19E924972CB9B57732FB172F8A8604DE13EEDA2A6234E348983344B23057 -128.199.237.51 33445 67D80D1E00DE2A5294C9CCF9116C72CEC05FB8C2C6DBCEE0B5EB796DA52E2564 195.154.119.113 33445 E398A69646B8CEACA9F0B84F553726C1C49270558C57DF5F3C368F05A7D71354 -178.62.250.138 33445 788236D34978D1D5BD822F0A5BEBD2C53C64CC31CD3149350EE27D4D9A2F9B6B -178.62.150.106 33445 58D2DE4B169502669941E50780C1630FAA48A0B7026D6F4066C320D47AC6401E 192.210.149.121 33445 F404ABAA1C99A9D37D61AB54898F56793E1DEF8BD46B1038B9D822E8460FAB67 -54.199.139.199 33445 7F9C31FE850E97CEFD4C4591DF93FC757C7C12549DDD55F8EEAECC34FE76C029 104.219.184.206 443 8CD087E31C67568103E8C2A28653337E90E6B8EDA0D765D57C6B5172B4F1F04C 76.191.23.96 33445 93574A3FAB7D612FEA29FD8D67D3DD10DFD07A075A5D62E8AF3DD9F5D0932E11 46.38.239.179 33445 F5A1A38EFB6BD3C2C8AF8B10D85F0F89E931704D349F1D0720C3C4059AF2440A -144.76.93.230 33445 2C308B4518862740AD9A121598BCA7713AFB25858B747313A4D073E2F6AC506C +178.62.250.138 33445 788236D34978D1D5BD822F0A5BEBD2C53C64CC31CD3149350EE27D4D9A2F9B6B 78.225.128.39 33445 7A2306BFBA665E5480AE59B31E116BE9C04DCEFE04D9FE25082316FA34B4DA0C +130.133.110.14 33445 461FA3776EF0FA655F1A05477DF1B3B614F7D6B124F7DB1DD4FE3C08B03B640F +104.167.101.29 33445 5918AC3C06955962A75AD7DF4F80A5D7C34F7DB9E1498D2E0495DE35B3FE8A57 195.154.109.148 33445 391C96CB67AE893D4782B8E4495EB9D89CF1031F48460C06075AA8CE76D50A21 192.3.173.88 33445 3E1FFDEB667BFF549F619EC6737834762124F50A89C8D0DBF1DDF64A2DD6CD1B -130.133.110.14 33445 461FA3776EF0FA655F1A05477DF1B3B614F7D6B124F7DB1DD4FE3C08B03B640F +205.185.116.116 33445 A179B09749AC826FF01F37A9613F6B57118AE014D4196A0E1105A98F93A54702 +198.98.51.198 33445 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F +80.232.246.79 33445 2A54DE1B6FE567F163EEBF0B42A686D7C990005B4332DF10CF184060F7F64359D55C092E5683 + From 5599d73760fa1d6779f175743577c40892ad0b8d Mon Sep 17 00:00:00 2001 From: JFreegman Date: Sun, 11 Jan 2015 14:28:52 -0500 Subject: [PATCH 03/19] remove invalid node from nodes list --- misc/DHTnodes | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/DHTnodes b/misc/DHTnodes index c686c92..8a6dbd7 100644 --- a/misc/DHTnodes +++ b/misc/DHTnodes @@ -16,5 +16,3 @@ 192.3.173.88 33445 3E1FFDEB667BFF549F619EC6737834762124F50A89C8D0DBF1DDF64A2DD6CD1B 205.185.116.116 33445 A179B09749AC826FF01F37A9613F6B57118AE014D4196A0E1105A98F93A54702 198.98.51.198 33445 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F -80.232.246.79 33445 2A54DE1B6FE567F163EEBF0B42A686D7C990005B4332DF10CF184060F7F64359D55C092E5683 - From 2823115a6c686c62846124fb5b3696c150e75a92 Mon Sep 17 00:00:00 2001 From: urras Date: Sun, 11 Jan 2015 15:06:15 -0500 Subject: [PATCH 04/19] Update DHT nodes again --- misc/DHTnodes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/DHTnodes b/misc/DHTnodes index 8a6dbd7..3423527 100644 --- a/misc/DHTnodes +++ b/misc/DHTnodes @@ -16,3 +16,5 @@ 192.3.173.88 33445 3E1FFDEB667BFF549F619EC6737834762124F50A89C8D0DBF1DDF64A2DD6CD1B 205.185.116.116 33445 A179B09749AC826FF01F37A9613F6B57118AE014D4196A0E1105A98F93A54702 198.98.51.198 33445 1D5A5F2F5D6233058BF0259B09622FB40B482E4FA0931EB8FD3AB8E7BF7DAF6F +80.232.246.79 33445 0B8DCEAA7BDDC44BB11173F987CAE3566A2D7057D8DD3CC642BD472B9391002A + From a561ef8c49efbb8fa101671e801d4641196e77b9 Mon Sep 17 00:00:00 2001 From: dantok Date: Sun, 25 Jan 2015 20:17:32 +0100 Subject: [PATCH 05/19] Fixed emptying avatar_path if the path is too long. --- src/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.c b/src/settings.c index 95bd487..ff490e0 100644 --- a/src/settings.c +++ b/src/settings.c @@ -289,7 +289,7 @@ int settings_load(struct user_settings *s, const char *patharg) if ( config_setting_lookup_string(setting, tox_strings.avatar_path, &str) ) { snprintf(s->avatar_path, sizeof(s->avatar_path), "%s", str); - int len = strlen(s->avatar_path); + int len = strlen(str); if (len >= sizeof(s->avatar_path)) s->avatar_path[0] = '\0'; From 37b3b5a5ed91cbcaa6aa37185448735e849a060c Mon Sep 17 00:00:00 2001 From: dantok Date: Sun, 25 Jan 2015 20:48:02 +0100 Subject: [PATCH 06/19] Fix an edge case when obtaining home directory. Make the path to home directory empty before calling get_home_dir(), otherwise if the call fails, the contents are undefined. --- src/autocomplete.c | 1 + src/configdir.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/autocomplete.c b/src/autocomplete.c index 1c7c94b..982879a 100644 --- a/src/autocomplete.c +++ b/src/autocomplete.c @@ -210,6 +210,7 @@ static void complt_home_dir(ToxWindow *self, char *path, int pathsize, const cha ChatContext *ctx = self->chatwin; char homedir[MAX_STR_SIZE]; + homedir[0] = '\0'; get_home_dir(homedir, sizeof(homedir)); char newline[MAX_STR_SIZE]; diff --git a/src/configdir.c b/src/configdir.c index 9bc6744..a8f4b85 100644 --- a/src/configdir.c +++ b/src/configdir.c @@ -67,6 +67,7 @@ void get_home_dir(char *home, int size) char *get_user_config_dir(void) { char home[NSS_BUFLEN_PASSWD]; + home[0] = '\0'; get_home_dir(home, sizeof(home)); char *user_config_dir; From eeeaf8d7071a081ea4186ab768d83700e560c790 Mon Sep 17 00:00:00 2001 From: dantok Date: Sun, 25 Jan 2015 21:52:07 +0100 Subject: [PATCH 07/19] Update autocomplete.c --- src/autocomplete.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/autocomplete.c b/src/autocomplete.c index 982879a..5b6af44 100644 --- a/src/autocomplete.c +++ b/src/autocomplete.c @@ -209,8 +209,7 @@ static void complt_home_dir(ToxWindow *self, char *path, int pathsize, const cha { ChatContext *ctx = self->chatwin; - char homedir[MAX_STR_SIZE]; - homedir[0] = '\0'; + char homedir[MAX_STR_SIZE] = {0}; get_home_dir(homedir, sizeof(homedir)); char newline[MAX_STR_SIZE]; From c8a4f88ff3f5df455b8d796bc56e8c144a0b2043 Mon Sep 17 00:00:00 2001 From: dantok Date: Sun, 25 Jan 2015 21:53:13 +0100 Subject: [PATCH 08/19] Update configdir.c --- src/configdir.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/configdir.c b/src/configdir.c index a8f4b85..8a9f60c 100644 --- a/src/configdir.c +++ b/src/configdir.c @@ -66,8 +66,7 @@ void get_home_dir(char *home, int size) */ char *get_user_config_dir(void) { - char home[NSS_BUFLEN_PASSWD]; - home[0] = '\0'; + char home[NSS_BUFLEN_PASSWD] = {0}; get_home_dir(home, sizeof(home)); char *user_config_dir; From 2b19f56e637c22061e9edc683a58971bdc8bf934 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Sun, 1 Feb 2015 21:09:48 +0100 Subject: [PATCH 09/19] Update for toxcore API break --- src/friendlist.c | 12 ++++++------ src/friendlist.h | 4 ++-- src/global_commands.c | 4 ++-- src/prompt.c | 2 +- src/prompt.h | 2 +- src/toxic.c | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/friendlist.c b/src/friendlist.c index 6ce0cc9..21f8a93 100644 --- a/src/friendlist.c +++ b/src/friendlist.c @@ -150,7 +150,7 @@ static int save_blocklist(char *path) memset(&tmp, 0, sizeof(BlockedFriend)); tmp.namelength = htons(Blocked.list[i].namelength); memcpy(tmp.name, Blocked.list[i].name, Blocked.list[i].namelength + 1); - memcpy(tmp.pub_key, Blocked.list[i].pub_key, TOX_CLIENT_ID_SIZE); + memcpy(tmp.pub_key, Blocked.list[i].pub_key, TOX_PUBLIC_KEY_SIZE); uint8_t lastonline[sizeof(uint64_t)]; memcpy(lastonline, &Blocked.list[i].last_on, sizeof(uint64_t)); @@ -232,7 +232,7 @@ int load_blocklist(char *path) Blocked.list[i].num = i; Blocked.list[i].namelength = ntohs(tmp.namelength); memcpy(Blocked.list[i].name, tmp.name, Blocked.list[i].namelength + 1); - memcpy(Blocked.list[i].pub_key, tmp.pub_key, TOX_CLIENT_ID_SIZE); + memcpy(Blocked.list[i].pub_key, tmp.pub_key, TOX_PUBLIC_KEY_SIZE); uint8_t lastonline[sizeof(uint64_t)]; memcpy(lastonline, &tmp.last_on, sizeof(uint64_t)); @@ -448,7 +448,7 @@ static void friendlist_add_blocked(Tox *m, int32_t fnum, int32_t bnum) Friends.list[i].namelength = Blocked.list[bnum].namelength; update_friend_last_online(i, Blocked.list[bnum].last_on); memcpy(Friends.list[i].name, Blocked.list[bnum].name, Friends.list[i].namelength + 1); - memcpy(Friends.list[i].pub_key, Blocked.list[bnum].pub_key, TOX_CLIENT_ID_SIZE); + memcpy(Friends.list[i].pub_key, Blocked.list[bnum].pub_key, TOX_PUBLIC_KEY_SIZE); if (i == Friends.max_idx) ++Friends.max_idx; @@ -644,7 +644,7 @@ void block_friend(Tox *m, int32_t fnum) Blocked.list[i].num = i; Blocked.list[i].namelength = Friends.list[fnum].namelength; Blocked.list[i].last_on = Friends.list[fnum].last_online.last_on; - memcpy(Blocked.list[i].pub_key, Friends.list[fnum].pub_key, TOX_CLIENT_ID_SIZE); + memcpy(Blocked.list[i].pub_key, Friends.list[fnum].pub_key, TOX_PUBLIC_KEY_SIZE); memcpy(Blocked.list[i].name, Friends.list[fnum].name, Friends.list[fnum].namelength + 1); ++Blocked.num_blocked; @@ -823,7 +823,7 @@ static void blocklist_onDraw(ToxWindow *self, Tox *m, int y2, int x2) int i; - for (i = 0; i < TOX_CLIENT_ID_SIZE; ++i) + for (i = 0; i < TOX_PUBLIC_KEY_SIZE; ++i) wprintw(self->window, "%02X", Blocked.list[selected_num].pub_key[i] & 0xff); } @@ -1012,7 +1012,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m) int i; - for (i = 0; i < TOX_CLIENT_ID_SIZE; ++i) + for (i = 0; i < TOX_PUBLIC_KEY_SIZE; ++i) wprintw(self->window, "%02X", Friends.list[selected_num].pub_key[i] & 0xff); } diff --git a/src/friendlist.h b/src/friendlist.h index 3beb633..d031751 100644 --- a/src/friendlist.h +++ b/src/friendlist.h @@ -60,7 +60,7 @@ typedef struct { int namelength; char statusmsg[TOX_MAX_STATUSMESSAGE_LENGTH + 1]; uint16_t statusmsg_len; - char pub_key[TOX_CLIENT_ID_SIZE]; + char pub_key[TOX_PUBLIC_KEY_SIZE]; int32_t num; int chatwin; bool active; @@ -77,7 +77,7 @@ typedef struct { typedef struct { char name[TOXIC_MAX_NAME_LENGTH + 1]; int namelength; - char pub_key[TOX_CLIENT_ID_SIZE]; + char pub_key[TOX_PUBLIC_KEY_SIZE]; int32_t num; bool active; uint64_t last_on; diff --git a/src/global_commands.c b/src/global_commands.c index b2321b9..93837b5 100644 --- a/src/global_commands.c +++ b/src/global_commands.c @@ -507,9 +507,9 @@ void cmd_requests(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv if (!FrndRequests.request[i].active) continue; - char id[TOX_CLIENT_ID_SIZE * 2 + 1] = {0}; + char id[TOX_PUBLIC_KEY_SIZE * 2 + 1] = {0}; - for (j = 0; j < TOX_CLIENT_ID_SIZE; ++j) { + for (j = 0; j < TOX_PUBLIC_KEY_SIZE; ++j) { char d[3]; snprintf(d, sizeof(d), "%02X", FrndRequests.request[i].key[j] & 0xff); strcat(id, d); diff --git a/src/prompt.c b/src/prompt.c index 99c2a4a..a580c1f 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -145,7 +145,7 @@ static int add_friend_request(const char *public_key, const char *data) for (i = 0; i <= FrndRequests.max_idx; ++i) { if (!FrndRequests.request[i].active) { FrndRequests.request[i].active = true; - memcpy(FrndRequests.request[i].key, public_key, TOX_CLIENT_ID_SIZE); + memcpy(FrndRequests.request[i].key, public_key, TOX_PUBLIC_KEY_SIZE); snprintf(FrndRequests.request[i].msg, sizeof(FrndRequests.request[i].msg), "%s", data); if (i == FrndRequests.max_idx) diff --git a/src/prompt.h b/src/prompt.h index e184b8d..e6eb0cc 100644 --- a/src/prompt.h +++ b/src/prompt.h @@ -31,7 +31,7 @@ struct friend_request { bool active; char msg[MAX_STR_SIZE]; - uint8_t key[TOX_CLIENT_ID_SIZE]; + uint8_t key[TOX_PUBLIC_KEY_SIZE]; }; typedef struct { diff --git a/src/toxic.c b/src/toxic.c index 23046b8..dc5b862 100644 --- a/src/toxic.c +++ b/src/toxic.c @@ -324,13 +324,13 @@ static Tox *init_tox(void) #define MIN_NODE_LINE 50 /* IP: 7 + port: 5 + key: 38 + spaces: 2 = 70. ! (& e.g. tox.im = 6) */ #define MAX_NODE_LINE 256 /* Approx max number of chars in a sever line (name + port + key) */ #define MAXNODES 50 -#define NODELEN (MAX_NODE_LINE - TOX_CLIENT_ID_SIZE - 7) +#define NODELEN (MAX_NODE_LINE - TOX_PUBLIC_KEY_SIZE - 7) static struct toxNodes { int lines; char nodes[MAXNODES][NODELEN]; uint16_t ports[MAXNODES]; - char keys[MAXNODES][TOX_CLIENT_ID_SIZE]; + char keys[MAXNODES][TOX_PUBLIC_KEY_SIZE]; } toxNodes; static int load_nodelist(const char *filename) @@ -360,7 +360,7 @@ static int load_nodelist(const char *filename) toxNodes.ports[toxNodes.lines] = atoi(port); char *key_binary = hex_string_to_bin(key_ascii); - memcpy(toxNodes.keys[toxNodes.lines], key_binary, TOX_CLIENT_ID_SIZE); + memcpy(toxNodes.keys[toxNodes.lines], key_binary, TOX_PUBLIC_KEY_SIZE); free(key_binary); toxNodes.lines++; From d714cda145db841e2f98648b481e38e955b577f8 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Sun, 1 Feb 2015 17:10:44 -0800 Subject: [PATCH 10/19] Vital commit fixing serious Toxic bug --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c5e5d5..7d72277 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Toxic [![Build Status](https://travis-ci.org/Tox/toxic.png?branch=master)](https://travis-ci.org/Tox/toxic) -Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly resided in the [Tox core repository](https://github.com/irungentoo/toxcore), and is now available as a standalone application. +Toxic is ~~secretly a nTox fork~~ a [Tox](https://tox.im)-based instant messenging client which formerly resided in the [Tox core repository](https://github.com/irungentoo/toxcore), and is now available as a standalone application. ![Toxic Screenshot](https://i.imgur.com/san99Z2.png "Home Screen") From dfc594f9497d63b2ca5b74ca5e96d5c265fe8e29 Mon Sep 17 00:00:00 2001 From: Spagy Date: Wed, 4 Feb 2015 13:56:31 +0000 Subject: [PATCH 11/19] Correct filename comment from main.c to toxic.c --- src/toxic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toxic.c b/src/toxic.c index dc5b862..71035d3 100644 --- a/src/toxic.c +++ b/src/toxic.c @@ -1,4 +1,4 @@ -/* main.c +/* toxic.c * * * Copyright (C) 2014 Toxic All Rights Reserved. From 5cbbb62ce267284f8684a70bab3213552fc49d32 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 8 Feb 2015 05:26:36 -0500 Subject: [PATCH 12/19] Fix whitespace Signed-off-by: Loui Chang --- src/line_info.c | 36 +++++++++++------------ src/settings.c | 76 ++++++++++++++++++++++++------------------------- src/settings.h | 18 ++++++------ 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/src/line_info.c b/src/line_info.c index 6c6f872..8ee0a9f 100644 --- a/src/line_info.c +++ b/src/line_info.c @@ -502,24 +502,24 @@ bool line_info_onKey(ToxWindow *self, wint_t key) struct history *hst = self->chatwin->hst; bool match = true; - if (key == user_settings->key_half_page_up) { - line_info_page_up(self, hst); - } - else if (key == user_settings->key_half_page_down) { - line_info_page_down(self, hst); - } - else if (key == user_settings->key_scroll_line_up) { - line_info_scroll_up(hst); - } - else if (key == user_settings->key_scroll_line_down) { - line_info_scroll_down(hst); - } - else if (key == user_settings->key_page_bottom) { - line_info_reset_start(self, hst); - } - else { - match = false; - } + if (key == user_settings->key_half_page_up) { + line_info_page_up(self, hst); + } + else if (key == user_settings->key_half_page_down) { + line_info_page_down(self, hst); + } + else if (key == user_settings->key_scroll_line_up) { + line_info_scroll_up(hst); + } + else if (key == user_settings->key_scroll_line_down) { + line_info_scroll_down(hst); + } + else if (key == user_settings->key_page_bottom) { + line_info_reset_start(self, hst); + } + else { + match = false; + } return match; } diff --git a/src/settings.c b/src/settings.c index ff490e0..9d3c7c2 100644 --- a/src/settings.c +++ b/src/settings.c @@ -110,15 +110,15 @@ static const struct keys_strings { /* defines from toxic.h */ static void key_defaults(struct user_settings* settings) { - settings->key_next_tab = T_KEY_NEXT; - settings->key_prev_tab = T_KEY_PREV; - settings->key_scroll_line_up = KEY_PPAGE; - settings->key_scroll_line_down = KEY_NPAGE; - settings->key_half_page_up = T_KEY_C_F; - settings->key_half_page_down = T_KEY_C_V; - settings->key_page_bottom = T_KEY_C_H; - settings->key_peer_list_up = T_KEY_C_LB; - settings->key_peer_list_down = T_KEY_C_RB; + settings->key_next_tab = T_KEY_NEXT; + settings->key_prev_tab = T_KEY_PREV; + settings->key_scroll_line_up = KEY_PPAGE; + settings->key_scroll_line_down = KEY_NPAGE; + settings->key_half_page_up = T_KEY_C_F; + settings->key_half_page_down = T_KEY_C_V; + settings->key_page_bottom = T_KEY_C_H; + settings->key_peer_list_up = T_KEY_C_LB; + settings->key_peer_list_down = T_KEY_C_RB; settings->key_toggle_peerlist = T_KEY_C_B; } @@ -212,7 +212,7 @@ int settings_load(struct user_settings *s, const char *patharg) config_t cfg[1]; config_setting_t *setting; const char *str = NULL; - + /* Load default settings */ ui_defaults(s); tox_defaults(s); @@ -296,41 +296,41 @@ int settings_load(struct user_settings *s, const char *patharg) } } - /* keys */ - if ((setting = config_lookup(cfg, key_strings.self)) != NULL) { - const char* tmp = NULL; - if (config_setting_lookup_string(setting, key_strings.next_tab, &tmp)) - s->key_next_tab = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.prev_tab, &tmp)) - s->key_prev_tab = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.scroll_line_up, &tmp)) - s->key_scroll_line_up = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.scroll_line_down, &tmp)) - s->key_scroll_line_down= key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.half_page_up, &tmp)) - s->key_half_page_up = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.half_page_down, &tmp)) - s->key_half_page_down = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.page_bottom, &tmp)) - s->key_page_bottom = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.peer_list_up, &tmp)) - s->key_peer_list_up = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.peer_list_down, &tmp)) - s->key_peer_list_down = key_parse(&tmp); - if (config_setting_lookup_string(setting, key_strings.toggle_peerlist, &tmp)) - s->key_toggle_peerlist = key_parse(&tmp); - } + /* keys */ + if ((setting = config_lookup(cfg, key_strings.self)) != NULL) { + const char* tmp = NULL; + if (config_setting_lookup_string(setting, key_strings.next_tab, &tmp)) + s->key_next_tab = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.prev_tab, &tmp)) + s->key_prev_tab = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.scroll_line_up, &tmp)) + s->key_scroll_line_up = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.scroll_line_down, &tmp)) + s->key_scroll_line_down= key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.half_page_up, &tmp)) + s->key_half_page_up = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.half_page_down, &tmp)) + s->key_half_page_down = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.page_bottom, &tmp)) + s->key_page_bottom = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.peer_list_up, &tmp)) + s->key_peer_list_up = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.peer_list_down, &tmp)) + s->key_peer_list_down = key_parse(&tmp); + if (config_setting_lookup_string(setting, key_strings.toggle_peerlist, &tmp)) + s->key_toggle_peerlist = key_parse(&tmp); + } #ifdef AUDIO if ((setting = config_lookup(cfg, audio_strings.self)) != NULL) { config_setting_lookup_int(setting, audio_strings.input_device, &s->audio_in_dev); s->audio_in_dev = s->audio_in_dev < 0 || s->audio_in_dev > MAX_DEVICES ? 0 : s->audio_in_dev; - + config_setting_lookup_int(setting, audio_strings.output_device, &s->audio_out_dev); s->audio_out_dev = s->audio_out_dev < 0 || s->audio_out_dev > MAX_DEVICES ? 0 : s->audio_out_dev; - + config_setting_lookup_float(setting, audio_strings.VAD_treshold, &s->VAD_treshold); - } + } #endif #ifdef SOUND_NOTIFY @@ -340,7 +340,7 @@ int settings_load(struct user_settings *s, const char *patharg) if (str && strcasecmp(str, NO_SOUND) != 0) set_sound(error, PACKAGE_DATADIR "/sounds/ToxicError.wav"); } - + if ( !config_setting_lookup_string(setting, sound_strings.user_log_in, &str) || !set_sound(user_log_in, str) ) { if (str && strcasecmp(str, NO_SOUND) != 0) diff --git a/src/settings.h b/src/settings.h index 52e6ddc..6328382 100644 --- a/src/settings.h +++ b/src/settings.h @@ -41,15 +41,15 @@ struct user_settings { char chatlogs_path[PATH_MAX]; char avatar_path[PATH_MAX]; - int key_next_tab; - int key_prev_tab; - int key_scroll_line_up; - int key_scroll_line_down; - int key_half_page_up; - int key_half_page_down; - int key_page_bottom; - int key_peer_list_up; - int key_peer_list_down; + int key_next_tab; + int key_prev_tab; + int key_scroll_line_up; + int key_scroll_line_down; + int key_half_page_up; + int key_half_page_down; + int key_page_bottom; + int key_peer_list_up; + int key_peer_list_down; int key_toggle_peerlist; #ifdef AUDIO From d48d9ed4dcd6a2fc1ef637a71470cad68b937b1b Mon Sep 17 00:00:00 2001 From: Urras Date: Tue, 10 Feb 2015 09:47:06 -0500 Subject: [PATCH 13/19] Travis should build with Libsodium stable --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 210bdb7..984a12a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_script: # Installing libsodium, needed for toxcore - git clone https://github.com/jedisct1/libsodium.git libsodium - cd libsodium - - git checkout tags/0.7.0 > /dev/null + - git checkout tags/1.0.0 > /dev/null - ./autogen.sh > /dev/null - ./configure > /dev/null - make check -j2 || make check || exit 1 > /dev/null From e230badb47fc76a051b504952b1c0ddbc5f60624 Mon Sep 17 00:00:00 2001 From: Urras Date: Tue, 10 Feb 2015 10:01:44 -0500 Subject: [PATCH 14/19] Fix Clang I didn't expect this to work, but it is and I'm not complaining. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 984a12a..28d89b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: c compiler: - gcc - # - clang # Fix me + - clang before_script: # Installing yasm (needed for compiling vpx) and openal - - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev libnotify-dev + - sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev libnotify-dev clang llvm-dev # Installing libsodium, needed for toxcore - git clone https://github.com/jedisct1/libsodium.git libsodium - cd libsodium From 4b4bfe887685a8e403c714bcf7e4b3b1d7f96f12 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Wed, 11 Feb 2015 10:12:05 +0100 Subject: [PATCH 15/19] travis.yml: use latest libsodium stable --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 28d89b4..8b48566 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_script: # Installing libsodium, needed for toxcore - git clone https://github.com/jedisct1/libsodium.git libsodium - cd libsodium - - git checkout tags/1.0.0 > /dev/null + - git checkout tags/1.0.2 > /dev/null - ./autogen.sh > /dev/null - ./configure > /dev/null - make check -j2 || make check || exit 1 > /dev/null From 50438425e5ee2c65695b395a23fd2c52975da28b Mon Sep 17 00:00:00 2001 From: JFreegman Date: Wed, 11 Feb 2015 19:06:40 -0500 Subject: [PATCH 16/19] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fe5f39..0077f56 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Toxic [![Build Status](https://travis-ci.org/Tox/toxic.png?branch=master)](https://travis-ci.org/Tox/toxic) -Toxic is ~~secretly a nTox fork~~ a [Tox](https://tox.im)-based instant messenging client which formerly resided in the [Tox core repository](https://github.com/irungentoo/toxcore), and is now available as a standalone application. +Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly resided in the [Tox core repository](https://github.com/irungentoo/toxcore), and is now available as a standalone application. ![Toxic Screenshot](https://i.imgur.com/san99Z2.png "Home Screen") From 38a0f6fae47251bcdc4e0a213b50738c1f005121 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sun, 8 Feb 2015 07:49:05 -0500 Subject: [PATCH 17/19] Make little action indicators on each output line configurable. Also added a new DISCONNECTION line info type. Signed-off-by: Loui Chang --- doc/toxic.conf.5 | 24 ++++++++++++++++++++++-- doc/toxic.conf.5.asc | 12 ++++++++++++ misc/toxic.conf.example | 12 ++++++++++++ src/chat.c | 2 +- src/groupchat.c | 2 +- src/line_info.c | 37 +++++++++++++++++++++++++++++-------- src/line_info.h | 1 + src/prompt.c | 2 +- src/settings.c | 27 +++++++++++++++++++++++++++ src/settings.h | 13 +++++++++++++ 10 files changed, 119 insertions(+), 13 deletions(-) diff --git a/doc/toxic.conf.5 b/doc/toxic.conf.5 index 3fb2aee..fa30e86 100644 --- a/doc/toxic.conf.5 +++ b/doc/toxic.conf.5 @@ -2,12 +2,12 @@ .\" Title: toxic.conf .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 2014-10-08 +.\" Date: 2015-02-08 .\" Manual: Toxic Manual .\" Source: toxic __VERSION__ .\" Language: English .\" -.TH "TOXIC\&.CONF" "5" "2014\-10\-08" "toxic __VERSION__" "Toxic Manual" +.TH "TOXIC\&.CONF" "5" "2015\-02\-08" "toxic __VERSION__" "Toxic Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -105,6 +105,26 @@ Show welcome message on startup\&. true or false .RS 4 Maximum lines for chat window history\&. Integer value\&. (for example: 700) .RE +.PP +\fBline_join\fR +.RS 4 +Indicator for when someone connects or joins a group\&. Three characters max for line_ settings\&. +.RE +.PP +\fBline_quit\fR +.RS 4 +Indicator for when someone disconnects or leaves a group\&. +.RE +.PP +\fBline_alert\fR +.RS 4 +Indicator for alert messages\&. +.RE +.PP +\fBline_normal\fR +.RS 4 +Indicator for normal messages\&. +.RE .RE .PP \fBaudio\fR diff --git a/doc/toxic.conf.5.asc b/doc/toxic.conf.5.asc index 05ae202..4643405 100644 --- a/doc/toxic.conf.5.asc +++ b/doc/toxic.conf.5.asc @@ -66,6 +66,18 @@ OPTIONS *history_size*;; Maximum lines for chat window history. Integer value. (for example: 700) + *line_join*;; + Indicator for when someone connects or joins a group. + Three characters max for line_ settings. + + *line_quit*;; + Indicator for when someone disconnects or leaves a group. + + *line_alert*;; + Indicator for alert messages. + + *line_normal*;; + Indicator for normal messages. *audio*:: Configuration related to audio devices. diff --git a/misc/toxic.conf.example b/misc/toxic.conf.example index 29d6abf..7b8e352 100644 --- a/misc/toxic.conf.example +++ b/misc/toxic.conf.example @@ -28,6 +28,18 @@ ui = { // maximum lines for chat window history history_size=700; + + // Indicator for display when someone connects or joins a group. + line_join="-->"; + + // Indicator for display when someone disconnects or leaves a group. + line_quit="<--"; + + // Indicator for alert messages. + line_alert="-!-"; + + // Indicator for normal messages. + line_normal="---"; }; audio = { diff --git a/src/chat.c b/src/chat.c index 88ae56a..e44546d 100644 --- a/src/chat.c +++ b/src/chat.c @@ -205,7 +205,7 @@ static void chat_onConnectionChange(ToxWindow *self, Tox *m, int32_t num, uint8_ chat_stop_file_senders(num); msg = "has gone offline"; - line_info_add(self, timefrmt, nick, NULL, CONNECTION, 0, RED, msg); + line_info_add(self, timefrmt, nick, NULL, DISCONNECTION, 0, RED, msg); write_to_log(msg, nick, ctx->log, true); } } diff --git a/src/groupchat.c b/src/groupchat.c index e568947..5360bc9 100644 --- a/src/groupchat.c +++ b/src/groupchat.c @@ -505,7 +505,7 @@ static void groupchat_onGroupNamelistChange(ToxWindow *self, Tox *m, int groupnu case TOX_CHAT_CHANGE_PEER_DEL: event = "has left the room"; - line_info_add(self, timefrmt, (char *) oldpeername, NULL, CONNECTION, 0, RED, event); + line_info_add(self, timefrmt, (char *) oldpeername, NULL, DISCONNECTION, 0, RED, event); if (groupchats[self->num].side_pos > 0) --groupchats[self->num].side_pos; diff --git a/src/line_info.c b/src/line_info.c index 8ee0a9f..d3be1ae 100644 --- a/src/line_info.c +++ b/src/line_info.c @@ -156,23 +156,27 @@ void line_info_add(ToxWindow *self, const char *timestr, const char *name1, cons switch (type) { case IN_ACTION: case OUT_ACTION: - len += 5; + len += strlen(user_settings->line_normal) + 2; break; case IN_MSG: case OUT_MSG: - len += 6; + len += strlen(user_settings->line_normal) + 3; break; case CONNECTION: - len += 5; + len += strlen(user_settings->line_join) + 2; + break; + + case DISCONNECTION: + len += strlen(user_settings->line_quit) + 2; break; case SYS_MSG: break; case NAME_CHANGE: - len += 4; + len += strlen(user_settings->line_alert) + 1; break; case PROMPT: @@ -309,7 +313,7 @@ void line_info_print(ToxWindow *self) nameclr = CYAN; wattron(win, COLOR_PAIR(nameclr)); - wprintw(win, "--- %s: ", line->name1); + wprintw(win, "%s %s: ", user_settings->line_normal, line->name1); wattroff(win, COLOR_PAIR(nameclr)); if (line->msg[0] == '>') @@ -342,7 +346,7 @@ void line_info_print(ToxWindow *self) wattroff(win, COLOR_PAIR(BLUE)); wattron(win, COLOR_PAIR(YELLOW)); - wprintw(win, "--- %s %s", line->name1, line->msg); + wprintw(win, "%s %s %s", user_settings->line_normal, line->name1, line->msg); wattroff(win, COLOR_PAIR(YELLOW)); if (type == OUT_ACTION && timed_out(line->timestamp, get_unix_time(), NOREAD_FLAG_TIMEOUT)) { @@ -399,7 +403,24 @@ void line_info_print(ToxWindow *self) wattroff(win, COLOR_PAIR(BLUE)); wattron(win, COLOR_PAIR(line->colour)); - wprintw(win, "%s ", line->colour == RED ? "<--" : "-->"); + wprintw(win, "%s ", user_settings->line_join); + + wattron(win, A_BOLD); + wprintw(win, "%s ", line->name1); + wattroff(win, A_BOLD); + + wprintw(win, "%s\n", line->msg); + wattroff(win, COLOR_PAIR(line->colour)); + + break; + + case DISCONNECTION: + wattron(win, COLOR_PAIR(BLUE)); + wprintw(win, "%s", line->timestr); + wattroff(win, COLOR_PAIR(BLUE)); + + wattron(win, COLOR_PAIR(line->colour)); + wprintw(win, "%s ", user_settings->line_quit); wattron(win, A_BOLD); wprintw(win, "%s ", line->name1); @@ -416,7 +437,7 @@ void line_info_print(ToxWindow *self) wattroff(win, COLOR_PAIR(BLUE)); wattron(win, COLOR_PAIR(MAGENTA)); - wprintw(win, "-!- "); + wprintw(win, "%s ", user_settings->line_alert); wattron(win, A_BOLD); wprintw(win, "%s", line->name1); wattroff(win, A_BOLD); diff --git a/src/line_info.h b/src/line_info.h index cb91365..7bd1aa8 100644 --- a/src/line_info.h +++ b/src/line_info.h @@ -41,6 +41,7 @@ enum { OUT_ACTION_READ, /* same as OUT_MSG_READ but for actions */ PROMPT, CONNECTION, + DISCONNECTION, NAME_CHANGE, } LINE_TYPE; diff --git a/src/prompt.c b/src/prompt.c index a580c1f..10af01e 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -357,7 +357,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum "Toxic", "%s has come online", nick ); } else { msg = "has gone offline"; - line_info_add(self, timefrmt, nick, NULL, CONNECTION, 0, RED, msg); + line_info_add(self, timefrmt, nick, NULL, DISCONNECTION, 0, RED, msg); write_to_log(msg, nick, ctx->log, true); if (self->active_box != -1) diff --git a/src/settings.c b/src/settings.c index 9d3c7c2..cd8385f 100644 --- a/src/settings.c +++ b/src/settings.c @@ -55,6 +55,11 @@ static struct ui_strings { const char* show_typing_self; const char* show_typing_other; const char* show_welcome_msg; + + const char* line_join; + const char* line_quit; + const char* line_alert; + const char* line_normal; } ui_strings = { "ui", "timestamps", @@ -66,6 +71,10 @@ static struct ui_strings { "show_typing_self", "show_typing_other", "show_welcome_msg", + "line_join", + "line_quit", + "line_alert", + "line_normal", }; static void ui_defaults(struct user_settings* settings) @@ -79,6 +88,11 @@ static void ui_defaults(struct user_settings* settings) settings->show_typing_self = SHOW_TYPING_ON; settings->show_typing_other = SHOW_TYPING_ON; settings->show_welcome_msg = SHOW_WELCOME_MSG_ON; + + snprintf(settings->line_join, LINE_HINT_MAX + 1, "%s", LINE_JOIN); + snprintf(settings->line_quit, LINE_HINT_MAX + 1, "%s", LINE_QUIT); + snprintf(settings->line_alert, LINE_HINT_MAX + 1, "%s", LINE_ALERT); + snprintf(settings->line_normal, LINE_HINT_MAX + 1, "%s", LINE_NORMAL); } static const struct keys_strings { @@ -262,6 +276,19 @@ int settings_load(struct user_settings *s, const char *patharg) config_setting_lookup_bool(setting, ui_strings.show_welcome_msg, &s->show_welcome_msg); config_setting_lookup_int(setting, ui_strings.time_format, &s->time); s->time = s->time == TIME_24 || s->time == TIME_12 ? s->time : TIME_24; /* Check defaults */ + + if ( config_setting_lookup_string(setting, ui_strings.line_join, &str) ) { + snprintf(s->line_join, sizeof(s->line_join), "%s", str); + } + if ( config_setting_lookup_string(setting, ui_strings.line_quit, &str) ) { + snprintf(s->line_quit, sizeof(s->line_quit), "%s", str); + } + if ( config_setting_lookup_string(setting, ui_strings.line_alert, &str) ) { + snprintf(s->line_alert, sizeof(s->line_alert), "%s", str); + } + if ( config_setting_lookup_string(setting, ui_strings.line_normal, &str) ) { + snprintf(s->line_normal, sizeof(s->line_normal), "%s", str); + } } /* paths */ diff --git a/src/settings.h b/src/settings.h index 6328382..1cc9e13 100644 --- a/src/settings.h +++ b/src/settings.h @@ -25,6 +25,9 @@ #include +/* Represents line_* hints max strlen */ +#define LINE_HINT_MAX 3 + /* holds user setting values */ struct user_settings { int autolog; /* boolean */ @@ -37,6 +40,11 @@ struct user_settings { int show_typing_other; /* boolean */ int show_welcome_msg; /* boolean */ + char line_join[LINE_HINT_MAX + 1]; + char line_quit[LINE_HINT_MAX + 1]; + char line_alert[LINE_HINT_MAX + 1]; + char line_normal[LINE_HINT_MAX + 1]; + char download_path[PATH_MAX]; char chatlogs_path[PATH_MAX]; char avatar_path[PATH_MAX]; @@ -84,5 +92,10 @@ enum { DFLT_HST_SIZE = 700, } settings_values; +#define LINE_JOIN "-->" +#define LINE_QUIT "<--" +#define LINE_ALERT "-!-" +#define LINE_NORMAL "---" + int settings_load(struct user_settings *s, const char *patharg); #endif /* #define SETTINGS_H */ From b87f73cc478e46e2b8d94baf2376309c8317d07f Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 17 Feb 2015 11:01:31 +0100 Subject: [PATCH 18/19] Add INSTALL.md --- INSTALL.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 68 +++++++++--------------------------------------------- 2 files changed, 79 insertions(+), 57 deletions(-) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..6dc0bba --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,68 @@ +# Installation +* [Dependencies](#deps) + * [OS X Notes](#deps_osx) +* [Compiling](#compiling) + * [Documentation](#docs) +* [Notes](#notes) + * [Compilation variables](#comp_vars) + * [Packaging](#packaging) + + +## Dependencies +| Name | Needed by | Debian package | +|------------------------------------------------------|----------------------------|------------------| +| [Tox Core](https://github.com/irungentoo/toxcore) | BASE | *None* | +| [NCurses](https://www.gnu.org/software/ncurses) | BASE | libncursesw5-dev | +| [LibConfig](http://www.hyperrealm.com/libconfig) | BASE | libconfig-dev | +| [Tox Core AV](https://github.com/irungentoo/toxcore) | AUDIO | *None* | +| [OpenAL](http://openal.org) | AUDIO, SOUND NOTIFICATIONS | libopenal-dev | +| [OpenALUT](http://openal.org) | SOUND NOTIFICATIONS | libalut-dev | +| [LibNotify](https://developer.gnome.org/libnotify) | DESKTOP NOTIFICATIONS | libnotify-dev | +| [AsciiDoc](http://asciidoc.org/index.html) | DOCUMENTATION1 | asciidoc | +1: see [Documentation](#docs) + + +#### OS X Notes +Using [Homebrew](http://brew.sh): +``` +brew install openal-soft freealut libconfig +brew install https://raw.githubusercontent.com/Tox/homebrew-tox/master/Formula/libtoxcore.rb +brew install https://raw.githubusercontent.com/Homebrew/homebrew-x11/master/libnotify.rb +``` + +You can omit `libnotify` if you intend to build without desktop notifications enabled. + + +## Compiling +``` +cd build/ +make PREFIX="/where/to/install" +sudo make install PREFIX="/where/to/install" +``` + + +#### Documentation +Run `make doc` in the build directory after editing the asciidoc files to regenerate the manpages.
+**NOTE FOR DEVELOPERS**: asciidoc files and generated manpages will need to be commited together.
+**NOTE FOR EVERYONE**: [asciidoc](http://asciidoc.org/index.html) (and this step) is only required for regenerating manpages when you modify them. + +
+## Notes + + +#### Compilation variables +* You can add specific flags to the Makefile with `USER_CFLAGS=""` and/or `USER_LDFLAGS=""` +* You can pass your own flags to the Makefile with `CFLAGS=""` and/or `LDFLAGS=""` (this will supersede the default ones) +* Additional features are automatically enabled if all dependencies are found, but you can disable them by using special variables: + * `DISABLE_X11=1` → build toxic without X11 support (needed for focus tracking) + * `DISABLE_AV=1` → build toxic without audio call support + * `DISABLE_SOUND_NOTIFY=1` → build toxic without sound notifications support + * `DISABLE_DESKTOP_NOTIFY=1` → build toxic without desktop notifications support + + +#### Packaging +* For packaging purpose, you can use `DESTDIR=""` to specify a directory where to store installed files +* `DESTDIR=""` can be used in addition to `PREFIX=""`: + * `DESTDIR=""` is meant to specify a directory where to store installed files (ex: "/tmp/build/pkg") + * `PREFIX=""` is meant to specify a prefix directory for binaries and data files (ex: "/usr/local") + diff --git a/README.md b/README.md index 0077f56..43739a5 100644 --- a/README.md +++ b/README.md @@ -3,56 +3,20 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly ![Toxic Screenshot](https://i.imgur.com/san99Z2.png "Home Screen") +## Downloads +You can download precompiled binaries from [jenkins](https://jenkins.libtoxcore.so): +* [Linux (packages)](https://wiki.tox.im/Binaries#Linux) +* [Linux 32 bit](https://jenkins.libtoxcore.so/job/toxic_linux_i386/lastSuccessfulBuild/artifact/toxic_linux_i386.tar.xz) +* [Linux 64 bit](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/lastSuccessfulBuild/artifact/toxic_linux_amd64.tar.xz) + ## Installation +[Compiling](/INSTALL.md) -### Dependencies -##### Base -* [libtoxcore](https://github.com/irungentoo/toxcore) -* [ncurses](https://www.gnu.org/software/ncurses) (for Debian based systems, 'libncursesw5-dev') -* [libconfig](http://www.hyperrealm.com/libconfig) (for Debian based systems, 'libconfig-dev') +## Settings +Running Toxic for the first time creates an empty file called toxic.conf in your home configuration directory ("~/.config/tox" for Linux users). Adding options to this file allows you to enable auto-logging, change the time format (12/24 hour), and much more. +You can view our example config file [here](misc/toxic.conf.example). -##### Audio -* libtoxav ([libtoxcore](https://github.com/irungentoo/toxcore) compiled with audio support) -* [openal](http://openal.org) (for Debian based systems, 'libopenal-dev') - -##### Sound notifications -* [openal](http://openal.org) (for Debian based systems, 'libopenal-dev') -* [openalut](http://openal.org) (for Debian based systems, 'libalut-dev') - -##### Desktop notifications -* [libnotify](https://developer.gnome.org/libnotify) (for Debian based systems, 'libnotify-dev') - -##### Documentation -* [Asciidoc](http://asciidoc.org/index.html) (only required for regenerating manpages) - * Run `make doc` in the build directory after editing the asciidoc files to regenerate the manpages. - * **NOTE FOR DEVELOPERS**: asciidoc files and generated manpages will need to be commited together. - -### Compiling -1. `cd build/` -2. `make PREFIX="/where/to/install"` -3. `sudo make install PREFIX="/where/to/install"` - -### Compilation Notes -* You can add specific flags to the Makefile with `USER_CFLAGS=""` and/or `USER_LDFLAGS=""` -* You can pass your own flags to the Makefile with `CFLAGS=""` and/or `LDFLAGS=""` (this will supersede the default ones) -* Additional features are automatically enabled if all dependencies are found, but you can disable them by using special variables: - * `DISABLE_X11=1` → build toxic without X11 support (needed for focus tracking) - * `DISABLE_AV=1` → build toxic without audio call support - * `DISABLE_SOUND_NOTIFY=1` → build toxic without sound notifications support - * `DISABLE_DESKTOP_NOTIFY=1` → build toxic without desktop notifications support - -### OS X Compile -Using [Homebrew](http://brew.sh): `brew install openal-soft freealut libconfig && brew install https://raw.githubusercontent.com/Tox/homebrew-tox/master/Formula/libtoxcore.rb && brew install https://raw.githubusercontent.com/Homebrew/homebrew-x11/master/libnotify.rb`. - -You can omit `libnotify` if you intend to build without desktop notifications enabled. - -### Packaging -* For packaging purpose, you can use `DESTDIR=""` to specify a directory where to store installed files -* `DESTDIR=""` can be used in addition to `PREFIX=""`: - * `DESTDIR=""` is meant to specify a directory where to store installed files (ex: "/tmp/build/pkg") - * `PREFIX=""` is meant to specify a prefix directory for binaries and data files (ex: "/usr/local") - -### Troubleshooting +## Troubleshooting If your default prefix is "/usr/local" and you receive the following: ``` error while loading shared libraries: libtoxcore.so.0: cannot open shared object file: No such file or directory @@ -63,13 +27,3 @@ echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf sudo ldconfig ``` -## Precompiled binaries -You can download precompiled binaries from [jenkins](https://jenkins.libtoxcore.so): -* [Linux (packages)](https://wiki.tox.im/Binaries#Linux) -* [Linux 32 bit](https://jenkins.libtoxcore.so/job/toxic_linux_i386/lastSuccessfulBuild/artifact/toxic_linux_i386.tar.xz) -* [Linux 64 bit](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/lastSuccessfulBuild/artifact/toxic_linux_amd64.tar.xz) - -## Settings -Running Toxic for the first time creates an empty file called toxic.conf in your home configuration directory ("~/.config/tox" for Linux users). Adding options to this file allows you to enable auto-logging, change the time format (12/24 hour), and much more. -You can view our example config file [here](misc/toxic.conf.example). - From 3efc984ae93227ab64c0c38e88dd13d953ee104f Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Wed, 18 Feb 2015 15:31:42 +0100 Subject: [PATCH 19/19] README.md: update download section --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 43739a5..d3cc263 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,25 @@ # Toxic [![Build Status](https://travis-ci.org/Tox/toxic.png?branch=master)](https://travis-ci.org/Tox/toxic) Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly resided in the [Tox core repository](https://github.com/irungentoo/toxcore), and is now available as a standalone application. -![Toxic Screenshot](https://i.imgur.com/san99Z2.png "Home Screen") - -## Downloads -You can download precompiled binaries from [jenkins](https://jenkins.libtoxcore.so): -* [Linux (packages)](https://wiki.tox.im/Binaries#Linux) -* [Linux 32 bit](https://jenkins.libtoxcore.so/job/toxic_linux_i386/lastSuccessfulBuild/artifact/toxic_linux_i386.tar.xz) -* [Linux 64 bit](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/lastSuccessfulBuild/artifact/toxic_linux_amd64.tar.xz) +[![Toxic Screenshot](https://i.imgur.com/san99Z2.png "Home Screen")](https://i.imgur.com/san99Z2.png) ## Installation -[Compiling](/INSTALL.md) +[Use our repositories](https://wiki.tox.im/Binaries#Linux)
+[Compile it yourself](/INSTALL.md) + +## Downloads +If you don't like installation methods listed above, you can still download precompiled binaries from [jenkins](https://jenkins.libtoxcore.so): +* [Linux 32 bit](https://jenkins.libtoxcore.so/job/toxic_linux_i386/lastSuccessfulBuild/artifact/toxic_linux_i386.tar.xz) [![Build Status](https://jenkins.libtoxcore.so/job/toxic_linux_i386/badge/icon)](https://jenkins.libtoxcore.so/job/toxic_linux_i386/lastSuccessfulBuild/artifact/toxic_linux_i386.tar.xz) +* [Linux 64 bit](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/lastSuccessfulBuild/artifact/toxic_linux_amd64.tar.xz) [![Build Status](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/badge/icon)](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/lastSuccessfulBuild/artifact/toxic_linux_amd64.tar.xz) +* [~~Linux ARMv6~~](https://jenkins.libtoxcore.so/job/toxic_linux_armv6/lastSuccessfulBuild/artifact/toxic_linux_armv6.tar.xz) **CURRENTLY DISABLED** [![Build Status](https://jenkins.libtoxcore.so/job/toxic_linux_amd64/badge/icon)](https://jenkins.libtoxcore.so/job/toxic_linux_armv6/lastSuccessfulBuild/artifact/toxic_linux_armv6.tar.xz) + +#### DEBs packages +* [toxic-i386.deb](https://jenkins.libtoxcore.so/job/toxic-linux-pkg/lastSuccessfulBuild/artifact/toxic-i386.deb) +* [toxic-x86_64.deb](https://jenkins.libtoxcore.so/job/toxic-linux-pkg/lastSuccessfulBuild/artifact/toxic-x86_64.deb) + +#### RPMs packages +* [toxic-i386.rpm](https://jenkins.libtoxcore.so/job/toxic-linux-pkg/lastSuccessfulBuild/artifact/toxic-i386.rpm) +* [toxic-x86_64.rpm](https://jenkins.libtoxcore.so/job/toxic-linux-pkg/lastSuccessfulBuild/artifact/toxic-x86_64.rpm) ## Settings Running Toxic for the first time creates an empty file called toxic.conf in your home configuration directory ("~/.config/tox" for Linux users). Adding options to this file allows you to enable auto-logging, change the time format (12/24 hour), and much more.