Delivering settings
The service resolves the storefront’s branding and validates it. The UI only
asks for the result with GetBranding, and never reads config.yaml or the
registry itself. Branding works offline.
This sets a title and an accent colour on Windows:
reg add "HKLM\SOFTWARE\Policies\SofCat\branding" /v title /t REG_SZ /d "Acme Software Center" /freg add "HKLM\SOFTWARE\Policies\SofCat\branding" /v accent /t REG_SZ /d "#0b6e4f" /fThe value names are the keys of the branding: block in config.yaml. What
each key does is on Branding,
Layout and behaviour and
Catalog presentation.
Sources and precedence
Section titled “Sources and precedence”Each field comes from the first source that sets it:
- A
branding.yamlcompiled into a rebranded build. See Built-in branding. Stock SofCat has none. - Managed settings. On Windows these are the values under
HKLM\SOFTWARE\Policies\SofCat\branding. On macOS they are thebrandingdict in/Library/Managed Preferences/<IDENTIFIER>.plist. - The
branding:block inconfig.yaml. - Nothing. The storefront then looks unbranded.
A rebranded build reads HKLM\SOFTWARE\Policies\<Name>\branding and its own
plist instead, where <Name> is the brand’s NAME. A profile for one build
never brands another.
Resolution is per field. A policy that sets only accent leaves title to
config.yaml, so you can set the repository in one place and the look in
another. A key you remove from the policy goes back to the next source.
The general rules for managed settings, including the types, the file checks
on macOS and the keys outside branding, are in
Managed settings.
Windows
Section titled “Windows”Set the values under HKLM\SOFTWARE\Policies\SofCat\branding. Use REG_SZ
for a string, and REG_MULTI_SZ for a list. sections is the one list key.
reg add "HKLM\SOFTWARE\Policies\SofCat\branding" /v nav_placement /t REG_SZ /d left /freg add "HKLM\SOFTWARE\Policies\SofCat\branding" /v sections /t REG_MULTI_SZ /d "Apps\0Tools" /fDeliver the same values at scale with Intune, as a custom OMA-URI setting or a registry script, or with Group Policy Preferences.
Deliver a configuration profile whose payload sets the branding dict in
your build’s preferences domain, ca.hrndz.sofcat for stock SofCat. The
keys are the same, and sections is an array of strings:
<key>branding</key><dict> <key>title</key> <string>Acme Software Center</string> <key>accent</key> <string>#0b6e4f</string> <key>sections</key> <array> <string>Apps</string> <string>Tools</string> </array></dict>SofCat ignores the plist unless root owns it and neither its group nor others can write it.
When changes apply
Section titled “When changes apply”The service reads managed settings at the start of every run, so a policy
change shows after the next run. A config.yaml change needs a service
restart.
A value that fails its check is dropped, with a message at debug level only.
The config.yaml value does not replace it, so the field shows its
unbranded default.
Checking the result
Section titled “Checking the result”Ask the service what it resolved:
sofcat.exe -S GetBrandingThe command prints the payload the UI receives, with the logo replaced by its size in bytes. A field missing from the output was unset or failed its check.
How the UI uses it
Section titled “How the UI uses it”The UI caches the last payload in the browser’s localStorage under
sofcat.branding.v1. At start it applies the cached payload, then fetches
the current one and applies that.