Commit Graph

295 Commits

Author SHA1 Message Date
iphydf
a096c71db8
Release v0.1.2 2016-12-23 02:41:01 +00:00
iphydf
db71602731
Use tox_options_set_* instead of direct member access.
Also added a `tox_options_copy` function for cloning an options object.
This can be useful when creating several Tox instances with slightly
varying options.
2016-12-22 10:53:39 +00:00
iphydf
de623f9eb9
Add test to check if tox_new/tox_kill leaks.
We create and destroy 20k tox instances and run a single tox_iterate on
it. This test is not comprehensive, but provides a simple check to see
whether the destruction properly cleans up memory and perhaps other
resources.
2016-12-20 20:27:51 +00:00
iphydf
b0647b174c
Release v0.1.1 2016-12-17 00:47:08 +00:00
iphydf
7d2f2e4607
Release 0.1.0.
Fixes #216.
2016-12-14 09:35:59 +00:00
iphydf
bb0fbf94ae
Fix Libs line in toxcore.pc pkg-config file.
CMake lists are `;` separated and CMAKE_THREAD_LIBS_INIT contains
"-lpthread". This resulted in "-l-lpthread;-lrt" on Linux.
2016-12-14 01:34:57 +00:00
iphydf
b14b8d07fa
Add compatibility pkg-config modules: libtoxcore, libtoxav.
These were generated by the autotools build. Some clients may depend on
these files instead of the newer split pkg-config files. New clients
should be using the toxcore, toxav, toxencryptsave, and toxdns modules.
2016-12-13 20:58:32 +00:00
iphydf
4cf69996cc
Add apidsl file for toxencryptsave.
This breaks the toxencryptsave API. It hides the Tox_Pass_Key struct
definition.
2016-12-13 14:24:40 +00:00
sudden6
3cfe5544b1
Fix version compatibility test.
Also added some test cases for it.
2016-12-13 02:06:25 +00:00
Robin Lindén
029c4fb83f Fix padding in SAVED_FRIEND struct and add test.
Test covers saving and loading of a Tox instance with a friend added.
2016-12-13 01:36:28 +01:00
iphydf
d8ae726d0a Don't build nTox by default.
Build it on Travis. It won't be built on the windows builds regardless
of having it enabled globally.

Fixes #292.
2016-12-05 22:02:30 +00:00
Maxim Biro
f0f53dbd55 Don't error on warnings by default
Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
2016-11-28 15:13:01 -05:00
Gregory Mullen (grayhatter)
d6bad9078b
Version Patch v0.0.4 => v0.0.5 2016-11-24 19:55:45 -08:00
Ismael Luceno
19711d0fd0 Add knob to suppress building the nTox client 2016-11-23 22:01:50 -02:00
Ismael Luceno
15993d40a4 Add knob to suppress building the toxav test 2016-11-23 22:01:50 -02:00
iphydf
75a33d2201 Mark Tox_Options struct as deprecated.
We will remove it in v0.1.
2016-11-21 00:16:59 +00:00
iphydf
404042cc2d
v0.0.4 2016-11-14 02:20:25 +01:00
iphydf
8bbde23f48
Use apidsl for the crypto_core API.
This allows us to use apidsl features like namespaces to enforce a
naming standard.
2016-11-12 11:55:40 +00:00
iphydf
a205b788ad
Disable -Wunused-but-set-variable compiler warning flag.
This warning is triggered in `av_test.c`, where we have an open issue.
Silencing the warning locally would make the issue less visible. This
way, we will see the warning when we start removing the `-Wno-*` flags.
2016-11-11 23:31:13 +00:00
iphydf
42dfdf73c1
Add spectest to the cmake test suite.
This allows for easier development. It is not used on travis (yet).
2016-11-08 21:58:26 +00:00
iphydf
dd5e69b3bf
Disable some gcc-specific warnings.
Also, disable -pedantic on C++, because it's not really useful there,
and causes a lot of warnings on `enum FOO { BAR, };` (comma at end of
enumerator list).
2016-11-08 12:03:20 +00:00
iphydf
2a7bc19004
Release v0.0.3. 2016-11-07 00:56:59 +00:00
endoffile78
3f53090c1d
Remove assoc 2016-11-06 09:14:53 -06:00
iphydf
cf94537266
Enable all possible C compiler warning flags.
We disable the ones that fire, so we can use -Werror. We can then
investigate each warning individually and see whether to fix it or to
keep silencing it.
2016-11-06 01:32:10 +00:00
iphydf
96c672aef5
Compile as C++ for windows builds.
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.

C++ compatibility is useful for tooling and additional diagnostics and
analyses.
2016-11-02 18:50:41 +00:00
Gregory Mullen (grayhatter)
60e15f165e
Version Patch v0.0.2 2016-10-30 11:16:16 -07:00
Dmytro Vorobiov
59d27e6d94 toxav renaming: group.{h,c} -> groupav.{h,c}
toxav file for "group" conflicts with toxcore "group" file. While this
works fine in almost all cases, Xcode on macOS is confused with that.
2016-10-28 22:11:48 +02:00
iphydf
de966cdf90
Error if format_test can't be executed.
This ensures that on Travis, format_test will always be executed, or the
build fails.
2016-10-26 13:34:29 +01:00
iphydf
6d0c8060c1
Remove duplicate tests: split tests part 2. 2016-10-11 21:29:58 +02:00
iphydf
1ce4c3fe13
Install libraries with RPATH.
This makes deployment easier, as the install libpath is used to look up
dependent libraries.
2016-10-11 14:05:41 +02:00
iphydf
0fb79c54b8
Set log level for DEBUG=ON to LOG_DEBUG.
We use TRACE=ON (cmake flag) to enable LOG_TRACE. This way, a regular
build can enable DEBUG while not paying the price of TRACE. This is
particularly important for FFI bindings (especially Python), where
invoking callbacks can be an expensive operation.
2016-10-06 15:15:42 +01:00
Maxim Biro
02e9cd38f1 Add option to build tox-bootstrapd
When cross-compiling to <target> from Linux, cmake might find native Linux
libconfig and decide to build tox-bootstrapd. If the target is Windows, this
will fail, as tox-bootstrapd can't be built for Windows in the first place. If
the target is Linux of some other architecture, then using host native
libconfig will fail too. Thus an option is needed to guard against this.
2016-10-05 23:47:39 -04:00
Maxim Biro
ac8fb636a1 Add option to set test timeout
Some tests take 20 or more minutes to run before they timeout, this allows
to limit their runtime if needed.
2016-10-04 12:48:24 -04:00
iphydf
b8b9789a69
Rebuild apidsl'd headers in cmake.
- Moved apidsl headers next to their generated versions. In the future,
  perhaps all (or most) headers will be apidsl-generated, so the sources
  should stay together.
- Try to find apidsl/apigen binary and astyle binary and use it for the
  format test. Don't run the format test if these can't be found.
2016-10-02 23:54:03 +01:00
iphydf
66e1bb4510
Remove the _test suffix in auto_test calls.
All tests must end in `_test` so we can use this convention to slightly
shorten the names in `auto_test` calls. This also enforces the
convention so future tests obey it.
2016-10-02 15:14:19 +01:00
iphydf
36f40f1a4f
Add version-sync script to update all places with versions.
This will update tox.in.h only. Currently, you will still need to
manually update tox.h. An upcoming PR (#154) will update tox.h as
part of the build.
2016-09-28 23:29:36 +01:00
Gregory Mullen (grayhatter)
51139a080c
v0.0.0 => v0.0.1 2016-09-28 12:12:39 -07:00
iphydf
d369448ace
Work around bug in opencv3 headers.
OpenCV 3.1 doesn't define cvRound in C, only in C++. Thus, we now need
to compile av_test as C++ code.
2016-09-25 01:58:51 +01:00
iphydf
f60900c4b8
Move ring buffer out of toxcore/util into toxav.
Toxcore itself doesn't use this data structure. Only toxav does, so now
toxav owns the code for it.
2016-09-24 23:36:50 +01:00
iphydf
15cb426166
Make toxcore code C++ compatible.
It is still C code, so still compatible with C compilers as well. This
change lets us see more clearly where implicit conversions occur by
making them explicit.
2016-09-24 21:53:50 +01:00
iphydf
aa7670da5a
Fix strict-ld grep expressions to include digits.
`tox_options_[gs]et_ipv6_enabled` were missing from the version script
because the grep expression only accepted `[a-z_]`. Now it also accepts
digits in the function names.
2016-09-21 22:36:29 +01:00
iphydf
e59fd26d49
Add OSX and Windows build to travis config.
Tests for Windows are disabled for now, until we figure out which tests
can successfully run on wine and select only those.
2016-09-20 13:52:33 +01:00
iphydf
67ac9138ab
Add STRICT_ABI cmake flag to generate export lists.
Enabling this flag will generate and use an LD version script. It
ensures that the dynamic libraries (libtoxcore.so, libtoxav.so) only
export the symbols that are defined in their public API (tox.h and
toxav.h, respectively).
2016-09-19 19:42:12 +01:00
iphydf
f41b010e9b
Only build toxav if opus and vpx are found. 2016-09-18 02:18:24 +01:00
Jfreegman
8e43ca834c Complete old groupchat conversion to new API 2016-09-17 19:11:28 -04:00
iphydf
c0397a0a46 ApiDSL'ing old group chats (now: conference). 2016-09-17 19:11:28 -04:00
iphydf
5da85c582d
Fix for windows dynamic libraries. 2016-09-17 19:54:22 +01:00
iphydf
d1f16e27b8
Add option to build static libraries. 2016-09-14 14:32:01 +01:00
iphydf
254feb0acd
Add address sanitizer option to cmake file. 2016-09-08 10:13:40 +01:00
iphydf
6356eb4e4f
Enable build of av_test.
It has not been built in a while. We do want to keep this one working (or at
least compiling).
2016-08-31 20:02:41 +01:00
iphydf
8595d47e10
Remove unused and bit-rotten friends_test. 2016-08-31 18:11:44 +01:00
iphydf
fa3b51266b
Add missing #includes to headers and rename tox_old to tox_group.
Also, no longer #include the group code into tox.c. Instead, compile it
separately in tox_group.c. This is a bit less surprising to someone looking
around the code. Having some implementations in a .h file is certainly a bit
surprising to a disciplined C programmer, especially when there is no technical
reason to do it.
2016-08-30 19:31:40 +01:00
iphydf
13ae9e9a93
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
2016-08-27 01:16:14 +01:00
iphydf
7075c3648a
Add cmake test for apidsl. 2016-08-24 09:41:40 +01:00
iphydf
b044cfbf15
Fix windows build.
The threading networking functions (on windows: winsock and friends) need to be
linked into the toxnetwork library, not the toxcore library, anymore. On Linux
and OSX, there is no winsock. On OSX, there is no need to link against threading
libraries, and on Linux, toxnetwork can have unresolved symbols when linking, so
this failure wasn't caught before.

Tested by building on the iphydf/windows-x86-qt5 docker image.
2016-08-21 14:21:57 +01:00
iphydf
f9c83c1084
Build assoc DHT code on travis. 2016-08-20 00:59:22 +01:00
iphydf
db22522741
Add missing DHT_bootstrap to CMakeLists.txt.
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG.
- We also remove `-Wall`, because there are too many warnings, and nobody really
  looks at them at the moment. We'll see about fixing them soon. We'll also want
  to enable `-Werror` at some point.
- Finally, this PR enables `-O3` to make sure toxcore still works correctly
  under heavy compiler optimisations.
2016-08-17 22:12:39 +01:00
iphydf
cebf64a588
Split toxcore into layers.
This allows us to more clearly define interfaces between modules, and have the
linker help us ensure that module boundaries are respected.

The onion/tcp/net_crypto layer is a bit too large. This is due to a cyclic
dependency (onion -> net_crypto -> TCP -> onion). We may or may not want to
break that cycle in the future to allow the onion library to exist on its own
without net_crypto.
2016-08-16 17:36:18 +01:00
iphydf
35932b5381
Add "make install" step to Travis build. 2016-08-12 20:49:50 +02:00
iphydf
11de2c222f
Build tox-bootstrapd in the cmake build. 2016-08-12 01:58:23 +01:00
iphydf
b5cfd33340
Add and use CMake build script
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes.
Also, perform distcheck on travis to ensure that make dist works. It's not
actually failing the build at the moment due to broken tests.
2016-08-12 01:13:11 +01:00
jin-eld
1ec70337cf Remove cmake build system 2013-08-24 03:36:43 +03:00
jin-eld
e658892793 Rename core directory because of autoconf name clash
While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.

There's no workaround but to rename the core directory.
2013-08-24 03:25:07 +03:00
Manuel Argüelles
7ffa4017aa Make wide character support optional
Issue #514. FindCursesw modified to make it simpler. Wide character
can be disable by passing NO_WIDECHAR=ON.
2013-08-22 15:57:34 -05:00
Manuel Argüelles
d840e8a743 Add cmake module for ncursesw
Default Curses module fails to detect the wide char version of curses
when both are installed. Current module should do better.
2013-08-21 16:11:07 -05:00
naxuroqa
487c7d27d5 Fix for issue 472 2013-08-16 09:40:53 +02:00
slvr
91d8344cca Macports support (OS X only). MAP_ANON -> MAP_ANONYMOUS (OS X only). 2013-08-09 16:51:54 +01:00
Astonex
85092b6441 Update CMakeLists.txt 2013-08-08 21:58:54 +01:00
charmlesscoin
4b34ecf913 added files for unit tests 2013-08-07 00:18:27 -04:00
Maxim Biro
03a2bac319 Improved cmake 2013-08-04 22:25:07 -04:00
Maxim Biro
f03dc44e97 Fixed Windows build 2013-08-04 21:20:48 -04:00
Chloride Cull
add9c0b6dc Changed CMake options to compile the core shared
It is now compiled under 'toxcore' instead of just 'core' to be able to be installed without conflicts.
2013-08-03 18:25:12 +02:00
Filipp Ozinov
5ea6b58ec4 Curses check is now only on *nix 2013-08-03 11:08:21 +04:00
Filipp Ozinov
a85fce5c03 Curses dependence added to CMake 2013-08-03 09:17:44 +04:00
Florian Hahn
7ebc69f374 Add docs directory to cmake 2013-08-01 21:22:41 +02:00
irungentoo
55a2e59a64 Fixed build. 2013-07-31 08:35:06 -04:00
irungentoo
f2f266e9a7 Merge branch 'master' of https://github.com/xzfc/ProjectTox-Core into xzfc-master
Conflicts:
	CMakeLists.txt
2013-07-31 07:56:10 -04:00
xzfcpw
f77fe65d54 NaCl compiling option 2013-07-31 15:42:05 +07:00
Dmitry Marakasov
89dd7ed011 Add detection of required libraries 2013-07-31 06:15:26 +04:00
Maxim Biro
34bc2fad35 Fixed tabulation 2013-07-21 21:17:08 -04:00
Maxim Biro
533f136d0e Made a cmake project for Core 2013-07-21 20:41:08 -04:00
Maxim Biro
ec38df6f91 Set appropriative cmake_policy 2013-07-17 18:41:58 -04:00
Maxim Biro
6939a48226 Apply compiler flags only once 2013-07-17 18:29:26 -04:00
Maxim Biro
ef0efd72b5 Improved build system 2013-07-17 18:18:27 -04:00
Oliver Hunt
a58a6f5c7b prettier output 2013-07-14 03:27:23 +01:00
irungentoo
65bda2a6c9 ncurses test doesn't work very well. Putting back the old test. 2013-07-13 21:07:30 -04:00
irungentoo
11a39bb49a Cmake changed, small change in random_int()
Cmake builds now builds the new ncurses test only on non windows.
2013-07-13 19:24:14 -04:00
Oliver Hunt
5441562e11 Added ncurses tox client 2013-07-13 23:42:05 +01:00
Maxim Biro
573c88df44 Fixed cmake and Travis 2013-07-12 21:06:22 -04:00
irungentoo
5725e86a93 Build fixed? 2013-07-12 17:03:54 -04:00
irungentoo
79aa715514 First part of DHT hardening done.
Added crypto to the DHT communications.

This defeats completely the first attack mentioned in
docs/DHT_hardening.

Also updated the build system to build the latest test (it links it with
libsodium)
2013-07-12 16:27:19 -04:00
irungentoo
a632d960f8 Fixed to be confilcts with the DHT and the messenger part. 2013-07-07 11:54:25 -04:00
irungentoo
c7f7e30c75 Moved the network functions from the DHT into network.
Also made a nice function to init networking.
2013-06-26 09:56:15 -04:00
Maxim Biro
c2ad80431b Added warnings for GCC 2013-06-26 02:16:38 -04:00
Maxim Biro
20c7244357 Added a simple cmake list 2013-06-24 20:55:30 -04:00