Implement user-configurable settings with enhanced UI
Configuration Changes: - Store config.ini in platform-specific user directories - macOS: ~/Library/Application Support/MSMD/ - Windows: %APPDATA%\MSMD\ - Linux: ~/.config/MSMD/ - Automatically create default config on first run - Config file now editable and persists across app updates Settings Dialog Enhancements: - Add "Show Reference Creator" checkbox to Settings UI - All settings now configurable through UI (no manual editing required) - Settings dialog dynamically updates reference creator button visibility Technical Implementation: - Add getUserConfigDir(), getConfigFilePath(), createDefaultConfig() helper functions - Update readConfig() and writeConfig() to use user config location - Enhanced Settings.py with QCheckBox for showReferenceCreator - Automatic config migration from old location (if exists) Documentation: - Update README with config file locations - Document both UI and manual configuration methods - Update troubleshooting section This resolves the bundled app config.ini issue - config is now user-writable and survives app updates. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
33
README.md
33
README.md
@@ -151,7 +151,30 @@ Add sound effects by placing WAV files named `sound0.wav`, `sound1.wav`, etc., i
|
||||
|
||||
## Configuration
|
||||
|
||||
Edit `config.ini` to customize robot behavior:
|
||||
MSMD Player stores its configuration in a platform-specific user directory:
|
||||
|
||||
- **macOS**: `~/Library/Application Support/MSMD/config.ini`
|
||||
- **Windows**: `%APPDATA%\MSMD\config.ini`
|
||||
- **Linux**: `~/.config/MSMD/config.ini`
|
||||
|
||||
A default configuration file is automatically created on first run.
|
||||
|
||||
### Changing Settings
|
||||
|
||||
**Option 1: Settings Dialog (Recommended)**
|
||||
|
||||
Click the Settings button (gear icon) in the main window to open the Settings dialog. All configuration options can be changed through the UI:
|
||||
- Upgrade Trigger (Hotspot or Level)
|
||||
- Upgrade Mode (Both, Left, Right, or Distance)
|
||||
- Minimum Power to Move (0-255)
|
||||
- Maximum Power to Move (0-255)
|
||||
- Show Reference Creator checkbox
|
||||
|
||||
Changes are saved immediately when you click "Set".
|
||||
|
||||
**Option 2: Manual Edit**
|
||||
|
||||
You can also manually edit the `config.ini` file:
|
||||
|
||||
```ini
|
||||
[robot]
|
||||
@@ -162,6 +185,8 @@ maxpowertomove = 95 # Maximum power (0-255)
|
||||
showReferenceCreator = 0 # Show reference creator button (0 or 1)
|
||||
```
|
||||
|
||||
Restart the application for manual changes to take effect.
|
||||
|
||||
### Configuration Options
|
||||
|
||||
- **upgradetrigger**: When to upgrade robot power
|
||||
@@ -361,7 +386,11 @@ See project repository for license information.
|
||||
## Troubleshooting
|
||||
|
||||
### "Config.ini was not found"
|
||||
Create a `config.ini` file in the project root using the configuration template above.
|
||||
This error should not occur as the config file is created automatically on first run. If you see this error:
|
||||
- Check that the application has write permissions to the user config directory
|
||||
- On macOS: `~/Library/Application Support/MSMD/`
|
||||
- On Windows: `%APPDATA%\MSMD\`
|
||||
- On Linux: `~/.config/MSMD/`
|
||||
|
||||
### "hotspots.json does not exist"
|
||||
Ensure your content folder contains a valid `hotspots.json` file with entries for each image.
|
||||
|
||||
Reference in New Issue
Block a user