readme updated and python_path var moving
This commit is contained in:
parent
fb44f09610
commit
910e0c25a1
8
.env.example
Normal file
8
.env.example
Normal file
@ -0,0 +1,8 @@
|
||||
# Python Configuration
|
||||
PYTHON_PATH=C:/Path/To/Your/Python/python.exe
|
||||
|
||||
# Email configuration for suggestion system
|
||||
EMAIL_ADDRESS=your_email@gmail.com
|
||||
EMAIL_PASSWORD=your_app_password
|
||||
EMAIL_SMTP_SERVER=smtp.gmail.com
|
||||
EMAIL_SMTP_PORT=587
|
266
README.md
266
README.md
@ -0,0 +1,266 @@
|
||||
# Python PyQt6 Application Template
|
||||
|
||||
A modern, feature-rich template for building desktop applications with PyQt6. This template provides a solid foundation with theming, internationalization, settings management, and a modular architecture.
|
||||
|
||||
## Features
|
||||
|
||||
- **Modern UI Framework**: Built with PyQt6 for cross-platform compatibility
|
||||
- **Theme System**: Dark and light themes with easy customization
|
||||
- **Internationalization**: Multi-language support (English and French included)
|
||||
- **Settings Management**: Persistent user preferences with QSettings
|
||||
- **Modular Architecture**: Clean separation of concerns with managers and observers
|
||||
- **Tabbed Interface**: Flexible tab widget system with customizable positioning
|
||||
- **Window State Management**: Remembers window size, position, and maximized state
|
||||
- **Email Integration**: Built-in suggestion/feedback system with secure email configuration
|
||||
- **Build Automation**: Automated building with PyInstaller
|
||||
- **Virtual Environment Management**: Automated environment setup
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
Template/
|
||||
├── app/
|
||||
│ ├── core/ # Core application managers
|
||||
│ │ ├── main_manager.py # Singleton manager coordinator
|
||||
│ │ ├── settings_manager.py # User settings and configuration
|
||||
│ │ ├── theme_manager.py # Theme and styling management
|
||||
│ │ ├── language_manager.py # Internationalization
|
||||
│ │ └── observer_manager.py # Event notification system
|
||||
│ ├── ui/
|
||||
│ │ ├── main_window.py # Main application window
|
||||
│ │ ├── widgets/ # Custom widgets
|
||||
│ │ │ └── tabs_widget.py # Customizable tab system
|
||||
│ │ └── windows/ # Application windows
|
||||
│ │ ├── settings_window.py
|
||||
│ │ └── suggestion_window.py
|
||||
│ └── utils/
|
||||
│ └── paths.py # Path utilities for resources
|
||||
├── data/
|
||||
│ ├── assets/ # Icons and images
|
||||
│ ├── lang/ # Language files (JSON)
|
||||
│ ├── themes/ # Theme configuration files
|
||||
│ └── others/ # Default settings
|
||||
├── tools/ # Build and development tools
|
||||
│ ├── build.bat/.sh/.command # Platform-specific build script
|
||||
│ └── open.bat/.sh/.command # Platform-specific development setup
|
||||
├── config.json # Application configuration
|
||||
├── requirements.txt # Python dependencies
|
||||
├── BUILD.spec # PyInstaller specification
|
||||
└── main.py # Application entry point
|
||||
```
|
||||
|
||||
### Development Setup
|
||||
|
||||
1. **Clone/Download** this template
|
||||
2. **Configure** your application in `config.json`:
|
||||
```json
|
||||
{
|
||||
"app_name": "YourAppName",
|
||||
"python_version": "YourPythonVersion",
|
||||
"app_os": "Windows or Linux or Mac",
|
||||
"app_version": "YourAppVersion",
|
||||
"architecture": "x64 or x32",
|
||||
"icon_path": "data/assets/icon.ico",
|
||||
"main_script": "main.py"
|
||||
}
|
||||
```
|
||||
|
||||
3. **Setup environment configuration**:
|
||||
- Copy `.env.example` to `.env`
|
||||
- Configure your Python path and email credentials:
|
||||
```env
|
||||
# Python Configuration
|
||||
PYTHON_PATH=C:/Path/To/Your/Python/python.exe
|
||||
|
||||
# Email Configuration (optional)
|
||||
EMAIL_ADDRESS=your_email@gmail.com
|
||||
EMAIL_PASSWORD=your_app_password
|
||||
EMAIL_SMTP_SERVER=smtp.gmail.com
|
||||
EMAIL_SMTP_PORT=587
|
||||
```
|
||||
- For Gmail, use an [App Password](https://support.google.com/accounts/answer/185833) instead of your regular password
|
||||
|
||||
4. **Run development environment**:
|
||||
- **Windows**: `tools\open.bat`
|
||||
- **Linux**: `tools/open.sh`
|
||||
- **macOS**: `tools/open.command`
|
||||
|
||||
This will:
|
||||
- Create a virtual environment
|
||||
- Install dependencies
|
||||
- Open VS Code with proper environment
|
||||
|
||||
### Building for Production
|
||||
|
||||
- **Windows**: `tools\build.bat`
|
||||
- **Linux**: `tools/build.sh`
|
||||
- **macOS**: `tools/build.command`
|
||||
|
||||
This creates a standalone executable in the `build/` directory.
|
||||
|
||||
### Adding Themes
|
||||
|
||||
Create JSON files in `data/themes/`. **Important**: Use the predefined color names as they are used throughout the application's styling system.
|
||||
|
||||
```json
|
||||
{
|
||||
"theme_name": "custom",
|
||||
"colors": {
|
||||
"background": "#FFFFFF", // Main background color
|
||||
"background2": "#F5F5F5", // Secondary background
|
||||
"background3": "#E0E0E0", // Tertiary background
|
||||
"font_color": "#000000", // Text color
|
||||
"selected_icon": "#000000", // Selected icon color
|
||||
"unselected_icon": "#5D5A5A", // Unselected icon color
|
||||
"selected_border_icon": "#000000", // Selected border color
|
||||
"hover_icon": "#000000" // Hover state color
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Warning**: Do not change the color property names (`background`, `background2`, etc.) as they are hardcoded in the theme system. Only modify the hex color values.
|
||||
|
||||
### Adding Languages
|
||||
|
||||
Create JSON files in `data/lang/`. **Important**: Use the existing translation keys to ensure proper functionality.
|
||||
|
||||
```json
|
||||
{
|
||||
"lang_name": "Español",
|
||||
"yes": "Sí",
|
||||
"no": "No",
|
||||
"language": "Idioma:",
|
||||
"settings": "Configuración",
|
||||
"theme": "Tema:",
|
||||
"dark_theme": "Tema Oscuro",
|
||||
"light_theme": "Tema Claro",
|
||||
"suggestion_text": "¿Tienes una pregunta o idea para mejorar esta aplicación?",
|
||||
"suggestion_placeholder": "Escribe tu mensaje aquí...",
|
||||
"send_suggestion": "Enviar",
|
||||
"sending": "Enviando...",
|
||||
"success": "Éxito",
|
||||
"error": "Error",
|
||||
"suggestion_sent_success": "¡Tu mensaje ha sido enviado exitosamente!",
|
||||
"suggestion_send_error": "Error al enviar el mensaje. Inténtalo de nuevo más tarde.",
|
||||
"email_credentials_error": "Credenciales de email no configuradas. Por favor configura tu email y contraseña en el archivo .env."
|
||||
}
|
||||
```
|
||||
|
||||
**Warning**: Do not change the translation keys (left side of the colon) as they are used throughout the application code. Only translate the values (right side).
|
||||
|
||||
## Architecture
|
||||
|
||||
### Manager Pattern
|
||||
|
||||
The application uses a centralized manager system:
|
||||
|
||||
- **MainManager**: Singleton coordinator for all managers
|
||||
- **SettingsManager**: Handles user preferences and persistence
|
||||
- **ThemeManager**: Manages themes and styling
|
||||
- **LanguageManager**: Handles internationalization
|
||||
- **ObserverManager**: Event notification system
|
||||
|
||||
### Observer Pattern
|
||||
|
||||
Components can subscribe to events:
|
||||
|
||||
```python
|
||||
self.observer_manager.subscribe(NotificationType.THEME, self.update_theme)
|
||||
self.observer_manager.subscribe(NotificationType.LANGUAGE, self.update_language)
|
||||
```
|
||||
|
||||
### Tab System
|
||||
|
||||
The flexible tab widget supports multiple positioning options:
|
||||
|
||||
```python
|
||||
# Add a tab with custom positioning
|
||||
self.side_menu.add_widget(
|
||||
widget=your_widget,
|
||||
button_text="",
|
||||
icon_path=paths.get_asset_svg_path("icon_name"),
|
||||
position=ButtonPosition.CENTER
|
||||
)
|
||||
```
|
||||
|
||||
## Email Integration
|
||||
|
||||
The template includes a suggestion system with email capabilities. Configure in your `.env` file:
|
||||
|
||||
**Security Note**: Never commit your `.env` file to version control. It's already included in `.gitignore`.
|
||||
|
||||
For Gmail users:
|
||||
- Enable 2-factor authentication
|
||||
- Generate an App Password specifically for this application
|
||||
- Use the App Password in the `EMAIL_PASSWORD` field
|
||||
|
||||
## Customization
|
||||
|
||||
### Adding New Windows
|
||||
|
||||
1. Create window class inheriting from `QWidget`
|
||||
2. Subscribe to language notifications
|
||||
3. Add to main window tab system
|
||||
|
||||
```python
|
||||
class YourWindow(QWidget):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.main_manager = MainManager.get_instance()
|
||||
# Subscribe to notifications
|
||||
self.observer_manager.subscribe(NotificationType.LANGUAGE, self.update_language)
|
||||
self.setup_ui()
|
||||
```
|
||||
|
||||
### Custom Widgets
|
||||
|
||||
Place custom widgets in `app/ui/widgets/` and follow the existing patterns for theme integration.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **PyQt6**: Modern GUI framework
|
||||
- **pyinstaller**: Executable building
|
||||
- **python-dotenv**: Environment variable management
|
||||
|
||||
Add additional dependencies to `requirements.txt`.
|
||||
|
||||
## Building
|
||||
|
||||
The build system automatically:
|
||||
- Creates virtual environments per architecture
|
||||
- Installs dependencies
|
||||
- Builds with PyInstaller
|
||||
- Names executables with config.json
|
||||
- Includes all assets and data files
|
||||
|
||||
## Cross-Platform Notes
|
||||
|
||||
The template supports multiple platforms with platform-specific scripts:
|
||||
- **Windows**: Uses `.bat` files
|
||||
- **Linux**: Uses `.sh` files
|
||||
- **macOS**: Uses `.command` files
|
||||
|
||||
Adjust config.json for your target platform.
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see LICENSE file for details.
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Test thoroughly
|
||||
5. Submit a pull request
|
||||
|
||||
## Support
|
||||
|
||||
For issues or questions:
|
||||
- Check existing issues
|
||||
- Create detailed bug reports
|
||||
- Include system information and error logs
|
||||
|
||||
---
|
||||
|
||||
**Happy coding!** 🚀
|
@ -5,8 +5,12 @@ import smtplib
|
||||
import os
|
||||
from email.mime.text import MIMEText
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from dotenv import load_dotenv
|
||||
from app.core.main_manager import MainManager, NotificationType
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
class EmailSender(QThread):
|
||||
success = pyqtSignal()
|
||||
error = pyqtSignal(str)
|
||||
@ -19,14 +23,13 @@ class EmailSender(QThread):
|
||||
def run(self):
|
||||
try:
|
||||
# Get email configuration from environment variables
|
||||
password = 'xprqegxuqixgljyi'
|
||||
email = 'louismazindev@gmail.com'
|
||||
smtp_server = 'smtp.gmail.com'
|
||||
smtp_port = 587
|
||||
email = os.getenv('EMAIL_ADDRESS')
|
||||
password = os.getenv('EMAIL_PASSWORD')
|
||||
smtp_server = os.getenv('EMAIL_SMTP_SERVER', 'smtp.gmail.com')
|
||||
smtp_port = int(os.getenv('EMAIL_SMTP_PORT', '587'))
|
||||
|
||||
if not password:
|
||||
# Fallback to simulation if no credentials are configured
|
||||
self._simulate_email_sending()
|
||||
if not email or not password:
|
||||
self.error.emit("password")
|
||||
return
|
||||
|
||||
# Create message
|
||||
@ -49,19 +52,8 @@ class EmailSender(QThread):
|
||||
server.quit()
|
||||
|
||||
self.success.emit()
|
||||
except Exception as e:
|
||||
self.error.emit()
|
||||
|
||||
def _simulate_email_sending(self):
|
||||
"""Fallback simulation when no email credentials are configured"""
|
||||
time.sleep(2) # Simulate network delay
|
||||
|
||||
print("=== EMAIL SIMULATION (No credentials configured) ===")
|
||||
print(f"Subject: {self.subject}")
|
||||
print(f"Message: {self.message}")
|
||||
print("=" * 55)
|
||||
|
||||
self.success.emit()
|
||||
except Exception:
|
||||
self.error.emit("")
|
||||
|
||||
class SuggestionWindow(QWidget):
|
||||
def __init__(self, parent=None):
|
||||
@ -132,13 +124,16 @@ class SuggestionWindow(QWidget):
|
||||
self.language_manager.get_text("suggestion_sent_success"))
|
||||
self.text_edit.clear()
|
||||
|
||||
def on_email_error(self):
|
||||
def on_email_error(self, error):
|
||||
self.send_button.setEnabled(True)
|
||||
self.send_button.setText(self.language_manager.get_text("send_suggestion"))
|
||||
|
||||
if error == "password":
|
||||
message = self.language_manager.get_text("email_credentials_error")
|
||||
else:
|
||||
message = self.language_manager.get_text("suggestion_send_error")
|
||||
QMessageBox.critical(self,
|
||||
self.language_manager.get_text("error"),
|
||||
f"{self.language_manager.get_text('suggestion_send_error')}")
|
||||
self.language_manager.get_text("error"),
|
||||
message)
|
||||
|
||||
def update_language(self):
|
||||
self.title_label.setText(self.language_manager.get_text("suggestion_text"))
|
||||
|
@ -5,6 +5,5 @@
|
||||
"app_version": "1.0.0",
|
||||
"architecture": "x64",
|
||||
"icon_path": "data/assets/icon.ico",
|
||||
"main_script": "main.py",
|
||||
"python_path": "C:/Logiciels/Python/x64/3.11.7/python.exe"
|
||||
"main_script": "main.py"
|
||||
}
|
@ -1 +1 @@
|
||||
<ns0:svg xmlns:ns0="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="100px" height="100px" fill="#D1D1D6" stroke="#D1D1D6"><ns0:path d="M 22.205078 2 A 1.0001 1.0001 0 0 0 21.21875 2.8378906 L 20.246094 8.7929688 C 19.076509 9.1331971 17.961243 9.5922728 16.910156 10.164062 L 11.996094 6.6542969 A 1.0001 1.0001 0 0 0 10.708984 6.7597656 L 6.8183594 10.646484 A 1.0001 1.0001 0 0 0 6.7070312 11.927734 L 10.164062 16.873047 C 9.583454 17.930271 9.1142098 19.051824 8.765625 20.232422 L 2.8359375 21.21875 A 1.0001 1.0001 0 0 0 2.0019531 22.205078 L 2.0019531 27.705078 A 1.0001 1.0001 0 0 0 2.8261719 28.691406 L 8.7597656 29.742188 C 9.1064607 30.920739 9.5727226 32.043065 10.154297 33.101562 L 6.6542969 37.998047 A 1.0001 1.0001 0 0 0 6.7597656 39.285156 L 10.648438 43.175781 A 1.0001 1.0001 0 0 0 11.927734 43.289062 L 16.882812 39.820312 C 17.936999 40.39548 19.054994 40.857928 20.228516 41.201172 L 21.21875 47.164062 A 1.0001 1.0001 0 0 0 22.205078 48 L 27.705078 48 A 1.0001 1.0001 0 0 0 28.691406 47.173828 L 29.751953 41.1875 C 30.920633 40.838997 32.033372 40.369697 33.082031 39.791016 L 38.070312 43.291016 A 1.0001 1.0001 0 0 0 39.351562 43.179688 L 43.240234 39.287109 A 1.0001 1.0001 0 0 0 43.34375 37.996094 L 39.787109 33.058594 C 40.355783 32.014958 40.813915 30.908875 41.154297 29.748047 L 47.171875 28.693359 A 1.0001 1.0001 0 0 0 47.998047 27.707031 L 47.998047 22.207031 A 1.0001 1.0001 0 0 0 47.160156 21.220703 L 41.152344 20.238281 C 40.80968 19.078827 40.350281 17.974723 39.78125 16.931641 L 43.289062 11.933594 A 1.0001 1.0001 0 0 0 43.177734 10.652344 L 39.287109 6.7636719 A 1.0001 1.0001 0 0 0 37.996094 6.6601562 L 33.072266 10.201172 C 32.023186 9.6248101 30.909713 9.1579916 29.738281 8.8125 L 28.691406 2.828125 A 1.0001 1.0001 0 0 0 27.705078 2 L 22.205078 2 z M 23.056641 4 L 26.865234 4 L 27.861328 9.6855469 A 1.0001 1.0001 0 0 0 28.603516 10.484375 C 30.066026 10.848832 31.439607 11.426549 32.693359 12.185547 A 1.0001 1.0001 0 0 0 33.794922 12.142578 L 38.474609 8.7792969 L 41.167969 11.472656 L 37.835938 16.220703 A 1.0001 1.0001 0 0 0 37.796875 17.310547 C 38.548366 18.561471 39.118333 19.926379 39.482422 21.380859 A 1.0001 1.0001 0 0 0 40.291016 22.125 L 45.998047 23.058594 L 45.998047 26.867188 L 40.279297 27.871094 A 1.0001 1.0001 0 0 0 39.482422 28.617188 C 39.122545 30.069817 38.552234 31.434687 37.800781 32.685547 A 1.0001 1.0001 0 0 0 37.845703 33.785156 L 41.224609 38.474609 L 38.53125 41.169922 L 33.791016 37.84375 A 1.0001 1.0001 0 0 0 32.697266 37.808594 C 31.44975 38.567585 30.074755 39.148028 28.617188 39.517578 A 1.0001 1.0001 0 0 0 27.876953 40.3125 L 26.867188 46 L 23.052734 46 L 22.111328 40.337891 A 1.0001 1.0001 0 0 0 21.365234 39.53125 C 19.90185 39.170557 18.522094 38.59371 17.259766 37.835938 A 1.0001 1.0001 0 0 0 16.171875 37.875 L 11.46875 41.169922 L 8.7734375 38.470703 L 12.097656 33.824219 A 1.0001 1.0001 0 0 0 12.138672 32.724609 C 11.372652 31.458855 10.793319 30.079213 10.427734 28.609375 A 1.0001 1.0001 0 0 0 9.6328125 27.867188 L 4.0019531 26.867188 L 4.0019531 23.052734 L 9.6289062 22.117188 A 1.0001 1.0001 0 0 0 10.435547 21.373047 C 10.804273 19.898143 11.383325 18.518729 12.146484 17.255859 A 1.0001 1.0001 0 0 0 12.111328 16.164062 L 8.8261719 11.46875 L 11.523438 8.7734375 L 16.185547 12.105469 A 1.0001 1.0001 0 0 0 17.28125 12.148438 C 18.536908 11.394293 19.919867 10.822081 21.384766 10.462891 A 1.0001 1.0001 0 0 0 22.132812 9.6523438 L 23.056641 4 z M 25 17 C 20.593567 17 17 20.593567 17 25 C 17 29.406433 20.593567 33 25 33 C 29.406433 33 33 29.406433 33 25 C 33 20.593567 29.406433 17 25 17 z M 25 19 C 28.325553 19 31 21.674447 31 25 C 31 28.325553 28.325553 31 25 31 C 21.674447 31 19 28.325553 19 25 C 19 21.674447 21.674447 19 25 19 z" fill="#D1D1D6" stroke="#D1D1D6" /></ns0:svg>
|
||||
<ns0:svg xmlns:ns0="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="100px" height="100px" fill="#4A4A4A" stroke="#4A4A4A"><ns0:path d="M 22.205078 2 A 1.0001 1.0001 0 0 0 21.21875 2.8378906 L 20.246094 8.7929688 C 19.076509 9.1331971 17.961243 9.5922728 16.910156 10.164062 L 11.996094 6.6542969 A 1.0001 1.0001 0 0 0 10.708984 6.7597656 L 6.8183594 10.646484 A 1.0001 1.0001 0 0 0 6.7070312 11.927734 L 10.164062 16.873047 C 9.583454 17.930271 9.1142098 19.051824 8.765625 20.232422 L 2.8359375 21.21875 A 1.0001 1.0001 0 0 0 2.0019531 22.205078 L 2.0019531 27.705078 A 1.0001 1.0001 0 0 0 2.8261719 28.691406 L 8.7597656 29.742188 C 9.1064607 30.920739 9.5727226 32.043065 10.154297 33.101562 L 6.6542969 37.998047 A 1.0001 1.0001 0 0 0 6.7597656 39.285156 L 10.648438 43.175781 A 1.0001 1.0001 0 0 0 11.927734 43.289062 L 16.882812 39.820312 C 17.936999 40.39548 19.054994 40.857928 20.228516 41.201172 L 21.21875 47.164062 A 1.0001 1.0001 0 0 0 22.205078 48 L 27.705078 48 A 1.0001 1.0001 0 0 0 28.691406 47.173828 L 29.751953 41.1875 C 30.920633 40.838997 32.033372 40.369697 33.082031 39.791016 L 38.070312 43.291016 A 1.0001 1.0001 0 0 0 39.351562 43.179688 L 43.240234 39.287109 A 1.0001 1.0001 0 0 0 43.34375 37.996094 L 39.787109 33.058594 C 40.355783 32.014958 40.813915 30.908875 41.154297 29.748047 L 47.171875 28.693359 A 1.0001 1.0001 0 0 0 47.998047 27.707031 L 47.998047 22.207031 A 1.0001 1.0001 0 0 0 47.160156 21.220703 L 41.152344 20.238281 C 40.80968 19.078827 40.350281 17.974723 39.78125 16.931641 L 43.289062 11.933594 A 1.0001 1.0001 0 0 0 43.177734 10.652344 L 39.287109 6.7636719 A 1.0001 1.0001 0 0 0 37.996094 6.6601562 L 33.072266 10.201172 C 32.023186 9.6248101 30.909713 9.1579916 29.738281 8.8125 L 28.691406 2.828125 A 1.0001 1.0001 0 0 0 27.705078 2 L 22.205078 2 z M 23.056641 4 L 26.865234 4 L 27.861328 9.6855469 A 1.0001 1.0001 0 0 0 28.603516 10.484375 C 30.066026 10.848832 31.439607 11.426549 32.693359 12.185547 A 1.0001 1.0001 0 0 0 33.794922 12.142578 L 38.474609 8.7792969 L 41.167969 11.472656 L 37.835938 16.220703 A 1.0001 1.0001 0 0 0 37.796875 17.310547 C 38.548366 18.561471 39.118333 19.926379 39.482422 21.380859 A 1.0001 1.0001 0 0 0 40.291016 22.125 L 45.998047 23.058594 L 45.998047 26.867188 L 40.279297 27.871094 A 1.0001 1.0001 0 0 0 39.482422 28.617188 C 39.122545 30.069817 38.552234 31.434687 37.800781 32.685547 A 1.0001 1.0001 0 0 0 37.845703 33.785156 L 41.224609 38.474609 L 38.53125 41.169922 L 33.791016 37.84375 A 1.0001 1.0001 0 0 0 32.697266 37.808594 C 31.44975 38.567585 30.074755 39.148028 28.617188 39.517578 A 1.0001 1.0001 0 0 0 27.876953 40.3125 L 26.867188 46 L 23.052734 46 L 22.111328 40.337891 A 1.0001 1.0001 0 0 0 21.365234 39.53125 C 19.90185 39.170557 18.522094 38.59371 17.259766 37.835938 A 1.0001 1.0001 0 0 0 16.171875 37.875 L 11.46875 41.169922 L 8.7734375 38.470703 L 12.097656 33.824219 A 1.0001 1.0001 0 0 0 12.138672 32.724609 C 11.372652 31.458855 10.793319 30.079213 10.427734 28.609375 A 1.0001 1.0001 0 0 0 9.6328125 27.867188 L 4.0019531 26.867188 L 4.0019531 23.052734 L 9.6289062 22.117188 A 1.0001 1.0001 0 0 0 10.435547 21.373047 C 10.804273 19.898143 11.383325 18.518729 12.146484 17.255859 A 1.0001 1.0001 0 0 0 12.111328 16.164062 L 8.8261719 11.46875 L 11.523438 8.7734375 L 16.185547 12.105469 A 1.0001 1.0001 0 0 0 17.28125 12.148438 C 18.536908 11.394293 19.919867 10.822081 21.384766 10.462891 A 1.0001 1.0001 0 0 0 22.132812 9.6523438 L 23.056641 4 z M 25 17 C 20.593567 17 17 20.593567 17 25 C 17 29.406433 20.593567 33 25 33 C 29.406433 33 33 29.406433 33 25 C 33 20.593567 29.406433 17 25 17 z M 25 19 C 28.325553 19 31 21.674447 31 25 C 31 28.325553 28.325553 31 25 31 C 21.674447 31 19 28.325553 19 25 C 19 21.674447 21.674447 19 25 19 z" fill="#4A4A4A" stroke="#4A4A4A" /></ns0:svg>
|
@ -1,8 +1,8 @@
|
||||
<ns0:svg xmlns:ns0="http://www.w3.org/2000/svg" fill="#4A4A4A" width="800px" height="800px" viewBox="0 0 64 64" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" version="1.1" xml:space="preserve" stroke="#4A4A4A">
|
||||
<ns0:svg xmlns:ns0="http://www.w3.org/2000/svg" fill="#D1D1D6" width="800px" height="800px" viewBox="0 0 64 64" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" version="1.1" xml:space="preserve" stroke="#D1D1D6">
|
||||
|
||||
<ns0:g id="ICON">
|
||||
|
||||
<ns0:path d="M59,43l-54,0l-0,-9c-0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1c-0,5.651 -0,11.154 -0,14c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l4,0c0.552,0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-4,0c-0.265,-0 -0.52,-0.105 -0.707,-0.293c-0.188,-0.187 -0.293,-0.442 -0.293,-0.707l-0,-3l54,0l-0,3c0,0.265 -0.105,0.52 -0.293,0.707c-0.187,0.188 -0.442,0.293 -0.707,0.293l-44,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1l12.606,0c-0.16,2.682 -0.855,6.147 -3.417,8l-1.689,0c-0.552,-0 -1,0.448 -1,1c-0,0.552 0.448,1 1,1l21,0c0.552,-0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-1.689,0c-2.562,-1.854 -3.257,-5.318 -3.417,-8l20.606,0c0.796,-0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c-0,-6.028 -0,-23.972 -0,-30c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879l-11,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1l11,-0c0.265,0 0.52,0.105 0.707,0.293c0.188,0.187 0.293,0.442 0.293,0.707l-0,25Zm-23.606,8l-6.788,0c-0.155,2.531 -0.785,5.68 -2.585,8l11.958,0c-1.8,-2.32 -2.43,-5.47 -2.585,-8Zm-6.394,-9l6.5,0c0.552,0 1,-0.448 1,-1c0,-0.552 -0.448,-1 -1,-1l-6.5,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1Zm-22,-4l0,2c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1l0,-2c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1Zm20.5,1l9.5,0c0.552,-0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-9.5,0c-0.552,-0 -1,0.448 -1,1c-0,0.552 0.448,1 1,1Zm2.501,-3l-3.406,0c-0.261,0 -0.511,-0.102 -0.698,-0.284c-3.344,-3.257 -6.897,-8.272 -6.897,-14.756c0,-7.152 5.824,-12.96 13,-12.96c7.176,0 13,5.808 13,12.96c-0,6.484 -3.553,11.499 -6.897,14.756c-0.187,0.182 -0.437,0.284 -0.698,0.284l-3.405,0c0,0 -1,-0.003 -1,-1l0,-11l-2,0l0,10.999c0,0.652 -0.447,1.001 -0.999,1.001Zm-21.001,-1l0,-13c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1l0,13c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1Zm26,-1c0.871,-0 1.995,-0 1.995,-0c2.941,-2.949 6.005,-7.36 6.005,-13.04c0,-6.05 -4.93,-10.96 -11,-10.96c-6.07,0 -11,4.91 -11,10.96c-0,5.68 3.064,10.091 6.005,13.04l1.995,0l0,-10l-2,0c-2.208,0 -4,-1.792 -4,-4c0,-2.208 1.792,-4 4,-4c2.208,0 4,1.792 4,4l0,2l2,0l0,-2c0,-2.208 1.792,-4 4,-4c2.208,0 4,1.792 4,4c0,2.208 -1.792,4 -4,4l-2,0l0,10Zm-18,-19l-11,0c-0.796,0 -1.559,0.316 -2.121,0.879c-0.563,0.562 -0.879,1.325 -0.879,2.121c-0,2.509 -0,7.081 -0,12c-0,0.552 0.448,1 1,1c0.552,0 1,-0.448 1,-1l-0,-12c-0,-0.265 0.105,-0.52 0.293,-0.707c0.187,-0.188 0.442,-0.293 0.707,-0.293c0,0 11,0 11,0c0.552,0 1,-0.448 1,-1c0,-0.552 -0.448,-1 -1,-1Zm18,7l2,0c1.104,0 2,-0.896 2,-2c0,-1.104 -0.896,-2 -2,-2c-1.104,0 -2,0.896 -2,2l0,2Zm-6,0l0,-2c0,-1.104 -0.896,-2 -2,-2c-1.104,0 -2,0.896 -2,2c0,1.104 0.896,2 2,2l2,0Zm-2.509,-14.792l-1,-1.732c-0.276,-0.478 -0.888,-0.642 -1.366,-0.366c-0.478,0.276 -0.642,0.888 -0.366,1.366l1,1.732c0.276,0.478 0.888,0.642 1.366,0.366c0.478,-0.276 0.642,-0.888 0.366,-1.366Zm12.75,1l1,-1.732c0.276,-0.478 0.112,-1.09 -0.366,-1.366c-0.478,-0.276 -1.09,-0.112 -1.366,0.366l-1,1.732c-0.276,0.478 -0.112,1.09 0.366,1.366c0.478,0.276 1.09,0.112 1.366,-0.366Zm-6.241,-2.208l0,-2c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1l0,2c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1Z" fill="#4A4A4A" stroke="#4A4A4A" />
|
||||
<ns0:path d="M59,43l-54,0l-0,-9c-0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1c-0,5.651 -0,11.154 -0,14c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l4,0c0.552,0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-4,0c-0.265,-0 -0.52,-0.105 -0.707,-0.293c-0.188,-0.187 -0.293,-0.442 -0.293,-0.707l-0,-3l54,0l-0,3c0,0.265 -0.105,0.52 -0.293,0.707c-0.187,0.188 -0.442,0.293 -0.707,0.293l-44,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1l12.606,0c-0.16,2.682 -0.855,6.147 -3.417,8l-1.689,0c-0.552,-0 -1,0.448 -1,1c-0,0.552 0.448,1 1,1l21,0c0.552,-0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-1.689,0c-2.562,-1.854 -3.257,-5.318 -3.417,-8l20.606,0c0.796,-0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c-0,-6.028 -0,-23.972 -0,-30c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879l-11,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1l11,-0c0.265,0 0.52,0.105 0.707,0.293c0.188,0.187 0.293,0.442 0.293,0.707l-0,25Zm-23.606,8l-6.788,0c-0.155,2.531 -0.785,5.68 -2.585,8l11.958,0c-1.8,-2.32 -2.43,-5.47 -2.585,-8Zm-6.394,-9l6.5,0c0.552,0 1,-0.448 1,-1c0,-0.552 -0.448,-1 -1,-1l-6.5,0c-0.552,0 -1,0.448 -1,1c0,0.552 0.448,1 1,1Zm-22,-4l0,2c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1l0,-2c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1Zm20.5,1l9.5,0c0.552,-0 1,-0.448 1,-1c-0,-0.552 -0.448,-1 -1,-1l-9.5,0c-0.552,-0 -1,0.448 -1,1c-0,0.552 0.448,1 1,1Zm2.501,-3l-3.406,0c-0.261,0 -0.511,-0.102 -0.698,-0.284c-3.344,-3.257 -6.897,-8.272 -6.897,-14.756c0,-7.152 5.824,-12.96 13,-12.96c7.176,0 13,5.808 13,12.96c-0,6.484 -3.553,11.499 -6.897,14.756c-0.187,0.182 -0.437,0.284 -0.698,0.284l-3.405,0c0,0 -1,-0.003 -1,-1l0,-11l-2,0l0,10.999c0,0.652 -0.447,1.001 -0.999,1.001Zm-21.001,-1l0,-13c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1l0,13c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1Zm26,-1c0.871,-0 1.995,-0 1.995,-0c2.941,-2.949 6.005,-7.36 6.005,-13.04c0,-6.05 -4.93,-10.96 -11,-10.96c-6.07,0 -11,4.91 -11,10.96c-0,5.68 3.064,10.091 6.005,13.04l1.995,0l0,-10l-2,0c-2.208,0 -4,-1.792 -4,-4c0,-2.208 1.792,-4 4,-4c2.208,0 4,1.792 4,4l0,2l2,0l0,-2c0,-2.208 1.792,-4 4,-4c2.208,0 4,1.792 4,4c0,2.208 -1.792,4 -4,4l-2,0l0,10Zm-18,-19l-11,0c-0.796,0 -1.559,0.316 -2.121,0.879c-0.563,0.562 -0.879,1.325 -0.879,2.121c-0,2.509 -0,7.081 -0,12c-0,0.552 0.448,1 1,1c0.552,0 1,-0.448 1,-1l-0,-12c-0,-0.265 0.105,-0.52 0.293,-0.707c0.187,-0.188 0.442,-0.293 0.707,-0.293c0,0 11,0 11,0c0.552,0 1,-0.448 1,-1c0,-0.552 -0.448,-1 -1,-1Zm18,7l2,0c1.104,0 2,-0.896 2,-2c0,-1.104 -0.896,-2 -2,-2c-1.104,0 -2,0.896 -2,2l0,2Zm-6,0l0,-2c0,-1.104 -0.896,-2 -2,-2c-1.104,0 -2,0.896 -2,2c0,1.104 0.896,2 2,2l2,0Zm-2.509,-14.792l-1,-1.732c-0.276,-0.478 -0.888,-0.642 -1.366,-0.366c-0.478,0.276 -0.642,0.888 -0.366,1.366l1,1.732c0.276,0.478 0.888,0.642 1.366,0.366c0.478,-0.276 0.642,-0.888 0.366,-1.366Zm12.75,1l1,-1.732c0.276,-0.478 0.112,-1.09 -0.366,-1.366c-0.478,-0.276 -1.09,-0.112 -1.366,0.366l-1,1.732c-0.276,0.478 -0.112,1.09 0.366,1.366c0.478,0.276 1.09,0.112 1.366,-0.366Zm-6.241,-2.208l0,-2c0,-0.552 -0.448,-1 -1,-1c-0.552,-0 -1,0.448 -1,1l0,2c0,0.552 0.448,1 1,1c0.552,-0 1,-0.448 1,-1Z" fill="#D1D1D6" stroke="#D1D1D6" />
|
||||
|
||||
</ns0:g>
|
||||
|
||||
|
@ -14,5 +14,6 @@
|
||||
"success": "Success",
|
||||
"error": "Error",
|
||||
"suggestion_sent_success": "Your message has been sent successfully!",
|
||||
"suggestion_send_error": "Error sending message. Try again later."
|
||||
"suggestion_send_error": "Error sending message. Try again later.",
|
||||
"email_credentials_error": "Email credentials not configured. Please set your email and password in the .env file."
|
||||
}
|
@ -14,5 +14,6 @@
|
||||
"success": "Succès",
|
||||
"error": "Erreur",
|
||||
"suggestion_sent_success": "Votre message a été envoyé avec succès !",
|
||||
"suggestion_send_error": "Erreur lors de l'envoi du message. Essayez à nouveau plus tard."
|
||||
"suggestion_send_error": "Erreur lors de l'envoi du message. Essayez à nouveau plus tard.",
|
||||
"email_credentials_error": "Identifiants de messagerie non configurés. Veuillez définir votre email et mot de passe dans le fichier .env."
|
||||
}
|
@ -1,2 +1,3 @@
|
||||
PyQt6
|
||||
pyinstaller
|
||||
pyinstaller
|
||||
python-dotenv
|
@ -4,6 +4,13 @@ setlocal enabledelayedexpansion
|
||||
REM === PATH SETUP ===
|
||||
set PARENT_DIR=%~dp0..
|
||||
set CONFIG_FILE=%PARENT_DIR%\config.json
|
||||
set ENV_FILE=%PARENT_DIR%\.env
|
||||
|
||||
REM Check if .env file exists
|
||||
if not exist "%ENV_FILE%" (
|
||||
echo [ERROR] .env file not found. Please copy .env.example to .env and configure it.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM === Extract values from config.json ===
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
@ -14,8 +21,9 @@ for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
"Get-Content '%CONFIG_FILE%' | ConvertFrom-Json | Select-Object -ExpandProperty app_name"') do set APP_NAME=%%i
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
"Get-Content '%CONFIG_FILE%' | ConvertFrom-Json | Select-Object -ExpandProperty architecture"') do set ARCHITECTURE=%%i
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
"Get-Content '%CONFIG_FILE%' | ConvertFrom-Json | Select-Object -ExpandProperty python_path"') do set SYSTEM_PYTHON=%%i
|
||||
|
||||
REM === Extract python path from .env file ===
|
||||
for /f "usebackq tokens=2 delims==" %%i in (`findstr "PYTHON_PATH" "%ENV_FILE%"`) do set SYSTEM_PYTHON=%%i
|
||||
|
||||
set VENV_PATH=%PARENT_DIR%\WINenv_%ARCHITECTURE%
|
||||
set EXE_NAME=%APP_NAME%-Windows-%ARCHITECTURE%
|
||||
|
@ -5,6 +5,13 @@ REM Set file paths
|
||||
set ROOT_DIR=%~dp0..
|
||||
set CONFIG_FILE=%ROOT_DIR%\config.json
|
||||
set REQUIREMENTS=%ROOT_DIR%\requirements.txt
|
||||
set ENV_FILE=%ROOT_DIR%\.env
|
||||
|
||||
REM Check if .env file exists
|
||||
if not exist "%ENV_FILE%" (
|
||||
echo [ERROR] .env file not found. Please copy .env.example to .env and configure it.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Extract config.json fields using PowerShell
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
@ -12,9 +19,9 @@ for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
"Get-Content '%CONFIG_FILE%' | ConvertFrom-Json | Select-Object -ExpandProperty architecture"') do set ARCHITECTURE=%%i
|
||||
|
||||
for /f "delims=" %%i in ('powershell -NoProfile -Command ^
|
||||
"Get-Content '%CONFIG_FILE%' | ConvertFrom-Json | Select-Object -ExpandProperty python_path"') do set PYTHON_EXEC=%%i
|
||||
|
||||
REM Extract python path from .env file
|
||||
for /f "usebackq tokens=2 delims==" %%i in (`findstr "PYTHON_PATH" "%ENV_FILE%"`) do set PYTHON_EXEC=%%i
|
||||
|
||||
REM Construct python executable path
|
||||
set ENV_NAME=WINenv_%ARCHITECTURE%
|
||||
@ -22,7 +29,7 @@ set ENV_PATH=%ROOT_DIR%\%ENV_NAME%
|
||||
|
||||
if not exist "%PYTHON_EXEC%" (
|
||||
echo [ERROR] Python introuvable à: %PYTHON_EXEC%
|
||||
echo Veuillez vérifier votre config.json ou le dossier d'installation.
|
||||
echo Veuillez vérifier votre .env ou le dossier d'installation.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user