4 Commits

Author SHA1 Message Date
yasien_gmail cfd6b8c5f4 Fix flatpak build and run issues 2026-06-10 12:16:00 +02:00
yasien_gmail 0ea3482e9a revert Dockerfile 2026-06-10 09:40:01 +02:00
yasien_gmail 0e05ce0b89 WIP:update flatpak configs 2026-06-10 09:37:57 +02:00
yasien_gmail 166328df89 updated .git to ignore flatpak build files 2026-06-10 09:35:38 +02:00
10 changed files with 59 additions and 62 deletions
+4
View File
@@ -0,0 +1,4 @@
.dart_tool/
.build/
build/
.pub-cache/
+5
View File
@@ -48,3 +48,8 @@ app.*.map.json
# Flutter config file # Flutter config file
/config/ /config/
#Flatpak build files
flatpak/build-dir/
flatpak/.flatpak-builder/
+1 -1
View File
@@ -16,7 +16,7 @@ WORKDIR /app
COPY pubspec.yaml pubspec.lock ./ COPY pubspec.yaml pubspec.lock ./
RUN flutter pub get RUN flutter pub get
COPY . . COPY . .
RUN flutter build web --release -t ./lib/main_prod.dart RUN flutter build web --release -t ./lib/main_prod.dart -v
# --- STAGE 2: The Final Production Image --- # --- STAGE 2: The Final Production Image ---
FROM nginx:alpine FROM nginx:alpine

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

@@ -0,0 +1,43 @@
id: za.co.mzansiinnovationhub.mih
runtime: org.gnome.Platform
runtime-version: "49"
sdk: org.gnome.Sdk
command: mzansi_innovation_hub
finish-args:
- --share=ipc
- --share=network
- --socket=fallback-x11
- --socket=wayland
- --device=dri
- --env=__EGL_VENDOR_LIBRARY_FILENAMES=/usr/lib/x86_64-linux-gnu/GL/glvnd/egl_vendor.d/50_mesa.json
modules:
- name: mzansi-innovation-hub
buildsystem: simple
sources:
- type: archive
url: https://git.mzansi-innovation-hub.co.za/yaso_meth/mih-project/releases/download/v.1.3.0/mzansi_innovation_hub.tar.gz
archive-type: tar-gzip
strip-components: 0
sha256: 8efff8baf8d9be44b70f3af500d985e80f2eb5a25cc421ce5c4f88b83f44ebe0
- type: file
path: za.co.mzansiinnovationhub.mih.desktop
- type: file
path: za.co.mzansiinnovationhub.mih.metainfo.xml
- type: file
path: za.co.mzansiinnovationhub.mih.png
build-commands:
- mkdir -p /app/bin
- mkdir -p /app/share/applications
- mkdir -p /app/share/metainfo
- mkdir -p /app/share/icons/hicolor/256x256/apps
- cp mzansi_innovation_hub /app/bin/
- cp -r lib/ /app/bin/
- cp -r data/ /app/bin/
- install -Dm644 za.co.mzansiinnovationhub.mih.desktop /app/share/applications/za.co.mzansiinnovationhub.mih.desktop
- install -Dm644 za.co.mzansiinnovationhub.mih.png /app/share/icons/hicolor/256x256/apps/za.co.mzansiinnovationhub.mih.png
- install -Dm644 za.co.mzansiinnovationhub.mih.metainfo.xml /app/share/metainfo/za.co.mzansiinnovationhub.mih.metainfo.xml
@@ -1,55 +0,0 @@
id: za.co.mzansiinnovationhub.mih
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
command: mzansi_innovation_hub
finish-args:
- --share=ipc
- --share=network # Added for Internet access
- --socket=fallback-x11
- --socket=wayland
- --device=dri
# Removed --filesystem=home for better security; add back only if strictly needed.
modules:
- name: mzansi-innovation-hub
buildsystem: simple
sources:
- type: archive
url: https://git.mzansi-innovation-hub.co.za/yaso_meth/mih-project/releases/download/linux/mzansi_innovation_hub.tar.gz
sha256: b8c383f4d43e2de36b4e6520c9745e3f8e8618bdb9ef6024ad0bf260061137a9
# If the tarball contains a top-level folder (like 'bundle'),
# flatpak-builder enters it automatically.
# If it doesn't, we use the commands below to find them.
- type: file
path: za.co.mzansiinnovationhub.mih.desktop
- type: file
path: za.co.mzansiinnovationhub.mih.metainfo.xml
- type: file
path: za.co.mzansiinnovationhub.mih.png
build-commands:
# 1. Create the necessary directories
- mkdir -p /app/bin /app/share/applications /app/share/icons/hicolor/256x256/apps /app/share/metainfo
# 2. Move EVERYTHING from your archive into /app/bin/
# We use 'find' to move only the app-related files and avoid the metadata files
- |
find . -mindepth 1 -maxdepth 2 \
! -name "*.desktop" \
! -name "*.xml" \
! -name "*.png" \
! -name "*.yml" \
-exec cp -R -t /app/bin/ {} +
# 3. Ensure the binary is in the right place and executable
# If the binary ended up in a subfolder, this moves it to the top of /app/bin
- find /app/bin -name "mzansi_innovation_hub" -type f -exec mv {} /app/bin/ \;
- chmod +x /app/bin/mzansi_innovation_hub
# 4. Install Metadata (using the exact local files)
- install -Dm644 za.co.mzansiinnovationhub.mih.desktop /app/share/applications/za.co.mzansiinnovationhub.mih.desktop
- install -Dm644 za.co.mzansiinnovationhub.mih.png /app/share/icons/hicolor/256x256/apps/za.co.mzansiinnovationhub.mih.png
- install -Dm644 za.co.mzansiinnovationhub.mih.metainfo.xml /app/share/metainfo/za.co.mzansiinnovationhub.mih.metainfo.xml
+5 -5
View File
@@ -1212,10 +1212,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.0" version: "1.18.0"
mih_package_toolkit: mih_package_toolkit:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -1977,10 +1977,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.10" version: "0.7.11"
timing: timing:
dependency: transitive dependency: transitive
description: description:
@@ -2294,5 +2294,5 @@ packages:
source: hosted source: hosted
version: "3.1.1" version: "3.1.1"
sdks: sdks:
dart: ">=3.9.0 <3.13.0-z" dart: ">=3.10.0-0 <3.13.0-z"
flutter: ">=3.29.0" flutter: ">=3.29.0"