Subversion Repositories spk

Rev

Rev 229 | Rev 238 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 229 Rev 233
Line 5037... Line 5037...
5037
	// if file exists, read it, otherwise, just add
5037
	// if file exists, read it, otherwise, just add
5038
	if (!exeFile.empty() && CFileIO::Exists(exeFile))
5038
	if (!exeFile.empty() && CFileIO::Exists(exeFile))
5039
		m_gameExe.readFile(exeFile);
5039
		m_gameExe.readFile(exeFile);
5040
	else
5040
	else
5041
	{
5041
	{
5042
		m_gameExe.parseExe(L"x2.exe|0:5:NOSAVESUBDIR:HKCU/Software/EgoSoftware/X2/ModName:X2 The Threat:!GAMEDIR!:2:1604608!2150400:1.4 Artifical Life:1974272:1.5 Uplink");
5042
		m_gameExe.parseExe(L"x2.exe|0:5:1:NOSAVESUBDIR:HKCU/Software/EgoSoftware/X2/ModName:X2 The Threat:!GAMEDIR!:2:1604608!2150400:1.4 Artifical Life:1974272:1.5 Uplink");
5043
		m_gameExe.parseExe(L"x3.exe|30:5:0:HKCU/Software/Egosoft/X3/ModName:X3 Reunion:Egosoft/X3:2:2347008:2.0 Bala Gi:2367488!2375680:2.5 Uplink");
5043
		m_gameExe.parseExe(L"x3.exe|30:5:1:0:HKCU/Software/Egosoft/X3/ModName:X3 Reunion:Egosoft/X3:2:2347008:2.0 Bala Gi:2367488!2375680:2.5 Uplink");
5044
		m_gameExe.parseExe(L"x3tc.exe|35:5:NO_XOR|TC_TEXT|MYDOCLOG:HKCU/Software/Egosoft/X3TC/ModName:X3 Terran Conflict:Egosoft/X3TC:3:1933464!1933520:2.0 Aldrin Expansion:-1:2.5 A New Home (Superbox):-1:3.0 Balance of Power");
5044
		m_gameExe.parseExe(L"x3tc.exe|35:5:1:NO_XOR|TC_TEXT|MYDOCLOG:HKCU/Software/Egosoft/X3TC/ModName:X3 Terran Conflict:Egosoft/X3TC:3:1933464!1933520:2.0 Aldrin Expansion:-1:2.5 A New Home (Superbox):-1:3.0 Balance of Power");
5045
		m_gameExe.parseExe(L"x3ap.exe|38:2:NO_XOR|TC_TEXT|MYDOCLOG|ADDON:HKCU/Software/Egosoft/X3AP/ModName:X3 Albion Prelude:Egosoft/X3AP:addon!x3tc.exe:3:-1:2.0 The War Continues:-1:2.5 Operation Loose Ends:-1:3.0 Shady Business");
5045
		m_gameExe.parseExe(L"x3ap.exe|38:2:2:NO_XOR|TC_TEXT|MYDOCLOG|ADDON:HKCU/Software/Egosoft/X3AP/ModName:X3 Albion Prelude:Egosoft/X3AP:addon!x3tc.exe:3:-1:2.0 The War Continues:-1:2.5 Operation Loose Ends:-1:3.0 Shady Business");
5046
		m_gameExe.parseExe(L"x3fl.exe|39:3:NO_XOR|TC_TEXT|MYDOCLOG|ADDON:HKCU/Software/Egosoft/X3FL/ModName:X3 Farnham's Legacy:Egosoft/X3FL:addon2!x3tc.exe:0");
5046
		m_gameExe.parseExe(L"x3fl.exe|39:3:3:NO_XOR|TC_TEXT|MYDOCLOG|ADDON:HKCU/Software/Egosoft/X3FL/ModName:X3 Farnham's Legacy:Egosoft/X3FL:addon2!x3tc.exe:0");
5047
	}
5047
	}
5048
}
5048
}
5049
void CPackages::startup(const Utils::WString &dir, const Utils::WString &tempDir, const Utils::WString &myDoc, const Utils::WString &mod)
5049
void CPackages::startup(const Utils::WString &dir, const Utils::WString &tempDir, const Utils::WString &myDoc, const Utils::WString &mod)
5050
{
5050
{
5051
	startup(dir, tempDir, myDoc);
5051
	startup(dir, tempDir, myDoc);
Line 7174... Line 7174...
7174
		return; // no global settings
7174
		return; // no global settings
7175
 
7175
 
7176
	Utils::WStringList globals;
7176
	Utils::WStringList globals;
7177
	if (readGlobals(globals))
7177
	if (readGlobals(globals))
7178
	{
7178
	{
-
 
7179
		// apply package settings
-
 
7180
		for (CListNode<CBaseFile>* node = m_lPackages.Front(); node; node = node->next())
-
 
7181
		{
-
 
7182
			CBaseFile* p = node->Data();
-
 
7183
			auto& list = p->getGlobals();
-
 
7184
			for (auto itr = list.begin(); itr != list.end(); itr++)
-
 
7185
			{
-
 
7186
				if(!globals.changeData((*itr)->str, (*itr)->data))
-
 
7187
					globals.pushBack((*itr)->str, (*itr)->data);
-
 
7188
			}
-
 
7189
		}
-
 
7190
 
7179
		// apply out settings
7191
		// apply out settings
7180
		for(auto itr = _lGlobals.begin(); itr != _lGlobals.end(); itr++)
7192
		for (auto itr = _lGlobals.begin(); itr != _lGlobals.end(); itr++)
-
 
7193
		{
7181
			globals.changeData((*itr)-&gt;str, (*itr)->data);
7194
			if(!globals.changeData((*itr)-&gt;str, (*itr)->data))
-
 
7195
				globals.pushBack((*itr)->str, (*itr)->data);
-
 
7196
		}
7182
 
7197
 
7183
		// now write it
7198
		// now write it
7184
		Utils::WStringList writeList;
7199
		Utils::WStringList writeList;
7185
		for(auto itr = globals.begin(); itr != globals.end(); itr++)
7200
		for(auto itr = globals.begin(); itr != globals.end(); itr++)
7186
			writeList.pushBack((*itr)->str + L";" + (*itr)->data + L";");
7201
			writeList.pushBack((*itr)->str + L";" + (*itr)->data + L";");