mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Update for RZ_GITTAP Removal (#2608)
This commit is contained in:
parent
f95751c4cd
commit
6da02c6a02
@ -30,6 +30,15 @@
|
||||
# include <RzGhidraDecompiler.h>
|
||||
#endif
|
||||
|
||||
// Rizin before 301e5af2170d9f3ed1edd658b0f9633f31fc4126
|
||||
// has RZ_GITTAP defined and uses it in rz_core_version().
|
||||
// After that, RZ_GITTAP is not defined anymore and RZ_VERSION is used.
|
||||
#ifdef RZ_GITTAP
|
||||
#define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_GITTAP
|
||||
#else
|
||||
#define CUTTER_COMPILE_TIME_RZ_VERSION "" RZ_VERSION
|
||||
#endif
|
||||
|
||||
CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc, argv)
|
||||
{
|
||||
// Setup application information
|
||||
@ -76,7 +85,8 @@ CutterApplication::CutterApplication(int &argc, char **argv) : QApplication(argc
|
||||
|
||||
// Check rizin version
|
||||
QString rzversion = rz_core_version();
|
||||
QString localVersion = "" RZ_GITTAP;
|
||||
QString localVersion = CUTTER_COMPILE_TIME_RZ_VERSION;
|
||||
qDebug() << rzversion << localVersion;
|
||||
if (rzversion != localVersion) {
|
||||
QMessageBox msg;
|
||||
msg.setIcon(QMessageBox::Critical);
|
||||
|
@ -3890,6 +3890,12 @@ void CutterCore::loadScript(const QString &scriptname)
|
||||
triggerRefreshAll();
|
||||
}
|
||||
|
||||
QString CutterCore::getRizinVersionReadable()
|
||||
{
|
||||
return QString("%1 (%2)").arg(QString::fromUtf8(RZ_VERSION),
|
||||
QString::fromUtf8(RZ_GITTIP).left(7));
|
||||
}
|
||||
|
||||
QString CutterCore::getVersionInformation()
|
||||
{
|
||||
int i;
|
||||
@ -3924,7 +3930,7 @@ QString CutterCore::getVersionInformation()
|
||||
/* ... */
|
||||
{ NULL, NULL }
|
||||
};
|
||||
versionInfo.append(QString("%1 rz\n").arg(RZ_GITTAP));
|
||||
versionInfo.append(QString("%1 rz\n").arg(getRizinVersionReadable()));
|
||||
for (i = 0; vcs[i].name; i++) {
|
||||
struct vcs_t *v = &vcs[i];
|
||||
const char *name = v->callback();
|
||||
|
@ -147,6 +147,7 @@ public:
|
||||
{
|
||||
return asyncCmdEsil(command.toUtf8().constData(), task);
|
||||
}
|
||||
QString getRizinVersionReadable();
|
||||
QString getVersionInformation();
|
||||
|
||||
QJsonDocument parseJson(const char *res, const char *cmd = nullptr);
|
||||
|
@ -25,8 +25,9 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia
|
||||
ui->logoSvgWidget->load(Config()->getLogoFile());
|
||||
|
||||
QString aboutString(
|
||||
tr("Version") + " " CUTTER_VERSION_FULL "<br/>" + tr("Using rizin-") + RZ_GITTAP
|
||||
+ "<br/>" + buildQtVersionString() + "<p><b>" + tr("Optional Features:") + "</b><br/>"
|
||||
tr("Version") + " " CUTTER_VERSION_FULL "<br/>" + tr("Using rizin ")
|
||||
+ Core()->getRizinVersionReadable() + "<br/>" + buildQtVersionString() + "<p><b>"
|
||||
+ tr("Optional Features:") + "</b><br/>"
|
||||
+ QString("Python: %1<br/>")
|
||||
.arg(
|
||||
#ifdef CUTTER_ENABLE_PYTHON
|
||||
|
Loading…
Reference in New Issue
Block a user