Skip to content

Commit

Permalink
[docs] Add build instructions
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
jjonescz committed Jun 30, 2019
1 parent f3366bb commit 9febdb1
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -12,6 +12,15 @@ We use [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
[Git LFS](https://git-lfs.github.com/), so make sure you have that installed if
you want to get all files.

## Building and installation

If you want to use the emulator, you can either [build it from
sources](docs/build.md) (that's slow), [use partially prebuilt
artifacts](docs/artifacts.md) (that's fast and recommended if you want to make
changes; however, you still need to have Docker and Visual Studio installed) or
just [use prebuilt binaries](https://github.com/ipasimulator/ipasim/releases)
(recommended if you don't want to make changes).

## Directory structure

- [`deps`](deps) contains third-party dependencies (mostly as Git submodules because
Expand Down
3 changes: 3 additions & 0 deletions docs/README.md
Expand Up @@ -24,6 +24,9 @@

## Building

In this section, we describe some advanced building scenarios. Basic building
instructions [are available elsewhere](build.md).

Install and run Docker for Windows (tested with version `18.06.1-ce-win73`),
enable Windows containers,
[increase maximum container disk size](https://docs.microsoft.com/en-us/visualstudio/install/build-tools-container?view=vs-2017#step-4-expand-maximum-container-disk-size)
Expand Down
21 changes: 21 additions & 0 deletions docs/artifacts.md
@@ -0,0 +1,21 @@
# Prebuilt artifacts

Following [our build instructions](build.md) step-by-step can be a very
time-consuming task. To speed up the process, prebuilt artifacts are available.

- Instead of running `docker-compose build`, you can pull container
[`ipasim/build`](https://hub.docker.com/r/ipasim/build):

```bash
docker pull ipasim/build
```

- Instead of running `./scripts/build.ps1`, you can pull container
[`ipasim/artifacts`](https://hub.docker.com/r/ipasim/artifacts) and then start
the container like this:

```bash
docker pull ipasim/artifacts
docker tag ipasim/artifacts ipasim/build
docker-compose run --name ipasim ipasim powershell
```
34 changes: 34 additions & 0 deletions docs/build.md
@@ -0,0 +1,34 @@
# Build instructions

## Prerequisites

1. Install [Docker Desktop for
Windows](https://hub.docker.com/editions/community/docker-ce-desktop-windows).
2. [Switch to Windows
containers](https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers).
3. Install [Visual Studio](https://visualstudio.microsoft.com/) (around version
2019).

## Build process

Inside the repository root, run:

```bash
docker-compose build
docker-compose run --name ipasim ipasim powershell
```

Once inside the built container, run:

```bash
./scripts/build.ps1
./scripts/extract.ps1 Release
```

Finally, open `src/IpaSimulator/IpaSimApp.sln` in Visual Studio and run it (in
configuration `Release`). Alternatively, you can use `Debug` configuration, but
then you have to execute command `./scripts/extract.ps1 Debug` instead of the
one mentioned above.

If you don't want to build everything from scratch, you can [use prebuilt
artifacts](artifacts.md).

0 comments on commit 9febdb1

Please sign in to comment.