Windows&Unicode - build scripts. Fixes #589 (#890)

* Fixes #589
Build scripts were updated
Fixed utf8 file path displaying in Dashboard widget

* Fixed meson build
This commit is contained in:
a1ext 2018-10-30 17:02:01 +03:00 committed by xarkes
parent 1a2afdc026
commit ce66fe98b0
3 changed files with 9 additions and 2 deletions

View File

@ -54,6 +54,7 @@ def build(args):
defines.append('-Dradare2:r2_incdir=radare2/include')
defines.append('-Dradare2:r2_libdir=radare2/lib')
defines.append('-Dradare2:r2_datdir=radare2/share')
defines.append('-Dc_args=-D_UNICODE -DUNICODE')
r2_meson_mod.meson(os.path.join(ROOT, 'src'), cutter_builddir,
prefix=cutter_builddir, backend=args.backend,
release=args.release, shared=False, options=defines)

View File

@ -16,6 +16,6 @@ ECHO Building radare2 (%PLATFORM%)
CD radare2
git clean -xfd
RMDIR /S /Q ..\%R2DIST%
python sys\meson.py --release --shared --install=..\%R2DIST% --options r2_datdir=radare2/share
python sys\meson.py --release --shared --install=..\%R2DIST% --options "r2_datdir=radare2/share" "c_args=-D_UNICODE -DUNICODE"
IF !ERRORLEVEL! NEQ 0 EXIT /B 1
COPY /Y build\shlr\libr2sdb.a ..\%R2DIST%\lib\r_sdb.lib

View File

@ -39,7 +39,13 @@ void Dashboard::updateContents()
QJsonObject item = docu.object()["core"].toObject();
QJsonObject item2 = docu.object()["bin"].toObject();
this->ui->fileEdit->setText(item["file"].toString());
#ifdef Q_OS_WIN
QString fname = item["file"].toString();
fname = QString::fromUtf8(fname.toLatin1());
#else // Q_OS_WIN
QString fname = item["file"].toString();
#endif // Q_OS_WIN
this->ui->fileEdit->setText(fname);
this->ui->formatEdit->setText(item["format"].toString());
this->ui->modeEdit->setText(item["mode"].toString());
this->ui->typeEdit->setText(item["type"].toString());