Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build Vllama

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.4" # Matching pubspec.yaml SDK constraints
channel: "stable"

- name: Get Dependencies
run: flutter pub get

- name: Build Windows
run: flutter build windows

- name: Build MSIX
run: flutter pub run msix:create

- name: Build Android APK
run: flutter build apk --release

- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: vllama-windows
path: build/windows/x64/runner/Release/

- name: Upload MSIX Artifact
uses: actions/upload-artifact@v4
with:
name: vllama-msix
path: build/windows/x64/runner/Release/*.msix

- name: Upload Android APK
uses: actions/upload-artifact@v4
with:
name: vllama-android
path: build/app/outputs/flutter-apk/app-release.apk
89 changes: 89 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# Vllama Deployment Guide

This guide explains how to build and publish the Vllama app for different platforms.

## Prerequisites

- **Flutter SDK**: [Install Flutter](https://docs.flutter.dev/get-started/install)
- **Java Development Kit (JDK)**: Required for Android builds (JDK 17 recommended).
- **Desktop Development with C++**: Required for Windows builds (install via Visual Studio Installer).

## 🚀 Building for Windows

To create a standalone executable for Windows:

```powershell
flutter build windows
```

The output will be in `build/windows/x64/runner/Release/`.
You can distribute the entire folder or create an installer using tools like **Inno Setup** or **MSIX**.

### Creating an MSIX Installer (Recommended)

1. **Install dependencies**:
```powershell
flutter pub get
```
2. **Build the MSIX**:
```powershell
flutter pub run msix:create
```

The `.msix` file will be generated in `build/windows/x64/runner/Release/vllama_da.msix`.

> [!NOTE]
> I have pre-configured the MSIX settings in `pubspec.yaml` under `msix_config`. For production, you may want to set up a trusted certificate for signing.

---

## 📱 Building for Android

You can build either an APK (for direct installation) or an App Bundle (for Google Play).

### Build APK
```powershell
flutter build apk --release
```
Output: `build/app/outputs/flutter-apk/app-release.apk`

### Build App Bundle (for Google Play)
```powershell
flutter build appbundle
```
Output: `build/app/outputs/bundle/release/app-release.aab`

> [!TIP]
> Before publishing to Google Play, ensure you have set up **App Signing**. Follow the [official Flutter guide](https://docs.flutter.dev/deployment/android#signing-the-app).

---

## 🍏 Building for iOS

Building for iOS requires a **Mac** with **Xcode**.

1. Run `flutter build ios --release` on a Mac.
2. Open `ios/Runner.xcworkspace` in Xcode.
3. Configure signing and capabilities in the "Signing & Capabilities" tab.
4. Select "Any iOS Device" as the target and go to **Product > Archive**.
5. Follow the Xcode prompts to upload to App Store Connect.

---

## 🌐 Building for Web

```powershell
flutter build web
```
The output in `build/web/` can be hosted on GitHub Pages, Vercel, or Netlify.

---

## 🤖 Automated Builds (CI/CD)

We have included a GitHub Actions workflow in `.github/workflows/build.yml`.
When you push code to GitHub:
1. It automatically builds the Windows and Android versions.
2. It uploads them as **Artifacts** in the GitHub "Actions" tab.

To use this, simply push your repository to GitHub!
2 changes: 1 addition & 1 deletion lib/services/vllama_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'package:http/http.dart' as http;
import 'app_log.dart';

class VllamaApi {
static const String baseUrl = 'http://localhost:5000';
static const String baseUrl = 'https://manvithgopu1394-vllama-backend.hf.space';

static Future<Map<String, dynamic>> generate3d({
required File imageFile,
Expand Down
56 changes: 56 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
url: "https://pub.dev"
source: hosted
version: "0.4.2"
clock:
dependency: transitive
description:
Expand All @@ -57,6 +65,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.19.1"
console:
dependency: transitive
description:
name: console
sha256: e04e7824384c5b39389acdd6dc7d33f3efe6b232f6f16d7626f194f6a01ad69a
url: "https://pub.dev"
source: hosted
version: "4.1.0"
cross_file:
dependency: transitive
description:
Expand Down Expand Up @@ -216,6 +232,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
get_it:
dependency: transitive
description:
name: get_it
sha256: ae78de7c3f2304b8d81f2bb6e320833e5e81de942188542328f074978cc0efa9
url: "https://pub.dev"
source: hosted
version: "8.3.0"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -304,6 +328,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.17.0"
msix:
dependency: "direct dev"
description:
name: msix
sha256: f88033fcb9e0dd8de5b18897cbebbd28ea30596810f4a7c86b12b0c03ace87e5
url: "https://pub.dev"
source: hosted
version: "3.16.12"
opentype_dart:
dependency: transitive
description:
Expand All @@ -312,6 +344,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.0.1"
package_config:
dependency: transitive
description:
name: package_config
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.dev"
source: hosted
version: "2.2.0"
path:
dependency: "direct main"
description:
Expand Down Expand Up @@ -400,6 +440,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.0.3"
pub_semver:
dependency: transitive
description:
name: pub_semver
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -620,6 +668,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.6.1"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.10.4 <4.0.0"
flutter: ">=3.35.0"
12 changes: 10 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: vllama_da
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
Expand Down Expand Up @@ -72,13 +72,13 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^6.0.0
msix: ^3.16.1

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down Expand Up @@ -114,3 +114,11 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package

msix_config:
display_name: Vllama
publisher_display_name: Manvith Gopu
identity_name: com.manvithgopu.vllama
msix_version: 1.0.0.0
logo_path: windows/runner/resources/app_icon.ico
capabilities: internetClient, location, microphone, webcam
Loading