|
|
@@ -0,0 +1,70 @@
|
|
|
+# KirinCode Mobile — Build Guide
|
|
|
+
|
|
|
+## Prerequisites
|
|
|
+
|
|
|
+Your Mac has **Xcode 26.5** already. The following need to be installed (one-time setup):
|
|
|
+
|
|
|
+```bash
|
|
|
+# 1. Java 17 (required for Android builds)
|
|
|
+brew install openjdk@17
|
|
|
+echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc
|
|
|
+source ~/.zshrc
|
|
|
+
|
|
|
+# 2. CocoaPods (required for iOS builds)
|
|
|
+brew install cocoapods
|
|
|
+
|
|
|
+# 3. Node.js (required for React Native)
|
|
|
+brew install node
|
|
|
+
|
|
|
+# 4. Android Studio (required for Android builds)
|
|
|
+# Download from: https://developer.android.com/studio
|
|
|
+# After install, add to ~/.zshrc:
|
|
|
+# export ANDROID_HOME=$HOME/Library/Android/sdk
|
|
|
+# export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
|
|
|
+
|
|
|
+# 5. DevEco Studio (required for HarmonyOS builds)
|
|
|
+# Download from: https://developer.huawei.com/consumer/en/devstudio/
|
|
|
+```
|
|
|
+
|
|
|
+## Quick Build
|
|
|
+
|
|
|
+```bash
|
|
|
+cd kirincode
|
|
|
+bash build-mobile.sh all
|
|
|
+```
|
|
|
+
|
|
|
+## Platform-Specific
|
|
|
+
|
|
|
+### iOS (.ipa)
|
|
|
+```bash
|
|
|
+cd packages/mobile
|
|
|
+npm install
|
|
|
+npx expo prebuild --platform ios
|
|
|
+cd ios && pod install
|
|
|
+cd ..
|
|
|
+npx expo run:ios --configuration Release
|
|
|
+# Output: ios/build/
|
|
|
+```
|
|
|
+
|
|
|
+### Android (.apk)
|
|
|
+```bash
|
|
|
+cd packages/mobile
|
|
|
+npm install
|
|
|
+npx expo prebuild --platform android
|
|
|
+cd android && ./gradlew assembleRelease
|
|
|
+# Output: app/build/outputs/apk/release/
|
|
|
+```
|
|
|
+
|
|
|
+### HarmonyOS (.hap)
|
|
|
+1. Open DevEco Studio
|
|
|
+2. File → Open → `packages/kirincode-ohos`
|
|
|
+3. Build → Build Hap(s)
|
|
|
+4. Output: `entry/build/default/outputs/default/entry-default-signed.hap`
|
|
|
+
|
|
|
+## Installer Locations (after build)
|
|
|
+
|
|
|
+```
|
|
|
+iOS: packages/mobile/ios/build/KirinCode.ipa
|
|
|
+Android: packages/mobile/android/app/build/outputs/apk/release/app-release.apk
|
|
|
+HarmonyOS: packages/kirincode-ohos/entry/build/default/outputs/default/entry-default-signed.hap
|
|
|
+```
|