Page 1 of 1

Building VRS into single package with mkbundle

Posted: Fri Mar 17, 2017 10:51 pm
by drjson
I'm trying to reduce the footprint of my mono+vrs install on a small device. When trying to run mkbundle I keep running into issues where it's looking for System.Speech even though it's not used in the mono version. Is it possible there's some kind of manifest file that is causing the reference from the exe itself? I can run it just fine using the mono libs and local dll's, but I was looking for a way to build a single executable on my build PC and copy it over to my target.

Re: Building VRS into single package with mkbundle

Posted: Sat Mar 25, 2017 3:35 pm
by drjson
I'm going to try to build from source using xbuild and see if I can't patch a few files to run around this.

Re: Building VRS into single package with mkbundle

Posted: Mon Mar 27, 2017 10:01 pm
by agw
The mono build is the same as the Windows build. When the program starts up it checks to see if it's running under Mono and if it is then it replaces the implementations of a few of the objects with stubs. One of the things that gets replaced with stubs is the text to speech stuff, which only exists under .Net. So that'll be where the reference to System.Speech is coming from.

It looks like mkbundle can be told which assemblies to bundle, could you just reference everything you need by hand rather than via the -deps switch?

http://www.mono-project.com/archived/gu ... lications/

Re: Building VRS into single package with mkbundle

Posted: Mon Apr 10, 2017 1:17 am
by drjson
Sorry, haven't had much time to look into this.

My primary issue with providing all of the DLLs is knowing which DLLs are required. I was trying to use monolinker on all of the included DLLs rather than the .exe to try to pull-in the required DLLs into a folder and then run mkbundle, but for example VirtaulRadar.Library.dll references System.Speech so the CIL Linker bombs out. I am admittedly not very familiar with mono and .Net, but monolinker and mkbundle seem to be statically analyzing the program so I believe any checks that would be ironed out at run-time wouldn't get figured out by the tools. I poked around with profiles wondering if those could be used to inform the linker tool, but that doesn't seem to be what I'm looking for.