Using minizip in Visual C++ 2010 - visual-c++

I've been programming for a while, but for some reason I just can't find how to do something that I know has to be simple. I want to create zip files with a small utility that does not require dlls or any other helper files. I found a few places that recommend using zlib and minizip to work with zip files. I just can't figure out HOW to use them. I've installed zlib, but I have no clue how to install or use minizip. Every thing I find assumes I already have my environment set up to use it and "all you need to do is use function X and voila!" I've been trying to find how to use external libraries, but I'm getting just as vague info that way too. Are there any books that might be a place to start looking? I'm all for educating myself, but I'm actually quite lost with where to start on this.

Checkout XZip on CodeProject: http://www.codeproject.com/KB/cpp/xzipunzip.aspx
If you don't want to have to use any DLL's, that is a way to go. I've been using the 7-Zip DLLs with C# .NET programs lately. The 7-Zip SDK itself is not fun to work with, and all the solutions I know of that really work require the 7-Zip DLLs. However, once you integrate 7-Zip, you have ZIP, TAR, RAR, just about every other archive format integrated. The 7-Zip format itself is my favorite as it generally offers the best compression.
For .NET managed code, the SevenZipSharp library makes integrating the 7-Zip DLLs a snap:
http://sevenzipsharp.codeplex.com/

Related

Universal .so file generation for all android studio projects

I know this question is there a lot on this platform, however, what I am looking for is the way for which I can generate .so files one time and can utilize them in all projects whenever I need them without any modification. is that possible?
If it is possible then what things need to be done?

Python: Does the user need to download library?

noobie question here. I've been writing a program in python3.5.1 and I'm managing pretty well with the built in libraries like tkinter but I'm starting to want to use libraries that aren't built in with python3.5.1.
The problem with this is that as far as I can tell if I use a library that isn't built into python the users of my program will have to download the library as well. Which would be a major pain in the ass for a lot of users. Am I correct in assuming this? Is there a way to work around this?
I don't mind having to download the stuff myself, but I would like my users to be able to run my program with just basic python3.5.1.
Thanks
Users need to download your program. And many Python programs do consist of multiple source files. In some cases you can simply include the external libraries you use with the files you're shipping to the user. But this may not work well if the libraries contain compiled C code and you're targeting multiple platforms.
Alternatively, you can simply document which packages users need to install to use your program. They can then use whatever system package manager they have, or PIP, etc.

When using someone else's application code do I need to run Cmake to get the project structure for my operating system.

I am getting into a position where I have to use other people code for projects, for example openTLD. I want to change some of the code to give it more functionality and use it in a diffrent way. What I have found is that many people have packaged their files in such a way that you are supposed to use
cmake
and then
make
and sometimes after that
make install
I don't want to install the software on my system. What I am looking to do is get these peoples code to a point where I can add to it in Eclipse or even just using Nano and then compile it.
At what point is the code in a workable/usable state. Can I use it after doing cmake or do I need to also call make? Is my thinking correct that it would be better to edit the code after calling cmake as opposed to before? I am not going to want my finished code to be cross platform supported, it will only be on Linux. Is it easer to learn cmake and edit the code befor running cmake as opposed to not learning cmake and using the code afterwards, if that is possible?
You question is a little open ended.
Looking at the opentld project, there is a binary and a library available for use. If you are interested in using the binary in your code, you need to download the executables(Linux executables are not posted). If you are planning to use the library, you have two options. Either you use the pre-built library or build it during your build process. You would include the header files in your custom application and link with the library.
If you add more details, probably others can pitch in with new answers or refine the older ones.

Cross platform installation conventions & best practices

I manage an open source project that we currently distribute as a zipped bundle of files. We provide a bundle for Windows and Mac -- we currently expect Linux users to compile it themselves.
This program comes with a bunch of auxiliary files that the user will need to access. These include example files and example/default scripts (like plugins) that the user will need to be able to easily find (preferably not searching through a maze of /usr/local/foo/examples/scripts).
The user will also have their own files (that they may want to store in random locations), but they will also have their own collection of scripts (that they probably want centralized so they are always available).
I would like to support installation in multi-user environments where the user does not have permissions to mess with the program installation. The program will include an API (shared library and header) and a Python wrapper for that too. It would be nice to make those available automatically.
We build the project with CMake - and currently use CPack to bundle the zip files. CPack has much more capability than we are currently using. This is not a mechanical question of how to build the package/installation files, but a convention question of where to put all the stuff?
We would like to have an Application on MacOS, an installer for Windows, and packages for Linux. Mac Apps package icons, fonts, images, etc. nicely, but they don't seem to support user-visible files very well.
I would love for there to be a cross-platform standard way of handling this situation, but I have trouble finding decent examples on individual platforms.
Is there anything better for us to do than just a zip of files?
Providing archive of those extra files is probably one of the best solutions. You may encourage users to download them on first start of program - let users decide where they want them themselves.

Tools to help manage sets of multiple versions of executables on Linux?

We are in a networked Linux environment and what I'm looking for is a FOSS or generic system level method for managing what versions of executables and libraries get used, per session. The executables would preferably be installed on the network. The executables will be in-house tools and installs of commercial packages like Houdini, Maya and Nuke.
The need for this is that we'd prefer to have multiple versions of the software installed and available for the artists but there needs to be an easy way to select which version to use. As an added benefit, I'd like to be able to track the version of software used to generate a given output as metadata. I've worked at studios that did this successfully but I was not 100% up to speed on how it was achieved. Every executable in a given set was assigned a single uber version for the set. That way, the "approved packages" of the studio tools were all collapsed into a single package of tools that were known to work together.
Due to the way they install, some programs make setting this up easy (It's as simple as adding their install directories to $PATH). Other programs don't make it quite so easy. I'm particularly worried about how to handle the libraries a program might install. What's needed is a generic access method I can use to wrap everything into a clean front end.
Does anyone know of such a system available in the wild or am I going to have to implement it from scratch? Google hasn't been very helpful in finding a solution.
Thanks!
Check out the "modules" system at http://modules.sourceforge.net/ ; it's quite widely used in HPC.
There is eselect . I have only used it on funtoo(offspring of gentoo) but it seems to be doing what you need. It is also written entirely in BASH, so it should be quite possible to port to other distros.

Resources