Skip to content

Commit 2df5fde

Browse files
author
DravinceG16
committed
新建仓库
1 parent 308942c commit 2df5fde

57 files changed

Lines changed: 12789 additions & 59 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/python-app.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ release ]
6+
pull_request:
7+
branches: [ release ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install pyinstaller
26+
27+
- name: Test imports
28+
run: |
29+
python -c "import main"
30+
python -c "from tool_version_manager import ToolVersionManager"
31+
python -c "from file_manager import FileManager"
32+
echo "All imports successful"
33+
34+
- name: Build executable
35+
run: |
36+
python build_exe.py
37+
echo "Build completed"
38+
39+
- name: List files
40+
run: |
41+
echo "Release directory:"
42+
if (Test-Path "release") {
43+
Get-ChildItem "release" -Recurse | Select-Object Name, Length
44+
echo "Release directory file count: $((Get-ChildItem "release" -Recurse).Count)"
45+
} else { echo "Release directory not found" }
46+
echo "Dist directory:"
47+
if (Test-Path "dist") {
48+
Get-ChildItem "dist" -Recurse | Select-Object Name, Length
49+
echo "Dist directory file count: $((Get-ChildItem "dist" -Recurse).Count)"
50+
} else { echo "Dist directory not found" }
51+
echo "Current working directory:"
52+
Get-Location
53+
echo "All files in current directory:"
54+
Get-ChildItem | Select-Object Name, Length
55+
56+
- name: Upload artifacts
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: IAR-Firmware-Publish-Tool
60+
path: release/*.exe
61+
retention-days: 30

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.11'
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
25+
- name: Build executable
26+
run: |
27+
python build_exe.py
28+
29+
- name: Create Release Package
30+
run: |
31+
python scripts/build_release.py
32+
33+
- name: Upload Release Assets
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: release-package
37+
path: release_package/
38+
39+
- name: Create Release
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: release_package/*
43+
generate_release_notes: true
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
MANIFEST
23+
24+
# Virtual Environment
25+
venv/
26+
env/
27+
ENV/
28+
env.bak/
29+
venv.bak/
30+
31+
# IDE
32+
.vscode/
33+
.idea/
34+
*.swp
35+
*.swo
36+
*~
37+
38+
# Logs
39+
logs/
40+
*.log
41+
42+
# Output directories
43+
output/
44+
fw_publish/
45+
build/
46+
release/
47+
48+
# User configuration
49+
user_config.json
50+
51+
# Keep example files
52+
!user_config.example.json
53+
!config.example.json
54+
55+
# OS
56+
.DS_Store
57+
Thumbs.db
58+
59+
# Temporary files
60+
*.tmp
61+
*.temp
62+
*.bak
63+
*.backup
64+
65+
# IAR project files (if needed)
66+
# *.ewt
67+
# *.dni
68+
# *.wsdt
69+
70+
# Compiled binaries
71+
*.exe
72+
*.bin
73+
*.hex
74+
*.elf

Embedded_Firmware_Manager.spec

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
import os
3+
4+
block_cipher = None
5+
6+
a = Analysis(
7+
['main.py'],
8+
pathex=[],
9+
binaries=[],
10+
datas=[
11+
('user_config.example.json', '.'),
12+
('docs', 'docs'),
13+
],
14+
hiddenimports=[],
15+
hookspath=[],
16+
hooksconfig={},
17+
runtime_hooks=[],
18+
excludes=[],
19+
win_no_prefer_redirects=False,
20+
win_private_assemblies=False,
21+
cipher=block_cipher,
22+
noarchive=False,
23+
)
24+
25+
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
26+
27+
exe = EXE(
28+
pyz,
29+
a.scripts,
30+
a.binaries,
31+
a.zipfiles,
32+
a.datas,
33+
[],
34+
name='Embedded_Firmware_Manager_v1.0.5.0',
35+
debug=False,
36+
bootloader_ignore_signals=False,
37+
strip=False,
38+
upx=True,
39+
upx_exclude=[],
40+
runtime_tmpdir=None,
41+
console=False,
42+
disable_windowed_traceback=False,
43+
argv_emulation=False,
44+
target_arch=None,
45+
codesign_identity=None,
46+
entitlements_file=None,
47+
icon=os.path.join(os.getcwd(), 'icon_efm.ico'),
48+
)

0 commit comments

Comments
 (0)