Closed f-rit closed 2 years ago
Yes, the Windows port is a bit fragile, as it has to keep a mixed Unix/Windows logic to operate. Unfortunately, it is not that easy to keep both the Windows & the Unix logics together. However, some code switches are just controlled by the presence of some environmental variables.
In particular, these two variables are relevant: GREATSPN_APPIMAGE_DIR should point to the GreatSPN binary directory, without the bin/ folder GREATSPN_TEMP_DIR any directory that will be used for temporary files
Currently, I cannot test the tool, as I am traveling and I don't have a Windows machine with me. Could you please check if these variables fixes the problem?
Thanks for your fast reply.
Now the DSPN-Tool uses the Windows paths, but unfortunately it does not use it correct.
The correct folder should be: But the ENV variables are not handled correct...
I suppose it is just the wrong path. Use C:\Program Files\GreatSPN\app\portable_greatspn Please also add a '\' at the end of the GREATSPN_TEMP_DIR pathname, as it is otherwise used incorrectly.
Unfortunately, the change of the ENV variables does not affact the call. Also if I remove it, the error output is equal to my last post. It seems to be frozen.... Do you have any idea?
The error message in the terminal is:
ERROR: posix_spawn[C:\Program Files\GreatSPN\app\bin\alphaFactory.exe]: No such File
This is raised since the sub-tool is called with the code in https://github.com/greatspn/SOURCES/blob/09e8d331effe7296be5f2862ff3095e172967fbf/NSRC/numeric/numeric.cpp#L171
where appimg_dir is the value of the environmental variable GREATSPN_APPIMAGE_DIR it is not possible that by changing the variable value, the program behaviour remains unaffected. Have you set the variable as a global environment variable using the Windows Control Panel? In that case, have you restarted the CMD after changing the value? Please, check with echo %GREATSPN_APPIMAGE_DIR% that the value is properly set to the pathname up to the bin\ directory (excluded), so that the highlighted code builds the proper alphaFactory pathname.
Thanks! Perfect, it works!
I missed the restart of CMD...
You can close the issue and thanks for the impressive support!
Hi Guys, I installed the new Windows executable of GreatSPN. The GUI works pretty fine and I can sovle my PN. As I want to integrate the PN in a Python script, I'm calling it from command line. This results in an error (see below). AlphaFactory seems to be set for unix but called from DSPN-Tool on Windows. Commit 9047b67 fixes it for the GUI. It there an easy change for my usage?
Error:
Thanks