Page 1 of 1

Is there a way to change the ADDON folder?

PostPosted: 09 Oct 2021, 17:11
by Kotzi
I'm currently using windows and i would like to know if there is a way to change the addon folder?

Re: Is there a way to change the ADDON folder?

PostPosted: 12 Oct 2021, 09:14
by bzt
Hi,

I've never used STK on Win, but browsing the source tells me that addons are always looked up next to the config directory: see here.
{l Code}: {l Select All Code}
        m_addons_dir  = m_user_config_dir+"../addons/";

And in turn, you can override the config directory's location using the APPDATA environment variable: see here.
{l Code}: {l Select All Code}
        DWORD length = GetEnvironmentVariable(L"APPDATA", env.data(), 32767);
        if (length != 0)
        {
            m_user_config_dir = StringUtils::wideToUtf8(env.data());

Hope this helps,
bzt