Comments (9)
@Flamefire Thanks for your report. Could you submit a PR with the needed changes ? That would be great !
from libzippp.
I will. What about my second point? Needs an owner decision ;)
from libzippp.
@Flamefire Thanks for your feedback. It makes sense to me to have a subfolder. Maybe we can make that configurable somehow ?
from libzippp.
While I understand the idea of having it configurable I'd rather not. Every option added must/should be tested so every option added increases the amount to test by a factor of 2. (On/off with every other option)
Downside of the subfolder: currently installed project uses no subfolder in the include, but a subfolder in the install: installed to include/libzippp/libzippp.h
but #include <libzippp.h>
due to the subfolder being added to -I
, so that would be a breaking change. However as it is probably installed into some global location for users not using CMake they could be using #include <libzippp/libzippp.h>
without using any -I
already.
So IMO: Use a subfolder, bump the major version as per SemVer, don't use an option toggle. Oh and while doing that: Maybe require C++11? Should be supported wide enough already and allows to replace the typedefs at
Lines 55 to 70 in be75a34
unique_ptr
from fromBuffer
and/or making it movable. I also noticed that your MakeFile already adds -std=c++0x
although it doesn't seem to be used. Finally: Maybe drop the makefile completely? It is not a "clean" Makefile to be used e.g. by package maintainers, so rather factor out the dependency installation into shell scripts (code like in my updated travis.yml) and announce CMake as the "official" way.Just mentioning all this so it can be considered when bumping the major version.
from libzippp.
@ctabin Take a look at my PR #52 which implements the basics and puts CMake into focus. The include path change is not done as I'm waiting for your decisions. Besides that I think the setup and testing is pretty solid.
from libzippp.
@Flamefire That's very promising ! Regarding the include, the goal is to follow the standards as much as possible, and also to keep it simple. I wonder how vcpkg will behave, since libzippp has been included in it (see microsoft/vcpkg#6801 and #46).
Since this will change the building of libzippp, I don't mind making a new major version with some breaking changes, such as the include, so let's go 👍
from libzippp.
I wonder how vcpkg will behave, since libzippp has been included in it (see microsoft/vcpkg#6801 and #46).
That is indeed an issue. Users will use the targets and expect #include "libzippp.h"
to work. Maybe the better solution would be to skip the subfolder and install libzippp.h
into include
directly assuming this will always be the only header file? This would unify usage with non-cmake there libzippp is installed into /usr/local and hence #include "libzippp.h
would work without any -I
. However this would break such uses of the current libzippp where #include "libzippp/libzippp.h"
is already used without any -I
.
Maybe: Use the subfolder, but add include
AND include/libzippp
to the include path of the targets and announce one of them to be deprecated/discouraged so users should start using the other.
Then which one? If there will only be 1 header then #include "libzippp/libzippp.h"
looks rather ugly :/
Maybe just keep it as-is. IMO there is no real standard for handling stuff like that, so...
from libzippp.
@Flamefire I don't see any other header than libzippp.h
in a near future. Actually, this library is intended to be small, since it is only a wrapper.
I would say to keep things as-is, having #include "libzippp/libzippp.h
does'nt look so ugly to me 😅
from libzippp.
Ok then it will stay as #include "libzippp.h"
for CMake users and #include "libzippp/libzippp.h#
for users using default install location and no -I
or CMake
from libzippp.
Related Issues (20)
- unzip progress handling HOT 3
- Missing cancel option HOT 7
- E0135 class "libzippp::ZipArchive" has no member "fromWriteableBuffer" HOT 1
- Nested zip in memory HOT 1
- Issue opening zip file (constructor or .open() call) HOT 3
- Minor: when the zip is aborted the percent is modified to 100% HOT 3
- Set compression method in addData
- ZipArchive::readEntry doesn't handle entries of zero size
- Add the possibility to set the compression level
- setCompressionMethod silently fail when the archive is not yet opened
- Is it possible to incrementally append data to a file already added to an archive? HOT 1
- Memory leak when archive `close` is not successful HOT 2
- ZipArchive::close: zip_close called before saving buffer data. HOT 8
- Modification Time Not Updated for Overwritten Files in Zip Archive
- [macOS] After unzip archive binary file become text file HOT 1
- The install of libzippp.pc is not working HOT 1
- LIBZIPPP_ENABLE_ENCRYPTION does not set LIBZIPPP_WITH_ENCRYPTION in .pc file
- BUG: null pointer dereference after cancelling a `close()` HOT 2
- Issue when closing a zip HOT 3
- Extract have something wrong HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libzippp.