Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 3376962

Browse files
author
Pedro
committed
Final attempt to fix YAML syntax errors
1 parent 508d564 commit 3376962

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

flatpak-build/org.pedrodev2025.NavegadorPyTech.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ app-id: org.pedrodev2025.NavegadorPyTech
33
runtime: org.kde.Platform
44
runtime-version: '6.7' # Ajuste se você instalou outra versão
55
sdk: org.kde.Sdk
6-
command: start-navegador.sh # O novo script wrapper
7-
6+
command: start-navegador.sh # O comando que executa o script wrapper
87

98
finish-args:
109
- --share=ipc
@@ -16,37 +15,36 @@ finish-args:
1615
modules:
1716
- name: python-dependencies
1817
buildsystem: simple
19-
# A propriedade 'network: enabled' foi removida, pois não é suportada ou causa problemas.
20-
# A rede agora funciona devido ao download offline das wheels.
2118
build-commands:
19+
# Instala pip, setuptools e wheel (boas práticas)
2220
- pip3 install --user pip setuptools wheel
2321
# Instala as dependências PyQt5 e PyQtWebEngine dos arquivos baixados localmente
2422
- pip3 install --user --no-index --find-links=file:///run/build/python-dependencies/ PyQt5 PyQtWebEngine
2523
sources:
24+
# O conteúdo de 'python_wheels' é copiado diretamente para /run/build/python-dependencies/
2625
- type: dir
2726
path: ./python_wheels # Este caminho é relativo à pasta flatpak-build/
28-
- name: navegador-app
27+
28+
- name: navegador-app
2929
buildsystem: simple
3030
build-commands:
31+
# Copia o script Python para /app/bin/ com o nome completo
3132
- install -Dm755 navegador.py $(FLATPAK_DEST)/bin/navegador.py
32-
33-
# NOVO COMANDO: Criar o script wrapper e torná-lo executável
34-
# MODIFICAÇÃO AQUI: ADICIONAR O SEGUNDO CAMINHO AO PYTHONPATH
33+
# Copia o arquivo .desktop para o local correto
34+
- install -Dm644 org.pedrodev2025.NavegadorPyTech.desktop $(FLATPAK_DEST)/share/applications/org.pedrodev2025.NavegadorPyTech.desktop
35+
# Copia o ícone para o local correto
36+
- install -Dm644 org.pedrodev2025.NavegadorPyTech.png $(FLATPAK_DEST)/share/icons/hicolor/512x512/apps/org.pedrodev2025.NavegadorPyTech.png
37+
# Cria o script wrapper e o torna executável
3538
- |
3639
cat > $(FLATPAK_DEST)/bin/start-navegador.sh << 'EOF'
3740
#!/bin/bash
38-
# Tenta o caminho padrão do site-packages do runtime E o caminho comum para instalações --user
41+
# Adiciona o caminho onde o pip instalou os pacotes ao PYTHONPATH
3942
export PYTHONPATH="/app/lib/python3.11/site-packages:/app/share/python-packages:$PYTHONPATH"
40-
echo "DEBUG_FLATPAK: PYTHONPATH set to: $PYTHONPATH"
41-
42-
python3 -c "import sys; print('DEBUG_FLATPAK: sys.path at runtime:'); print(sys.path)"
43-
44-
python3 /app/bin/navegador.py "$@"
43+
echo "DEBUG_FLATPAK: PYTHONPATH set to: $PYTHONPATH" # Manter para debug
44+
python3 -c "import sys; print('DEBUG_FLATPAK: sys.path at runtime:'); print(sys.path)" # Manter para debug
45+
python3 $(FLATPAK_DEST)/bin/navegador.py "$@" # Chama o script principal
4546
EOF
46-
- chmod +x $(FLATPAK_DEST)/bin/start-navegador.sh # Torna o script executável
47-
48-
- install -Dm644 org.pedrodev2025.NavegadorPyTech.desktop $(FLATPAK_DEST)/share/applications/org.pedrodev2025.NavegadorPyTech.desktop
49-
- install -Dm644 org.pedrodev2025.NavegadorPyTech.png $(FLATPAK_DEST)/share/icons/hicolor/512x512/apps/org.pedrodev2025.NavegadorPyTech.png
47+
- chmod +x $(FLATPAK_DEST)/bin/start-navegador.sh
5048
sources:
5149
- type: dir
5250
path: app-source/

0 commit comments

Comments
 (0)