You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
selection-logger/
├── Makefile # Cross-platform build system
├── README.md # Main documentation
├── DEVELOPMENT.md # This file
├── create_release.sh # Release packaging script
├── test_wine_auto.sh # Wine testing script
├── test_wine.sh # Legacy Wine test script
│
├── src/ # Source files
│ ├── memory_daemon_auto_cross.cpp # Cross-platform auto monitoring
│ ├── memory_daemon_cross.cpp # DEPRECATED: Manual mode
│ ├── clipboard.cpp/h # Platform-specific clipboard
│ ├── platform.cpp/h # Platform detection
│ ├── win32_compat.cpp/h # Win32 compatibility layer
│ ├── service_win32.cpp/h # Windows service implementation
│ └── main_win32.cpp # Windows main entry point
│
├── dist/ # Distribution files
│ ├── linux/ # Linux distribution
│ └── windows/ # Windows distribution
│
└── install_*.sh # Installation scripts
Build System
Makefile Targets
# Default build (detects platform)
make
# Linux build
make PLATFORM=linux
# Windows build (dynamic linking)
make PLATFORM=windows
# Windows build (static linking, no DLLs)
make PLATFORM=windows STATIC=1
# Release build (static linking for Windows)
make release PLATFORM=windows
# Clean build artifacts
make clean
Platform Detection
Linux: Uses X11 clipboard via xclip
Windows: Uses Win32 API (OpenClipboard, GetClipboardData)
make clean && make PLATFORM=linux
./selection-logger-auto --both --interval 1000
3. Build and Test (Windows via Wine)
make clean && make PLATFORM=windows STATIC=1
./test_wine_auto.sh
4. Native Testing
Linux: Run directly
Windows: Copy EXE to Windows machine
Testing Strategy
Unit Tests
# Test clipboard functionality
./test_clipboard_formats
# Test selection monitoring
./test_selection
# Test file operations
./test_file_copy
Integration Tests
# Wine testing (Windows compatibility)
./test_wine_auto.sh
# Cross-platform consistency# 1. Build both platforms# 2. Run same test scenarios# 3. Compare log outputs
Manual Testing
Copy text with Ctrl+C
Select text with mouse
Check log file: ~/memories/2026/04.txt
Verify timestamps and content
Release Process
1. Version Bumping
# Update version in create_release.sh
VERSION=${1:-1.0.0}
2. Build Release Packages
./create_release.sh 1.1.0
3. Test Release Packages
# Test Windows package
unzip dist/release_1.1.0/selection-logger-windows-1.1.0.zip
cd windows
wine selection-logger-auto.exe --help
# Test Linux package
tar -xzf dist/release_1.1.0/selection-logger-linux-1.1.0.tar.gz
cd linux
./selection-logger-auto --help
# Build with debug symbols
make clean && make PLATFORM=linux CXXFLAGS="-g -O0"# Run with gdb
gdb --args ./selection-logger-auto --both
# Check system dependencies
ldd ./selection-logger-auto
Windows Debugging (via Wine)
# Build with debug symbols
make clean && make PLATFORM=windows STATIC=1 CXXFLAGS="-g -O0"# Run with Wine debug output
WINEDEBUG=+seh wine selection-logger-auto.exe --both
# Check DLL dependencies (should be none with static linking)
objdump -p selection-logger-auto.exe | grep "DLL Name:"
Log Analysis
# Monitor log file in real-time
tail -f ~/memories/2026/04.txt
# Check log directory structure
ls -la ~/memories/
ls -la ~/memories/2026/
Contributing
1. Fork Repository
git clone https://github.com/yourusername/selection-logger.git
cd selection-logger
# Test on Linux
make clean && make PLATFORM=linux
./selection-logger-auto --both
# Test on Windows (via Wine)
make clean && make PLATFORM=windows STATIC=1
./test_wine_auto.sh