mkbundle
cannot process dynamically linked libraries like MonoPosixHelper.dll
. If you want the application to run without mono, you need to deploy this (and other libraries) along with your application on the target system.
If you want to run the application on Ubuntu and do not want the user to install libgtk2.0-cil, you will also need to deploy libatksharpglue-2.so libgdksharpglue-2.so libglibsharpglue-2.so libgtksharpglue-2.so libpangosharpglue-2.so
, as required *-sharp.dll
.
Then make sure that the target system can find these libraries. Either by defining LD_LIBRARY_PATH
, or by creating DLL cards in the build system (which is complicated and can be a bit tedious).
You can also pass the --static
parameter to mkbundle
to include all the necessary mono libraries directly in your kit (see the man page for more details). Also, run your latest package with MyApp.exe
only, not with mono MyApp.exe
.
Below are some options for Linux purposes. I did not use mkbundle
with mono on Windows, but only compiled with .NET using msbuild
, which also creates .msi
files.
Option 1:
$DEPS = "gtk-sharp.dll glib-sharp.dll atk-sharp.dll gdk-sharp.dll glade-sharp.dll glib-sharp.dll pango-sharp.dll RestSharp.dll JiraRestLib.dll" mkbundle --static -o JiraTempoApp JiraTempoApp.exe --deps $DEPS --machine-config "$machineconfig" -z
Then, make sure you deploy MonoPosixHelper.dll
. and other .so
files pictured above into your system. To start the application, run
LD_LIBRARY_PATH=/path/to/deployed/libs:$LD_LIBRARY_PATH JiraTempoApp
However, I cannot verify if this method works with the LD_LIBRARY_PATH
setting.
Option 2:
Build using the same command as in Option 1, but execute from the deployed libraries directory:
cd /path/to/deployed/libs; /path/to/JiraTempoApp
Option 3:
This is a little trickier: you need to find your .dll
dependency and their .dll.config
files in your build system. Copy them to the assembly directory and the dll mapping in the configuration file with a mapping that includes the relative path to the location of the .so
files on the target system. Thus, the dll mapping will be packaged using mkbundle, and the packaged executable will be able to find the deployed .so
in the target system. I once wrote a Makefile for an application that uses this parameter, maybe this will help you.