Skip to content

Commit

Permalink
Preparations for Windows release
Browse files Browse the repository at this point in the history
  • Loading branch information
kovzol committed Jan 1, 2025
1 parent 923b1de commit 748a88f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ target_link_libraries(bibref-qt PRIVATE
Qt6::SvgWidgets
${sword_LIBRARIES} ${Boost_LIBRARIES} ${readline_LIBRARIES}
${ICU_LIBRARIES} ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES}
${gvc_LIBRARIES}
${gvc_LIBRARIES} -lgvplugin_dot_layout -lgvplugin_rsvg -lgvplugin_core -lgvplugin_pango
)

# If not set, XDG_DATA_HOME is set to $HOME:
Expand Down
2 changes: 1 addition & 1 deletion qt/bibref.iss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define BIBREF_VERSION "2024Mar30"
#define BIBREF_VERSION "2025Jan01"

[Setup]
AppName=bibref
Expand Down
5 changes: 5 additions & 0 deletions qt/create-windows-folder
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ start \"\" bibref-qt.exe" > $FOLDER/start.bat
for d in styles platforms; do
cp -a $MSYSTEM_PREFIX/share/qt6/plugins/$d $FOLDER
done

# Create statements folder...
mkdir $FOLDER/statements
cp -a ../statements/SBLGNT/* $FOLDER/statements
rm -fr $FOLDER/statements/all # don't need to have the copies
14 changes: 14 additions & 0 deletions qt/visualizewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@ VisualizeWindow::VisualizeWindow(QWidget *parent, string input)
this->setAttribute(::Qt::WA_DeleteOnClose);
tile = new QSvgWidget(this);
setCentralWidget(tile);

GVC_t *gvc= gvContext();
/* This seems to be required, at least on Windows.
* Also, in CMake's library settings these 4 dynamic libraries
* must be included.
*/
extern gvplugin_library_t gvplugin_dot_layout_LTX_library;
extern gvplugin_library_t gvplugin_rsvg_LTX_library;
extern gvplugin_library_t gvplugin_core_LTX_library;
extern gvplugin_library_t gvplugin_pango_LTX_library;
gvAddLibrary(gvc, &gvplugin_dot_layout_LTX_library);
gvAddLibrary(gvc, &gvplugin_rsvg_LTX_library);
gvAddLibrary(gvc, &gvplugin_core_LTX_library);
gvAddLibrary(gvc, &gvplugin_pango_LTX_library);

Agraph_t *g = agmemread((char*)input.c_str());
gvLayout(gvc, g, "dot");
#define MAX_SVG_LENGTH ((unsigned int) 200000)
Expand Down

0 comments on commit 748a88f

Please sign in to comment.