906 Commits

Author SHA1 Message Date
Skylsmoi
2634167f41 fix taskbar design for iOS 2017-04-21 15:00:57 +02:00
Skylsmoi
7edc49c4eb Merge branch 'master' of github.com:kiwix/kiwix-tools into 336/fix_display_taskbar_save 2017-04-20 17:37:03 +02:00
Skylsmoi
36225207c0 force custom design to override rules from libraries 2017-04-20 17:35:12 +02:00
Emmanuel Engelhart
1d61e270fb Add CTPP2 link in README 2017-04-16 20:37:01 +02:00
Kelson
5aecb4231d Merge pull request #20 from Skylsmoi/336/fix_display_taskbar
#336 taskbar is now responsive
2017-04-16 11:06:47 +02:00
Skylsmoi
126781bbb5 removed calc() 2017-04-13 11:52:27 +02:00
Skylsmoi
f045590243 #336 taskbar is now responsive 2017-04-13 11:52:27 +02:00
Matthieu Gautier
f46e560d7f Merge pull request #22 from kiwix/search_in_libzim
Search in libzim
2017-04-11 14:02:21 +02:00
Matthieu Gautier
643293c7df Try to link with uuid only if xapian is present. 2017-04-10 14:47:19 +02:00
Matthieu Gautier
799a47142b Adapt kiwix-tools to last kiwix-lib API (Xapian in zimlib). 2017-04-10 14:47:19 +02:00
Matthieu Gautier
79fdee1df2 Merge pull request #23 from kiwix/travisci
Travisci
2017-04-10 14:46:22 +02:00
Matthieu Gautier
ab623b7176 Add TravisCI.
Now the project is build on every PR using TravisCI.

The project dependencies are get from the archive generated by kiwix-build.
2017-04-10 14:42:41 +02:00
Matthieu Gautier
208050df4b Merge pull request #21 from kiwix/no_indexer
Remove indexer and indexing functionality from installer.
2017-04-06 15:39:07 +02:00
Matthieu Gautier
9ead431b3f Remove indexer and indexing functionality from installer.
This is handled by zimwriterfs now (and zimlib itself later on).
2017-04-06 15:37:39 +02:00
Julian Harty
1e6353330d Please discount (ignore) my last commit, it was intended for the kiwix-apache repo. 2017-04-06 00:05:08 +01:00
Julian Harty
482577fd53 You're welcome... and here's the starting point to encourage you to get involved. 2017-04-06 00:02:27 +01:00
Matthieu Gautier
856b487007 Merge pull request #18 from kiwix/snippets
Update to the new API of kiwix-lib.
2017-03-28 11:37:58 +02:00
Matthieu Gautier
cb20e719ee Update to the new API of kiwix-lib. 2017-03-21 16:33:57 +01:00
Matthieu Gautier
25091c320b Merge pull request #16 from kiwix/kiwix-serve.bugfix
Kiwix serve.bugfix
2017-03-20 11:05:21 +01:00
Matthieu Gautier
35b83144c6 Do not compress only if the content is small.
We do not need the test "contentLength < COMPRESSOR_BUFFER_SIZE" to know
if we compress the content or not.

This is a non sens, we WANT to compress the content if it is big.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
063e9ba80d Use compressBound function to reserve the right amount of space.
compressBound function give the upper bound of space needed to
reserve to the compression buffer. Use it instead of using a define.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
e27ce444c6 Correctly check that compress gone well before using the result buffer.
We need to check the return code of compress.
Compress may fail for different reason, one being that the compr_buffer
is not large enough.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
3592cd84c6 Do not modify the compr buffer pointer.
The compr pointer points to the allocated memory. We must not modify
it value.
If we advance the pointer by two bytes each time we compress an answer
we will end to write in some random memory and segfault.

Now, we use a std::vector to correctly handle allocation
(and deallocation!) of the memory.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
a27010c247 Correctly change the compression buffer we send.
For ie browser, we need to remove the two first bytes.
If we make our buffer start two bytes after, we also need to reduce the
size of the buffer by two bytes. Else we will read and send two extra
junk bytes.

Fix #15
2017-03-20 10:08:14 +01:00
Matthieu Gautier
0c01ec5bb5 Cleanup a bit kiwix-serve.cpp
- Remove spaces at end of lines
- Remove unused variables.
2017-03-20 10:08:14 +01:00
Matthieu Gautier
a3a0127edb Do not try to discover ctpp2 ourselves.
Kiwixlib now exports ctpp2 link/cflags in its pkg-config file.
So we don't have to check to ctpp2 here.
2017-02-22 12:10:47 +01:00
Matthieu Gautier
ad7d30cc4f Do not link with iconv when cross-compilating to windows.
Ideally we should check if iconv is present to know if ctpp2 has been
build with iconv.
This may be a bit too complex for our present case. As we know our
cross-compilation environment. It is better to remove the use of iconv
everywhere for now.
2017-02-07 12:25:43 +01:00
Emmanuel Engelhart
134f079c3c Improved README r0.1 2017-02-06 20:52:14 +01:00
Matthieu Gautier
4aba306d68 Add missing linking flag for uuid and rt.
Those libraries are used by xapian, so it should be declare there.
But for now, add the link in our compile script as we still want to compile.
2017-02-06 19:03:22 +01:00
Matthieu Gautier
dc6c9d618f Correctly ask link flags to pkg-config.
If we are compiling a static binaries, all dependencies (including indirect
dependencies) must be present on the command line.
To have them, we have to add '--static' option to the pkg-config line.
Meson does this for us, but we must ask it to do it with the 'static'
argument.
2017-01-31 14:45:44 +01:00
Matthieu Gautier
0f6ca21188 Add static linkage argument in meson.build.
Those options were added by the kiwix-build.py script.
But it's better to add them in the meson.build script to allow people
not using kiwix-build to compile static binaries either.
2017-01-31 14:43:25 +01:00
Matthieu Gautier
db7e1e5c8f Do not try to link with ctpp2-st.
ctpp2-st is not a standard name, all other projects use the same base name
for dynamic and static libs.

Debian already patch the lib name in the ctpp2 package.
As we also patch it in kiwix-build, we can ignore ctpp2-st and always
try to link on ctpp2.

This is even necessary as ctpp2-st is not existing at all is those
usecases, so we cannot try to link with ctpp2-st when compiling statically.

We could fix, the ctpp2 lib search to search ctpp2 and ctpp2-st when
compiling statically but it seems to be a lot of work for nothing
as ctpp2-st is not used at all in our usecases.
2017-01-30 18:02:26 +01:00
Matthieu Gautier
e8dc6b0f45 Correctly compare version of meson 2017-01-24 15:41:42 +01:00
Matthieu Gautier
5fe4e9a4ab Delete the macosx directory.
This should have never been there but keep in the kiwix repository.

Fix #7.
2017-01-17 17:42:44 +01:00
Matthieu Gautier
83768b176c Use old find_library to found ctpp2 lib if meson version < 0.31.0.
We need to support as far as possible the meson version installed on
ubuntu 16.04 (LTS).

In meson 0.31.0, the find_library has moved as a method of the compiler.
2017-01-17 17:32:14 +01:00
Matthieu Gautier
2ca63541f2 On Windows, ctpp2 use the iconv libraries.
If we are cross-compiling to windows, we need to also link with the
iconv library.

We do not check for the iconv library existance here. We assume that
if the ctpp2 library is present all its own dependencies are present also.
2017-01-17 10:51:07 +01:00
Matthieu Gautier
5cfbda1219 Force the template specialization for the min function.
'max' is a size_t and 'blob()->size()-pos' is a uint64_t.
Depending of the compiler (version, options, ...) this is a error as
we don't know which template specialization we have to use.
2017-01-17 10:29:04 +01:00
Matthieu Gautier
9aa7e371f7 Fix header include for cross-compilation to Windows.
- On unix, filenames are case sensitive and all include files are lowercase
- When crosscompiling to Windows, we use mingw32 and not msc.
  So we should not try to include "stdint4win.h"
- Windows includes #define interface to struct.
  As we use interface as variable name, we need to undef interface
2017-01-17 10:26:04 +01:00
Matthieu Gautier
1d2a9879cc Merge pull request #9 from legoktm/zlib
meson: Add missing zlib dependency
2017-01-13 11:40:10 +01:00
Matthieu Gautier
25dc9b1d55 Remove kiwix-builder.py script as it as been move in kiwix-build repo.
Also update README.md.
2017-01-10 10:50:58 +01:00
Kunal Mehta
87cb692c6a meson: Add missing zlib dependency 2017-01-06 04:25:30 -08:00
Matthieu Gautier
384d113b6f Compile and install other tools than kiwix-serve. 2017-01-03 11:57:12 +01:00
Matthieu Gautier
9465b764fa Fix resources compilation.
Add missing files and always build them.
2017-01-03 11:57:12 +01:00
Matthieu Gautier
ea915b6410 Meson compile command (ninja) also need a proper environment.
The ninja command may relaunch meson if meson files have changed.
As we need a proper environment (PKG_CONFIG_PATH, PATH) to let meson
configure properly, we also need to pass the environment to ninja.
2017-01-03 11:50:18 +01:00
Matthieu Gautier
9fdbb8b574 Let's meson found the compile_resource.py script.
Add the INSTALL_DIR/bin dir to the path and allow meson to found installed
binaries.
2016-12-23 13:09:24 +01:00
Matthieu Gautier
2b12f2b830 Set the patch paths relative to the script, not the cwd.
This way, we can run the script from everywhere.
2016-12-23 13:08:09 +01:00
Matthieu Gautier
9f36014449 Use the new script compile_resource from kiwix-lib to compile resources.
Now, resources are automatically recompiled at build.
2016-12-23 12:47:15 +01:00
Matthieu Gautier
94058ce811 Add README and other files 2016-12-22 14:30:58 +01:00
Matthieu Gautier
f580a06163 Meson version of kiwix-lib and kiwix-tools are on master now. 2016-12-22 13:49:56 +01:00
Matthieu Gautier
b363dc387b Add installation of missing hpp when compiling/installing pugixml. 2016-12-22 13:49:56 +01:00