Open Foadsf opened 4 years ago
Thanks for the suggestion. As you seem to have looked into package managers for Windows before, are there specific ones you can suggest? Do you have an idea of the complexity of their respective build / packaging scripts? I'm rarely developing on Windows, so haven't found myself using any Windows package managers yet. There seems to be quite a variety of package managers / repositories, which isn't ideal. Are there maybe a few that would be considered a "norm"?
Would you like to maintain build scripts for such package managers in a separate repository under the cmake-basis
GitHub organization?
As an alternative, what about attaching a Windows installer file (MSI) to the GitHub release page? These could be readily created with CPack without requiring separate build scripts for different package managers. Would that be suitable as well?
I see that registries such as just-install do indeed just download and run such installers.
Ideally, the installer package would be created as a by-product of a CI test, e.g., using AppVeyor.
I see that Travis CI has now also an early stage Windows build environment, which favors Chocolatey for installation of required third-party libraries. That would put Chocolatey onto the short list of Windows package managers.
EDIT: Given this SO thread, seems NuGet would be more appropriate than Chocolatey for a "library". There is also a CPack NuGet Generator which could possibly be used to create a package.
OK let me answer the questions one by one:
If you want to deliver BASIS as a library, which doesn't seem like a good idea to me, then Conan and Vcpkg are the most common options AFIK.
In my opinion, BASIS is a library of CMake modules. It also contains libraries for programming languages, the so-called BASIS Utilities, but these I belief are mostly unused.
The only application it contains is basisproject
, but this tool was more included for convenience and I consider it non-essential. It's not what defines BASIS.
Similar to applications / libraries in other programming languages, which may depend on header files or modules from a third-party library, the same is true for BASIS. The CMakeLists.txt of the user project depends on including the CMake modules of the BASIS "library".
Delivering a binary package is actually required for any of the so-called Windows package managers, including Chocolatey. [...] CPack is great I would love to learn that as well.
Then I'd say let's start with CPack and try the WiX Generator and NuGet generator.
The definition of CPack variables for these generators should go in config/Package.cmake. The default settings can be found in BasisPack.cmake.
@schuhschuh maybe you can write a blog post or something explaining the differences between BASIS and other template generators like CoockieCutter?
There is a clear misconception. BASIS is not a template generator. I would indeed suggest use of cookiecutter instead of basisproject tool. Your cookiecutter template would, however, contain files that make use of the BASIS CMake modules. Think of BASIS as an extension of CMake funtionality. Just like CMake provides you with functions and a set of CMake modules written in the CMake language for the purpose of build configuration.
Following this post, it would be great if we could have a Windows binary releases as well. Then we could add the software to some of the common Windows package managers.
I just tested the source code on Windows by:
and except some warnings, it seems to be working perfectly fine.