Anyone here familiar with a tool called renpy-graphviz?

FaceCrap

Active Member
Oct 1, 2020
935
668
Purely by accident I stumbled on this tool . Pretty quick it became clear this tool is deliberately mangled. It removes underscores from labelnames for 'aestathic' resons...
After creating an for it in the github repo I got told by the dev he won't do anything about it but I was free to submit a PR.

Well, I know nothing about GO, but decided to take a look at the code.
looks like this line in ./parser/graph.go is responsible for it.
Code:
    labelName := beautifyLabel(label, tags)
My initial thought was I just needed to replace that with
Code:
    labelName := label
but the called function seems to do more than just strip underscores...
On top of that, when I tried to build the damn thing, the first time around I got
Revisiting that issue after , I tried the suggested workaround and suddenly GO began to complain it could not find gcc...
Ok, downloaded mingw64, added it to the path and got a whole slew of other errors... (see attachment)

At this point I throw the towell, I have even less knowledge about fixing errors spewed by gcc than I have about GO, which is zero.

So, if anyone here has used the tool, and maybe, (I fear I've got a snowball's hope in hell here) , maybe decided to build a personal copy that does NOT remove underscores from labelnames... I would very much appreciate to get a copy.
 
Last edited:

loveIsInTheAir

New Member
Aug 11, 2022
2
0
I don't know if this helps or create more problem for you but I have tried to create some script in c# with graphviz but I ended up abandoning it but it works somewhat well for very small project, but you can try this youtube video watch?v=7dfGgJRAEZY (I can't yet post a link) it is in python there is a link in the description

if you want mine c# script (works barely and needs other tools too) I will upload it here
 
Last edited:

FaceCrap

Active Member
Oct 1, 2020
935
668
I don't know if this helps or create more problem for you but I have tried to create some script in c# with graphviz but I ended up abandoning it but it works somewhat well for very small project, but you can try this youtube video watch?v=7dfGgJRAEZY (I can't yet post a link) it is in python there is a link in the description

if you want mine c# script (works barely and needs other tools too) I will upload it here
I know probably even less about C# then about GO. I can somewhat follow the logic in GO, but have no idea what most functions do.
And since I can't get the damn thing compiled, no way to experiment.
The thing is, it's the large(r) projects I wanted it for, as these are the ones where branches and multi-paths are fairly difficult to follow.

Fun fact though, the author of that vid points to a lemmasoft forum thread which then also points to the exact same tool I mentioned in my OP...
So we're back where I started... but thanks anyway for the pointer. If it didn't have the shortcomings the author pointed out, it might have been a good alternative.
 

loveIsInTheAir

New Member
Aug 11, 2022
2
0
I have never used go but have worked with the c and cpp build ports for windows

I just tried to build renpy-graphviz and go-graphviz it builds ok and works fine, so i'm guessing the problem is the dependency missing from your computer.

What I noticed is when building on my computer it uses my installation of winlibs (it is mainly mingw64 and other compiler tools).
cgo.exe calls gcc.exe

my suggestion
- instead of using choco or doing it manually, there is a package manager called scoop use it to install mingw-winlibs
- run => scoop install main/mingw-winlibs​
- restart your terminal/shell - to load the updated PATH
- use admin mode when starting new terminal - not always necessary but better safe than sorry​
- just for a test run => gcc -v​
- if you are not sure about scoop and wanna do it manually, you can download a zip from winlibs_com
- choose the download that says 'without LLVM/Clang/LLD/LLDB' and I say choose MSVCRT instead of the latest UCRT for compatibility with older windows - if you care about that​
- then all left is extracting it and adding to the bin folder to the path​

I read in go github issues you can use -x argument to list all subcommands run by go: go build -v -x

good luck
 
Last edited: