Is there a way to change the ADDON folder?

Is there a way to change the ADDON folder?

Postby Kotzi » 09 Oct 2021, 17:11

I'm currently using windows and i would like to know if there is a way to change the addon folder?
Kotzi
 
Posts: 2
Joined: 09 Oct 2021, 16:58

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

Postby bzt » 12 Oct 2021, 09:14

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
User avatar
bzt
 
Posts: 332
Joined: 23 May 2021, 21:46

Who is online

Users browsing this forum: No registered users and 1 guest