mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed missing SkinPath= during first launch
This commit is contained in:
parent
0ce52f744a
commit
4647c44d92
@ -799,6 +799,12 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
|
||||
|
||||
const WCHAR* iniFile = m_IniFile.c_str();
|
||||
|
||||
// Create a default Rainmeter.ini file if needed
|
||||
if (_waccess(iniFile, 0) == -1)
|
||||
{
|
||||
CreateOptionsFile();
|
||||
}
|
||||
|
||||
// Set file locations
|
||||
{
|
||||
m_SettingsPath = ExtractPath(m_IniFile);
|
||||
@ -823,6 +829,17 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
|
||||
CreateDataFile();
|
||||
}
|
||||
|
||||
// Reset log file
|
||||
CSystem::RemoveFile(m_LogFile);
|
||||
|
||||
m_Debug = 0!=GetPrivateProfileInt(L"Rainmeter", L"Debug", 0, iniFile);
|
||||
m_Logging = 0!=GetPrivateProfileInt(L"Rainmeter", L"Logging", 0, iniFile);
|
||||
|
||||
if (m_Logging)
|
||||
{
|
||||
StartLogging();
|
||||
}
|
||||
|
||||
// Determine the language resource to load
|
||||
std::wstring resource = m_Path + L"Languages\\";
|
||||
if (GetPrivateProfileString(L"Rainmeter", L"Language", L"", buffer, MAX_LINE_LENGTH, iniFile) == 0)
|
||||
@ -864,17 +881,6 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
|
||||
}
|
||||
}
|
||||
|
||||
// Reset log file
|
||||
CSystem::RemoveFile(m_LogFile);
|
||||
|
||||
m_Debug = 0!=GetPrivateProfileInt(L"Rainmeter", L"Debug", 0, iniFile);
|
||||
m_Logging = 0!=GetPrivateProfileInt(L"Rainmeter", L"Logging", 0, iniFile);
|
||||
|
||||
if (m_Logging)
|
||||
{
|
||||
StartLogging();
|
||||
}
|
||||
|
||||
// Get skin folder path
|
||||
size_t len = GetPrivateProfileString(L"Rainmeter", L"SkinPath", L"", buffer, MAX_LINE_LENGTH, iniFile);
|
||||
if (len > 0 &&
|
||||
@ -905,12 +911,6 @@ int CRainmeter::Initialize(LPCWSTR iniPath)
|
||||
m_SkinPath = m_Path + L"Skins\\";
|
||||
}
|
||||
|
||||
// Create a default Rainmeter.ini file if needed
|
||||
if (_waccess(iniFile, 0) == -1)
|
||||
{
|
||||
CreateOptionsFile();
|
||||
}
|
||||
|
||||
// Create user skins, themes, addons, and plugins folders if needed
|
||||
CreateComponentFolders(bDefaultIniLocation);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user