Distributing robot with external DLLs - How????
Distributing robot with external DLLs - How????
20 Jul 2017, 11:18
Hi,
I've got my robot all working and it references several external DLL's e.g. Newtonsoft.Json. This all works for me but when I build the robot as it puts absolute paths to these dll's e.g.
C:\Users\Fred\Documents\cAlgo\Sources\Robots\MyBot\MyBot\dll\Newtonsoft.Json.dll
This is all fine for my pc but if I want to then distribute this robot to other users their paths will be different or different drive letter etc.
Is there a way to make this relative to the location of the robot algo file? or combine these dll's into a production algo file with the robot?
Thanks
Replies
... Deleted by UFO ...
ctid320188
20 Jul 2017, 12:40
RE:
Spotware said:
Dear ctid320188,
All referenced dlls to are packed inside the .algo file except those registered in GAC. So your cBot should work on any computer. Did you try it and it didn't work?
Best Regards,
cTrader Team
When I copy the algo file to another computer, it won't build - get build errors relating to missing dll references so I have to go into the Manage References section on the calgo application and then go to libraries, untick the references that have my path in them "C:\Users\Fred\Documents\cAlgo\Sources\Robots\MyBot\MyBot\dll\Newtonsoft.Json.dll" and then browse to local versions of those DLL's on that computer.
To note: I am coding and building my robots using Visual Studio and adding the references to the DLLs through Visual Studio.
It would be excellent if those DLL's were packaged up in the main algo file with no references having to be made in the Manage References.
How do I do this? Any help would be massively appreciated as I need to distribute this to other users who will have little to no knowledge of how to re-reference other DLL's.
Thanks again
@ctid320188
ctid320188
20 Jul 2017, 12:51
Just a thought - does this "packaging" of the reference DLL's only happen when you "build" the algo rather than "build with source code"? As the testing on the other computer was always with the "build with source code" as I was tweaking some settings.
Obviously this won't be the case when I finally go to production version as there will be no source code available for other members and it will always be a simple "build".
Thanks
@ctid320188
ctid320188
20 Jul 2017, 13:09
RE:
ctid320188 said:
Just a thought - does this "packaging" of the reference DLL's only happen when you "build" the algo rather than "build with source code"? As the testing on the other computer was always with the "build with source code" as I was tweaking some settings.
Obviously this won't be the case when I finally go to production version as there will be no source code available for other members and it will always be a simple "build".
Thanks
Just answered my own question - Yes it works just fine if you do a "build" rather than a "build with souce code". If that helps anyone else.
Thank you for pointing me in the right direction with the Packaged DLL's - all working and happy again.
Thanks guys
@ctid320188
acrigney
20 Jul 2017, 11:37
RE:
ctid320188 said:
Even better if you could make it a cloud service that people could publish to their own PC or external servers or cloud server?
@acrigney