Skip to content

Commit ef6f032

Browse files
committed
add build infrastructure and documentation
- create build scripts for macOS ARM64 and Windows AMD64 - add comprehensive documentation and contribution guidelines - update Makefile with build targets - add pyproject.toml for project metadata - create GitHub issue/PR templates and security policy - update requirements.txt with PyInstaller dependency - add .gitignore to exclude build artifacts build system ready: - make build-macos (creates .app bundle) - make build-windows (creates spec for Windows) - complete cross-platform build documentation
1 parent aed332c commit ef6f032

31 files changed

Lines changed: 2211 additions & 20 deletions

.DS_Store

0 Bytes
Binary file not shown.

.githooks/pre-commit

100644100755
Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,37 @@ while IFS= read -r -d '' f; do
2626
fi
2727
done < <(git ls-files -z)
2828

29+
echo "[pre-commit] Checking writing standards..."
30+
# Check for forbidden characters and phrases
31+
FORBIDDEN_PATTERNS=(
32+
"made with love|feito com amor"
33+
"ultimate|final|professional|enhanced|improved|optimized"
34+
"amazing|awesome|incredible|fantastic|revolutionary"
35+
"cutting-edge|state-of-the-art|next-generation|world-class"
36+
"[🎉✅❌⚠️📚❤️⭐]"
37+
"[àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ]"
38+
)
39+
40+
for pattern in "${FORBIDDEN_PATTERNS[@]}"; do
41+
if git diff --cached --name-only | grep -E '\.(md|txt|py)$' | xargs grep -l -i -E "$pattern" 2>/dev/null; then
42+
echo "Error: forbidden content found matching pattern: $pattern" >&2
43+
echo "See .github/CONTRIBUTING_RULES.md for writing standards" >&2
44+
exit 1
45+
fi
46+
done
47+
48+
# Check for spaces in file/directory names
49+
if git diff --cached --name-only | grep -E ' '; then
50+
echo "Error: spaces found in file/directory names" >&2
51+
echo "Use underscores or hyphens instead" >&2
52+
exit 1
53+
fi
54+
2955
echo "[pre-commit] Running pytest (if available)..."
3056
if command -v pytest >/dev/null 2>&1; then
31-
QT_QPA_PLATFORM=offscreen pytest -q
57+
PYTHONPATH=. QT_QPA_PLATFORM=offscreen pytest tests/ -q
3258
elif [ -x ".venv/bin/pytest" ]; then
33-
QT_QPA_PLATFORM=offscreen .venv/bin/pytest -q
59+
PYTHONPATH=. QT_QPA_PLATFORM=offscreen .venv/bin/pytest tests/ -q
3460
else
3561
echo "pytest not found, skipping tests. Install with: python -m pip install -r requirements.txt" >&2
3662
fi

.github/CONTRIBUTING_RULES.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Repository Rules and Standards
2+
3+
## Mandatory Writing Standards
4+
5+
### Forbidden Characters and Symbols
6+
- **No emojis** in any documentation, code comments, or file names
7+
- **No special characters** (accented_characters) in any text content
8+
- **No spaces** in directory or file names - use underscores or hyphens
9+
- **No cedillas or accents** in any content
10+
11+
### Forbidden Language and Phrases
12+
These terms are **strictly prohibited** in all repository content:
13+
14+
#### Cringe Marketing Terms
15+
- "made with love" / "feito com amor"
16+
- "ultimate" / "final" / "professional" / "enhanced" / "improved"
17+
- "amazing" / "awesome" / "incredible" / "fantastic"
18+
- Any heart symbols or love references
19+
- Star solicitation phrases
20+
21+
#### Banned Adjectives
22+
- ultimate, final, professional, enhanced, improved, optimized
23+
- perfect, amazing, awesome, incredible, fantastic, revolutionary
24+
- cutting-edge, state-of-the-art, next-generation, world-class
25+
26+
### Required Writing Style
27+
- **Objective and technical language only**
28+
- **Direct, factual descriptions**
29+
- **No marketing language or emotional appeals**
30+
- **Clear, concise instructions without fluff**
31+
32+
## Code Standards
33+
34+
### File Naming
35+
- Use only ASCII characters (a-z, A-Z, 0-9, _, -)
36+
- No spaces in file or directory names
37+
- Use snake_case for Python files
38+
- Use kebab-case for documentation files
39+
40+
### Documentation Standards
41+
- Focus on functionality, not promotion
42+
- Use simple present tense
43+
- Avoid superlatives and marketing terms
44+
- Provide factual information only
45+
46+
### Commit Message Standards
47+
- Use imperative mood ("add feature" not "added feature")
48+
- Be specific and technical
49+
- No emotional or promotional language
50+
- Reference issues with numbers only
51+
52+
## Enforcement
53+
54+
### Pre-commit Checks
55+
The repository enforces these rules through:
56+
- Git hooks that scan for forbidden characters
57+
- Automated checks for prohibited phrases
58+
- File name validation
59+
60+
### Pull Request Requirements
61+
All contributions must:
62+
- Pass automated rule validation
63+
- Use only approved language patterns
64+
- Follow ASCII-only naming conventions
65+
- Contain no marketing language
66+
67+
### Violations
68+
Content that violates these rules will be:
69+
- Automatically rejected by pre-commit hooks
70+
- Flagged in pull request reviews
71+
- Required to be corrected before merge
72+
73+
These rules ensure consistent, technical documentation free of promotional language and special characters.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG] '
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
## Bug Description
11+
A clear and concise description of what the bug is.
12+
13+
## To Reproduce
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '...'
17+
3. Scroll down to '...'
18+
4. See error
19+
20+
## Expected Behavior
21+
A clear and concise description of what you expected to happen.
22+
23+
## Screenshots
24+
If applicable, add screenshots to help explain your problem.
25+
26+
## Environment Information
27+
- OS: [e.g. macOS 14.0, Windows 11, Ubuntu 22.04]
28+
- Python Version: [e.g. 3.9.7]
29+
- PyQt6 Version: [e.g. 6.4.0]
30+
- GUI Version Used: [PyQt6 / Tkinter]
31+
- FFmpeg Version: [if known]
32+
33+
## Error Messages
34+
```
35+
Paste any error messages or logs here
36+
```
37+
38+
## Additional Context
39+
Add any other context about the problem here.
40+
41+
## Checklist
42+
- [ ] I have searched existing issues to ensure this is not a duplicate
43+
- [ ] I have provided all the requested information above
44+
- [ ] I can reproduce this issue consistently
45+
- [ ] I have tried the latest version of the application
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: '[FEATURE] '
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
## Is your feature request related to a problem?
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
## Describe the solution you'd like
14+
A clear and concise description of what you want to happen.
15+
16+
## Describe alternatives you've considered
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
## Use Case
20+
Describe how this feature would be used and who would benefit from it.
21+
22+
## Implementation Ideas
23+
If you have ideas about how this could be implemented, please share them here.
24+
25+
## Additional Context
26+
Add any other context, mockups, or screenshots about the feature request here.
27+
28+
## Checklist
29+
- [ ] I have searched existing issues to ensure this is not a duplicate
30+
- [ ] This feature would benefit multiple users, not just my specific use case
31+
- [ ] I understand this is a volunteer project and features take time to implement
32+
- [ ] I would be willing to help implement this feature (optional)

.github/pull_request_template.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Pull Request
2+
3+
## Description
4+
Brief description of changes made in this PR.
5+
6+
## Type of Change
7+
Please check the relevant option:
8+
- [ ] Bug fix (non-breaking change which fixes an issue)
9+
- [ ] New feature (non-breaking change which adds functionality)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Documentation update
12+
- [ ] Performance improvement
13+
- [ ] Code refactoring
14+
- [ ] Test improvements
15+
16+
## Related Issue
17+
Fixes # (issue number)
18+
19+
## Changes Made
20+
- Change 1
21+
- Change 2
22+
- Change 3
23+
24+
## Testing
25+
- [ ] I have tested these changes locally
26+
- [ ] All existing tests pass (`make test`)
27+
- [ ] I have added new tests for my changes (if applicable)
28+
- [ ] I have tested both GUI versions (PyQt6 and Tkinter) if applicable
29+
30+
## Screenshots (if applicable)
31+
Add screenshots to demonstrate the changes.
32+
33+
## Checklist
34+
- [ ] My code follows the project's style guidelines
35+
- [ ] I have performed a self-review of my code
36+
- [ ] I have commented my code, particularly in hard-to-understand areas
37+
- [ ] I have made corresponding changes to the documentation
38+
- [ ] My changes generate no new warnings or errors
39+
- [ ] I have added tests that prove my fix is effective or that my feature works
40+
- [ ] New and existing unit tests pass locally with my changes
41+
- [ ] Any dependent changes have been merged and published
42+
43+
## Breaking Changes
44+
If this PR introduces breaking changes, please describe them here and update the migration guide.
45+
46+
## Additional Notes
47+
Any additional information that reviewers should know.

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Build artifacts
2+
build/
3+
dist/
4+
*.spec
5+
*.dmg
6+
*.zip
7+
*.exe
8+
*.app
9+
10+
# Python cache
11+
__pycache__/
12+
*.pyc
13+
*.pyo
14+
*.pyd
15+
.pytest_cache/
16+
.mypy_cache/
17+
18+
# Virtual environments
19+
.venv/
20+
venv/
21+
env/
22+
23+
# IDE files
24+
.vscode/settings.json
25+
.idea/
26+
27+
# OS files
28+
.DS_Store
29+
Thumbs.db
30+
31+
# Temporary files
32+
*.tmp
33+
*.log
34+
version_info.txt
35+
36+
# Package files
37+
*.pkg
38+
*.deb
39+
*.rpm
40+
41+
# Lock files
42+
package-lock.json
43+
Pipfile.lock

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11.9
1+
3.13.7

BUILD_WINDOWS_NATIVE.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Building Native Windows Executable
2+
3+
## Requirements
4+
- Windows 10/11 (AMD64)
5+
- Python 3.8+ installed
6+
- Git for Windows (optional)
7+
8+
## Setup on Windows
9+
10+
1. **Clone repository:**
11+
```cmd
12+
git clone https://github.com/yourusername/ffmpeg-gui-pyqt6.git
13+
cd ffmpeg-gui-pyqt6
14+
```
15+
16+
2. **Create virtual environment:**
17+
```cmd
18+
python -m venv .venv
19+
.venv\Scripts\activate
20+
```
21+
22+
3. **Install dependencies:**
23+
```cmd
24+
pip install -r requirements.txt
25+
```
26+
27+
## Build Native Windows .exe
28+
29+
### Method 1: Using spec file (recommended)
30+
```cmd
31+
.venv\Scripts\activate
32+
pyinstaller FFmpeg_GUI_Windows.spec
33+
```
34+
35+
### Method 2: Direct command
36+
```cmd
37+
.venv\Scripts\activate
38+
pyinstaller --onefile --windowed --name=FFmpeg_GUI_Windows_AMD64 ^
39+
--add-data="utils_safe_extract.py;." ^
40+
--hidden-import=PyQt6.QtCore ^
41+
--hidden-import=PyQt6.QtGui ^
42+
--hidden-import=PyQt6.QtWidgets ^
43+
--hidden-import=ffmpeg ^
44+
--hidden-import=ssl ^
45+
--hidden-import=urllib3 ^
46+
--icon=icon.ico ^
47+
GUI_pyqt6_WINFF.py
48+
```
49+
50+
## Output
51+
- Executable: `dist\FFmpeg_GUI_Windows_AMD64.exe`
52+
- Size: ~40-60MB (native Windows)
53+
- Format: PE32+ executable (Windows .exe)
54+
55+
## Testing
56+
```cmd
57+
dist\FFmpeg_GUI_Windows_AMD64.exe
58+
```
59+
60+
## Notes
61+
- This creates a true Windows .exe file
62+
- No Wine or compatibility layer needed
63+
- Smaller size than cross-compiled version
64+
- Better Windows integration (file associations, etc.)

0 commit comments

Comments
 (0)