Skip to content

Commit 570c0c2

Browse files
committed
Updated README
1 parent 499fb0c commit 570c0c2

File tree

1 file changed

+140
-25
lines changed

1 file changed

+140
-25
lines changed

README.md

Lines changed: 140 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@
44

55
![](https://github.com/libimobiledevice/libusbmuxd/actions/workflows/build.yml/badge.svg)
66

7+
## Table of Contents
8+
- [Features](#features)
9+
- [Building](#building)
10+
- [Prerequisites](#prerequisites)
11+
- [Linux (Debian/Ubuntu based)](#linux-debianubuntu-based)
12+
- [macOS](#macos)
13+
- [Windows](#windows)
14+
- [Configuring the source tree](#configuring-the-source-tree)
15+
- [Building and installation](#building-and-installation)
16+
- [Usage](#usage)
17+
- [Contributing](#contributing)
18+
- [Links](#links)
19+
- [License](#license)
20+
- [Credits](#credits)
21+
722
## Features
823

924
This project is a client library to multiplex connections from and to iOS
@@ -32,36 +47,138 @@ Some key features are:
3247
Furthermore the Linux build optionally provides support using inotify if
3348
available.
3449

35-
## Installation / Getting started
50+
## Building
51+
52+
### Prerequisites
53+
54+
You need to have a working compiler (gcc/clang) and development environent
55+
available. This project uses autotools for the build process, allowing to
56+
have common build steps across different platforms.
57+
Only the prerequisites differ and they are described in this section.
58+
59+
libusbmuxd requires [libplist](https://github.com/libimobiledevice/libplist) and [libimobiledevice-glue](https://github.com/libimobiledevice/libimobiledevice-glue). On Linux, it also requires [usbmuxd](https://github.com/libimobiledevice/usbmuxd) installed on the system, while macOS has its own copy and on Windows AppleMobileDeviceSupport package provides it.
60+
Check [libplist's Building](https://github.com/libimobiledevice/libplist?tab=readme-ov-file#building) and [libimobiledevice-glue's Building](https://github.com/libimobiledevice/libimobiledevice-glue?tab=readme-ov-file#building)
61+
section of the respective README on how to build them. Note that some platforms might have them as a package.
62+
63+
#### Linux (Debian/Ubuntu based)
64+
65+
* Install all required dependencies and build tools:
66+
```shell
67+
sudo apt-get install \
68+
build-essential \
69+
pkg-config \
70+
checkinstall \
71+
git \
72+
autoconf \
73+
automake \
74+
libtool-bin \
75+
libplist-dev \
76+
libimobiledevice-glue-dev \
77+
usbmuxd
78+
```
79+
In case libplist-dev, libimobiledevice-glue-dev, or usbmuxd are not available, you can manually build and install them. See note above.
80+
81+
#### macOS
82+
83+
* Make sure the Xcode command line tools are installed. Then, use either [MacPorts](https://www.macports.org/)
84+
or [Homebrew](https://brew.sh/) to install `automake`, `autoconf`, `libtool`, etc.
85+
86+
Using MacPorts:
87+
```shell
88+
sudo port install libtool autoconf automake pkgconfig
89+
```
90+
91+
Using Homebrew:
92+
```shell
93+
brew install libtool autoconf automake pkg-config
94+
```
95+
96+
#### Windows
97+
98+
* Using [MSYS2](https://www.msys2.org/) is the official way of compiling this project on Windows. Download the MSYS2 installer
99+
and follow the installation steps.
100+
101+
It is recommended to use the _MSYS2 MinGW 64-bit_ shell. Run it and make sure the required dependencies are installed:
102+
103+
```shell
104+
pacman -S base-devel \
105+
git \
106+
mingw-w64-x86_64-gcc \
107+
make \
108+
libtool \
109+
autoconf \
110+
automake-wrapper \
111+
pkg-config
112+
```
113+
NOTE: You can use a different shell and different compiler according to your needs. Adapt the above command accordingly.
114+
115+
### Configuring the source tree
116+
117+
You can build the source code from a git checkout, or from a `.tar.bz2` release tarball from [Releases](https://github.com/libimobiledevice/libusbmuxd/releases).
118+
Before we can build it, the source tree has to be configured for building. The steps depend on where you got the source from.
36119

37-
### Debian / Ubuntu Linux
120+
Since libusbmuxd depends on other packages, you should set the pkg-config environment variable `PKG_CONFIG_PATH`
121+
accordingly. Make sure to use a path with the same prefix as the dependencies. If they are installed in `/usr/local` you would do
38122

39-
First install all required dependencies and build tools:
40123
```shell
41-
sudo apt-get install \
42-
build-essential \
43-
pkg-config \
44-
checkinstall \
45-
git \
46-
autoconf \
47-
automake \
48-
libtool-bin \
49-
libplist-dev \
50-
libimobiledevice-glue-dev \
51-
usbmuxd
124+
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
52125
```
53126

54-
Then clone the actual project repository:
127+
* **From git**
128+
129+
If you haven't done already, clone the actual project repository and change into the directory.
130+
```shell
131+
git clone https://github.com/libimobiledevice/libusbmuxd
132+
cd libusbmuxd
133+
```
134+
135+
Configure the source tree for building:
136+
```shell
137+
./autogen.sh
138+
```
139+
140+
* **From release tarball (.tar.bz2)**
141+
142+
When using an official [release tarball](https://github.com/libimobiledevice/libusbmuxd/releases) (`libusbmuxd-x.y.z.tar.bz2`)
143+
the procedure is slightly different.
144+
145+
Extract the tarball:
146+
```shell
147+
tar xjf libusbmuxd-x.y.z.tar.bz2
148+
cd libusbmuxd-x.y.z
149+
```
150+
151+
Configure the source tree for building:
152+
```shell
153+
./configure
154+
```
155+
156+
Both `./configure` and `./autogen.sh` (which generates and calls `configure`) accept a few options, for example `--prefix` to allow
157+
building for a different target folder. You can simply pass them like this:
158+
55159
```shell
56-
git clone https://github.com/libimobiledevice/libusbmuxd.git
57-
cd libusbmuxd
160+
./autogen.sh --prefix=/usr/local
58161
```
59-
60-
Now you can build and install it:
162+
or
61163
```shell
62-
./autogen.sh
63-
make
64-
sudo make install
164+
./configure --prefix=/usr/local
165+
```
166+
167+
Once the command is successful, the last few lines of output will look like this:
168+
```
169+
[...]
170+
config.status: creating config.h
171+
config.status: executing depfiles commands
172+
config.status: executing libtool commands
173+
174+
Configuration for libusbmuxd 2.1.0:
175+
-------------------------------------------
176+
177+
Install prefix: .........: /usr/local
178+
inotify support (Linux) .: no
179+
180+
Now type 'make' to build libusbmuxd 2.1.0,
181+
and then 'make install' for installation.
65182
```
66183

67184
## Usage
@@ -138,8 +255,6 @@ Please make sure your contribution adheres to:
138255
* Try to split larger changes into individual commits of a common domain
139256
* Use your real name and a valid email address for your commits
140257

141-
We are still working on the guidelines so bear with us!
142-
143258
## Links
144259

145260
* Homepage: https://libimobiledevice.org/
@@ -164,4 +279,4 @@ iPadOS, tvOS, watchOS, and macOS are trademarks of Apple Inc.
164279
This project is an independent software library and has not been authorized,
165280
sponsored, or otherwise approved by Apple Inc.
166281

167-
README Updated on: 2022-04-04
282+
README Updated on: 2024-03-27

0 commit comments

Comments
 (0)