Updated BUILD.md

This commit is contained in:
Tyler
2025-11-13 12:18:34 -10:00
committed by GitHub
parent 9968233dee
commit 1174b12ed9
+146 -174
View File
@@ -1,175 +1,147 @@
# Build Instructions # Build Instructions
## Prerequisites ## Prerequisites
- [Node.js](https://nodejs.org/) (v18+) - [Node.js](https://nodejs.org/) (v18+)
- [Git](https://git-scm.com/) - [Git](https://git-scm.com/)
- Flet v0.28.0 - Flet v0.28.0
- Flutter SDK v3.29.0 (Use FVM for managing Flutter versions) - Flutter SDK v3.29.0 (Flet will install this automatically, but you can also [install it manually](https://docs.flutter.dev/get-started/install))
- [Visual Studio 2016 (Windows Users)](https://aka.ms/vs/16/release/vs_community.exe) - [Visual Studio 2016 (Windows Users)](https://aka.ms/vs/16/release/vs_community.exe)
- Android Studio (for Android builds) - Android Studio (for Android builds)
- Xcode (for iOS builds) - Xcode (for iOS builds)
- Any required package managers (e.g., npm, yarn) - Any required package managers (e.g., npm, yarn)
## Clone the Repository > [!IMPORTANT]
> Flet v0.28.9 only supports Flutter SDK v3.29.0. Using other versions may lead to build failures.
```bash > Flutter SDK v3.29.0 only supports Visual Studio 2016 on Windows. Ensure you have the correct version installed.
git clone https://github.com/TySP-Dev/github_pulse.git
cd github_pulse/src ## Clone the Repository
```
```bash
## Python Virtual Environment git clone https://github.com/TySP-Dev/github_pulse.git
cd github_pulse/src
```bash ```
# Create virtual environment
python -m venv venv ## Python Virtual Environment
# Activate virtual environment ```bash
# On Windows: # Create virtual environment
venv\Scripts\activate python -m venv venv
# On macOS/Linux: # Activate virtual environment
source venv/bin/activate # On Windows:
``` venv\Scripts\activate
## Install Dependencies # On macOS/Linux:
source venv/bin/activate
```bash ```
pip install -r requirements.txt
``` ## Install Dependencies
```bash ```bash
# Linux Dependencies (Ubuntu/Debian) pip install -r requirements.txt
sudo apt update ```
sudo apt upgrade
sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev ```bash
``` # Linux Dependencies (Ubuntu/Debian)
sudo apt update
## Setup Flutter sudo apt upgrade
sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
```bash ```
# Install FVM
dart pub global activate fvm ## Setup Flutte
```
```bash
```bash # Set ICU data file path (Windows example)
# Add to path $env:FLUTTER_ICU_DATA_FILE="C:\path\to\flutter\bin\cache\artifacts\engine\windows-x64\icudtl.dat"
export PATH="$PATH":"$HOME/.pub-cache/bin" ```
```
# Example path $env:FLUTTER_ICU_DATA_FILE="C:\Users\<username>\flutter\bin\cache\artifacts\engine\windows-x64\icudtl.dat"
```bash
# Set ICU data file path (Windows example) ```bash
$env:FLUTTER_ICU_DATA_FILE="C:\path\to\flutter\bin\cache\artifacts\engine\windows-x64\icudtl.dat" # Verify Flutter installation
``` flutter --version
```
# Example path $env:FLUTTER_ICU_DATA_FILE="C:\Users\<username>\flutter\bin\cache\artifacts\engine\windows-x64\icudtl.dat"
```bash
```bash # Run Flutter doctor
# Install Flutter version 3.29.0 flutter doctor
fvm install 3.29.0 ```
```
```bash
```bash # Flet doctor
fvm use 3.29.0 --force python -m flet.cli doctor
``` ```
```bash ```bash
# Get cached Flutter versions # Accept Android licenses (if building for Android)
fvm list flutter doctor --android-licenses
``` ```
```bash ```bash
# Create a temporary alias for Flutter (Windows example) # Precache Flutter artifacts (All platforms)
function flutter { fvm flutter $args } flutter precache --all
``` ```
```bash ```bash
# Create a temporary alias for Flutter (Linux / MacOS example) # precache Flutter artifacts (Windows example)
alias flutter="fvm flutter" flutter precache --windows
``` ```
```bash ```bash
# Verify Flutter installation # precache Flutter artifacts (Linux example)
flutter --version flutter precache --linux
# Should show Flutter 3.29.0 ```
```
```bash
```bash # precache Flutter artifacts (MacOS example)
# Run Flutter doctor flutter precache --macos
flutter doctor ```
```
```bash
```bash # precache Flutter artifacts (iOS example)
# Flet doctor flutter precache --ios
python -m flet.cli doctor ```
```
```bash
```bash # precache Flutter artifacts (Android example)
# Accept Android licenses (if building for Android) flutter precache --android
flutter doctor --android-licenses ```
```
>[!NOTE]
```bash > Only precache the platforms you intend to build for.
# Precache Flutter artifacts (All platforms)
flutter precache --all ## Build the Application
```
> [!NOTE]
```bash > Ensure you are in the `src` directory of the project and the Python virtual environment is activated. `venv\Scripts\activate` (Windows) or `source venv/bin/activate` (macOS/Linux).
# precache Flutter artifacts (Windows example)
flutter precache --windows ```bash
``` # Windows
flet build windows
```bash ```
# precache Flutter artifacts (Linux example)
flutter precache --linux ```bash
``` # Linux
flet build linux
```bash ```
# precache Flutter artifacts (MacOS example)
flutter precache --macos ```bash
``` # Android
flet build apk
```bash ```
# precache Flutter artifacts (iOS example)
flutter precache --ios ```bash
``` # macOS
flet build macos
```bash ```
# precache Flutter artifacts (Android example)
flutter precache --android ```bash
``` # iOS
flet build ios
>[!NOTE] ```
> Only precache the platforms you intend to build for. ## Additional Notes
## Build the Application - See `README.md` for more details.
- For troubleshooting, check the logs or open an issue.
```bash
# Windows
python -m flet.cli build windows
```
```bash
# Linux
python -m flet.cli build linux
```
```bash
# Android
python -m flet.cli build apk
```
```bash
# macOS
python -m flet.cli build macos
```
```bash
# iOS
python -m flet.cli build ios
```
## Additional Notes
- See `README.md` for more details.
- For troubleshooting, check the logs or open an issue.
- Customize build scripts in `package.json` as needed. - Customize build scripts in `package.json` as needed.