Skip to content

Commit

Permalink
update readme with build instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic Laing <[email protected]>
  • Loading branch information
FreddyFunk committed Nov 14, 2022
1 parent 98d3f79 commit 47d87f4
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,37 @@ The Asahi Linux installer is distributed under the MIT license. See LICENSE for

This installer vendors [python-asn1](https://github.com/andrivet/python-asn1), which is distributed under the same license.

## Building

`./build.sh`

## Building on macOS
### Build Requirements
Install and setup `Xcode Command Line Tools` from Apple
```bash
xcode-select --install
```
Install and setup [`Homebrew`](https://brew.sh/), "The Missing Package Manager for macOS"
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
Install [Rust and Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):
```bash
# follow the installer instructions
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# afterwards initialize
source "$HOME/.cargo/env"
```

### Build Asahi Installer locally
```bash
git clone --recursive https://github.com/AsahiLinux/asahi-installer.git
cd ./asahi-installer
./build.sh
```

### FAQ Errors
```bash
# Error: Rust dependency not found
error: failed to load source for dependency `bitflags`
# Solution: download rust cargo dependencies for m1n1
cd m1n1
git submodule init
git submodule update
```
9 changes: 9 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ rm -rf "$PACKAGE"
mkdir -p "$DL" "$PACKAGE" "$RELEASES" "$RELEASES_DEV"
mkdir -p "$PACKAGE/bin"

echo "Install brew dependencies..."
for BREW_DEPENDENCY in "wget" "make" "llvm"; do
echo "Brew install $BREW_DEPENDENCY..."
if brew ls --versions "$BREW_DEPENDENCY"
then brew upgrade "$BREW_DEPENDENCY"
else brew install "$BREW_DEPENDENCY"
fi
done

echo "Determining version..."

VER=$(git describe --always --dirty --tags)
Expand Down
5 changes: 3 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,8 +807,9 @@ def main(self):
self.input()
print()
p_message("By default, this installer will hide certain advanced options that")
p_message("are only useful for developers. You can enable expert mode to show them.")
p_message("Do not enable this unless you know what you are doing.")
p_message("are only useful for Asahi Linux developers. You can enable expert mode")
p_message("to show them. Do not enable this unless you know what you are doing.")
p_message("Please do not file bugs if things go wrong in expert mode.")
self.expert = self.yesno("Enable expert mode?")
print()

Expand Down

0 comments on commit 47d87f4

Please sign in to comment.