a mega cool windows xp app
1# Shortwave Radio Development Guide
2
3## Project Overview
4- **Language**: C-style C++ for Win32 API compatibility
5- **Target Platform**: Windows XP
6- **Primary Goal**: Vintage Shortwave Radio Tuner Application
7
8## Build & Development Commands
9- **Build**: `nix build`
10 - Compiles Shortwave Radio application
11- **Build Installer**: `nix build .#installer` or `build-installer`
12 - Creates Windows installer (ShortwaveRadioInstaller.exe)
13- **Dev Setup**: `setup-dev`
14 - Generates `compile_commands.json`
15- **Deploy**: `deploy-to-xp`
16 - Copies executable and DLLs to XP VM
17- **Debugging**: Use Visual Studio or WinDbg
18- **Testing**: Manual testing on Windows XP
19
20## Important: Nix Build System
21- **CRITICAL**: Nix only includes files tracked in git
22- **Always run**: `git add .` after adding new files/libraries
23- **BASS Integration**: Files in `libs/` directory must be committed to git
24- **Build fails?** Check if new files are added to git with `git status`
25
26## Code Style Guidelines
27
28### Formatting
29- Use tabs for indentation
30- Opening braces on same line
31- Max line length: 80 characters
32- Avoid trailing whitespace
33
34### Naming Conventions
35- Functions: `PascalCase` (e.g., `StartBassStreaming`)
36- Constants/Macros: `UPPER_SNAKE_CASE` (e.g., `ID_ABOUT`)
37- Global Variables: `g_` prefix (e.g., `g_radio`)
38- Avoid abbreviations
39
40### Types & Memory
41- Prefer standard C types: `int`, `char*`
42- Use Win32 types: `HWND`, `LPARAM`
43- Avoid STL
44- Static allocation preferred
45- No dynamic memory allocation
46- No exceptions
47
48### Error Handling
49- Always check Win32 API return values
50- Validate pointers before use
51- Use `NULL` checks
52- Log errors to console/file
53- Graceful failure modes
54
55### Imports & Headers
561. `<windows.h>`
572. Standard C headers
583. Project-specific headers
59- Use include guards
60- Minimize header dependencies
61
62### Documentation
63- Comment complex Win32 logic
64- Document function parameters/returns
65
66## Best Practices
67- Prioritize Win32 API compatibility
68- Minimize external dependencies
69- Focus on performance and low resource usage
70- Test thoroughly on target Windows XP environment
71
72## Radio Features
73- Vintage shortwave radio interface
74- Internet radio streaming capability
75- Realistic tuning and signal simulation
76- Keyboard and mouse controls
77- Debug console for troubleshooting