Giới thiệu
Conan Package Manager là phần mềm mã nguồn mở được phát triển bởi JFrog, chuyên dành cho các lập trình viên C và C++. Công cụ này giúp quản lý, xây dựng và chia sẻ các gói phần mềm (package) một cách tự động và hiệu quả trên nhiều nền tảng khác nhau như Windows, Linux, macOS, và các hệ điều hành khác.
Với tính năng phân tán hoàn toàn, người dùng có thể lưu trữ các gói phần mềm trên máy chủ riêng hoặc tích hợp với các dịch vụ như Artifactory và Bintray. Conan hỗ trợ đa dạng các hệ thống xây dựng như CMake, MSBuild, Makefiles, Meson, giúp dễ dàng tích hợp vào quy trình phát triển phần mềm hiện có.
Tính năng chính
- Quản lý gói phần mềm C/C++ phân tán, cho phép lưu trữ trên máy chủ riêng hoặc dịch vụ tích hợp.
- Hỗ trợ đa nền tảng, hoạt động trên Windows, Linux, macOS, Solaris, FreeBSD, Docker, WSL và các môi trường nhúng.
- Quản lý và tạo các file nhị phân (binaries) cho nhiều cấu hình và nền tảng, bao gồm cross-compiling.
- Tích hợp với nhiều hệ thống xây dựng phổ biến như CMake, MSBuild, Makefiles, Meson.
- Mở rộng linh hoạt nhờ các recipe viết bằng Python và các điểm mở rộng (extension points).
- Cộng đồng lớn, hoạt động tích cực trên GitHub và Slack, hỗ trợ cập nhật và duy trì kho gói ConanCenter và Bincrafters.
- Ổn định và được sử dụng trong môi trường sản xuất với cam kết không làm thay đổi các recipe và hành vi đã được công bố.
Ai nên dùng
Conan phù hợp với các lập trình viên và nhóm phát triển phần mềm sử dụng ngôn ngữ C và C++, đặc biệt là những ai cần quản lý gói phần mềm phức tạp, đa nền tảng hoặc làm việc trong môi trường tích hợp liên tục (CI/CD).
Cài đặt
- Bấm nút Tải về trên trang này để tải bộ cài gốc.
- Chạy file setup dạng Inno Installer để cài đặt phần mềm trên máy tính.
- Mở terminal hoặc command prompt để sử dụng các lệnh của Conan Package Manager trong quá trình phát triển.
Lưu ý
Conan là phần mềm mã nguồn mở, miễn phí theo giấy phép MIT. Người dùng có thể sử dụng tự do, tuy nhiên cần mua bản quyền nếu muốn tích hợp thêm các dịch vụ thương mại của JFrog hoặc sử dụng lâu dài trong môi trường doanh nghiệp.
Có gì mới trong 2.34.0
- Feature: Define /MP in CMakeToolchain for clang-cl with Visual Studio generators (ClangCL toolset), like msvc. (#20439)
- Feature: Reduce local cache sqlite3 DB calls (33% fewer for regular installs with cached packages). (#20434)
- Feature: Simplify the build step terminal output, removing duplicated package references. (#20426)
- Feature: Add CMAKE_PREFIX_PATH as fallback to CMakeConfigDeps for cases beyond the <pkg>_DIR variable. (#20420). Docs: 📃
- Feature: Pass original URLs to backup source remotes in the X-Conan-Origin-Urls header. (#20385). Docs: 📃
- Feature: Update conan new bazel_lib and conan new bazel_exe templates to Bazel 7. (#20367). Docs: 📃
- Feature: Add a command_alias.conf file to define command aliases and shortcuts without writing a custom command. (#20365)
- Feature: Support the new CPS dyld_requires (CMake>=4.4) for transitive shared libraries on Linux. (#20362)
- Feature: Add cmake_file_names dict property to CMakeConfigDeps to generate several CMake CONFIG files per package. (#20298). Docs: 📃
- Feature: Add an optional components argument to aggregated_components() to aggregate only the given components. (#20298). Docs: 📃
- Feature: Always generate .ps1 environment launchers, alongside the .bat/.sh ones, for the consumer, editables and test_package. (#19649). Docs: 📃
- Fix: Clarify in the PackagesList.items() docstring that it only returns revision-specific information. (#20432)
- Fix: Add docstrings to the PkgReference class of the Python API. (#20431). Docs: 📃
- Fix: Remove the legacy warning about ConanCenter being frozen for Conan 1 clients. (#20425)
- Fix: Remove the python-dateutil dependency for Python>=3.11. (#20419)
- Fix: Resolve LocalAPI.editable_add relative output_folder against the cwd argument. (#20416)
- Fix: Make conan cache clean --backup-sources only clean the backup sources of the selected recipes. (#20415)
- Fix: Allow several negated patterns, and mixing them with inclusions, in remote --allowed-packages. (#20412)
- Fix: Avoid a VirtualRunEnv generation crash with win_bash=True when cross-building from Linux to Windows. (#20407)
- Fix: Correct Python API docstrings for ListAPI, CacheAPI and other subapis that did not match their behavior. (#20405)
- Fix: Correct the ListAPI.latest_recipe_revision docstring, as it always raises if the reference is not found. (#20400)
- Fix: Report a proper error for non-integer --lru time values. (#20399)
- Fix: Avoid duplicating tools.build:sharedlinkflags from conf in BazelToolchain. (#20390)
- Fix: Join multiple SBOM license expressions with AND to comply with the CycloneDX standard. (#20382)
- Fix: Allow running conan remote logout for disabled remotes. (#20381)
- Fix: Replace stale CONAN_RUNTIME_LIB_DIRS entries in CMakeConfigDeps when installing a new package revision. (#20378)
- Fix: Raise an error for --requires=pkg/version@_, an undocumented and unsupported Conan 1 legacy syntax. (#20371)
- Fix: Remove Conan 1.X legacy alias (undocumented and unsupported) code. (#20370)
- Fix: Make the workspace experimental warning skippable with core:skip_warnings. (#20369)
- Fix: Add deprecation warnings for Bazel 6 support in the BazelDeps generator. (#20367). Docs: 📃
- Fix: Filter CMakeConfigDeps target data based on require traits, aligned with CMakeDeps. (#20277). Docs: 📃
- Fix: tools.env.virtualenv:powershell no longer replaces the .bat/.sh launchers. self.run() only uses .ps1 launchers when this conf is defined. (#19649). Docs: 📃
- Bugfix: Avoid accumulating variables when calling GnuToolchain._environment several times. (#20446)
- Bugfix: Avoid internal rmdir failures when removing Windows folders with read-only permissions. (#20440)
- Bugfix: Do not install host profile [tool_requires] in conan install with only --tool-requires arguments. (#20422). Docs: 📃
- Bugfix: Do not remove pre-existing recipe revisions in ReportAPI.diff. (#20417)
- Bugfix: Make AuditAPI.auth_provider receive a provider name instead of a provider object, as documented. (#20414)
- Bugfix: Do not write --dynamic_mode=off in BazelToolchain when the recipe has no shared option. (#20390)
- Bugfix: Avoid random dictionary changed size during iteration errors in uploads with core.upload:parallel. (#20389)
- Bugfix: Avoid HTTP header cross-pollution between consecutive calls to the backup sources server. (#20386)
- Bugfix: Use tools.microsoft.msbuild:max_cpu_count for the -m argument in CMakeToolchain Visual Studio presets. (#20360)