Subversion Repositories spk

Rev

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

Rev 170 Rev 175
Line 145... Line 145...
145
				continue;
145
				continue;
146
			if ( package->pFile->icon() )
146
			if ( package->pFile->icon() )
147
			{
147
			{
148
				package->pFile->ReadIconFileToMemory();
148
				package->pFile->ReadIconFileToMemory();
149
				Utils::String sIconFile = _S(IO::Path::GetTempPath()) + "\\" + CFileIO(package->sName).baseName() + "." + package->pFile->iconExt();
149
				Utils::String sIconFile = _S(IO::Path::GetTempPath()) + "\\" + CFileIO(package->sName).baseName() + "." + package->pFile->iconExt();
150
				if ( package->pFile->ExtractFile(package->pFile->icon(), CFileIO(sIconFile).fullFilename(), false) )
150
				if ( package->pFile->extractFile(package->pFile->icon(), CFileIO(sIconFile).fullFilename(), false) )
151
				{
151
				{
152
					String ^iconFile = _US(sIconFile);
152
					String ^iconFile = _US(sIconFile);
153
					if ( IO::File::Exists(iconFile) )
153
					if ( IO::File::Exists(iconFile) )
154
					{
154
					{
155
						String ^file = SystemStringFromCyString(package->sName);
155
						String ^file = SystemStringFromCyString(package->sName);
Line 926... Line 926...
926
			m_pMultiPackage->ReadAllPackages();
926
			m_pMultiPackage->ReadAllPackages();
927
			m_pMultiPackage->UpdatedPackage(m_pPackage);
927
			m_pMultiPackage->UpdatedPackage(m_pPackage);
928
			m_pMultiPackage->WriteFile(m_pMultiPackage->GetFilename());
928
			m_pMultiPackage->WriteFile(m_pMultiPackage->GetFilename());
929
		}
929
		}
930
		else
930
		else
931
			m_pPackage->WriteFile(m_pPackage->filename());
931
			m_pPackage->writeFile(m_pPackage->filename());
932
	}
932
	}
933
 
933
 
934
	void SpkForm::PasteFiles(CLinkList<C_File> *list)
934
	void SpkForm::PasteFiles(CLinkList<C_File> *list)
935
	{
935
	{
936
		if ( m_pMultiPackage && m_pSelectedPackage )
936
		if ( m_pMultiPackage && m_pSelectedPackage )
Line 992... Line 992...
992
 
992
 
993
			switch ( f->GetFileType() )
993
			switch ( f->GetFileType() )
994
			{
994
			{
995
				case FILETYPE_SCRIPT:
995
				case FILETYPE_SCRIPT:
996
				case FILETYPE_UNINSTALL:
996
				case FILETYPE_UNINSTALL:
997
					if ( m_pPackage->ExtractFile(f, _S(IO::Path::GetTempPath()), false) )
997
					if ( m_pPackage->extractFile(f, _S(IO::Path::GetTempPath()), false) )
998
					{
998
					{
999
						SPK::WriteScriptStyleSheet(_S(IO::Path::GetTempPath()));
999
						SPK::WriteScriptStyleSheet(_S(IO::Path::GetTempPath()));
1000
						process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1000
						process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1001
					}
1001
					}
1002
					break;
1002
					break;
1003
 
1003
 
1004
				case FILETYPE_MOD:
1004
				case FILETYPE_MOD:
1005
					if ( m_pPackage->ExtractFile(f, _S(IO::Path::GetTempPath()), false) )
1005
					if ( m_pPackage->extractFile(f, _S(IO::Path::GetTempPath()), false) )
1006
					{
1006
					{
1007
						if ( f->CheckFileExt("cat") )
1007
						if ( f->CheckFileExt("cat") )
1008
						{
1008
						{
1009
							C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "");
1009
							C_File *datFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("dat"), FILETYPE_MOD, "");
1010
							if ( datFile )
1010
							if ( datFile )
1011
							{
1011
							{
1012
								if ( m_pPackage->ExtractFile(datFile, _S(IO::Path::GetTempPath()), false) )
1012
								if ( m_pPackage->extractFile(datFile, _S(IO::Path::GetTempPath()), false) )
1013
									process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1013
									process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1014
							}
1014
							}
1015
						}
1015
						}
1016
						else if ( f->CheckFileExt("dat") )
1016
						else if ( f->CheckFileExt("dat") )
1017
						{
1017
						{
1018
							C_File *catFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "");
1018
							C_File *catFile = m_pPackage->findFile(CFileIO(f).changeFileExtension("cat"), FILETYPE_MOD, "");
1019
							if ( catFile )
1019
							if ( catFile )
1020
							{
1020
							{
1021
								if ( m_pPackage->ExtractFile(catFile, _S(IO::Path::GetTempPath()), false) )
1021
								if ( m_pPackage->extractFile(catFile, _S(IO::Path::GetTempPath()), false) )
1022
									process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(catFile->name());
1022
									process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(catFile->name());
1023
							}
1023
							}
1024
						}
1024
						}
1025
					}
1025
					}
1026
					break;
1026
					break;
1027
 
1027
 
1028
				case FILETYPE_MAP:
1028
				case FILETYPE_MAP:
1029
					break;
1029
					break;
1030
 
1030
 
1031
				default:
1031
				default:
1032
					if ( m_pPackage->ExtractFile(f, _S(IO::Path::GetTempPath()), false) )
1032
					if ( m_pPackage->extractFile(f, _S(IO::Path::GetTempPath()), false) )
1033
						process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1033
						process->StartInfo->FileName = IO::Path::GetTempPath() + "\\" + _US(f->name());
1034
			}
1034
			}
1035
 
1035
 
1036
			if ( process->StartInfo->FileName && process->StartInfo->FileName->Length )
1036
			if ( process->StartInfo->FileName && process->StartInfo->FileName->Length )
1037
			{
1037
			{