mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-29 08:04:19 +01:00
* add basic stuff for putting svn rev into the programs for identification.
* only tested on kubuntu with ohneswanzenegger so far git-svn-id: http://wiiqt.googlecode.com/svn/trunk@97 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
2777708318
commit
c621d20e86
@ -249,6 +249,21 @@ quint8 AttrFromSave( const SaveGame &save, const QString &name )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CleanSvnStr( const QString &orig )
|
||||||
|
{
|
||||||
|
QString ret = orig;
|
||||||
|
|
||||||
|
if( ret.isEmpty() )
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
QRegExp notNum( "[^0-9]" );
|
||||||
|
QStringList parts = ret.split( notNum, QString::SkipEmptyParts );
|
||||||
|
if( parts.size() )
|
||||||
|
return parts.at( parts.size() - 1 );
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#define CERTS_DAT_SIZE 2560
|
#define CERTS_DAT_SIZE 2560
|
||||||
const quint8 certs_dat[ CERTS_DAT_SIZE ] = {
|
const quint8 certs_dat[ CERTS_DAT_SIZE ] = {
|
||||||
0x00, 0x01, 0x00, 0x01, 0x7D, 0x9D, 0x5E, 0xBA, 0x52, 0x81, 0xDC, 0xA7, 0x06, 0x5D, 0x2F, 0x08,
|
0x00, 0x01, 0x00, 0x01, 0x7D, 0x9D, 0x5E, 0xBA, 0x52, 0x81, 0xDC, 0xA7, 0x06, 0x5D, 0x2F, 0x08,
|
||||||
|
@ -78,6 +78,9 @@ QByteArray ReadFile( const QString &path );
|
|||||||
//save a file to disc
|
//save a file to disc
|
||||||
bool WriteFile( const QString &path, const QByteArray &ba );
|
bool WriteFile( const QString &path, const QByteArray &ba );
|
||||||
|
|
||||||
|
//cleanup an svn revision string
|
||||||
|
QString CleanSvnStr( const QString &orig );
|
||||||
|
|
||||||
#define CERTS_DAT_SIZE 2560
|
#define CERTS_DAT_SIZE 2560
|
||||||
extern const quint8 certs_dat[ CERTS_DAT_SIZE ];
|
extern const quint8 certs_dat[ CERTS_DAT_SIZE ];
|
||||||
extern const quint8 root_dat[];
|
extern const quint8 root_dat[];
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "newnandbin.h"
|
#include "newnandbin.h"
|
||||||
|
#include "svnrev.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include "../WiiQt/settingtxtdialog.h"
|
#include "../WiiQt/settingtxtdialog.h"
|
||||||
@ -57,7 +58,6 @@ MainWindow::MainWindow( QWidget *parent ) : QMainWindow( parent ), ui( new Ui::M
|
|||||||
|
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
ui->lineEdit_nandPath->setText( "./testNand.bin" );
|
ui->lineEdit_nandPath->setText( "./testNand.bin" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
@ -785,7 +785,7 @@ void MainWindow::on_actionAbout_triggered()
|
|||||||
"<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"
|
"<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"
|
||||||
"<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( "svn r%1" ).arg( CleanSvnStr( SVN_REV_STR ) ), txt );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -39,3 +39,14 @@ FORMS += mainwindow.ui \
|
|||||||
../WiiQt/settingtxtdialog.ui \
|
../WiiQt/settingtxtdialog.ui \
|
||||||
newnandbin.ui
|
newnandbin.ui
|
||||||
RESOURCES += rc.qrc
|
RESOURCES += rc.qrc
|
||||||
|
|
||||||
|
|
||||||
|
# create new svnrev.h
|
||||||
|
unix {
|
||||||
|
system( chmod 755 ../tools/makesvnrev.sh )
|
||||||
|
system( ../tools/makesvnrev.sh )
|
||||||
|
}
|
||||||
|
|
||||||
|
win32 {
|
||||||
|
system( ../tools/SubWCRev.exe "." "../tools/svnrev_template.h" "./svnrev.h" )
|
||||||
|
}
|
||||||
|
BIN
tools/SubWCRev.exe
Normal file
BIN
tools/SubWCRev.exe
Normal file
Binary file not shown.
6
tools/makesvnrev.sh
Executable file
6
tools/makesvnrev.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
REV=`svnversion -n .`
|
||||||
|
echo $REV
|
||||||
|
cat > ./svnrev.h <<EOF
|
||||||
|
#define SVN_REV $REV
|
||||||
|
#define SVN_REV_STR "$REV"
|
||||||
|
EOF
|
2
tools/svnrev_template.h
Normal file
2
tools/svnrev_template.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#define SVN_REV $WCREV$
|
||||||
|
#define SVN_REV_STR "$WCMODS?$WCREV$M:$WCREV$$"
|
Loading…
Reference in New Issue
Block a user