Subversion Repositories spk

Rev

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

Rev 127 Rev 129
Line 492... Line 492...
492
			}
492
			}
493
		}
493
		}
494
 
494
 
495
		void ExtractPackage(String ^file, bool here)
495
		void ExtractPackage(String ^file, bool here)
496
		{
496
		{
497
			CyString sFile = CyStringFromSystemString(file);
497
			Utils::String sFile = _S(file);
498
			int error = 0;
498
			int error = 0;
499
 
499
 
500
			CBaseFile *p = m_pPackages->OpenPackage(sFile, &error, 0, SPKREAD_NODATA);
500
			CBaseFile *p = m_pPackages->OpenPackage(sFile, &error, 0, SPKREAD_NODATA);
501
			if ( !p ) {
501
			if ( !p ) {
502
				MessageBox::Show(this, "Error: Unable to open package file\n" + file, "Error Opening", MessageBoxButtons::OK, MessageBoxIcon::Error);
502
				MessageBox::Show(this, "Error: Unable to open package file\n" + file, "Error Opening", MessageBoxButtons::OK, MessageBoxIcon::Error);
Line 526... Line 526...
526
					}
526
					}
527
					else if ( p->IsAnyGameInPackage() ) {
527
					else if ( p->IsAnyGameInPackage() ) {
528
						game = p->FindFirstGameInPackage();
528
						game = p->FindFirstGameInPackage();
529
					}
529
					}
530
 
530
 
531
					if ( to && to->Length ) {
531
					if ( to && to->Length ) 
-
 
532
					{
532
						if ( p->ExtractAll(CyStringFromSystemString(to), game, true) ) {
533
						if (m_pPackages->extractAll(p, _S(to), game, true)) 
-
 
534
						{
533
							String ^message = "Extracted: " + file + "\nTo: " + to;
535
							String ^message = "Extracted: " + file + "\nTo: " + to;
534
							if ( game ) {
536
							if ( game )
535
								message += "\nGame: " + SystemStringFromCyString(m_pPackages->GetGameExe()->GetGame(game - 1)->sName);
537
								message += "\nGame: " + _US(m_pPackages->GetGameExe()->GetGame(game - 1)->sName);
536
							}
-
 
537
							MessageBox::Show(this, message, "Extracted Package", MessageBoxButtons::OK, MessageBoxIcon::Information);
538
							MessageBox::Show(this, message, "Extracted Package", MessageBoxButtons::OK, MessageBoxIcon::Information);
538
						}
539
						}
539
						else {
540
						else 
540
							MessageBox::Show(this, "Error: Unable to extract to:\n" + to, "Error Extracting", MessageBoxButtons::OK, MessageBoxIcon::Error);
541
							MessageBox::Show(this, "Error: Unable to extract to:\n" + to, "Error Extracting", MessageBoxButtons::OK, MessageBoxIcon::Error);
541
						}
-
 
542
					}
542
					}
543
				}
543
				}
544
			}
544
			}
545
		}
545
		}
546
 
546