Subversion Repositories spk

Rev

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

Rev 170 Rev 175
Line 57... Line 57...
57
 
57
 
58
	CBaseFile::Delete ();
58
	CBaseFile::Delete ();
59
}
59
}
60
 
60
 
61
 
61
 
62
bool CSpkFile::CheckHeader(const Utils::String header) const
62
bool CSpkFile::_checkHeader(const Utils::String header) const
63
{
63
{
64
	if ( header.Compare("SPKCycrow") )
64
	if ( header.Compare("SPKCycrow") )
65
		return true;
65
		return true;
66
	return false;
66
	return false;
67
}
67
}
Line 115... Line 115...
115
/*
115
/*
116
	Func:   CreateValuesLine
116
	Func:   CreateValuesLine
117
	Return: String - returns the full string for values
117
	Return: String - returns the full string for values
118
	Desc:   Creates a single string for all values, this is used when compressing to write to the spk file
118
	Desc:   Creates a single string for all values, this is used when compressing to write to the spk file
119
*/
119
*/
120
Utils::String CSpkFile::CreateValuesLine () const
120
Utils::String CSpkFile::createValuesLine () const
121
{
121
{
122
	Utils::String values = CBaseFile::CreateValuesLine ();
122
	Utils::String values = CBaseFile::createValuesLine ();
123
	// combine all values together
123
	// combine all values together
124
	if ( (!m_sOtherAuthor.empty()) && (!m_sOtherName.empty()) )
124
	if ( (!m_sOtherAuthor.empty()) && (!m_sOtherName.empty()) )
125
		values += "AnotherMod: " + m_sOtherAuthor + "|" + m_sOtherName + "\n";
125
		values += "AnotherMod: " + m_sOtherAuthor + "|" + m_sOtherName + "\n";
126
	if ( m_bForceProfile )
126
	if ( m_bForceProfile )
127
		values += "ForceProfile\n";
127
		values += "ForceProfile\n";
Line 214... Line 214...
214
	}
214
	}
215
 
215
 
216
	return false;
216
	return false;
217
}
217
}
218
 
218
 
219
bool CSpkFile::WriteHeader(CFileIO &file, int valueheader, int valueComprLen)
219
bool CSpkFile::writeHeader(CFileIO &file, int valueheader, int valueComprLen) const
220
{
220
{
221
	return file.write("SPKCycrow;%.2f;%d;%d\n", FILEVERSION, valueheader, valueComprLen);
221
	return file.write("SPKCycrow;%.2f;%d;%d\n", FILEVERSION, valueheader, valueComprLen);
222
}
222
}
223
 
223
 
224
void CSpkFile::AddWareText(const Utils::String &sData)
224
void CSpkFile::AddWareText(const Utils::String &sData)
Line 389... Line 389...
389
		return 1;
389
		return 1;
390
	else
390
	else
391
		return 2;
391
		return 2;
392
}
392
}
393
 
393
 
394
bool CSpkFile::UpdateSigned (bool updateFiles)
394
bool CSpkFile::computeSigned(bool updateFiles) const
395
{
395
{
396
	// check for any custom wares
396
	// check for any custom wares
397
	// patch mods and custom starts are also not signed
397
	// patch mods and custom starts are also not signed
398
	if ( (!m_lWares.empty()) || (this->IsPatch()) || (this->IsCustomStart()) )
398
	if ((!m_lWares.empty()) || (this->IsPatch()) || (this->IsCustomStart()))
399
	{
-
 
400
		m_bSigned = false;
-
 
401
		return false;
399
		return false;
402
	}
-
 
403
 
400
 
404
	return CBaseFile::UpdateSigned(updateFiles);
401
	return CBaseFile::computeSigned(updateFiles);
405
}
402
}
406
 
403
 
407
SSettingType *CSpkFile::AddSetting(const Utils::String &key, int type )
404
SSettingType *CSpkFile::AddSetting(const Utils::String &key, int type )
408
{
405
{
409
	Utils::String sKey = key.remove('|');
406
	Utils::String sKey = key.remove('|');