Skip to content

Commit

Permalink
readme: updated for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
osy authored and osy committed Feb 19, 2020
1 parent d4ed87c commit 64b2bb3
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# UTM
[![](https://github.com/utmapp/UTM/workflows/Build/badge.svg)][1]

> It is possible to invent a single machine which can be used to compute any computable sequence.
Expand All @@ -17,21 +18,37 @@ UTM is a full featured virtual machine host for iOS. In short, it allows you to

## Building

Make sure you have cloned with submodules `git submodule update --init --recursive`.

### Easy

The recommended way to obtain the dependencies is to use the built artifacts from [Github Actions][1]. Look for the latest build and download the Sysroot artifact from either the arm64 build (for iOS) or x86_64 build (for iOS Simulator). Then unzip the artifact to the root directory of UTM. You can then open `UTM.xcodeproj`, select your signing certificate, and then run UTM from Xcode.

### Advanced

If you want to build the dependencies yourself, it is highly recommended that you start with a fresh macOS VM. This is because some of the dependencies attempt to use `/usr/local/lib` even though the architecture does not match. Certain installed libraries like `libusb` and `gawk` will break the build.

1. Install Xcode command line and the following build prerequisites
`brew install bison pkg-config gettext glib libgpg-error`
`brew install bison pkg-config gettext glib libgpg-error nasm`
Make sure to add `bison` to your `$PATH` environment!
2. `git submodule update --init --recursive` if you haven't already
3. Run `./scripts/build_dependencies.sh` and wait for everything to build
3. Run `./scripts/build_dependencies.sh` to start the build. If building for the simulator, run `./scripts/build_dependencies.sh -a x86_64` instead.
4. Open `UTM.xcodeproj` and select your signing certificate
5. Build and deploy from Xcode

### Building for Simulator
### Running on iOS 13.3.1+

Run `./scripts/build_dependencies.sh -a x86_64` to build the libraries for iOS Simulator.
Since iOS 13.3.1, it [appears Apple has stopped allowing free developer profiles to sign dylibs][2]. As a workaround, you can either spend $99/year on an Apple developer program or < $10/year on some third party iOS signing certificate (you can search for it online, do not ask for help with this).

### Running on iOS 13.3.1+
## Signing Existing Build

If you want to sign an `xcarchive` such as from a [Github Actions][1] built artifact, you can use the following command:

Since iOS 13.3.1, it [appears Apple has stopped allowing free developer profiles to sign dylibs](https://github.com/flutter/flutter/issues/49504#issuecomment-581090664). As a workaround, you can either spend $99/year on an Apple developer program or < $10/year on some third party iOS signing certificate (you can search for it online, do not ask for help with this).
```
./scripts/resign.sh UTM.xcarchive PROFILE_NAME TEAM_ID outputPath
```

Where `PROFILE_NAME` is the name of the provision profile and `TEAM_ID` is the identifier next to the team name in the provision profile. Make sure the signing key is imported into your keychain and the provision profile is installed on your iOS device.

## Why isn't this in the AppStore?

Expand All @@ -40,3 +57,6 @@ Apple does not permit any apps that has interpreted or generated code therefore
## License

UTM is distributed under the permissive Apache 2.0 license. However, it uses several (L)GPL components. Most are dynamically linked but the gstreamer plugins are statically linked and parts of the code are taken from qemu. Please be aware of this if you intend on redistributing this application.

[1]: https://github.com/utmapp/UTM/actions?query=workflow%3ABuild
[2]: https://github.com/flutter/flutter/issues/49504#issuecomment-581090664

0 comments on commit 64b2bb3

Please sign in to comment.