Skip to content

Commit d223f69

Browse files
2 parents 081c5a0 + 1ec0156 commit d223f69

2 files changed

Lines changed: 69 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Windows EXE
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: 🔄 Checkout do código
14+
uses: actions/checkout@v4
15+
16+
- name: 🐍 Instalar Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.12'
20+
21+
- name: 📦 Instalar dependências
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install pyinstaller customtkinter pillow matplotlib numpy scipy control
25+
26+
- name: ⚙️ Compilar o sistema
27+
# CORREÇÃO: Trocado '^' por '`' para ser compatível com PowerShell
28+
run: |
29+
pyinstaller `
30+
--noconfirm `
31+
--onefile `
32+
--windowed `
33+
--name "SistemaControle" `
34+
--icon=logo.png `
35+
--add-data "logo.png;." `
36+
--add-data "icons;icons" `
37+
--add-data "criterios_estabilidade.py;." `
38+
--add-data "analise_segunda_ordem.py;." `
39+
--add-data "controladores.py;." `
40+
--collect-all "customtkinter" `
41+
--collect-all "numpy" `
42+
--collect-all "scipy" `
43+
--collect-all "control" `
44+
--hidden-import "matplotlib.backends.backend_tkagg" `
45+
tela.py
46+
47+
- name: 📤 Fazer upload do executável
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: Sistema-de-Controle-EXE
51+
path: dist/SistemaControle.exe

workflows/build-windows-exe.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,42 @@ jobs:
1010
runs-on: windows-latest
1111

1212
steps:
13-
- name: Checkout código
13+
- name: 🔄 Checkout do código
1414
uses: actions/checkout@v4
1515

16-
- name: Instalar Python
16+
- name: 🐍 Instalar Python
1717
uses: actions/setup-python@v5
1818
with:
1919
python-version: '3.12'
2020

21-
- name: Instalar dependências
21+
- name: 📦 Instalar dependências
2222
run: |
2323
python -m pip install --upgrade pip
24-
pip install pyinstaller
25-
pip install customtkinter matplotlib numpy scipy control pillow
24+
# Lista de dependências baseada em TODOS os seus arquivos .py
25+
pip install pyinstaller customtkinter pillow matplotlib numpy scipy control
2626
27-
- name: Compilar para EXE
27+
- name: ⚙️ Compilar o sistema
2828
run: |
2929
pyinstaller ^
3030
--noconfirm ^
3131
--onefile ^
3232
--windowed ^
33+
--name "SistemaControle" ^
3334
--icon=logo.png ^
34-
--add-data "image;image" ^
35-
--add-data "icons;icons" ^
3635
--add-data "logo.png;." ^
36+
--add-data "icons;icons" ^
37+
--add-data "criterios_estabilidade.py;." ^
38+
--add-data "analise_segunda_ordem.py;." ^
39+
--add-data "controladores.py;." ^
40+
--collect-all "customtkinter" ^
41+
--collect-all "numpy" ^
42+
--collect-all "scipy" ^
43+
--collect-all "control" ^
44+
--hidden-import "matplotlib.backends.backend_tkagg" ^
3745
tela.py
3846
39-
- name: Fazer upload do executável
47+
- name: 📤 Fazer upload do executável
4048
uses: actions/upload-artifact@v4
4149
with:
4250
name: Sistema-de-Controle-EXE
43-
path: dist/tela.exe
51+
path: dist/SistemaControle.exe

0 commit comments

Comments
 (0)