From 5274fd6651ff38f18fe6d909def035fe244e6505 Mon Sep 17 00:00:00 2001 From: elonkou Date: Tue, 8 Oct 2024 14:07:08 +0800 Subject: [PATCH 1/2] [BUG#2024] fixed crypto/Qt version issues for ubuntu 20.04 compile with default libraries. --- BUILD.md | 2 +- ui/zenoedit/panel/zlogpanel.cpp | 2 +- zenovis/xinxinoptix/OptiXStuff.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BUILD.md b/BUILD.md index 837e7df6be..1bc12be99c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -46,7 +46,7 @@ If you use Linux the setup would be much easier, simply run these commands: ```bash sudo apt-get install -y git cmake make g++ -sudo apt-get install -y qt5-default libqt5svg5-dev +sudo apt-get install -y qt5-default libqt5svg5-dev libcrypto++-dev ``` > NOTE: We highly recommend to use **Ubuntu 20.04 (or above)** whenever possible. diff --git a/ui/zenoedit/panel/zlogpanel.cpp b/ui/zenoedit/panel/zlogpanel.cpp index eb1dbff6a8..96f1429168 100644 --- a/ui/zenoedit/panel/zlogpanel.cpp +++ b/ui/zenoedit/panel/zlogpanel.cpp @@ -334,7 +334,7 @@ void ZPlainLogPanel::contextMenuEvent(QContextMenuEvent* event) QString cmd = text; cmd = cmd.replace(str, newStr); QProcess process; - auto cmdArgs = process.splitCommand(cmd); + auto cmdArgs = cmd.split(QRegularExpression("\\s+"), QString::SkipEmptyParts); process.setProgram(cmdArgs.takeFirst()); QStringList args; for (int i = 0; i < cmdArgs.size(); i++) diff --git a/zenovis/xinxinoptix/OptiXStuff.h b/zenovis/xinxinoptix/OptiXStuff.h index 1644843984..7583c5c820 100644 --- a/zenovis/xinxinoptix/OptiXStuff.h +++ b/zenovis/xinxinoptix/OptiXStuff.h @@ -849,8 +849,8 @@ inline void calc_sky_cdf_map(cuTexture* tex, int nx, int ny, int nc, std::functi } static std::string calculateMD5(const std::vector& input) { - CryptoPP::byte digest[CryptoPP::Weak::MD5::DIGESTSIZE]; - CryptoPP::Weak::MD5().CalculateDigest(digest, (const CryptoPP::byte*)input.data(), input.size()); + unsigned char digest[CryptoPP::Weak::MD5::DIGESTSIZE]; + CryptoPP::Weak::MD5().CalculateDigest(digest, (const unsigned char*)input.data(), input.size()); CryptoPP::HexEncoder encoder; std::string output; encoder.Attach(new CryptoPP::StringSink(output)); From 9f529f992b9143a4364d1aa6fdbb5781a9fa7922 Mon Sep 17 00:00:00 2001 From: elonkou Date: Wed, 9 Oct 2024 18:01:01 +0800 Subject: [PATCH 2/2] [BUG#2024] fixed crypto version issues for ubuntu 20.04 compile with default libraries. --- ui/zenoedit/panel/zlogpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/zenoedit/panel/zlogpanel.cpp b/ui/zenoedit/panel/zlogpanel.cpp index 96f1429168..eb1dbff6a8 100644 --- a/ui/zenoedit/panel/zlogpanel.cpp +++ b/ui/zenoedit/panel/zlogpanel.cpp @@ -334,7 +334,7 @@ void ZPlainLogPanel::contextMenuEvent(QContextMenuEvent* event) QString cmd = text; cmd = cmd.replace(str, newStr); QProcess process; - auto cmdArgs = cmd.split(QRegularExpression("\\s+"), QString::SkipEmptyParts); + auto cmdArgs = process.splitCommand(cmd); process.setProgram(cmdArgs.takeFirst()); QStringList args; for (int i = 0; i < cmdArgs.size(); i++)