Skip to content

Commit 0d38fca

Browse files
committed
feat: initial release of PyQt UI Designer
A drag-and-drop HMI designer supporting serial, Modbus RTU, key-value, JSON and HEX protocols with real-time data binding, live preview, and one-click Nuitka packaging. Made-with: Cursor
0 parents  commit 0d38fca

43 files changed

Lines changed: 10679 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
lint-and-import:
11+
name: Lint & Import Check
12+
runs-on: windows-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python 3.12
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install PyQt5 PyQt-Fluent-Widgets pyserial pyqtgraph nuitka
25+
26+
- name: Syntax check (compile all .py)
27+
run: python -m compileall app/ main.py deploy.py -q
28+
29+
- name: Import smoke test
30+
shell: cmd
31+
run: |
32+
set QT_QPA_PLATFORM=offscreen
33+
python -c "from app.common.config import cfg, APP_VERSION; print('Config OK, version:', APP_VERSION)"
34+
python -c "from app.core.serial_manager import SerialManager; print('SerialManager OK')"
35+
python -c "from app.core.data_binding import bindingEngine; print('DataBinding OK')"
36+
python -c "from app.core.code_generator import generate_project; print('CodeGenerator OK')"
37+
38+
- name: Nuitka dry-run (version info only)
39+
run: python -m nuitka --version

.github/workflows/release.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Release Build
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build-windows:
12+
name: Nuitka Build (Windows)
13+
runs-on: windows-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python 3.12
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.12"
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install PyQt5 PyQt-Fluent-Widgets pyserial pyqtgraph nuitka ordered-set
27+
28+
- name: Extract version from tag
29+
id: version
30+
shell: bash
31+
run: |
32+
TAG="${GITHUB_REF#refs/tags/}"
33+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
34+
VER="${TAG#v}"
35+
echo "ver=$VER" >> "$GITHUB_OUTPUT"
36+
37+
- name: Build with Nuitka
38+
shell: cmd
39+
run: |
40+
set CL=/utf-8
41+
python -m nuitka ^
42+
--standalone ^
43+
--assume-yes-for-downloads ^
44+
--mingw64 ^
45+
--enable-plugins=pyqt5 ^
46+
--windows-console-mode=disable ^
47+
--windows-icon-from-ico=logo.ico ^
48+
--windows-product-version=${{ steps.version.outputs.ver }}.0 ^
49+
--windows-file-version=${{ steps.version.outputs.ver }}.0 ^
50+
--show-progress ^
51+
--output-dir=build ^
52+
main.py
53+
54+
- name: Prepare distribution
55+
shell: pwsh
56+
run: |
57+
$distName = "PyQt-UI-Designer-${{ steps.version.outputs.tag }}"
58+
$distSrc = "build\main.dist"
59+
60+
if (Test-Path $distSrc) {
61+
Rename-Item $distSrc $distName
62+
$distPath = "build\$distName"
63+
} else {
64+
Write-Error "Nuitka output not found at $distSrc"
65+
exit 1
66+
}
67+
68+
# Copy logo if exists
69+
if (Test-Path "logo.ico") {
70+
Copy-Item "logo.ico" "$distPath\logo.ico"
71+
}
72+
73+
# Create zip
74+
Compress-Archive -Path $distPath -DestinationPath "build\$distName.zip" -Force
75+
echo "ASSET_PATH=build\$distName.zip" >> $env:GITHUB_ENV
76+
echo "ASSET_NAME=$distName.zip" >> $env:GITHUB_ENV
77+
78+
- name: Upload to Release
79+
uses: softprops/action-gh-release@v2
80+
with:
81+
files: ${{ env.ASSET_PATH }}

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
*.egg-info/
7+
dist/
8+
*.egg
9+
10+
# Virtual Environment
11+
.venv/
12+
venv/
13+
ENV/
14+
15+
# IDE
16+
.vscode/
17+
.idea/
18+
*.swp
19+
*.swo
20+
*~
21+
22+
# Nuitka build output
23+
build/
24+
*.build/
25+
*.dist/
26+
*.onefile-build/
27+
28+
# Packaging output
29+
*.zip
30+
31+
# OS
32+
.DS_Store
33+
Thumbs.db
34+
Desktop.ini
35+
36+
# Project exports
37+
output/
38+
*.uidp
39+
40+
# Cursor
41+
.cursor/

0 commit comments

Comments
 (0)