mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-26 06:34:21 +01:00
nandbin.cpp: add more characters to replace to support lame-ass windows filesystems
git-svn-id: http://wiiqt.googlecode.com/svn/trunk@77 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
13610f87ad
commit
b91785abac
@ -332,7 +332,18 @@ const QString NandBin::FstName( fst_t fst )
|
|||||||
QByteArray ba( (char*)fst.filename, 0xc );
|
QByteArray ba( (char*)fst.filename, 0xc );
|
||||||
QString ret = QString( ba );
|
QString ret = QString( ba );
|
||||||
if( fatNames )
|
if( fatNames )
|
||||||
ret.replace( ":", "-" );
|
{
|
||||||
|
ret.replace( ":", "-" );
|
||||||
|
ret.replace( "?", "-" );
|
||||||
|
ret.replace( "<", "-" );
|
||||||
|
ret.replace( ">", "-" );
|
||||||
|
ret.replace( "\\", "-" );
|
||||||
|
ret.replace( ":", "-" );
|
||||||
|
ret.replace( "*", "-" );
|
||||||
|
ret.replace( "|", "-" );
|
||||||
|
ret.replace( "\"", "-" );
|
||||||
|
ret.replace( "^", "-" );
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1279,7 +1279,7 @@ int main( int argc, char *argv[] )
|
|||||||
qCritical() << "** nandBinCheck : Wii nand info tool **";
|
qCritical() << "** nandBinCheck : Wii nand info tool **";
|
||||||
qCritical() << " from giantpune";
|
qCritical() << " from giantpune";
|
||||||
qCritical() << " built:" << __DATE__ << __TIME__;
|
qCritical() << " built:" << __DATE__ << __TIME__;
|
||||||
args = QCoreApplication::arguments();
|
args = QCoreApplication::arguments();
|
||||||
|
|
||||||
if( args.contains( "-nocolor", Qt::CaseInsensitive ) )
|
if( args.contains( "-nocolor", Qt::CaseInsensitive ) )
|
||||||
color = false;
|
color = false;
|
||||||
|
@ -285,14 +285,16 @@ void MainWindow::on_actionSetting_txt_triggered()
|
|||||||
if( !nandInited )
|
if( !nandInited )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QTreeWidgetItem *it = ItemFromPath( "/title/00000001/00000002/data/setting.txt" );
|
if( !ItemFromPath( "/title/00000001/00000002/data" ) )
|
||||||
if( !it )
|
{
|
||||||
{
|
ShowMessage( tr( "<b>You need to have a system menu before you can create a setting.txt</b>" ) );
|
||||||
ShowMessage( tr( "<b>There is no setting.txt found in %1</b>" )
|
|
||||||
.arg( QFileInfo( ui->lineEdit_nandPath->text() ).absoluteFilePath() ) );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QByteArray ba = nand.GetData( "/title/00000001/00000002/data/setting.txt" ); //read the current setting.txt
|
|
||||||
|
QByteArray ba;
|
||||||
|
if( ItemFromPath( "/title/00000001/00000002/data/setting.txt" ) )
|
||||||
|
ba = nand.GetData( "/title/00000001/00000002/data/setting.txt" ); //read the current setting.txt
|
||||||
|
|
||||||
ba = SettingTxtDialog::Edit( this, ba ); //call a dialog to edit that existing file and store the result in the same bytearray
|
ba = SettingTxtDialog::Edit( this, ba ); //call a dialog to edit that existing file and store the result in the same bytearray
|
||||||
if( !ba.isEmpty() ) //if the dialog returned anything ( cancel wasnt pressed ) write that new setting.txt to the nand dump
|
if( !ba.isEmpty() ) //if the dialog returned anything ( cancel wasnt pressed ) write that new setting.txt to the nand dump
|
||||||
{
|
{
|
||||||
@ -776,8 +778,7 @@ bool MainWindow::InstallNUSItem( NusJob job )
|
|||||||
void MainWindow::on_actionAbout_triggered()
|
void MainWindow::on_actionAbout_triggered()
|
||||||
{
|
{
|
||||||
QString txt = tr( "This is an example program from WiiQt. It is designed to write titles to a nand.bin and even create one from scratch."
|
QString txt = tr( "This is an example program from WiiQt. It is designed to write titles to a nand.bin and even create one from scratch."
|
||||||
"<br><br>PLEASE BE AWARE, THIS IS NOT VERY WELL TESTED AND AS OF RIGHT NOW."
|
"<br><br>IT SHOULD ONLY BE USED BY PEOPLE THAT KNOW HOW TO VERIFY THE FILES IT PRODUCES. AND HAVE A WAY TO FIX A BRICKED WII SHOULD THIS PROGRAM HAVE BUGS"
|
||||||
" IT SHOULD ONLY BE USED BY PEOPLE THAT KNOW HOW TO VERIFY THE FILES IT PRODUCES. AND HAVE A WAY TO FIX A BRICKED WII SHOULD THIS PROGRAM HAVE BUGS"
|
|
||||||
"<br><br>YOU HAVE BEEN WARNED"
|
"<br><br>YOU HAVE BEEN WARNED"
|
||||||
"<br>giantpune" );
|
"<br>giantpune" );
|
||||||
QMessageBox::critical( this, tr( "About" ), txt );
|
QMessageBox::critical( this, tr( "About" ), txt );
|
||||||
|
Loading…
Reference in New Issue
Block a user