-
-
Notifications
You must be signed in to change notification settings - Fork 573
Bundling Mono apps
probonopd edited this page Nov 2, 2016
·
13 revisions
Just unpacking Mono-based applications almost never works because they clutter libraries all over the place which need to be specifically installed, otherwise we get errors like
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' or one of its dependencies.
File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b' or one of its dependencies.
File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=a5715cc6d5c3540b'
For example, liblog4net1.2-cil_1.2.10+dfsg-6_all.deb
has a nasty postinstall script that does
#!/bin/sh
set -e
# Automatically added by dh_installcligac
if [ "$1" = "configure" ] && [ -x /usr/share/cli-common/gac-package-install ]; then
/usr/share/cli-common/gac-package-install liblog4net1.2-cil
fi
# End automatically added section
# Automatically added by dh_cligacpolicy
if [ "$1" = "configure" ] && [ -x /usr/share/cli-common/policy-install ]; then
/usr/share/cli-common/policy-install log4net 1.2
fi
# End automatically added section
Why such things are needed is completely beyond me. Have they never heard of $PATH
and /usr/lib
?
What are we supposed to do with this when putting together an AppImange?
cat ./usr/share/cli-common/packages.d/liblog4net1.2-cil.installcligac
/usr/lib/cli/log4net-1.2/log4net.dll
Hence we seemingly need to do something along the lines of
cat ./usr/share/cli-common/packages.d/*.installcligac > DLLS
sed -i -e 's|/usr|./usr|g' DLLS
DLLS=$(cat DLLS)
cp $DLLS usr/lib/
rm DLLS
Please edit this page if you know more.