From 35f9bfe135f5d87d8f0f47e2709b8dd952e42906 Mon Sep 17 00:00:00 2001 From: billow Date: Tue, 9 Aug 2022 09:29:08 +0800 Subject: [PATCH] Update rizin and version API (#3008) --- dist/bundle_python.ps1 | 2 +- rizin | 2 +- src/core/Cutter.cpp | 8 ++++---- src/core/Cutter.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/bundle_python.ps1 b/dist/bundle_python.ps1 index b421ed98..7e47c0d0 100644 --- a/dist/bundle_python.ps1 +++ b/dist/bundle_python.ps1 @@ -2,7 +2,7 @@ $arch = $args[0] $dist = $args[1] $py_version = (python --version).Split()[1] -$py_base = "python" + $py_version[0] + $py_version[2] +$py_base = "python" + $py_version.Split('.')[0] + $py_version.Split('.')[1] $py_platform = If ($arch -eq "x64") {"amd64"} Else {"win32"} $py_url = "https://www.python.org/ftp/python/${py_version}/python-${py_version}-embed-${py_platform}.zip" diff --git a/rizin b/rizin index b79201b4..215e4925 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit b79201b49a0d687c854b6e2f0c88fc8a7f2afa61 +Subproject commit 215e49253d3a35e1aae340b7ae8465018254ae87 diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index 1cd9ad50..5c7b515f 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -4297,10 +4297,9 @@ void CutterCore::loadScript(const QString &scriptname) triggerRefreshAll(); } -QString CutterCore::getRizinVersionReadable() +QString CutterCore::getRizinVersionReadable(const char *program) { - return QString("%1 (%2)").arg(QString::fromUtf8(RZ_VERSION), - QString::fromUtf8(RZ_GITTIP).left(7)); + return fromOwnedCharPtr(rz_version_str(program)); } QString CutterCore::getVersionInformation() @@ -4337,7 +4336,8 @@ QString CutterCore::getVersionInformation() /* ... */ { NULL, NULL } }; - versionInfo.append(QString("%1 rz\n").arg(getRizinVersionReadable())); + versionInfo.append(getRizinVersionReadable()); + versionInfo.append("\n"); for (i = 0; vcs[i].name; i++) { struct vcs_t *v = &vcs[i]; const char *name = v->callback(); diff --git a/src/core/Cutter.h b/src/core/Cutter.h index e544f3a5..574d5258 100644 --- a/src/core/Cutter.h +++ b/src/core/Cutter.h @@ -201,7 +201,7 @@ public: { return asyncCmdEsil(command.toUtf8().constData(), task); } - QString getRizinVersionReadable(); + QString getRizinVersionReadable(const char *program = nullptr); QString getVersionInformation(); CutterJson parseJson(char *res, const char *cmd = nullptr);