Subversion Repositories spk

Rev

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

Rev 202 Rev 203
Line 1682... Line 1682...
1682
			{
1682
			{
1683
				if ( !icon->UncompressData() )
1683
				if ( !icon->UncompressData() )
1684
					package->setIcon(NULL, "");
1684
					package->setIcon(NULL, "");
1685
				else
1685
				else
1686
				{
1686
				{
1687
					CFileIO iconFile(m_sCurrentDir + L"/PluginManager/Icons/" + package->author().toWString() + L"_" + package->name().toWString() + L"." + package->iconExt());
1687
					CFileIO iconFile(m_sCurrentDir + L"/PluginManager/Icons/" + package->author() + L"_" + package->name() + L"." + package->iconExt());
1688
					if ( iconFile.WriteData((const char *)icon->GetData(), icon->GetDataSize()) )
1688
					if ( iconFile.WriteData((const char *)icon->GetData(), icon->GetDataSize()) )
1689
					{
1689
					{
1690
						icon->setFilename(package->author().toWString() + L"_" + package->name().toWString() + L"." + package->iconExt());
1690
						icon->setFilename(package->author() + L"_" + package->name() + L"." + package->iconExt());
1691
						icon->setFullDir(m_sCurrentDir + L"/PluginManager/Icons");
1691
						icon->setFullDir(m_sCurrentDir + L"/PluginManager/Icons");
1692
					}
1692
					}
1693
					else
1693
					else
1694
						package->setIcon(NULL, "");
1694
						package->setIcon(NULL, "");
1695
				}
1695
				}
Line 2070... Line 2070...
2070
	}
2070
	}
2071
 
2071
 
2072
	// check if it needs depancies
2072
	// check if it needs depancies
2073
	if ( package->AnyDependacies() )
2073
	if ( package->AnyDependacies() )
2074
	{
2074
	{
2075
		if ( this->GetMissingDependacies(package, NULL, true) )
2075
		if ( this->getMissingDependacies(package, NULL, true) )
2076
		{
2076
		{
2077
			m_iError = PKERR_MISSINGDEP;
2077
			m_iError = PKERR_MISSINGDEP;
2078
			return false;
2078
			return false;
2079
		}
2079
		}
2080
	}
2080
	}
Line 2150... Line 2150...
2150
int CPackages::GetDependacyList(CBaseFile *package, CLinkList<CBaseFile> *list)
2150
int CPackages::GetDependacyList(CBaseFile *package, CLinkList<CBaseFile> *list)
2151
{
2151
{
2152
	for ( CListNode<CBaseFile> *node = m_lPackages.Front(); node; node = node->next() )
2152
	for ( CListNode<CBaseFile> *node = m_lPackages.Front(); node; node = node->next() )
2153
	{
2153
	{
2154
		CBaseFile *p = node->Data();
2154
		CBaseFile *p = node->Data();
2155
		if ( p->IsPackageNeeded(package->name(), package->author()) )
2155
		if ( p->isPackageNeeded(package->name(), package->author()))
2156
			list->push_back(p);
2156
			list->push_back(p);
2157
	}
2157
	}
2158
 
2158
 
2159
	return list->size();
2159
	return list->size();
2160
}
2160
}
Line 2215... Line 2215...
2215
				if ( spk->IsAnotherMod() )
2215
				if ( spk->IsAnotherMod() )
2216
				{
2216
				{
2217
					for ( CListNode<CBaseFile> *node = m_lInstallList.Front(); node; node = node->next() )
2217
					for ( CListNode<CBaseFile> *node = m_lInstallList.Front(); node; node = node->next() )
2218
					{
2218
					{
2219
						CBaseFile *p = node->Data();
2219
						CBaseFile *p = node->Data();
2220
						if ( spk->otherName().Compare(p->name()) && spk->otherAuthor().Compare(p->author()) )
2220
						if ( spk->otherName().Compare(p->name().toString()) && spk->otherAuthor().Compare(p->author().toString()) )
2221
						{
2221
						{
2222
							m_lInstallList.insert(m_lInstallList.FindPos(p) + 2, package);
2222
							m_lInstallList.insert(m_lInstallList.FindPos(p) + 2, package);
2223
							added = true;
2223
							added = true;
2224
							break;
2224
							break;
2225
						}
2225
						}
Line 2237... Line 2237...
2237
 
2237
 
2238
					CSpkFile *spk = (CSpkFile *)node->Data();
2238
					CSpkFile *spk = (CSpkFile *)node->Data();
2239
					if ( !spk->isAnotherMod() )
2239
					if ( !spk->isAnotherMod() )
2240
						continue;
2240
						continue;
2241
 
2241
 
2242
					if ( spk->otherName().Compare(package->name()) && spk->otherAuthor().Compare(package->author()) )
2242
					if ( spk->otherName().Compare(package->name().toString()) && spk->otherAuthor().Compare(package->author().toString()) )
2243
					{
2243
					{
2244
						added = true;
2244
						added = true;
2245
						m_lInstallList.insert(node->Data(), package);
2245
						m_lInstallList.insert(node->Data(), package);
2246
						break;
2246
						break;
2247
					}
2247
					}
Line 3236... Line 3236...
3236
		if ( f->IsFakePatch() )
3236
		if ( f->IsFakePatch() )
3237
		{
3237
		{
3238
			// find package the fake patch belongs to
3238
			// find package the fake patch belongs to
3239
			if ( checkPackage )
3239
			if ( checkPackage )
3240
			{
3240
			{
3241
				newFilename = m_sCurrentDir + L"/PluginManager/Disabled/FakePatches/FakePatch_" + checkPackage->getNameValidFile() + L"_" + checkPackage->author().toWString() + L"_" + f->name();
3241
				newFilename = m_sCurrentDir + L"/PluginManager/Disabled/FakePatches/FakePatch_" + checkPackage->getNameValidFile() + L"_" + checkPackage->author() + L"_" + f->name();
3242
				shuffle = true;
3242
				shuffle = true;
3243
			}
3243
			}
3244
		}
3244
		}
3245
		else if ( f->isAutoTextFile() )
3245
		else if ( f->isAutoTextFile() )
3246
		{
3246
		{
3247
			if ( checkPackage )
3247
			if ( checkPackage )
3248
			{
3248
			{
3249
				newFilename = m_sCurrentDir + L"/PluginManager/Disabled/TextFiles/Text_" + checkPackage->getNameValidFile() + L"_" + checkPackage->author().toWString() + L"_" + f->name();
3249
				newFilename = m_sCurrentDir + L"/PluginManager/Disabled/TextFiles/Text_" + checkPackage->getNameValidFile() + L"_" + checkPackage->author() + L"_" + f->name();
3250
				shuffle = true;
3250
				shuffle = true;
3251
			}
3251
			}
3252
		}
3252
		}
3253
		// otherwise we can just use the standard filename
3253
		// otherwise we can just use the standard filename
3254
		else
3254
		else
Line 3381... Line 3381...
3381
	if ( package->GetType() == TYPE_SPK )
3381
	if ( package->GetType() == TYPE_SPK )
3382
		return findSpkPackage(package->name(), package->author());
3382
		return findSpkPackage(package->name(), package->author());
3383
	else if ( package->GetType() == TYPE_XSP )
3383
	else if ( package->GetType() == TYPE_XSP )
3384
		return findXspPackage(((CXspFile *)package)->GetShipID());
3384
		return findXspPackage(((CXspFile *)package)->GetShipID());
3385
	else if ( package->GetType() == TYPE_ARCHIVE )
3385
	else if ( package->GetType() == TYPE_ARCHIVE )
3386
		return findArchivePackage(package->name());
3386
		return findArchivePackage(package->name().toString());
3387
 
3387
 
3388
	// nothing found obviously
3388
	// nothing found obviously
3389
	return 0;
3389
	return 0;
3390
}
3390
}
3391
 
3391
 
Line 3461... Line 3461...
3461
/**
3461
/**
3462
 * Find a SPK Package
3462
 * Find a SPK Package
3463
 *
3463
 *
3464
 * This searching all installed packages for a SPK Package matching the name and author
3464
 * This searching all installed packages for a SPK Package matching the name and author
3465
 */
3465
 */
3466
CBaseFile *CPackages::findSpkPackage(const Utils::String &name, const Utils::String &author) const
3466
CBaseFile *CPackages::findSpkPackage(const Utils::WString &name, const Utils::WString &author) const
3467
{
3467
{
3468
	// interate through all packages
3468
	// interate through all packages
3469
	for ( CListNode<CBaseFile> *node = m_lPackages.Front(); node; node = node->next() )
3469
	for ( CListNode<CBaseFile> *node = m_lPackages.Front(); node; node = node->next() )
3470
	{
3470
	{
3471
		CBaseFile *file = node->Data();
3471
		CBaseFile *file = node->Data();
Line 3489... Line 3489...
3489
	for (CListNode<CBaseFile>* node = m_lPackages.Front(); node; node = node->next())
3489
	for (CListNode<CBaseFile>* node = m_lPackages.Front(); node; node = node->next())
3490
	{
3490
	{
3491
		CBaseFile* file = node->Data();
3491
		CBaseFile* file = node->Data();
3492
 
3492
 
3493
		// now compare the name and author, "Compare" is a non case senseative check, opposed to ==.
3493
		// now compare the name and author, "Compare" is a non case senseative check, opposed to ==.
3494
		if (file->name().toWString().Compare(name) && file->author().toWString().Compare(author))
3494
		if (file->name().Compare(name) && file->author().Compare(author))
3495
			return file;
3495
			return file;
3496
	}
3496
	}
3497
 
3497
 
3498
	// nothing found
3498
	// nothing found
3499
	return 0;
3499
	return 0;
Line 3655... Line 3655...
3655
					return false;
3655
					return false;
3656
 
3656
 
3657
				bool found = false;
3657
				bool found = false;
3658
				for ( CListNode<CBaseFile> *node = m_lInstallList.Front(); node; node = node->next() )
3658
				for ( CListNode<CBaseFile> *node = m_lInstallList.Front(); node; node = node->next() )
3659
				{
3659
				{
3660
					if ( spk->GetOtherName().Compare(node->Data()->name()) && spk->GetOtherAuthor().Compare(node->Data()->author()) )
3660
					if ( spk->GetOtherName().Compare(node->Data()->name().toString()) && spk->GetOtherAuthor().Compare(node->Data()->author().toString()) )
3661
					{
3661
					{
3662
						found = true;
3662
						found = true;
3663
						break;
3663
						break;
3664
					}
3664
					}
3665
				}
3665
				}
Line 3694... Line 3694...
3694
	// check any dependacies
3694
	// check any dependacies
3695
	if ( p->AnyDependacies() )
3695
	if ( p->AnyDependacies() )
3696
	{
3696
	{
3697
		for ( CListNode<SNeededLibrary> *dNode = p->GetNeededLibraries()->Front(); dNode; dNode = dNode->next() )
3697
		for ( CListNode<SNeededLibrary> *dNode = p->GetNeededLibraries()->Front(); dNode; dNode = dNode->next() )
3698
		{
3698
		{
3699
			if ( dNode->Data()->sName.Compare("<package>") )
3699
			if ( dNode->Data()->sName.Compare(L"<package>") )
3700
				continue;
3700
				continue;
3701
			if ( !this->checkInstalledDependacy(dNode->Data()->sName, dNode->Data()->sAuthor, dNode->Data()->sMinVersion, true, true) )
3701
			if ( !this->checkInstalledDependacy(dNode->Data()->sName.toString(), dNode->Data()->sAuthor.toString(), dNode->Data()->sMinVersion, true, true))
3702
				return false;
3702
				return false;
3703
		}
3703
		}
3704
	}
3704
	}
3705
 
3705
 
3706
	return true;
3706
	return true;
3707
}
3707
}
3708
 
3708
 
3709
bool CPackages::checkInstalledDependacy(const Utils::String &name, const Utils::String &author, const Utils::String &version, bool onlyEnabled, bool includePrepared) const
3709
bool CPackages::checkInstalledDependacy(const Utils::WString &name, const Utils::WString &author, const Utils::String &version, bool onlyEnabled, bool includePrepared) const
3710
{
3710
{
3711
	CBaseFile *p = this->findSpkPackage(name, author);
3711
	CBaseFile *p = this->findSpkPackage(name, author);
3712
	if ( p )
3712
	if ( p )
3713
	{
3713
	{
3714
		// now check version
3714
		// now check version
Line 3752... Line 3752...
3752
	if (neededList)
3752
	if (neededList)
3753
	{
3753
	{
3754
		for (CListNode<SNeededLibrary> *node = neededList->Front(); node; node = node->next())
3754
		for (CListNode<SNeededLibrary> *node = neededList->Front(); node; node = node->next())
3755
		{
3755
		{
3756
			SNeededLibrary *nl = node->Data();
3756
			SNeededLibrary *nl = node->Data();
3757
			if (!checkInstalledDependacy((nl->sName.Compare("<package>")) ? p->name() : nl->sName, (nl->sAuthor.Compare("<author>")) ? p->author() : nl->sAuthor, nl->sMinVersion, (nl->sName.Compare("<package>")) ? false : onlyEnabled, (nl->sName.Compare("<package>")) ? false : includePrepared))
3757
			if (!checkInstalledDependacy((nl->sName.Compare(L"<package>")) ? p->name() : nl->sName, (nl->sAuthor.Compare(L"<author>")) ? p->author() : nl->sAuthor, nl->sMinVersion, (nl->sName.Compare(L"<package>")) ? false : onlyEnabled, (nl->sName.Compare(L"<package>")) ? false : includePrepared))
3758
			{
3758
			{
3759
				bool found = false;
3759
				bool found = false;
3760
				for (auto itr = packages.Front(); itr; itr = itr->next())
3760
				for (auto itr = packages.Front(); itr; itr = itr->next())
3761
				{
3761
				{
3762
					if (itr->Data()->name().Compare(nl->sName) && itr->Data()->author().Compare(nl->sAuthor) && nl->sMinVersion.compareVersion(itr->Data()->version()) >= 0)
3762
					if (itr->Data()->name().Compare(nl->sName) && itr->Data()->author().Compare(nl->sAuthor) && nl->sMinVersion.compareVersion(itr->Data()->version()) >= 0)
Line 3904... Line 3904...
3904
	}
3904
	}
3905
 
3905
 
3906
	return count;
3906
	return count;
3907
}
3907
}
3908
 
3908
 
3909
int CPackages::GetMissingDependacies(CBaseFile *p, Utils::CStringList *list, bool onlyEnabled, bool includePrepared)
3909
int CPackages::getMissingDependacies(CBaseFile *p, Utils::WStringList *list, bool onlyEnabled, bool includePrepared)
3910
{
3910
{
3911
	int count = 0;
3911
	int count = 0;
3912
	CLinkList<SNeededLibrary> *neededList = p->GetNeededLibraries();
3912
	CLinkList<SNeededLibrary> *neededList = p->GetNeededLibraries();
3913
	if ( neededList )
3913
	if ( neededList )
3914
	{
3914
	{
3915
		for ( CListNode<SNeededLibrary> *node = neededList->Front(); node; node = node->next() )
3915
		for ( CListNode<SNeededLibrary> *node = neededList->Front(); node; node = node->next() )
3916
		{
3916
		{
3917
			SNeededLibrary *nl = node->Data();
3917
			SNeededLibrary *nl = node->Data();
3918
			if ( !checkInstalledDependacy((nl->sName.Compare("<package>")) ? p->name() : nl->sName, (nl->sAuthor.Compare("<author>")) ? p->author() : nl->sAuthor, nl->sMinVersion, (nl->sName.Compare("<package>")) ? false : onlyEnabled, (nl->sName.Compare("<package>")) ? false : includePrepared) )
3918
			if ( !checkInstalledDependacy((nl->sName.Compare(L"<package>")) ? p->name() : nl->sName, (nl->sAuthor.Compare(L"<author>")) ? p->author() : nl->sAuthor, nl->sMinVersion, (nl->sName.Compare(L"<package>")) ? false : onlyEnabled, (nl->sName.Compare(L"<package>")) ? false : includePrepared) )
3919
			{
3919
			{
3920
				if ( list )
3920
				if ( list )
3921
					list->pushBack(((nl->sName.Compare("<package>")) ? p->name() : nl->sName) + "|" + nl->sMinVersion, (nl->sAuthor.Compare("<author>")) ? p->author() : nl->sAuthor);
3921
					list->pushBack(((nl->sName.Compare(L"<package>")) ? p->name() : nl->sName) + L"|" + nl->sMinVersion.toWString(), (nl->sAuthor.Compare(L"<author>")) ? p->author() : nl->sAuthor);
3922
				++count;
3922
				++count;
3923
			}
3923
			}
3924
		}
3924
		}
3925
	}
3925
	}
3926
 
3926
 
Line 3971... Line 3971...
3971
 
3971
 
3972
		// no requirements found, remove from list
3972
		// no requirements found, remove from list
3973
		bool missingDep = false;
3973
		bool missingDep = false;
3974
		if ( !this->CheckOtherPackage(p) )
3974
		if ( !this->CheckOtherPackage(p) )
3975
			missingDep = true;
3975
			missingDep = true;
3976
		else if ( this->GetMissingDependacies(p, NULL, false, true) )
3976
		else if ( this->getMissingDependacies(p, NULL, false, true) )
3977
			missingDep = true;
3977
			missingDep = true;
3978
 
3978
 
3979
		if ( missingDep )
3979
		if ( missingDep )
3980
		{
3980
		{
3981
			if ( list )
3981
			if ( list )
Line 6017... Line 6017...
6017
			if ( !s->pPackage || s->iType != WARETYPE_ADDED )
6017
			if ( !s->pPackage || s->iType != WARETYPE_ADDED )
6018
				continue;
6018
				continue;
6019
			if ( s->pPackage->GetOriginalDescription() )
6019
			if ( s->pPackage->GetOriginalDescription() )
6020
				continue;
6020
				continue;
6021
 
6021
 
6022
			Utils::WString name = s->pPackage->GetTextName(m_iLanguage);
6022
			Utils::WString name = s->pPackage->getTextName(m_iLanguage);
6023
			Utils::WString desc = s->pPackage->GetTextDescription(m_iLanguage);
6023
			Utils::WString desc = s->pPackage->GetTextDescription(m_iLanguage);
6024
			if ( !name.empty() )
6024
			if ( !name.empty() )
6025
				writeData.push_back(Utils::WString(L"		<t id=\"") + (long)s->iText + L"\">" + this->convertTextString(name) + L"</t>");
6025
				writeData.push_back(Utils::WString(L"		<t id=\"") + (long)s->iText + L"\">" + this->convertTextString(name) + L"</t>");
6026
			if ( !desc.empty() )
6026
			if ( !desc.empty() )
6027
				writeData.push_back(Utils::WString(L"		<t id=\"") + (long)(s->iText + 1) + L"\">" + this->convertTextString(desc) + L"</t>");
6027
				writeData.push_back(Utils::WString(L"		<t id=\"") + (long)(s->iText + 1) + L"\">" + this->convertTextString(desc) + L"</t>");
Line 8016... Line 8016...
8016
			
8016
			
8017
			if (p->icon())
8017
			if (p->icon())
8018
			{
8018
			{
8019
				bool addedIcon = false;
8019
				bool addedIcon = false;
8020
				p->ReadIconFileToMemory();
8020
				p->ReadIconFileToMemory();
8021
				p->icon()->setFilename(this->tempDirectory().findReplace(L"\\", L"/") + L"/" + p->author().toWString() + L"_" + p->name().toWString() + L"." + p->iconExt());
8021
				p->icon()->setFilename(this->tempDirectory().findReplace(L"\\", L"/") + L"/" + p->author() + L"_" + p->name() + L"." + p->iconExt());
8022
				p->icon()->setFullDir(this->tempDirectory());
8022
				p->icon()->setFullDir(this->tempDirectory());
8023
				if (p->icon()->UncompressData())
8023
				if (p->icon()->UncompressData())
8024
				{
8024
				{
8025
					if (p->icon()->writeFilePointer())
8025
					if (p->icon()->writeFilePointer())
8026
						addedIcon = true;
8026
						addedIcon = true;
Line 8649... Line 8649...
8649
	if ( !to->AnyFileType(FILETYPE_MOD) ) return false;
8649
	if ( !to->AnyFileType(FILETYPE_MOD) ) return false;
8650
 
8650
 
8651
	if ( from == to ) return false; // cant have incompatabilities to itself
8651
	if ( from == to ) return false; // cant have incompatabilities to itself
8652
 
8652
 
8653
	// check if one is a depencacy of the other
8653
	// check if one is a depencacy of the other
8654
	if (from->IsPackageNeeded(to->name(), to->author())) return false;
8654
	if (from->isPackageNeeded(to->name(), to->author())) return false;
8655
	if (to->IsPackageNeeded(from->name(), from->author())) return false;
8655
	if (to->isPackageNeeded(from->name(), from->author())) return false;
8656
	// check if one is directly connected
8656
	// check if one is directly connected
8657
	if (from->type() == BaseFileType::TYPE_SPK)
8657
	if (from->type() == BaseFileType::TYPE_SPK)
8658
	{
8658
	{
8659
		CSpkFile* fromSpk = dynamic_cast<CSpkFile*>(from);
8659
		CSpkFile* fromSpk = dynamic_cast<CSpkFile*>(from);
8660
		if (fromSpk->isAnotherMod())
8660
		if (fromSpk->isAnotherMod())
8661
		{
8661
		{
8662
			if (fromSpk->otherName().Compare(to->name()) && fromSpk->otherAuthor().Compare(to->author()))
8662
			if (fromSpk->otherName().toWString().Compare(to->name()) && fromSpk->otherAuthor().toWString().Compare(to->author()))
8663
				return false;
8663
				return false;
8664
		}
8664
		}
8665
	}
8665
	}
8666
	if (to->type() == BaseFileType::TYPE_SPK)
8666
	if (to->type() == BaseFileType::TYPE_SPK)
8667
	{
8667
	{
8668
		CSpkFile* toSpk = dynamic_cast<CSpkFile*>(to);
8668
		CSpkFile* toSpk = dynamic_cast<CSpkFile*>(to);
8669
		if (toSpk->isAnotherMod())
8669
		if (toSpk->isAnotherMod())
8670
		{
8670
		{
8671
			if (toSpk->otherName().Compare(from->name()) && toSpk->otherAuthor().Compare(from->author()))
8671
			if (toSpk->otherName().toWString().Compare(from->name()) && toSpk->otherAuthor().toWString().Compare(from->author()))
8672
				return false;
8672
				return false;
8673
		}
8673
		}
8674
	}
8674
	}
8675
 
8675
 
8676
	int count = 0;
8676
	int count = 0;
Line 8751... Line 8751...
8751
	if ( p1->name().Compare(p2->name()) && p1->author().Compare(p2->author()) )
8751
	if ( p1->name().Compare(p2->name()) && p1->author().Compare(p2->author()) )
8752
		return true;
8752
		return true;
8753
	return false;
8753
	return false;
8754
}
8754
}
8755
 
8755
 
8756
void CPackages::ApplyFakePatchOrder(Utils::CStringList *list)
8756
void CPackages::applyFakePatchOrder(const Utils::WStringList &list)
8757
{
8757
{
8758
	if ( !list ) return;
-
 
8759
	_lFakePatchOrder.clear();
8758
	_lFakePatchOrder.clear();
8760
	for(auto itr = list->begin(); itr != list->end(); itr++)
8759
	for(auto itr = list.begin(); itr != list.end(); itr++)
8761
		_lFakePatchOrder.pushBack((*itr)->str, (*itr)->data);
8760
		_lFakePatchOrder.pushBack((*itr)->str, (*itr)->data);
8762
}
8761
}
8763
 
8762
 
8764
SAvailablePackage *CPackages::CreateAvailablePackageData(CBaseFile *package)
8763
SAvailablePackage *CPackages::CreateAvailablePackageData(CBaseFile *package)
8765
{
8764
{
Line 8787... Line 8786...
8787
	else 
8786
	else 
8788
	{
8787
	{
8789
		p->iType = ((CSpkFile *)package)->GetPackageType();
8788
		p->iType = ((CSpkFile *)package)->GetPackageType();
8790
		p->iScriptType = ((CSpkFile *)package)->GetScriptType();
8789
		p->iScriptType = ((CSpkFile *)package)->GetScriptType();
8791
	}
8790
	}
8792
	p->sAuthor = package->author().toWString();
8791
	p->sAuthor = package->author();
8793
	p->sDesc = package->description().toWString().findReplace(L"\n", L"::newline::");
8792
	p->sDesc = package->description().toWString().findReplace(L"\n", L"::newline::");
8794
	p->sName = package->name().toWString();
8793
	p->sName = package->name();
8795
	p->sUpdated = package->creationDate().toWString();
8794
	p->sUpdated = package->creationDate().toWString();
8796
	p->sVersion = package->version().toWString();
8795
	p->sVersion = package->version().toWString();
8797
	p->sFilename = CFileIO(package->filename()).filename();
8796
	p->sFilename = CFileIO(package->filename()).filename();
8798
 
8797
 
8799
	return p;
8798
	return p;
Line 8929... Line 8928...
8929
 
8928
 
8930
CBaseFile* CPackages::findFoundPackage(const Utils::WString& name, const Utils::WString& author) const
8929
CBaseFile* CPackages::findFoundPackage(const Utils::WString& name, const Utils::WString& author) const
8931
{
8930
{
8932
	for (CListNode<CBaseFile>* node = m_lFoundPackages.Front(); node; node = node->next())
8931
	for (CListNode<CBaseFile>* node = m_lFoundPackages.Front(); node; node = node->next())
8933
	{
8932
	{
8934
		if (node->Data()->name().toWString().Compare(name) && node->Data()->author().toWString().Compare(author))
8933
		if (node->Data()->name().Compare(name) && node->Data()->author().Compare(author))
8935
			return node->Data();
8934
			return node->Data();
8936
	}
8935
	}
8937
	return NULL;
8936
	return NULL;
8938
}
8937
}
8939
 
8938
 
Line 9569... Line 9568...
9569
						CBaseFile *package = p->Data();
9568
						CBaseFile *package = p->Data();
9570
						if ( package->IsFileAdded(f) )
9569
						if ( package->IsFileAdded(f) )
9571
						{
9570
						{
9572
							if ( !packages.empty() )
9571
							if ( !packages.empty() )
9573
								packages += L"\n";
9572
								packages += L"\n";
9574
							packages += package->getFullPackageName(m_iLanguage).toWString();
9573
							packages += package->getFullPackageName(m_iLanguage);
9575
						}
9574
						}
9576
					}
9575
					}
9577
				}
9576
				}
9578
				Utils::WString filename = f->filePointer();
9577
				Utils::WString filename = f->filePointer();
9579
				filename = filename.findRemove(m_sCurrentDir);
9578
				filename = filename.findRemove(m_sCurrentDir);