| Line 297... | Line 297... | 
          
            | 297 | 			else if ( m_iSortingColumn == SORT_CREATED ) // sort by author
 | 297 | 			else if ( m_iSortingColumn == SORT_CREATED ) // sort by author
 | 
          
            | 298 | 				aNames[i] = _US(p->creationDate().token("/", 3) + p->creationDate().token("/", 2) + p->creationDate().token("/", 1));
 | 298 | 				aNames[i] = _US(p->creationDate().token("/", 3) + p->creationDate().token("/", 2) + p->creationDate().token("/", 1));
 | 
          
            | 299 | 			else if ( m_iSortingColumn == SORT_ENABLE ) // sort by author
 | 299 | 			else if ( m_iSortingColumn == SORT_ENABLE ) // sort by author
 | 
          
            | 300 | 			{
 | 300 | 			{
 | 
          
            | 301 | 				if ( p->IsEnabled() )
 | 301 | 				if ( p->IsEnabled() )
 | 
          
            | 302 | 					aNames[i] = _US(Utils::String::Number(1));
 | 302 | 					aNames[i] = _US(Utils::WString::Number(1));
 | 
          
            | 303 | 				else
 | 303 | 				else
 | 
          
            | 304 | 					aNames[i] = _US(Utils::String::Number(0));
 | 304 | 					aNames[i] = _US(Utils::WString::Number(0));
 | 
          
            | 305 | 			}
 | 305 | 			}
 | 
          
            | 306 | 			else if ( m_iSortingColumn == SORT_SIGNED ) // sort by author
 | 306 | 			else if ( m_iSortingColumn == SORT_SIGNED ) // sort by author
 | 
          
            | 307 | 			{
 | 307 | 			{
 | 
          
            | 308 | 				if ( p->IsEnabled() )
 | 308 | 				if ( p->IsEnabled() )
 | 
          
            | 309 | 					aNames[i] = _US(Utils::String::Number(1));
 | 309 | 					aNames[i] = _US(Utils::WString::Number(1));
 | 
          
            | 310 | 				else
 | 310 | 				else
 | 
          
            | 311 | 					aNames[i] = _US(Utils::String::Number(0));
 | 311 | 					aNames[i] = _US(Utils::WString::Number(0));
 | 
          
            | 312 | 			}
 | 312 | 			}
 | 
          
            | 313 | 			else if ( m_iSortingColumn == SORT_TYPE ) // sort by type
 | 313 | 			else if ( m_iSortingColumn == SORT_TYPE ) // sort by type
 | 
          
            | 314 | 			{
 | 314 | 			{
 | 
          
            | 315 | 				if ( p->GetType() == TYPE_XSP )
 | 315 | 				if ( p->GetType() == TYPE_XSP )
 | 
          
            | 316 | 					aNames[i] = "Ship";
 | 316 | 					aNames[i] = "Ship";
 | 
          
            | Line 333... | Line 333... | 
          
            | 333 | 			CBaseFile *p = (m_bSortingAsc) ? aPackages[i]->Package : aPackages[(aPackages->Length - 1 - i)]->Package;
 | 333 | 			CBaseFile *p = (m_bSortingAsc) ? aPackages[i]->Package : aPackages[(aPackages->Length - 1 - i)]->Package;
 | 
          
            | 334 | 			Utils::WString name;
 | 334 | 			Utils::WString name;
 | 
          
            | 335 | 			if ( p->GetType() == TYPE_ARCHIVE )
 | 335 | 			if ( p->GetType() == TYPE_ARCHIVE )
 | 
          
            | 336 | 				name = CFileIO(p->filename()).filename();
 | 336 | 				name = CFileIO(p->filename()).filename();
 | 
          
            | 337 | 			else
 | 337 | 			else
 | 
          
            | 338 | 				name = p->name(m_pPackages->GetLanguage()).toWString();
 | 338 | 				name = p->name(m_pPackages->GetLanguage());
 | 
          
            | 339 |  
 | 339 |  
 | 
          
            | 340 | 			int indent = 0;
 | 340 | 			int indent = 0;
 | 
          
            | 341 | 			CBaseFile *parent = p;
 | 341 | 			CBaseFile *parent = p;
 | 
          
            | 342 |  
 | 342 |  
 | 
          
            | 343 | 			if ( p->GetParent() && p->GetParent()->GetType() == TYPE_SPK && ((CSpkFile *)p->GetParent())->IsLibrary() )
 | 343 | 			if ( p->GetParent() && p->GetParent()->GetType() == TYPE_SPK && ((CSpkFile *)p->GetParent())->IsLibrary() )
 | 
          
            | Line 734... | Line 734... | 
          
            | 734 | 		CLinkList<CBaseFile> packageList;
 | 734 | 		CLinkList<CBaseFile> packageList;
 | 
          
            | 735 | 		CLinkList<CBaseFile> disableList;
 | 735 | 		CLinkList<CBaseFile> disableList;
 | 
          
            | 736 |  
 | 736 |  
 | 
          
            | 737 | 		if ( m_pPackages->uninstallPreparedPackages(m_pFileErrors, 0, &packageList, &disableList) )
 | 737 | 		if ( m_pPackages->uninstallPreparedPackages(m_pFileErrors, 0, &packageList, &disableList) )
 | 
          
            | 738 | 		{
 | 738 | 		{
 | 
          
            | 739 | 			Utils::StringsDisplay;
 | 739 | 			Utils::WString sDisplay;
 | 
          
            | 740 | 			Utils::StringsAfterText;
 | 740 | 			Utils::WString sAfterText;
 | 
          
            | 741 | 			for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 741 | 			for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 
          
            | 742 | 			{
 | 742 | 			{
 | 
          
            | 743 | 				sAfterText = m_pPackages->getUninstallAfterText(p);
 | 743 | 				sAfterText = m_pPackages->getUninstallAfterText(p).toWString();
 | 
          
            | 744 | 				m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), (sAfterText.empty() ? "Uninstalled" : _US(sAfterText)), "Uninstalled");
 | 744 | 				m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), (sAfterText.empty() ? "Uninstalled" : _US(sAfterText)), "Uninstalled");
 | 
          
            | 745 | 				sDisplay = p->getFullPackageName(m_pPackages->GetLanguage());
 | 745 | 				sDisplay = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 746 | 				delete p;
 | 746 | 				delete p;
 | 
          
            | 747 | 			}
 | 747 | 			}
 | 
          
            | 748 | 			for ( CBaseFile *p = disableList.First(); p; p = disableList.Next() )
 | 748 | 			for ( CBaseFile *p = disableList.First(); p; p = disableList.Next() )
 | 
          
            | Line 775... | Line 775... | 
          
            | 775 | 			if ( m_pPackages->disablePreparedPackages(0, 0, &packageList) )
 | 775 | 			if ( m_pPackages->disablePreparedPackages(0, 0, &packageList) )
 | 
          
            | 776 | 			{
 | 776 | 			{
 | 
          
            | 777 | 				for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 777 | 				for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 
          
            | 778 | 				{
 | 778 | 				{
 | 
          
            | 779 | 					m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), "Disabled", "Disabled Packages");
 | 779 | 					m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), "Disabled", "Disabled Packages");
 | 
          
            | 780 | 					display = "Package Disabled\n\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage()));
 | 780 | 					display = L"Package Disabled\n\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage()));
 | 
          
            | 781 | 				}
 | 781 | 				}
 | 
          
            | 782 | 			}
 | 782 | 			}
 | 
          
            | 783 | 			else
 | 783 | 			else
 | 
          
            | 784 | 				this->DisplayMessageBox(true, "Disable Error", "Error Disabling packages", MessageBoxButtons::OK, MessageBoxIcon::Stop);
 | 784 | 				this->DisplayMessageBox(true, "Disable Error", "Error Disabling packages", MessageBoxButtons::OK, MessageBoxIcon::Stop);
 | 
          
            | 785 | 		}
 | 785 | 		}
 | 
          
            | Line 790... | Line 790... | 
          
            | 790 | 			if ( m_pPackages->enablePreparedPackages(0, 0, &packageList) )
 | 790 | 			if ( m_pPackages->enablePreparedPackages(0, 0, &packageList) )
 | 
          
            | 791 | 			{
 | 791 | 			{
 | 
          
            | 792 | 				for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 792 | 				for ( CBaseFile *p = packageList.First(); p; p = packageList.Next() )
 | 
          
            | 793 | 				{
 | 793 | 				{
 | 
          
            | 794 | 					m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), "Enabled", "Enable Packages");
 | 794 | 					m_pPi->AddPackageWithGroup(_US(p->name(m_pPackages->GetLanguage())), _US(p->author()), _US(p->version()), "Enabled", "Enable Packages");
 | 
          
            | 795 | 					display = "Package Enabled\n\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage()));
 | 795 | 					display = L"Package Enabled\n\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage()));
 | 
          
            | 796 | 				}
 | 796 | 				}
 | 
          
            | 797 | 			}
 | 797 | 			}
 | 
          
            | 798 | 			else
 | 798 | 			else
 | 
          
            | 799 | 				this->DisplayMessageBox(true, "Enable Error", "Error Enabling packages", MessageBoxButtons::OK, MessageBoxIcon::Stop);
 | 799 | 				this->DisplayMessageBox(true, "Enable Error", "Error Enabling packages", MessageBoxButtons::OK, MessageBoxIcon::Stop);
 | 
          
            | 800 | 		}
 | 800 | 		}
 | 
          
            | Line 816... | Line 816... | 
          
            | 816 | 			if ( !builtin )
 | 816 | 			if ( !builtin )
 | 
          
            | 817 | 			{
 | 817 | 			{
 | 
          
            | 818 | 				if ( installedPackages.size() == 1 && erroredPackages.size() == 0 )
 | 818 | 				if ( installedPackages.size() == 1 && erroredPackages.size() == 0 )
 | 
          
            | 819 | 				{
 | 819 | 				{
 | 
          
            | 820 | 					CBaseFile *p = installedPackages.Front()->Data();
 | 820 | 					CBaseFile *p = installedPackages.Front()->Data();
 | 
          
            | 821 | 					Utils::StringpackageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 821 | 					Utils::WString packageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 822 | 					Utils::StringafterText = m_pPackages->getInstallAfterText(p);
 | 822 | 					Utils::WString afterText = m_pPackages->getInstallAfterText(p).toWString();
 | 
          
            | 823 | 					if (afterText.empty())
 | 823 | 					if (afterText.empty())
 | 
          
            | 824 | 						this->DisplayMessageBox(frombackground, "Installed", "Package: " + _US(packageName) + " installed!\n\n", MessageBoxButtons::OK, MessageBoxIcon::Information);
 | 824 | 						this->DisplayMessageBox(frombackground, "Installed", "Package: " + _US(packageName) + " installed!\n\n", MessageBoxButtons::OK, MessageBoxIcon::Information);
 | 
          
            | 825 | 					else
 | 825 | 					else
 | 
          
            | 826 | 					{
 | 826 | 					{
 | 
          
            | 827 | 						afterText = afterText.stripHtml();
 | 827 | 						afterText = afterText.stripHtml();
 | 
          
            | Line 834... | Line 834... | 
          
            | 834 |  
 | 834 |  
 | 
          
            | 835 | 					CyStringList packages;
 | 835 | 					CyStringList packages;
 | 
          
            | 836 | 					for ( CListNode<CBaseFile> *node = installedPackages.Front(); node; node = node->next() )
 | 836 | 					for ( CListNode<CBaseFile> *node = installedPackages.Front(); node; node = node->next() )
 | 
          
            | 837 | 					{
 | 837 | 					{
 | 
          
            | 838 | 						CBaseFile *p = node->Data();
 | 838 | 						CBaseFile *p = node->Data();
 | 
          
            | 839 | 						Utils::StringpackageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 839 | 						Utils::WString packageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 840 | 						Utils::StringafterText = m_pPackages->getInstallAfterText(p);
 | 840 | 						Utils::WString afterText = m_pPackages->getInstallAfterText(p);
 | 
          
            | 841 |  
 | 841 |  
 | 
          
            | 842 | 						if (afterText.empty())
 | 842 | 						if (afterText.empty())
 | 
          
            | 843 | 							afterText = "Installed";
 | 843 | 							afterText = "Installed";
 | 
          
            | 844 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), _US(afterText));
 | 844 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), _US(afterText));
 | 
          
            | 845 | 					}
 | 845 | 					}
 | 
          
            | 846 | 					for ( CListNode<CBaseFile> *node = erroredPackages.Front(); node; node = node->next() )
 | 846 | 					for ( CListNode<CBaseFile> *node = erroredPackages.Front(); node; node = node->next() )
 | 
          
            | 847 | 					{
 | 847 | 					{
 | 
          
            | 848 | 						CBaseFile *p = node->Data();
 | 848 | 						CBaseFile *p = node->Data();
 | 
          
            | 849 | 						Utils::StringpackageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 849 | 						Utils::WString packageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 850 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), "Failed to Install");
 | 850 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), "Failed to Install");
 | 
          
            | 851 | 					}
 | 851 | 					}
 | 
          
            | 852 |  
 | 852 |  
 | 
          
            | 853 | 					m_bDisplayDialog = true;
 | 853 | 					m_bDisplayDialog = true;
 | 
          
            | 854 | 				}
 | 854 | 				}
 | 
          
            | Line 860... | Line 860... | 
          
            | 860 | 			if ( !builtin )
 | 860 | 			if ( !builtin )
 | 
          
            | 861 | 			{
 | 861 | 			{
 | 
          
            | 862 | 				if ( erroredPackages.size() == 1 )
 | 862 | 				if ( erroredPackages.size() == 1 )
 | 
          
            | 863 | 				{
 | 863 | 				{
 | 
          
            | 864 | 					CBaseFile *p = erroredPackages.Front()->Data();
 | 864 | 					CBaseFile *p = erroredPackages.Front()->Data();
 | 
          
            | 865 | 					Utils::StringpackageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 865 | 					Utils::WString packageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 866 | 					this->DisplayMessageBox(frombackground, "Error Installing", "Package: " + _US(packageName) + " failed to install!\nError: " + _US(CBaseFile::ErrorString(p->lastError(), p->lastErrorString())) + "\n", MessageBoxButtons::OK, MessageBoxIcon::Error);
 | 866 | 					this->DisplayMessageBox(frombackground, "Error Installing", "Package: " + _US(packageName) + " failed to install!\nError: " + _US(CBaseFile::ErrorString(p->lastError(), p->lastErrorString())) + "\n", MessageBoxButtons::OK, MessageBoxIcon::Error);
 | 
          
            | 867 | 				}
 | 867 | 				}
 | 
          
            | 868 | 				else
 | 868 | 				else
 | 
          
            | 869 | 				{
 | 869 | 				{
 | 
          
            | 870 | 					m_pPi = gcnew PackageInstalled("Packages Failed To Install");
 | 870 | 					m_pPi = gcnew PackageInstalled("Packages Failed To Install");
 | 
          
            | 871 |  
 | 871 |  
 | 
          
            | 872 | 					CyStringList packages;
 | 872 | 					CyStringList packages;
 | 
          
            | 873 | 					for ( CListNode<CBaseFile> *node = erroredPackages.Front(); node; node = node->next() )
 | 873 | 					for ( CListNode<CBaseFile> *node = erroredPackages.Front(); node; node = node->next() )
 | 
          
            | 874 | 					{
 | 874 | 					{
 | 
          
            | 875 | 						CBaseFile *p = node->Data();
 | 875 | 						CBaseFile *p = node->Data();
 | 
          
            | 876 | 						Utils::StringpackageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 876 | 						Utils::WString packageName = p->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 877 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), "Failed: " + _US(CBaseFile::ErrorString(p->lastError(), p->lastErrorString())));
 | 877 | 						m_pPi->AddPackage(_US(packageName), _US(p->author()), _US(p->version()), "Failed: " + _US(CBaseFile::ErrorString(p->lastError(), p->lastErrorString())));
 | 
          
            | 878 | 					}
 | 878 | 					}
 | 
          
            | 879 |  
 | 879 |  
 | 
          
            | 880 | 					m_bDisplayDialog = true;
 | 880 | 					m_bDisplayDialog = true;
 | 
          
            | 881 | 				}
 | 881 | 				}
 | 
          
            | Line 975... | Line 975... | 
          
            | 975 | 					if (!added)
 | 975 | 					if (!added)
 | 
          
            | 976 | 						installRequired->push_back(package);
 | 976 | 						installRequired->push_back(package);
 | 
          
            | 977 | 					continue;
 | 977 | 					continue;
 | 
          
            | 978 | 				}
 | 978 | 				}
 | 
          
            | 979 |  
 | 979 |  
 | 
          
            | 980 | 				Utils::CStringListmissingList;
 | 980 | 				Utils::WStringList missingList;
 | 
          
            | 981 | 				if ( m_pPackages->GetMissingDependacies(package, &missingList) )
 | 981 | 				if ( m_pPackages->getMissingDependacies(package, &missingList) )
 | 
          
            | 982 | 				{
 | 982 | 				{
 | 
          
            | 983 | 					Utils::Stringrequires;
 | 983 | 					Utils::WString requires;
 | 
          
            | 984 | 					for (auto itr = missingList.begin(); itr != missingList.end(); itr++)
 | 984 | 					for (auto itr = missingList.begin(); itr != missingList.end(); itr++)
 | 
          
            | 985 | 					{
 | 985 | 					{
 | 
          
            | 986 | 						Utils::Stringname = (*itr)->str;;
 | 986 | 						Utils::WString name = (*itr)->str;;
 | 
          
            | 987 | 						Utils::Stringauthor = (*itr)->data;
 | 987 | 						Utils::WString author = (*itr)->data;
 | 
          
            | 988 | 						Utils::Stringversion;
 | 988 | 						Utils::WString version;
 | 
          
            | 989 | 						if (name.contains("|"))
 | 989 | 						if (name.contains(L"|"))
 | 
          
            | 990 | 						{
 | 990 | 						{
 | 
          
            | 991 | 							version = name.token("|", 2);
 | 991 | 							version = name.token(L"|", 2);
 | 
          
            | 992 | 							name = name.token("|", 1);
 | 992 | 							name = name.token(L"|", 1);
 | 
          
            | 993 | 						}
 | 993 | 						}
 | 
          
            | 994 |  
 | 994 |  
 | 
          
            | 995 | 						if (!version.empty())
 | 995 | 						if (!version.empty())
 | 
          
            | 996 | 							requires += name + " V" + version + " by " + author;
 | 996 | 							requires += name + L" V" + version + L" by " + author;
 | 
          
            | 997 | 						else
 | 997 | 						else
 | 
          
            | 998 | 							requires += name + " by " + author;
 | 998 | 							requires += name + L" by " + author;
 | 
          
            | 999 | 						requires += "\n";
 | 999 | 						requires += L"\n";
 | 
          
            | 1000 | 					}
 | 1000 | 					}
 | 
          
            | 1001 |  
 | 1001 |  
 | 
          
            | 1002 | 					std::vector<const SAvailablePackage*> downloads;
 | 1002 | 					std::vector<const SAvailablePackage*> downloads;
 | 
          
            | 1003 | 					if (m_pPackages->getDownloadableDependacies(package, downloads) >= missingList.size())
 | 1003 | 					if (m_pPackages->getDownloadableDependacies(package, downloads) >= missingList.size())
 | 
          
            | 1004 | 					{
 | 1004 | 					{
 | 
          
            | Line 1309... | Line 1309... | 
          
            | 1309 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nParent mod is not enabled", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 1309 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nParent mod is not enabled", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 
          
            | 1310 | 			else if ( m_pPackages->GetError() == PKERR_MODIFIED )
 | 1310 | 			else if ( m_pPackages->GetError() == PKERR_MODIFIED )
 | 
          
            | 1311 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nPackage is modified and game is currently set to vanilla\nSwitch to modified mode to enable", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 1311 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nPackage is modified and game is currently set to vanilla\nSwitch to modified mode to enable", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 
          
            | 1312 | 			else if ( m_pPackages->GetError() == PKERR_MISSINGDEP )
 | 1312 | 			else if ( m_pPackages->GetError() == PKERR_MISSINGDEP )
 | 
          
            | 1313 | 			{
 | 1313 | 			{
 | 
          
            | 1314 | 				Utils::CStringListdepList;
 | 1314 | 				Utils::WStringList depList;
 | 
          
            | 1315 | 				m_pPackages->GetMissingDependacies(p, &depList, true);
 | 1315 | 				m_pPackages->getMissingDependacies(p, &depList, true);
 | 
          
            | 1316 | 				Utils::StringsDep;
 | 1316 | 				Utils::WString sDep;
 | 
          
            | 1317 | 				for(auto itr = depList.begin(); itr != depList.end(); itr++)
 | 1317 | 				for(auto itr = depList.begin(); itr != depList.end(); itr++)
 | 
          
            | 1318 | 				{
 | 1318 | 				{
 | 
          
            | 1319 | 					if ( (*itr)->str.contains("|") )
 | 1319 | 					if ( (*itr)->str.contains(L"|") )
 | 
          
            | 1320 | 						sDep = (*itr)->str.token("|", 1) + " V" + (*itr)->str.token("|", 2) + " by " + (*itr)->data + "\n";
 | 1320 | 						sDep = (*itr)->str.token(L"|", 1) + L" V" + (*itr)->str.token(L"|", 2) + L" by " + (*itr)->data + L"\n";
 | 
          
            | 1321 | 					else
 | 1321 | 					else
 | 
          
            | 1322 | 						sDep = (*itr)->str + " by " + (*itr)->data + "\n";
 | 1322 | 						sDep = (*itr)->str + L" by " + (*itr)->data + L"\n";
 | 
          
            | 1323 | 				}
 | 1323 | 				}
 | 
          
            | 1324 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nMissing Enabled Dependacies:\n" + _US(sDep), MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 1324 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nMissing Enabled Dependacies:\n" + _US(sDep), MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 
          
            | 1325 | 			}
 | 1325 | 			}
 | 
          
            | 1326 | 			else
 | 1326 | 			else
 | 
          
            | 1327 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nUnknown Error", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 1327 | 				this->DisplayMessageBox(false, "Enable Error", "Error enabling package\n" + _US(p->getFullPackageName(m_pPackages->GetLanguage())) + "\n\nUnknown Error", MessageBoxButtons::OK, MessageBoxIcon::Warning);
 | 
          
            | Line 1524... | Line 1524... | 
          
            | 1524 | 		else if (result == System::Windows::Forms::DialogResult::Abort)
 | 1524 | 		else if (result == System::Windows::Forms::DialogResult::Abort)
 | 
          
            | 1525 | 		{
 | 1525 | 		{
 | 
          
            | 1526 | 			if (m_pPackages->GetEnabledMod())
 | 1526 | 			if (m_pPackages->GetEnabledMod())
 | 
          
            | 1527 | 			{
 | 1527 | 			{
 | 
          
            | 1528 | 				CBaseFile *mod = m_pPackages->GetEnabledMod();
 | 1528 | 				CBaseFile *mod = m_pPackages->GetEnabledMod();
 | 
          
            | 1529 | 				Utils::Stringmessage = mod->getFullPackageName(m_pPackages->GetLanguage());
 | 1529 | 				Utils::WString message = mod->getFullPackageName(m_pPackages->GetLanguage());
 | 
          
            | 1530 | 				m_pPackages->disablePackage(m_pPackages->GetEnabledMod(), 0, 0);
 | 1530 | 				m_pPackages->disablePackage(m_pPackages->GetEnabledMod(), 0, 0);
 | 
          
            | 1531 | 				this->DisplayMessageBox(false, "Mod Disabed", _US(message) + " has been disabled\nYour game is no longer using any mods\n", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
 | 1531 | 				this->DisplayMessageBox(false, "Mod Disabed", _US(message) + " has been disabled\nYour game is no longer using any mods\n", MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
 | 
          
            | 1532 | 			}
 | 1532 | 			}
 | 
          
            | 1533 | 		}
 | 1533 | 		}
 | 
          
            | 1534 |  
 | 1534 |  
 | 
          
            | Line 1575... | Line 1575... | 
          
            | 1575 | 					if ( skipShips )
 | 1575 | 					if ( skipShips )
 | 
          
            | 1576 | 						continue;
 | 1576 | 						continue;
 | 
          
            | 1577 | 				}
 | 1577 | 				}
 | 
          
            | 1578 |  
 | 1578 |  
 | 
          
            | 1579 | 				// display uninstall text
 | 1579 | 				// display uninstall text
 | 
          
            | 1580 | 				Utils::StringbeforeText = m_pPackages->getUninstallBeforeText(p);
 | 1580 | 				Utils::WString beforeText = m_pPackages->getUninstallBeforeText(p);
 | 
          
            | 1581 | 				if ( !beforeText.empty() ) {
 | 1581 | 				if ( !beforeText.empty() ) {
 | 
          
            | 1582 | 					if ( this->DisplayMessageBox(false, "Uninstall Package", _US(p->getFullPackageName(m_pPackages->GetLanguage()) + "\n" + beforeText + "\n\nDo you want to uninstall this package?"), MessageBoxButtons::YesNo, MessageBoxIcon::Question) != System::Windows::Forms::DialogResult::Yes )
 | 1582 | 					if ( this->DisplayMessageBox(false, "Uninstall Package", _US(p->getFullPackageName(m_pPackages->GetLanguage()) + "\n" + beforeText + "\n\nDo you want to uninstall this package?"), MessageBoxButtons::YesNo, MessageBoxIcon::Question) != System::Windows::Forms::DialogResult::Yes )
 | 
          
            | 1583 | 						continue;
 | 1583 | 						continue;
 | 
          
            | 1584 | 				}
 | 1584 | 				}
 | 
          
            | 1585 |  
 | 1585 |  
 | 
          
            | Line 1876... | Line 1876... | 
          
            | 1876 | 			bool installing = false;
 | 1876 | 			bool installing = false;
 | 
          
            | 1877 | 			array <System::String ^> ^Files = System::IO::Directory::GetFiles(dir, "*.spk");
 | 1877 | 			array <System::String ^> ^Files = System::IO::Directory::GetFiles(dir, "*.spk");
 | 
          
            | 1878 |  
 | 1878 |  
 | 
          
            | 1879 | 			for ( int i = 0; i < Files->Length; i++ )
 | 1879 | 			for ( int i = 0; i < Files->Length; i++ )
 | 
          
            | 1880 | 			{
 | 1880 | 			{
 | 
          
            | 1881 | 				Utils::Stringfile =_S(Files[i]);
 | 1881 | 				Utils::WString file = _WS(Files[i]);
 | 
          
            | 1882 | 				int error;
 | 1882 | 				int error;
 | 
          
            | 1883 | 				CBaseFile *p = m_pPackages->openPackage(file, &error, 0, SPKREAD_NODATA);
 | 1883 | 				CBaseFile *p = m_pPackages->openPackage(file, &error, 0, SPKREAD_NODATA);
 | 
          
            | 1884 | 				if ( !p )
 | 1884 | 				if ( !p )
 | 
          
            | 1885 | 					continue;
 | 1885 | 					continue;
 | 
          
            | 1886 |  
 | 1886 |  
 | 
          
            | Line 2376... | Line 2376... | 
          
            | 2376 | 				if ( this->extrasToolStripMenuItem->DropDownItems->Count )
 | 2376 | 				if ( this->extrasToolStripMenuItem->DropDownItems->Count )
 | 
          
            | 2377 | 					this->extrasToolStripMenuItem->Visible = true;
 | 2377 | 					this->extrasToolStripMenuItem->Visible = true;
 | 
          
            | 2378 |  
 | 2378 |  
 | 
          
            | 2379 | 				// email/website/forum
 | 2379 | 				// email/website/forum
 | 
          
            | 2380 | 				if ( !p->forumLink().empty() ) {
 | 2380 | 				if ( !p->forumLink().empty() ) {
 | 
          
            | 2381 | 					Utils::Stringweb = p->forumLink();
 | 2381 | 					Utils::WString web = p->forumLink();
 | 
          
            | 2382 | 					if ( web.isNumber() )
 | 2382 | 					if ( web.isNumber() )
 | 
          
            | 2383 | 						web = Utils::String("http://forum.egosoft.com/viewtopic.php?t=") + web;
 | 2383 | 						web = Utils::WString(L"http://forum.egosoft.com/viewtopic.php?t=") + web; 
 | 
          
            | 2384 |  
 | 2384 |  
 | 
          
            | 2385 | 					this->visitForumPageToolStripMenuItem->Visible = true;
 | 2385 | 					this->visitForumPageToolStripMenuItem->Visible = true;
 | 
          
            | 2386 | 					if ( !web.isin("http://") )
 | 2386 | 					if ( !web.isin("http://") )
 | 
          
            | 2387 | 						this->visitForumPageToolStripMenuItem->Tag = "http://" + _US(web);
 | 2387 | 						this->visitForumPageToolStripMenuItem->Tag = "http://" + _US(web);
 | 
          
            | 2388 | 					else
 | 2388 | 					else
 | 
          
            | Line 2562... | Line 2562... | 
          
            | 2562 | 	void MainGui::FakePatchControlDialog()
 | 2562 | 	void MainGui::FakePatchControlDialog()
 | 
          
            | 2563 | 	{
 | 2563 | 	{
 | 
          
            | 2564 | 		FakePatchControl ^fpc = gcnew FakePatchControl(m_pPackages);
 | 2564 | 		FakePatchControl ^fpc = gcnew FakePatchControl(m_pPackages);
 | 
          
            | 2565 | 		if ( fpc->ShowDialog(this) == Windows::Forms::DialogResult::OK )
 | 2565 | 		if ( fpc->ShowDialog(this) == Windows::Forms::DialogResult::OK )
 | 
          
            | 2566 | 		{
 | 2566 | 		{
 | 
          
            | 2567 | 			m_pPackages->ApplyFakePatchOrder(fpc->GetPatchOrder());
 | 2567 | 			m_pPackages->applyFakePatchOrder(*fpc->GetPatchOrder());
 | 
          
            | 2568 | 			m_pPackages->shuffleFakePatches(0);
 | 2568 | 			m_pPackages->shuffleFakePatches(0);
 | 
          
            | 2569 | 		}
 | 2569 | 		}
 | 
          
            | 2570 | 	}
 | 2570 | 	}
 | 
          
            | 2571 |  
 | 2571 |  
 | 
          
            | 2572 | 	void MainGui::CheckFakePatchCompatability()
 | 2572 | 	void MainGui::CheckFakePatchCompatability()
 | 
          
            | Line 2838... | Line 2838... | 
          
            | 2838 | 			try 
 | 2838 | 			try 
 | 
          
            | 2839 | 			{
 | 2839 | 			{
 | 
          
            | 2840 | 				for ( CBaseFile *package = m_pPackages->FirstPackage(); package; package = m_pPackages->NextPackage() )
 | 2840 | 				for ( CBaseFile *package = m_pPackages->FirstPackage(); package; package = m_pPackages->NextPackage() )
 | 
          
            | 2841 | 				{
 | 2841 | 				{
 | 
          
            | 2842 | 					if ( enabled && !package->IsEnabled() ) continue;
 | 2842 | 					if ( enabled && !package->IsEnabled() ) continue;
 | 
          
            | 2843 | 					Utils::Stringline = package->name() + " :: " + package->author() + " :: " + package->version()+ " :: " + package->creationDate() + " :: ";
 | 2843 | 					Utils::WString line = package->name() + L" :: " + package->author() + L" :: " + package->version().toWString() + L" :: " + package->creationDate().toWString() + L" :: ";
 | 
          
            | 2844 | 						
 | 2844 | 						
 | 
          
            | 2845 | 					if ( package->GetType() == TYPE_XSP )
 | 2845 | 					if ( package->GetType() == TYPE_XSP )
 | 
          
            | 2846 | 						line += "Ship :: ";
 | 2846 | 						line += L"Ship :: ";
 | 
          
            | 2847 | 					else if ( package->GetType() == TYPE_ARCHIVE )
 | 2847 | 					else if ( package->GetType() == TYPE_ARCHIVE )
 | 
          
            | 2848 | 						line += "- Archive - :: ";
 | 2848 | 						line += L"- Archive - :: ";
 | 
          
            | 2849 | 					else if ( package->GetType() == TYPE_SPK ) {
 | 2849 | 					else if ( package->GetType() == TYPE_SPK ) {
 | 
          
            | 2850 | 						Utils::Stringtype = ((CSpkFile *)package)->GetScriptTypeString(m_pPackages->GetLanguage());
 | 2850 | 						Utils::WString type = ((CSpkFile *)package)->GetScriptTypeString(m_pPackages->GetLanguage());
 | 
          
            | 2851 | 						if ( !type.empty() ) line += type + " :: ";
 | 2851 | 						if ( !type.empty() ) line += type + L" :: ";
 | 
          
            | 2852 | 					}
 | 2852 | 					}
 | 
          
            | 2853 |  
 | 2853 |  
 | 
          
            | 2854 | 					line = line + ((package->IsEnabled()) ? "Yes" : "No") + " :: " + ((package->IsSigned()) ? "Yes" : "No");
 | 2854 | 					line = line + ((package->IsEnabled()) ? L"Yes" : L"No") + L" :: " + ((package->IsSigned()) ? L"Yes" : L"No");
 | 
          
            | 2855 | 					sw->WriteLine(_US(line));
 | 2855 | 					sw->WriteLine(_US(line));
 | 
          
            | 2856 | 				}
 | 2856 | 				}
 | 
          
            | 2857 | 			}
 | 2857 | 			}
 | 
          
            | 2858 | 			finally
 | 2858 | 			finally
 | 
          
            | 2859 | 			{
 | 2859 | 			{
 |