Modified config files for Linux
Some checks failed
Build Linux App / build (push) Failing after 3m54s
Some checks failed
Build Linux App / build (push) Failing after 3m54s
This commit is contained in:
@@ -2,13 +2,12 @@ name: Build Linux App
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main", "master" ] # Uruchomi się, gdy zrobisz push na te gałęzie
|
branches: [ "main", "master" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
# Używamy gotowego kontenera z zainstalowanym już Flutterem!
|
|
||||||
image: ghcr.io/cirruslabs/flutter:latest
|
image: ghcr.io/cirruslabs/flutter:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -22,7 +21,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Instalacja bibliotek systemowych dla Linux Desktop
|
- name: Instalacja bibliotek systemowych dla Linux Desktop
|
||||||
run: |
|
run: |
|
||||||
apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev lld
|
apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev lld file
|
||||||
|
|
||||||
- name: Aktywacja wsparcia dla Linuxa
|
- name: Aktywacja wsparcia dla Linuxa
|
||||||
run: flutter config --enable-linux-desktop
|
run: flutter config --enable-linux-desktop
|
||||||
@@ -33,8 +32,53 @@ jobs:
|
|||||||
- name: Zbudowanie aplikacji na Linuxa (Release)
|
- name: Zbudowanie aplikacji na Linuxa (Release)
|
||||||
run: flutter build linux --release
|
run: flutter build linux --release
|
||||||
|
|
||||||
- name: Udostępnienie gotowego pliku (Artifact)
|
- name: Przygotowanie struktury AppDir
|
||||||
|
run: |
|
||||||
|
mkdir -p AppDir/usr/bin
|
||||||
|
# Kopiujemy całą zawartość zbudowanej apki (plik wykonywalny, lib, data)
|
||||||
|
cp -r build/linux/x64/release/bundle/* AppDir/usr/bin/
|
||||||
|
|
||||||
|
# Tworzymy plik .desktop (konfiguracja dla systemu Linux)
|
||||||
|
cat <<EOF > AppDir/trainhub.desktop
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Terminal=false
|
||||||
|
Name=Trainhub
|
||||||
|
Exec=trainhub_flutter %u
|
||||||
|
Icon=trainhub
|
||||||
|
Categories=Utility;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Kopiujemy domyślną ikonę Fluttera jako ikonę aplikacji
|
||||||
|
cp linux/application_icon.png AppDir/trainhub.png
|
||||||
|
|
||||||
|
# Tworzymy "AppRun" czyli skrót uruchamiający nasz plik wykonywalny
|
||||||
|
cd AppDir
|
||||||
|
ln -s usr/bin/trainhub_flutter AppRun
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Pobranie appimagetool i generowanie AppImage
|
||||||
|
run: |
|
||||||
|
# Pobieramy oficjalne narzędzie do tworzenia AppImage
|
||||||
|
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||||
|
chmod +x appimagetool
|
||||||
|
|
||||||
|
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||||
|
|
||||||
|
# Sklejamy folder AppDir w jeden plik AppImage!
|
||||||
|
./appimagetool AppDir Trainhub-x86_64.AppImage
|
||||||
|
|
||||||
|
# --- ZMIANA: TUTAJ UDOSTĘPNIAMY DWIE WERSJE ---
|
||||||
|
|
||||||
|
- name: Udostępnienie gotowej aplikacji (wersja AppImage)
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: trainhub-linux-build
|
name: Trainhub-Linux-AppImage
|
||||||
|
path: Trainhub-x86_64.AppImage
|
||||||
|
|
||||||
|
- name: Udostępnienie gotowej aplikacji (wersja ZIP - Fallback)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: Trainhub-Linux-Portable-ZIP
|
||||||
path: build/linux/x64/release/bundle/
|
path: build/linux/x64/release/bundle/
|
||||||
Reference in New Issue
Block a user