Skip to content

Commit

Permalink
docs(INSTALL.md): add instructions to build for native architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Jan 31, 2021
1 parent d2c3410 commit 34d24e2
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

### Prerequisites

Install **Xcode >= 12.2** from App Store.
Install **Xcode 12.2** or above from App Store, to build Squirrel as a Universal
app. The minimum required version is *Xcode 10* to build for `x86_64` only.

Install **cmake**.

Expand Down Expand Up @@ -64,7 +65,7 @@ export BOOST_ROOT="$(pwd)/librime/thirdparty/src/boost_1_75_0"
```

Let's set `BUILD_UNIVERSAL` to tell `make` that we are building Boost as
universal macOS binaries.
universal macOS binaries. Skip this if building only for the native architecture.

After Boost source code is downloaded and a few compiled libraries are built,
be sure to set shell variable `BOOST_ROOT` to its top level directory as above.
Expand Down Expand Up @@ -92,7 +93,7 @@ port install boost -no_static
### Build dependencies

Again, set `BUILD_UNIVERSAL` to tell `make` that we are building librime as
universal macOS binaries.
universal macOS binaries. Skip this if building only for the native architecture.

This comment has been minimized.

Copy link
@LEOYoon-Tsaw

LEOYoon-Tsaw Jan 31, 2021

Member

Does skipping work for arm64?

This comment has been minimized.

Copy link
@lotem

lotem Feb 1, 2021

Author Member

Yes. On Apple Silicon Mac it generates arm64-only build.


Build librime, dependent third-party libraries and data files:

Expand All @@ -110,12 +111,26 @@ With all dependencies ready, build `Squirrel.app`:
make
```

To build only for the native architecture, pass variable `ARCHS` to `make`:

``` sh
# for Mac computers with Apple Silicon
make ARCHS='arm64'

# for Intel-based Mac
make ARCHS='x86_64'
```

## Install it on your Mac

Once built, you can install and try it live on your Mac computer:

``` sh
sudo make install
# Squirrel as a Universal app
make install

# for Intel-based Mac only
make ARCHS='x86_64' install
```

That's it, a verbal journal. Thanks for riming with Squirrel.

0 comments on commit 34d24e2

Please sign in to comment.