AdvancedHMI Software
General Category => Open Discussion => Topic started by: bachphi on September 02, 2019, 04:46:14 PM
-
Does anyone know what path to use for IniFileName under mono?
I have tried "." , "./" , ".\" and just the filename only.
Currently , to get it working, I use its absolute path which is sort of lame.
-
Maybe take a look at this:
https://www.mono-project.com/docs/faq/known-issues/urikind-relativeorabsolute/
-
Maybe this might be better choice:
https://stackoverflow.com/questions/39601742/mono-executes-program-with-wrong-current-directory
What you see as "lame" seems to be the best approach.
-
lol, I guess so. Just trying out your & Archie mono serial driver today. Nice work, btw.
This is what I have:
(https://i.postimg.cc/sgsdkmbM/Micrologix-and-Raspberry-Pi.png)
-
I am now able to set its path "./IniFilename.ini"
and creating a AAHMI.desktop icon w/ entry
[Desktop Entry]
Type=Application
Name=AAHMI Prog
Path=/home/pi/AAHMI/Debug/
Icon=/home/pi/AAHMI/AHMI00.ico
Exec=mono AdvancedHMI.exe
Terminal=false
Comment[en_US]=Launch AAHMI
GenericName=App. Description
The lame thing now is the new Raspian Buster. When double click the desktop shortcut, it brings up a dialog "This text file seemed to be an executable script. What do you want to do with it?"
-
it's cool now :) by following the steps from here:
https://www.raspberrypi.org/forums/viewtopic.php?t=245152
P.S. That link does get me thinking of which companies are using Pi as thin clients.
Years ago, we have thin clients login to server using VT100, Vt200 terminals and such, then went away with personal PCs. ... and now we are back to thin client - server.
-
Can you elaborate on everything you stated in Reply #4?
Was it just sufficient to use "./IniFilename.ini" or did you have to make any changes?
What are the steps for creating that AAHMI.desktop icon?
-
Instead of using absolute path for IniFileName entry, I simply used ./Myfilename.ini
and created a file name /home/pi/Desktop/AAHMI.desktop with entry content as above.
Next, set it to executable
sudo chmod +x /home/pi/Desktop/AAHMI.desktop
Now you can double click the shortcut on the desktop to run
-
Cool.