<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div>I've been working on bring KK to Linux for about a week. There are several reasons for doing this. The first is that I wanted to use my OpenHPSDR rig from my main Linux desktop (Ubuntu 14.04). The other, was to see how well Mono's SWF (System.Windows.Forms) would work in this domain.<br><br></div><div>A little background:<br><br></div><div>Microsoft released .NET to the world more than 10 years ago. The framework and class library are clean and unified. The C# programming language has a lot of nice things going for it. The problem: MS only released .NET for their operating systems. A group of OSS folks decided to re-implement (clean room) the .NET framework in order to bring the .NET framework to other OS platforms, thus Mono was born (<a href="http://mono-project.com" target="_blank">http://mono-project.com</a>). Much of the framework is OS agnostic, which made the implementation neat and tidy. However, the main namespace that most UI developers use is NOT OS agnostic: System.Windows.Forms. This library relies on native libraries including the Windows Message pump. Creating a library that would allow Windows GUIs to run under Mono would require a reimplementation of more than just the .NET library, but much of the underlying win32 wm architecture.<br><br></div><div>Current Status:<br></div><div>Mono Windows Forms or MWF is the open source cross platform UI toolkit that attempts to re-implement the SWF on Windows. It doesn't do a perfect job and performance isn't as good, but many SWF apps will run under MWF with some careful code level changes. Once the changes are done, both Windows and Mono (Linux) can run the same application.<br><br></div><div>KISS Konsole is a Windows Forms C# application. It has a single native library dependency: fftw3. Fortunately, this library is OSS and compiles on many platforms. For KK purposes, this library is used by SharpDSP using the C# P/Invoke mechanism. To me, this is one of the beauties of C# vs Java: It is really easy to p/invoke native libraries and does not require a shim layer to do the work, like JNI.<br><br></div><div>Porting Process<br><br></div><div>The first thing that I did was attempt to get the source to compile within MonoDevelop. MonoDevelop is able to read/write <a href="http://VS.NET" target="_blank">VS.NET</a> solution and project files (C#). This is an easy way to find out if there are any project reference related issues with the source code. KK compiled without any issues when I tried it on Ubuntu 14.04 using the distro Mono packages. This was good news! Next I tried running it and was greeted with a DLLNotFoundException. It was complaining about not being able to find the libfftw3.dll library. After a bit of digging, I realized that I had not installed that library on my workstation prior. After installing the missing library, I was able run KK. The GUI elements didn't look the same as Windows and there were some issues with widget placement and zorder, but the app was able to run my SDR rig. TIP: MonoDevelop does not have a GUI designer for Windows Forms. Work is much faster when using <a href="http://VS.NET" target="_blank">VS.NET</a> as the authoritative designer and then sharing the code with MonoDevelop for building/debugging.<br><br></div><div>One of my goals was to attempt to make KK look as similar as possible under both .NET and Mono. This was accomplished by adding panels and regrouping several items together. I also had to mess around with the AutoSize functionality of various widgets. Under Mono, there were times when the App Window would begin to flutter as if it was fighting over the size it wanted to be. Windows never exhibited this behavior.<br></div><div><br></div><div>Summary:<br><br></div><div>It was a nice project to get me involved in this project. I enjoyed several conversations I had with various members of the community and enjoyed the warm welcome.<br></div><div><br></div><div>How to get it running:<br></div><div><br></div><div>The patch is located here: <a href="http://openhpsdr.org/downloads/KissKonsole/kiss.patch" target="_blank">http://openhpsdr.org/downloads/KissKonsole/kiss.patch</a> and you should use "save as" to download it. The patch is against SVN version 515, which should apply.<br><br></div>Mono Dependencies<br><div><div><div>mono-complete<br>monodevelop<br></div>libfftw3-bin<br>libfftw3-dev<br><br></div><div>on Ubuntu do:<br><br></div><div>$ sudo apt-get install mono-complete monodevelop libfftw3-bin libfftw3-dev<br><br></div><div>Build source with either monodevelop or xbuild. Example below:<br><br></div><div>~/Devel/kiss/Unified$ xbuild KISS\ Konsole\ Unified.sln<br><br></div><div>This will build the default configuration.<br><br></div><div>Any and all comments welcome. Enjoy. I plan on continuing the work I started with running KK on the Jetson board.<br><br>73,<br></div><div>Jae - K5JAE<br></div></div></div>
</div><br></div>