Added support for building Wii ISOs
This commit is contained in:
parent
665a098d50
commit
096ef45bac
|
@ -81,24 +81,23 @@ bool CGameProject::BuildISO(const TString& rkIsoPath, IProgressNotifier *pProgre
|
|||
{
|
||||
ASSERT( FileUtil::IsValidPath(rkIsoPath, false) );
|
||||
|
||||
if (IsWiiBuild())
|
||||
{
|
||||
Log::Error("Wii ISO building not supported!");
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
auto ProgressCallback = [&](float ProgressPercent, const nod::SystemString& rkInfoString, size_t)
|
||||
{
|
||||
pProgress->Report((int) (ProgressPercent * 10000), 10000, TWideString(rkInfoString).ToUTF8());
|
||||
};
|
||||
|
||||
nod::DiscBuilderGCN *pBuilder = new nod::DiscBuilderGCN(*rkIsoPath.ToUTF16(), ProgressCallback);
|
||||
pProgress->SetTask(0, "Building " + rkIsoPath.GetFileName());
|
||||
|
||||
TWideString DiscRoot = DiscDir(false).ToUTF16();
|
||||
return pBuilder->buildFromDirectory(*DiscRoot) == nod::EBuildResult::Success;
|
||||
|
||||
if (!IsWiiBuild())
|
||||
{
|
||||
nod::DiscBuilderGCN Builder(*rkIsoPath.ToUTF16(), ProgressCallback);
|
||||
return Builder.buildFromDirectory(*DiscRoot) == nod::EBuildResult::Success;
|
||||
}
|
||||
else
|
||||
{
|
||||
nod::DiscBuilderWii Builder(*rkIsoPath.ToUTF16(), IsTrilogy(), ProgressCallback);
|
||||
return Builder.buildFromDirectory(*DiscRoot) == nod::EBuildResult::Success;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,6 @@ void CProjectSettingsDialog::ActiveProjectChanged(CGameProject *pProj)
|
|||
close();
|
||||
}
|
||||
|
||||
mpUI->BuildIsoButton->setEnabled( pProj && !pProj->IsWiiBuild() );
|
||||
SetupPackagesList();
|
||||
}
|
||||
|
||||
|
@ -108,10 +107,23 @@ void CProjectSettingsDialog::CookAllDirtyPackages()
|
|||
void CProjectSettingsDialog::BuildISO()
|
||||
{
|
||||
CGameProject *pProj = gpEdApp->ActiveProject();
|
||||
ASSERT(pProj && !pProj->IsWiiBuild());
|
||||
ASSERT(pProj);
|
||||
|
||||
QString DefaultPath = TO_QSTRING( pProj->ProjectRoot() + FileUtil::SanitizeName(pProj->Name(), false) + ".gcm" );
|
||||
QString IsoPath = UICommon::SaveFileDialog(this, "Choose output ISO path", "*.gcm", DefaultPath);
|
||||
QString DefaultExtension, FilterString;
|
||||
|
||||
if (!pProj->IsWiiBuild())
|
||||
{
|
||||
DefaultExtension = ".gcm";
|
||||
FilterString = "*.gcm;*.iso";
|
||||
}
|
||||
else
|
||||
{
|
||||
DefaultExtension = ".iso";
|
||||
FilterString = "*.iso";
|
||||
}
|
||||
|
||||
QString DefaultPath = TO_QSTRING( pProj->ProjectRoot() + FileUtil::SanitizeName(pProj->Name(), false) ) + DefaultExtension;
|
||||
QString IsoPath = UICommon::SaveFileDialog(this, "Choose output ISO path", FilterString, DefaultPath);
|
||||
|
||||
if (!IsoPath.isEmpty())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue