Crates.io | dylib_installer |
lib.rs | dylib_installer |
version | 0.2.0 |
source | src |
created_at | 2024-07-10 04:11:52.893838 |
updated_at | 2024-07-18 04:07:29.140295 |
description | A tool to install dylib files and header to system library path. |
homepage | https://github.com/hackerchai/dylib-installer |
repository | https://github.com/hackerchai/dylib-installer |
max_upload_size | |
id | 1297821 |
size | 78,257 |
Dylib Installer is a tool for handling dylib directories and generating .pc files. It helps to automate the process of installing dynamic libraries and their associated headers, and it ensures that the required pkg-config files are generated correctly.
.dylib
files in a specified directory..pc
files for use with pkg-config
.You will need the following tools installed on your system to use Dylib Installer:
If you are using macOS, you can install pkg-config using Homebrew:
brew install pkg-config
If you are using Linux, you can install pkg-config using your package manager:
sudo apt-get install pkg-config
sudo dnf install pkg-config
sudo yum install pkg-config
sudo pacman -S pkg-config
apk add pkgconfig
To install Dylib Installer, ensure you have Rust installed on your system. You can install the project from source or using cargo install
:
If you are using macOS, you can install the tool using Homebrew:
brew tap hackerchai/tap
brew install dylib-installer
git clone https://github.com/hackerchai/dylib-installer.git
cd dylib-installer
cargo build --release
The binary will be located in the target/release
directory.
cargo install dylib_installer
Or installing with latest head from repository:
cargo install --git https://github.com/hackerchai/dylib-installer
Dylib Installer requires several arguments to specify the paths and options. Here are the available options:
dylib_installer [OPTIONS] <dylib_path> [HEADERPATH]
<dylib_path>
Sets the directory where the dylib files are stored.(required)
[HEADERPATH]
Sets the path to store the header files
-n, --name <NAME>
: Sets the name of the library. If not provided, it will be inferred from the dylib file name.-i, --headerpath <HEADERPATH>
: Sets the path to store the header files.-v, --version <VERSION>
: Sets the version of the library. Default is "0.1.0".-c, --description <DESC>
: Sets the description of the library. Default is "No description provided".-p, --pcpath <PCPATH>
: Sets the path to store the .pc file. If not provided, it will use the default pkg-config path.-t, --libpath <LIBPATH>
: Sets the target path for the library files. If not provided, it will use the system library path.-r, --header_target_path <HEADER_TARGET_PATH>
: Sets the target path for the header files.-h, --help
: Print help.Recommend to use sudo to install the library to system path.
In most cases (without specifying headers):
sudo dylib_installer /path/to/dylibs
If you want to specify full options:
dylib_installer /path/to/dylibs /path/to/headers \
-n mylibrary \
-v 0.1.0 \
-c "My Library Description" \
-p /path/to/pkgconfig \
-t /usr/local/lib \
-r /usr/local/include/mylibrary
If you do not provide a library name, the tool will attempt to infer it from the .dylib
file names found in the specified directory. For example, if it finds a file named libfuse.dylib
or libfuse.2.1.dylib
, it will use fuse
as the library name.
We welcome contributions! Please open an issue or submit a pull request on GitHub.
This project is licensed under the GPL License. See the LICENSE file for details.