From 0fed441e80173a36cf8b041c22015d2450c7f039 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Tue, 3 Sep 2013 13:23:40 +0300 Subject: [PATCH 1/2] Update INSTALL.md Cleaned up bogus configure parameters and updated Win32 build instructions. --- INSTALL.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 614b1a36..8780269c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -101,9 +101,6 @@ Advance configure options: - --prefix=/where/to/install - --with-libsodium-headers=/path/to/libsodium/include/ - --with-libsodium-libs=/path/to/sodiumtest/lib/ - - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - - --BUILD_NTOX="yes" - - --BUILD_TESTS="yes" - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --disable-tests build unit tests (default: auto) @@ -119,7 +116,6 @@ Grab the following packages: * http://www.gnu.org/software/libtool/ * http://www.gnu.org/software/autoconf/ * http://www.gnu.org/software/automake/ - * http://www.cmake.org/ * https://github.com/jedisct1/libsodium * http://www.hyperrealm.com/libconfig/ * http://check.sourceforge.net/ @@ -146,9 +142,6 @@ Advance configure options: - --prefix=/where/to/install - --with-libsodium-headers=/path/to/libsodium/include/ - --with-libsodium-libs=/path/to/sodiumtest/lib/ - - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - - --BUILD_NTOX="yes" - - --BUILD_TESTS="yes" - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --disable-tests build unit tests (default: auto) @@ -168,18 +161,29 @@ http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 ###Windows: You should install: - - [MinGW](http://sourceforge.net/projects/mingw/)'s C compiler - - [check] (http://check.sourceforge.net/) + - [MinGW](http://sourceforge.net/projects/mingw/) -You have to [modify your PATH environment variable](http://www.computerhope.com/issues/ch000549.htm) so that it contains MinGW's bin folder path. With default settings, the bin folder is located at `C:\MinGW\bin`, which means that you would have to append `;C:\MinGW\bin` to the PATH variable. +When installing MinGW, make sure to select the MSYS option in the installer. +MinGW will install an "MinGW shell" (you should get a shortcut for it), make sure to perform all opeartions (i.e. generating/running configure script, compiling, etc.) from the MinGW shell. + +First download the source tarball from http://download.libsodium.org/libsodium/releases/ and build it. +Assuming that you got the libsodium-0.4.2.tar.gz release: +```cmd +tar -zxvf libsodium-0.4.2.tar.gz +cd libsodium-0.4.2 +./configure +make +make install +cd .. +``` + +You can also use a precompiled win32 binary of libsodium, however you will have to place the files in places where they can be found, i.e. dll's go to /bin headers to /include and libraries to /lib directories in your MinGW shell. + +Next, install ProjectTox-Core library, should either clone this repo by using git, or just download a [zip of current Master branch](https://github.com/irungentoo/ProjectTox-Core/archive/master.zip) and extract it somewhere. + +Assuming that you now have the sources in the ProjectTox-Core directory: -Then you should either clone this repo by using git, or just download a [zip of current Master branch](https://github.com/irungentoo/ProjectTox-Core/archive/master.zip) and extract it somewhere. - -After that you should get precompiled package of libsodium from [here](https://download.libsodium.org/libsodium/releases/libsodium-win32-0.4.2.tar.gz) and extract the archive into this repo's root. That is, `sodium` folder should be along with `core`, `testing` and other folders. - -Then clone this repo and generate makefile: ```cmd -git clone git://github.com/irungentoo/ProjectTox-Core.git cd ProjectTox-Core autoreconf -i ./configure @@ -190,9 +194,6 @@ Advance configure options: - --prefix=/where/to/install - --with-libsodium-headers=/path/to/libsodium/include/ - --with-libsodium-libs=/path/to/sodiumtest/lib/ - - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - - --BUILD_NTOX="yes" - - --BUILD_TESTS="yes" - --enable-silent-rules less verbose build output (undo: "make V=1") - --disable-silent-rules verbose build output (undo: "make V=0") - --disable-tests build unit tests (default: auto) From c7c1b9272450cc0477d11e4733195b2f349a930c Mon Sep 17 00:00:00 2001 From: Jin^eLD Date: Tue, 3 Sep 2013 20:18:54 +0300 Subject: [PATCH 2/2] Remove error printouts A library should never print anything, so removing the perror() printouts. --- toxcore/LAN_discovery.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index 8998e0a9..880593d2 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -45,7 +45,6 @@ static uint32_t get_broadcast(void) /* Configure ifconf for the ioctl call. */ if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - perror("[!] get_broadcast: socket() error"); return 0; } @@ -56,7 +55,6 @@ static uint32_t get_broadcast(void) count = ifconf.ifc_len / sizeof(struct ifreq); if (ioctl(sock, SIOCGIFCONF, &ifconf) < 0) { - perror("get_broadcast: ioctl() error"); return 0; } @@ -64,7 +62,6 @@ static uint32_t get_broadcast(void) /* Skip the loopback interface, as it's useless. */ if (strcmp(i_faces[i].ifr_name, "lo") != 0) { if (ioctl(sock, SIOCGIFBRDADDR, &i_faces[i]) < 0) { - perror("[!] get_broadcast: ioctl error"); return 0; } @@ -77,7 +74,6 @@ static uint32_t get_broadcast(void) close(sock); if (sock_holder == NULL) { - perror("[!] no broadcast device found"); return 0; }