how to add Linux library to my Xamarin project - xamarin

I want to install this library "libgdiplus" with my deployment how to do this
standard Linux command as the following
"sudo apt-get update && sudo apt-get install -y libgdiplus"

In Xamarin and mono this can be resolved using:
https://github.com/CoreCompat/libgdiplus-packaging
To understand System.Drawing.Common is the graphics library which ships as part of .NET Core. On macOS and Linux, it uses libgdiplus as its back-end. This trick mirrors what mono did to implement System.Drawing (CoreCompat) for mac and Linux.
By adding CoreCompat libgdiplus packaging to our .net project we can remove the need to manually install libgdiplus as it will be loaded as a local native binary to our bin directory automatically.
This is available for MacOS as a nuget package:
https://www.nuget.org/packages/runtime.osx.10.10-x64.CoreCompat.System.Drawing/
For Linux:
I believe we need sudo permissions as you are correct t suggest:
sudo apt-get update && sudo apt-get install -y libgdiplus
Update 2021 - Use .Net Core or .Net 5 instead:
System.Drawing.Common as of version 5 and above now has reduced dependancies on external libgdiplus and works out-of-the-box in many more scenarios. This is part of .NET Core rather than mono though.

Related

Packages apt-get vs brew?

Im trying to get something running in a lab, and I need to install a whole bunch of packages to compile the code:
sudo apt-get install build-essential libgtk2.0-dev libwxgtk3.0-dev libwx-perl libmodule-build-perl git cpanminus libextutils-cppguess-perl libboost-all-dev libxmu-dev liblocal-lib-perl wx-common libopengl-perl libwx-glcanvas-perl libtbb-dev libxmu-dev freeglut3-dev libwxgtk-media3.0-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libcurl4-openssl-dev libextutils-makemaker-cpanfile-perl
The problem is, I'm working on a Mac; So I only have brew available - and the package names are not equivalent.
Am I trying to do something dumb and impossible, or is there a way to cross reference those apt-get packages to ones available in brew and install those so I can build the app?
For added context, its a modified "slicer" application for generating files that a 3d printer uses to make parts. I could fire up an ubuntu VM and use apt-get, but I'm on an M1 mac at the moment and recompiling experimental QEMU code just so I can fire up an ubuntu VM takes me way more out of my depth than I already am... I'm running brew on a duplicated, rosetta emulation forced terminal.
There is no straightforward way to automatically figure out whether a corresponding Homebrew package exists for each of these packages, no. But you can probably guess the majority, and manually figure out the rest. Each Debian package has a link to the upstream sources, and a home page if one exists, from which you can often find links to packages for other architectures, etc.
From the Debian package search page you can search e.g. for the libxmu-dev package, and discover the corresponding package page for Buster (the current stable Debian release), which in turn has links to the upstream repo, etc. But this is an X11 package, so it's not straightforwardly compatible with macOS, which uses an entirely different GUI architecture.

Installing Firefox on OEL (Oracle Enterprise Linux)

I am trying to install Firefox 59.0.2 on my linux server(OEL). But everytime I try to install firefox with command (yum install firefox) it installs 52.x version.
Could you please help me with the command to install firefox 59.0.2 in Oracle Enterprise Linux - 7.1
If possible, use yum to install Firefox on Oracle Linux. Using yum you can specify the Firefox version to install. Depending on your OL version, you may or may not be able to install Firefox 59.0.2.
To find which versions are available through the yum repositories on your machine, run:
sudo yum --showduplicates list firefox
You can choose a specific version that is shown in the list. So, on my OL7 VMs I currently have Firefox 60.3.0, and can install it like this:
sudo yum install firefox-60.3.0
Note that you may need to uninstall the existing version of Firefox before installing a new one:
sudo yum remove firefox
Since you're mentioning Enterprise, that's probably the reason why it downloads the 52.x version: it's the latest ESR (Extended Support Release). To install the latest version, you can:
Download the Linux archive from the official page.
Untar it with tar -xjvf firefox-59.02.tar.bz2 (current release).
Run the firefox executable from the unpacked directory.

Installing libgcrypt11-dev through Terminal on macOS

I have a project using headers such as malloc and gcrypt. To get the project to compile on my Ubuntu machine, I just have to run: % sudo apt-get install libgcrypt11-dev
However, I would like to be able to work on this project on my mac. I have tried to use brew for libgcrypt11-dev, but that is not a viable library with brew. Does anyone have any suggestions on how to install the equivalent of libgcrypt11-dev on macOS? I am using GCC on both machines.

Can I create an exe on Linux?

I would like to package a Java application into a .exe file using launch4j.
My build server is a Linux based operating system. Is it possible to build the .exe on a Linux machine?
Yes, it is possible. I have done it with Jenkins on a debian system. You might get some problems with missing libs. So you have to install them on your build server.
See: https://github.com/lukaszlenart/launch4j-maven-plugin#faq
Q: Can I use Launch4j on 64bit OS?
A: Yes but you will have to install these libs to avoid problems:
lib32z1
lib32ncurses5
lib32bz2-1.0 ( (has been ia32-libs in older Ubuntu versions)
zlib.i686
ncurses-libs.i686
bzip2-libs.i686
In my case for debian I've installed the following packages:
apt-get install zlib1g-dev libncurses5-dev
apt-get install lib32z1 lib32ncurses5

UHD Ubuntu 12.04 ZyBo ARMv7 32bit getting libboost-all-dev

Basic info:
I need to install UHD on my ZyBo board (by Digilent and Xilinx), but cannot. I have Xillinux Ubuntu 12.04 installed on it. It has an ARMv7 architecture of 32bits.(Go to bottom for question).
The UHD software can be installed by following the instructions here:
Installation option 1:
http://code.ettus.com/redmine/ettus/projects/uhd/wiki/UHD_Linux
An alternative installation process is:
Install Git and download source code:
sudo apt-get install git
git clone git://github.com/EttusResearch/uhd.git
Install all needed dependencies (see build guide):
sudo apt-get install libboost-all-dev libusb-1.0-0-dev python-cheetah doxygen python-docutils
Build-essential is a well packaged C++ library which is another needed
sudo apt-get install build-essential
Install and run cmake:
sudo apt-get install cmake
Next, to run the cmake program:
cd uhd/host
mkdir build
cd build
cmake ../
Ensure that all tests that are related to the main, necessary dependencies are successful.
Install and setup library path:
make
make test
sudo make install
cd uhd/host/build/lib
cp libuhd.so /etc/ld.so.conf.d
sudo ldconfig
sudo reboot
(I have also tried other website instructions and work-arounds).
PROBLEM / QUESTION:
However, the issue is that this software was made for i386 and amd64 machines. The ZyBo has an ARMv7 architecture. I used one installation guide which required the dependency of package: libboost-all-dev which is not available for my architecture. Therefore I was only to install half the requirements for UHD.
Does anyone know how to build the installation so that it can run on ARMv7 architecture or how to download the package libboost-all-dev onto an ARMv7 processor?
Thanks for the help
libboost-all-dev is available for arm, but accessing it requires Linux knowledge:
1.Search “Update Manager”
2.Click “Settings” on bottom left
3.Click on “Ubuntu Software” tab on upper left.
4.check/select the box “Community-maintained free and open-source Software (Universe)”
5.click “close” on bottom right

Resources