mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-22 05:29:14 +01:00
* ohneschwanzenegger:: allow passing nand filename as argv
* nandBinCheck:: default to "-all -v -v" if no args are given git-svn-id: http://wiiqt.googlecode.com/svn/trunk@104 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
7752ff1843
commit
06da4707a6
@ -354,6 +354,7 @@ QString NusDownloader::GetCachePath( quint32 idx )
|
||||
return path;
|
||||
}
|
||||
|
||||
#if 0
|
||||
//print info about a job
|
||||
void NusDownloader::DbgJoB( const NusJob &job )
|
||||
{
|
||||
@ -366,6 +367,7 @@ void NusDownloader::DbgJoB( const NusJob &job )
|
||||
.arg( job.version ).arg( job.decrypt ? "decrypted" : "encrypted" )
|
||||
.arg( dataStuff );
|
||||
}
|
||||
#endif
|
||||
|
||||
//check a hash and add the data to the return item
|
||||
bool NusDownloader::DecryptCheckHashAndAppendData( const QByteArray &encData, quint16 idx )
|
||||
@ -540,7 +542,6 @@ void NusDownloader::downloadFinished()
|
||||
{
|
||||
emit SendDownloadProgress( 100 );
|
||||
FileIsFinishedDownloading( dlJob );
|
||||
|
||||
}
|
||||
currentDownload->deleteLater();
|
||||
}
|
||||
|
@ -127,10 +127,10 @@ private:
|
||||
|
||||
//send a fail message about the current job and skip to the next
|
||||
void CurrentJobErrored( const QString &str );
|
||||
|
||||
#if 0
|
||||
//print info about a job to qDebug()
|
||||
void DbgJoB( const NusJob &job );
|
||||
|
||||
#endif
|
||||
//get the path for a file in the local cache
|
||||
QString GetCachePath( quint32 idx );
|
||||
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
quint32 content_count();
|
||||
|
||||
//get the last error encountered while trying to do something
|
||||
const QString LastError(){ return errStr; }
|
||||
const QString &LastError(){ return errStr; }
|
||||
|
||||
//get a name for a wad as it would be seen in a wii disc update partition
|
||||
//if a path is given, it will check that path for existing wads with the name and append a number to the end "(1)" to avoid duplicate files
|
||||
|
@ -165,6 +165,7 @@ void DebugHandler( QtMsgType type, const char *msg )
|
||||
void Usage()
|
||||
{
|
||||
qWarning() << "usage:" << QCoreApplication::arguments().at( 0 ) << "nand.bin" << "<other options>";
|
||||
qDebug() << "\nif no <other options> are given, it will default to \"-all -v -v\"";
|
||||
qDebug() << "\nOther options:";
|
||||
qDebug() << " -boot shows information about boot 1 and 2";
|
||||
qDebug() << "";
|
||||
@ -1328,7 +1329,7 @@ int main( int argc, char *argv[] )
|
||||
if( args.contains( "-about", Qt::CaseInsensitive ) )
|
||||
About();
|
||||
|
||||
if( args.size() < 3 )
|
||||
if( args.size() < 2 )
|
||||
Usage();
|
||||
|
||||
if( !QFile( args.at( 1 ) ).exists() )
|
||||
@ -1337,6 +1338,11 @@ int main( int argc, char *argv[] )
|
||||
if( !nand.SetPath( args.at( 1 ) ) || !nand.InitNand() )
|
||||
Fail( "Error setting path to nand object" );
|
||||
|
||||
if( args.size() < 3 )
|
||||
{
|
||||
args << "-all" << "-v" << "-v";
|
||||
}
|
||||
|
||||
root = NULL;
|
||||
|
||||
verbose = args.count( "-v" );
|
||||
|
@ -57,7 +57,17 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
|
||||
connect( &nand, SIGNAL( SendText( QString ) ), ui->statusBar, SLOT( showMessage( QString ) ) );
|
||||
|
||||
LoadSettings();
|
||||
ui->lineEdit_nandPath->setText( "./testNand.bin" );
|
||||
|
||||
QStringList args = QCoreApplication::arguments();
|
||||
if( args.size() > 1 && QFileInfo( args.at( 1 ) ).exists() )
|
||||
{
|
||||
ui->lineEdit_nandPath->setText( args.at( 1 ) );
|
||||
InitNand( args.at( 1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lineEdit_nandPath->setText( "./testNand.bin" );
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
Loading…
Reference in New Issue
Block a user