mirror of
https://github.com/martravi/wiiqt.git
synced 2024-11-22 09:09:18 +01:00
* add basic stuff for putting svn rev into the programs for identification.
* only tested on kubuntu with ohneswanzenegger so far
This commit is contained in:
parent
530f360482
commit
7f3c6d1d25
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -160,3 +160,6 @@ thp_player/thpwindow.ui -text
|
|||||||
thp_player/vol_high.png -text
|
thp_player/vol_high.png -text
|
||||||
thp_player/vol_low.png -text
|
thp_player/vol_low.png -text
|
||||||
thp_player/vol_med.png -text
|
thp_player/vol_med.png -text
|
||||||
|
tools/SubWCRev.exe -text
|
||||||
|
tools/makesvnrev.sh -text
|
||||||
|
tools/svnrev_template.h -text
|
||||||
|
@ -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