musescore / musescore/MuseScore
Ability to override config file path via command line or environment variables
@cbjeukendrup is already working on this.
Since Aug 23, 2024.
- Dominant language
- C++
- Stars
- 15.1k
- Forks
- 3.3k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 91
Description
Your idea
As per MS3, have the ability to run two different (stable) versions of MuseScore on the same user profile that use different config file paths.
Problem to be solved
I installed the "MuseScore 4 Testing" 4.4 beta and found it was sharing preferences with 4.3, which I definitely don't want (for a start, files saved with 4.4 can't be opened in 4.3 by default, but I want them to use different colour schemes etc. so I know when I'm doing "work" vs "testing"). If I were able to specify an alternative config path location via a command-line parameter (as per MS 3.6) this would be solved.
Prior art
MS 3.6 supported this.
Additional context
In the code it's just
#ifdef MUSE_APP_UNSTABLE
QCoreApplication::setApplicationName("MuseScore4Development");
#else
QCoreApplication::setApplicationName("MuseScore4");
#endif
And Qt then resolves the config file path via the standard OS-specific way of determining the "AppData" area (in Windows, this is C:\Users<user>\AppData\Local) and appends the Organization name (hardcoded to MuseScore) and the ApplicationName as above to form the path. There appears to be no way to override via command line parameter or environment variable.
In fact my preference would be the ability to place an .ini file in the same directory as the exe to override this, so even if I launched the exe directly from the bin directory it would still use the expected location.
For now I'm just testing the 4.4 nightlies, which are Development builds, and use the MuseScore/MuseScore4Development config path.
Checklist
- This request follows the guidelines for reporting issues
- I have verified that this feature request has not been logged before, by searching the issue tracker for similar requests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.