README1 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. https://graphviewer.nl/
  2. For windows users this open sourse project can improve by blocking
  3. spy and other websites at https://crazymax.dev/WindowsSpyBlocker/
  4. The gml4gtk windows version has included the gtk-3 dll's but when
  5. thwy are already installed these included dll's are not needed.
  6. To run this program on windows it needs the 64bits gtk-3 dll's to be installed
  7. and these are available from: https://sourceforge.net/projects/gtk3win/
  8. The file with 64bits gtk3 dll's is gtk3-runtime x84_64
  9. Below are the names of the dll's which are included in a bundled version.
  10. The gml4gtk program can be installed on any folder directory on windows.
  11. The gml4gtk program does not need or create extra files or change files.
  12. The gml4gtk program does not use network or send mail or other data.
  13. The gml4gtk windows bundle has all GTK+ dll's included and can be installed
  14. in any directory folder. To remove it remove the directory with the dlls'
  15. Howto compile:
  16. ./autogen.sh (or autoreconf -fvim)
  17. ./configure
  18. make
  19. cd src
  20. ./gml4gtk
  21. also:
  22. make clean
  23. make cleaner
  24. For gtk2 or gtk3 or gtk4
  25. ./configure --with-gtk=2
  26. ./configure --with-gtk=3
  27. ./configure --with-gtk=4
  28. Usage:
  29. gml4gtk
  30. or:
  31. gml4gtk file.gml
  32. gml4gtk file.dot
  33. gml4gtk file.gv
  34. Or see make-gtk2.sh and make-gtk3.sh scripts for the gtk2 or gtk3 versions.
  35. also these options can be used:
  36. gml4gtk --version [print version to stdout and exit]
  37. gml4gtk --debug [shows gtk gdk drawing debug]
  38. setting GTK_DEBUG in the environment turns on gtk debugging, see the gtk docs
  39. Font rendering is different between gtk3 and gtk4.
  40. If you have cairo 1.17.4, we are using subpixel positioning in gtk4.
  41. That could be described as more blurry, but its not a bug.
  42. When compiled with "./configure --enable-gcc-warnings" to get more compiler
  43. checks a -DMEMCHECK cflag is set and in dpmem.c is extra memory check done.
  44. Because this is a gtk program it can be compiled for windows or mac osx.
  45. The gtk support for compilation on os-x is at https://gitlab.gnome.org/GNOME/gtk-osx
  46. On Linux it is possible to cross compile to os-x and not easy to create a setup.
  47. When compiled for windows it needs all gtk dll's to run the program.
  48. The gml4gtk reads most GML files, BGV files and partial DOT graph files from
  49. gcc, bison, llvm, radare2 and more tools can be used.
  50. The dot html labels with <table> elements are partial supported in version 7.3
  51. It can happen the drawing is not oke, then switch to pos mode 1
  52. In the data directory are few sample graph files to try it.
  53. When the left mouse button is pressed on the drawing and held down
  54. the drawing can be dragged around instead of using the sliders.
  55. When the vertical distance between nodes is too much select
  56. position mode 3 and use the dy setting in the GTK+ user interface
  57. When the binary is renamed to gml4gtkd then debug output is generated.
  58. When "yydebug=true" is used in dot language debug output is generated.
  59. digraph "example"
  60. {
  61. yydebug=true;
  62. ...
  63. }
  64. The save-as-dia writes xml data usable with diagram editor dia
  65. for Linux and windows at http://dia-installer.de/
  66. The save-as-jgf writes json graph data with extension .jgf
  67. documented at https://jsongraphformat.info/
  68. The directory jgf4web has javascript to run jgf layout in the browser.
  69. To create a callgraph using gcc use gcc option -fcallgraph-info
  70. and the output.ci file is a graph file to open with file->open ci
  71. Some other gcc options generating dot graph are -fdump-rtl-all-graph,
  72. -fdump-tree-all-graph, -fdump-ipa-all-graph, -fdump-analyzer-callgraph,
  73. -fdump-analyzer-exploded-graph -fdump-analyzer-state-purge -fdump-analyzer-supergraph
  74. The save-as-svg image output allows generation of big images which
  75. can be used with firefox browser, inkscape or gimp without problems.
  76. The file sfg.c is a single file graph layout library with the user api
  77. described in sfg.h and there is a python, php interface possible with
  78. example code at https://notabug.org/mooigraph/sfgraph
  79. Most dot language details are parsed but not implemented yet.
  80. Also a->b,c is not supported but a->{b,c} works as expected.
  81. When the "popup" checkbutton is active then a popup window with the
  82. node label text will appear when the mouse is at a node and this is
  83. usable with large graph layout drawings. And it can be turned off.
  84. On sourceforge at the "files" tab there is gml4win.exe with
  85. less features but smaller and does not need extra dll's to run.
  86. The windows gml4gtk.exe program is a 64 bits program.
  87. It is cross-compiled on a GNU/Linux computer.
  88. It is tested using wine64 windows emulator on Linux.
  89. In directory src is the sourcecode of gml4gtk.
  90. In directory data are some dot and gml graphs.
  91. The dll files are for gtk-3 and gml4gtk.exe is using gtk3.
  92. The zip file is created using zip -r on Linux.
  93. The gml4gtk.exe program is verified to run on native windows 64bit.
  94. The gml4gtk.exe program is checked to be virus free.
  95. To compile gml4gtk on windows it needs the mingw compiler and gtk+ runtime and gtk+ development files.
  96. There is mingw compiler but also alternative which has newest gcc 11 version at
  97. https://github.com/skeeto/w64devkit
  98. and the releases are at
  99. https://github.com/skeeto/w64devkit/releases
  100. This are the needed dll's to run this gml4gtk.exe gtk+3 program:
  101. libatk-1.0-0.dll
  102. libcairo-2.dll
  103. libcairo-gobject-2.dll
  104. libcairo-script-interpreter-2.dll
  105. libcroco-0.6-3.dll
  106. libffi-6.dll
  107. libfontconfig-1.dll
  108. libfreetype-6.dll
  109. libgailutil-3-0.dll
  110. libgdk-3-0.dll
  111. libgdk_pixbuf-2.0-0.dll
  112. libgio-2.0-0.dll
  113. libglib-2.0-0.dll
  114. libgmodule-2.0-0.dll
  115. libgobject-2.0-0.dll
  116. libgthread-2.0-0.dll
  117. libgtk-3-0.dll
  118. libiconv-2.dll
  119. libintl-8.dll
  120. libjasper-1.dll
  121. libjpeg-9.dll
  122. liblzma-5.dll
  123. libpango-1.0-0.dll
  124. libpangocairo-1.0-0.dll
  125. libpangoft2-1.0-0.dll
  126. libpangowin32-1.0-0.dll
  127. libpixman-1-0.dll
  128. libpng15-15.dll
  129. librsvg-2-2.dll
  130. libtiff-5.dll
  131. libtiffxx-5.dll
  132. libwinpthread-1.dll
  133. libxml2-2.dll
  134. zlib1.dll
  135. The gmltest directory has index.html page with javascript for syntax check of a gml graph
  136. The jgf4web directory has index.html page with javascript for graph layout of json jgf graph data
  137. The jgf json graph save and open feature is experimental or just may work.
  138. The json jgf files have file extension .jgf
  139. Read also the Kozo Sugiyama book isbn 981-02-4879-2
  140. If you want a good sugiyama barycenter javascript routine, see:
  141. https://github.com/speich/dGraph
  142. For free pdf's about graph layout topics search also here:
  143. https://scholar.archive.org/
  144. Use for example "graph barycenter" as search.
  145. To generate skeleton for use with flex-2.4.6 go into it's src dir and run:
  146. sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' flex.skl | m4 -P -DFLEX_MAJOR_VERSION=2 -DFLEX_MINOR_VERSION=4 -DFLEX_SUBMINOR_VERSION=6 | sed 's/m4postproc_/m4_/g' > myflex.skl
  147. Then use flex with "flex -Smyflex.skl input.l" and now myflex.skl can be edited.
  148. The source is checked and used with clang-12 and gcc-11 compiler development version.
  149. To make a package for debian, slackware, fedora, ubuntu the checkinstall program can be used.
  150. Settings for autoconf can be changed editing the .autom4te.cfg file
  151. some parts are (C) Universitaet Passau 1986-1991
  152. some parts are Copyright (C) 1998-2021 Free Software Foundation, Inc. from GNU GCC
  153. some parts are Copyright (C) 2008, 2011 Matthias Stallmann
  154. some parts are Copyright (C) 2008, 2011 Saurabh Gupta
  155. For questions mail to mooigraph on gmail.com
  156. /*
  157. * SPDX-License-Identifier: GPL-3.0+
  158. * License-Filename: LICENSE
  159. */