Skip to content

Commit 59ee5d7

Browse files
docs(tauri): expand Android setup guide for Arch Linux and Fish shell
1 parent d2e4a28 commit 59ee5d7

1 file changed

Lines changed: 49 additions & 10 deletions

File tree

src/content/docs/programming_stuff/WebDev/Astro_on_Android_with_Tauri.mdx

Lines changed: 49 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import { Steps } from '@astrojs/starlight/components';
66
import { Tabs, TabItem } from '@astrojs/starlight/components';
77

88
This guide will walk you through how to setup a Astrojs Project primarily for Android Support using Tauri.
9-
This Guide assumes that you already have an Astro Js Project Setep and you are familliar with a Astro js Project Structure
9+
10+
11+
Guide is tailored to work on these Operating Systems and shells
12+
| | | | | |
13+
| - | - | - | - | - |
14+
| **OS** | Debian | Ubuntu | Antix | Arch |
15+
| **Shell** | Bash | ZSH | Fish |
1016

1117
## Prerequisites
1218
- You need to have an App Icon Ready in either `.svg`, `.png` or `.jpg` format in you `[project]/public/` folder
@@ -18,7 +24,7 @@ This Guide assumes that you already have an Astro Js Project Setep and you are f
1824
1. ### Install Rust and System Depedencies
1925

2026
<Tabs>
21-
<TabItem label="Linux / Debian" >
27+
<TabItem label="Linux / Debian, Ubuntu" >
2228

2329
```shell
2430
sudo apt update
@@ -35,10 +41,28 @@ This Guide assumes that you already have an Astro Js Project Setep and you are f
3541
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
3642
```
3743
</TabItem>
44+
<TabItem label="Linux / Arch" >
45+
46+
```shell
47+
sudo pacman -Syu
48+
sudo pacman -S webkit2gtk \
49+
base-devel \
50+
curl \
51+
wget \
52+
file \
53+
libxdo \
54+
openssl \
55+
libayatana-appindicator \
56+
librsvg
57+
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh &&
58+
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
59+
```
60+
</TabItem>
3861
</Tabs>
3962

4063
2. ### Setup Android Studio
4164
Download and Install [Android Studio](https://developer.android.com/studio)
65+
4266
Extract it into the `/opt/` directory in linux
4367
```shell
4468
sudo tar -xvf ~/Downloads/android-studio-2024.3.1.14-linux.tar.gz -C /opt/
@@ -47,19 +71,32 @@ This Guide assumes that you already have an Astro Js Project Setep and you are f
4771
<Tabs synckey="shell" >
4872
<TabItem label="Bash" >
4973
```shell
50-
echo 'export PATH="$PATH:/opt/android-studio/bin"' >> ~/.bashrc &&
51-
echo 'export JAVA_HOME=/opt/android-studio/jbr' >> ~/.bashrc &&
52-
echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> ~/.bashrc &&
53-
echo 'export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"' >> ~/.bashrc
74+
cat << 'EOF' >> ~/.bashrc
75+
export PATH="$PATH:/opt/android-studio/bin"
76+
export JAVA_HOME=/opt/android-studio/jbr
77+
export ANDROID_HOME="$HOME/Android/Sdk"
78+
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
79+
EOF
5480
```
5581
</TabItem>
5682
<TabItem label="ZSH" >
5783
5884
```shell
59-
echo 'export PATH="$PATH:/opt/android-studio/bin"' >> ~/.zshrc &&
60-
echo 'export JAVA_HOME=/opt/android-studio/jbr' >> ~/.zshrc &&
61-
echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> ~/.zshrc &&
62-
echo 'export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"' >> ~/.zshrc
85+
cat << 'EOF' >> ~/.zshrc
86+
export PATH="$PATH:/opt/android-studio/bin"
87+
export JAVA_HOME=/opt/android-studio/jbr
88+
export ANDROID_HOME="$HOME/Android/Sdk"
89+
export NDK_HOME="$ANDROID_HOME/ndk/$(ls -1 $ANDROID_HOME/ndk)"
90+
EOF
91+
```
92+
</TabItem>
93+
<TabItem label="Fish" >
94+
95+
```shell
96+
fish_add_path /opt/android-studio/bin
97+
set -Ux ANDROID_HOME $HOME/Android/Sdk
98+
set -Ux NDK_HOME $ANDROID_HOME/ndk
99+
set -Ux JAVA_HOME /opt/android-studio/jbr
63100
```
64101
</TabItem>
65102
</Tabs>
@@ -102,6 +139,8 @@ This Guide assumes that you already have an Astro Js Project Setep and you are f
102139
103140
## Build Your AstroJs Android App!
104141
142+
I recommend initializing Tauri mannualy instead of using a Preconfigured Template because of several automation tricks built into the Tauri CLI that make your required configs easy to configure (eg. seeting up name, icons, etc). so this guide will assume that you have already initialized your astrojs project
143+
105144
<Steps>
106145
107146
1. ### Initialize Tauri

0 commit comments

Comments
 (0)