One Build Commands Menu, Two Unrelated Toolchains
Geany has exactly one Build → Set Build Commands menu, shared by every file it has ever opened. That's fine with one toolchain. It stops being fine the moment there are two unrelated ones on the same machine — the SDCC/8051 setup behind the STC89C52RC page and the GNU RISC-V GCC setup behind the CH32V003F4P6 page both want to own the same menu, and hand-editing it every time a project switches is exactly the kind of thing that quietly goes stale.
The fix isn't manual switching — it's running two fully independent copies of Geany's configuration, each with its own Build Commands, filetypes, and recent-files list, launched from two separate shortcuts. Geany was built to support this directly.
The Mechanism
Everything that makes a Geany install "yours" — Build Commands, recent files, keybindings — lives in one folder, not in the installed program files:
C:\Users\<you>\AppData\Roaming\geany\
geany.exe itself is completely generic; point it at a different folder and it behaves like an entirely separate installation. Geany's own command-line interface documents the switch that does this:
-c dir_name, --config=dir_name — use an alternate configuration directory. The default on Windows is %APPDATA%\geany\.
Setting It Up
- Close every open Geany window (it writes its configuration back to disk on exit).
- Pick a folder name per toolchain, e.g.
Geany-STC-SDCCandGeany-CH32V003under%APPDATA%. No need to create them by hand — Geany creates and populates a configuration directory automatically the first time it's launched against a path that doesn't yet exist. - Create one Desktop shortcut per configuration, target:
"C:\Program Files\Geany\bin\geany.exe" -c "C:\Users\<you>\AppData\Roaming\Geany-STC-SDCC"
"C:\Program Files\Geany\bin\geany.exe" -c "C:\Users\<you>\AppData\Roaming\Geany-CH32V003"
Quote both the executable path and the -c argument in full — both Program Files and AppData\Roaming contain spaces. Rename each shortcut to something unambiguous ("Geany (STC/SDCC)", "Geany (CH32V003)") and consider a different icon color per shortcut as a cheap safeguard against opening the wrong one on autopilot.
- Launch each shortcut once and set its Build Commands independently (Build → Set Build Commands) — SDCC commands in one, the CH32V003 batch file (
cmd /c build_ch32v003.bat) in the other. - Verify: open each, confirm its Build Commands and Recent Files are completely independent of the other. If they're not, the usual cause is a typo in one of the two
-cpaths, causing both to resolve to the same default configuration directory.
One Cosmetic Wrinkle
Because both shortcuts launch the identical geany.exe, Windows may group their taskbar icons together despite the different shortcut names — taskbar grouping keys off the executable, not the launch arguments. Purely cosmetic; both windows still run fully independently. Differently-colored shortcut icons are the simplest way to tell them apart at a glance.
Get the Full Write-Up
The complete guide covers the exact folder layout, both shortcut targets in full, the Build Commands table for the STC89C52RC and CH32V003 profiles side by side, the verification checklist, and a short note on extending this to a third toolchain.
See Also
- STC89C52RC with SDCC and Geany — the first of the two profiles this setup keeps separate.
- CH32V003F4P6 with WCH-LinkE, GNU RISC-V GCC and Geany — the second.