Deploy GTK Sharp applications to Windows without installing GTK# - c#

I am developing a GTK# mono application under openSuse, but I am interested in deploying it for all three platforms (Windows 7, Snow Leopard and as many Linux distributions as I can test on).
Deploying on Linux is not a problem as GTK# comes with the mono libraries, but for Windows I would not like to force the users to install GTK#. Is there a way to embed GTK# in the application, or at least integrate its installation with the installation of my program?

You may deploy GTK# applications without forcing users to install GTK# for .NET on Windows in a number of ways.
You may embed the entire Mono runtime (19 MB overhead) into your Application. Then there won't be any dependencies, your users won't even need to install .NET or MONO. Here's a Guide (I think Banshee uses this).
You may copy all the GTK# assemblies into your program directory. It isn't recommended however because you may run into a lot of problems if the user has another version of the Gtk runtime installed. (Yes GTK+ also needs a runtime).
You may integrate the GTK# installer with the Windows Installer of your application. (Then your users will be able to install both with a single click, no forcing). Many Installer programs can do this.
You may use a Package Management System.
You may use Deployment Management / Dependency Management Software, but this is expensive since all the good ones are propriety.
Though these workarounds can save trouble for your users, in the long run I recommend option 3. It may prove worthwhile to have your users install GTK# because other workarounds may ultimately give more inconvenience to your users than a simple extra installation.

Related

Windows Desktop Extensions - which version should I reference?

Background: I'm having trouble getting my app's new version accepted by the Windows store. They say that it crashes on launch. The app runs fine even when installed from the appxbundle file on my computer.
So I'm thinking maybe this has to do with the Desktop Extensions (for the UWP) that I've added. Perhaps I'm referencing the wrong version of that assembly. If the app is targeting version 16299 but min version is 14393 - which assembly of the desktop extensions should I include in the References? 14393? 16299? Or both (and the one between them as well)?
I'm tagging this Centennial as well even though it's a UWP app (from a Xamarin.Forms solution) because I needed the OK by the Centennial team for the Desktop Extensions. Maybe it has to do with that.
If your app does not have the runFullTrust capability then you do not need Centennial approval. The Desktop Extension SDK just provides access to APIs that aren't necessarily available on other device families, like Xbox.
Your app can use the 16299 Extension SDK and still run on a 14393 OS as long as you don't use any newer APIs or you have light-up code in your app to detect whether APIs are available or not. You can use the ApiInformation APIs to detect whether certain WinRT APIs are available or not.

Can you develop Linux applications with Xamarin?

Is it possible to develop and build Linux applications with Xamarin with the same code base?
After a few years with Ubuntu, my main OS right now is Windows again. But it's not impossible that I could switch to Mac.
Right now I have a bit of experience with Qt and no experience with Xamarin.
With Qt you can develop on Windows, Linux, and Mac and for Windows, Linux, Mac, iOS, Android, Windows Mobile, ... They are pretty clear about that.
Since Xamarin is free and open source now and I still don't have much experience in Qt, I'm considering trying out Xamarin for cross platform development instead of Qt.
Not being able to release my software for Linux would be a deal breaker for me. Being able to develop on Linux would be nice, but is optional.
But after all my Google research, I could only find information and people asking for support to develop on Linux and not for Linux.
As far as I know, this shouldn't be a problem with Mono alone. But as far as I know Xamarin > Mono and I don't get everything in Mono I could get in Xamarin.
I'm also not sure how well-supported Mono will be in the future. For me it looks like Xamarin is much more important for Microsoft than Mono itself.
I'm not sure if it's even possible, since Xamarin is based on Mono, but is it possible that Microsoft will at some point decide not to support Mono with .NET compatibility in the same way as Xamarin, or even cancel Mono as standalone completely?
So I'm looking for one single framework for all desktop and mobile platforms I can rely on, and I want to know if Xamarin and/or Mono and and/or Xamarin + Mono could be an alternative to Qt before I go deeper into any of those solutions.
Just in case someone else comes accross this q/a: the situation has changed. With Xamarin.Forms 3.0, Gtk# is supported (as preview, at this moment). Therefore, full Linux GUI support is enabled.
So, Xamarin now covers:
Android
iOS
UWP apps
WPF apps
Linux Gtk desktop applications
Mac OS
Watch OS
tv OS
Tizen
The only thing left to wish for: JS/HTML5 Web App target platform, as part of Xamarin :)
No, Xamarin is not available for Linux. This was a conscious decision made by the Xamarin team several years ago:
Miguel de Icaza 2011-08-04 11:52:37 UTC
We face a QA problem here.
The problem with supporting Linux is that we would need to create a
self-contained Mono packaging for all of the bits we ship since most
Linux distributions are slightly off when it comes to Mono.
It also means that if we advertise "Linux" we would need to QA a dozen
different combination due to different Linux distributions and
different editions of each distribution.
Perhaps we would support just a single distribution and a single
version, which is closer to what we have to do on Windows/Mac today.
To clarify, the Xamarin product range is not available on Linux (Xamarin Studio, Xamarin.iOS and Xamarin.Android) but MonoDevelop, the foundation of Xamarin Studio, and Mono, the cross-platform .NET runtime, definitely is.
You can build desktop software using MonoDevelop. The MonoDevelop site has plenty of instructions on getting started:
Install MonoDevelop on Linux
Seems that there is a chance of Xamarin Forms work on linux distros. In this reddit thread Miguel de Icaza says:
Some of our team members actually develop in Linux. The reason why we
never released the Linux tools is because we were charging a lot of
money and people would rightfully expect the software to be fully
supported. We had enough keeping our Mac and Windows users happy, and
adding an unknown number of Linux distributions sounded like a hard
task. Now that we are open sourcing the SDKs and I no longer will feel
bad if something does not work under a particular Linux configuration,
I will be happy to release the Linux builds.
That is: the fact that Forms is an open source tool currently opens this possibility.
Yes, as of mid-2018, it is possible to develop cross platform GUI applications that target windows/mac/linux/android/ios using the "Xamarin.Forms" library. Basically, you have one shared library project from cross platform code (UI and other cross platform stuff), and one project per platform for platform-specific code (Xamarin.Forms have one backend implementation for each platform. On Linux, this is using GTK).
However, with MonoDevelop you can only develop/build the cross-platform project and the linux-specific project of the application. You will still need to use Visual Studio or Rider to develop/build for the other platforms.
See the following answer:
https://stackoverflow.com/a/53317021/298005
https://github.com/0xFireball/xamarin-android-linux
As matthewrdev said, Xamarin.Studio, Xamarin.iOS, and Xamarin.Android aren't "officially" supported; however, Xamarin.iOS uses virtual emulator anyway (and I don't think there will be a workaround for Xamarin.iOS to run on Linux), but for Xamarin Studio (MonoDevelop on Linux, or Jetbrain's Riders (how to run it on linux with no official support is also provided in the link) Can run on Linux as an alt for Xamarin.Studio, and that link I shared explains how to install Xamarin.Android on linux, so just for Xamarin.iOS you will need to migrate or dual boot or sth, I hope that helps! (I stopped using Xamarin my-self, however, this environment helps developing for Xamarin on linux!)
GTK is listed as one of supported platforms/backends for Xamarin.Forms which allows building apps for Linux (as well as macOS and Windows via same GTK project). Though it doesn't look like there was much of development since 2018/2019 and Xamarin.Forms 3.0. Tried running 2 apps with basic UI and compared GTK backedn on Windows/macOS (comparing to WPF and Xamarin.mac back-ends ) and found GTK not worth pursuing (basic scenarios failing).
You can track GTK progress at https://github.com/jsuarezruiz/forms-gtk-progress/blob/master/Status.md
On Ubuntu 20.04, you can run your ASP.Net MVC 5 application using XSP4. Open a console to where you installed your MVC applications, where all folders, Global.asax, Web.config, ... are and run "xsp4 --port 80" or any other port you like and available. XSP4 is an independent web server and does not need Apache to be run.
Also, for C# developers, even the MonoDevelop is not in Ubuntu 20.04, which I don't know why, you can still install it and debug your ASP.Net MVC application. You can also debug any WinForm and console application using the MonoDevelop. YOu can run all your application using mono too.

Is it necessary to install Dev-Express on machine to install a C# Application that uses Dev-Express controls..?

Need Your Help..
I have developed one windows application in C#.Net (stand-alone application). It is basically a Image processing application.
While developing this application I have used Dev-Express controls for better performance. Now I have created the setup file of that application and tried to install it on few machines for testing purpose, while doing this I found that this application is getting install successfully on those machines which has Dev-Express installed on it, but getting failed to install on those machines which do not have Dev-Express setup.
So my question is- "How can I solve this problem..?". Because, as Dev-Express license copy is very costly, "I don't know whether my client will afford it or not". Please Help..!!
You do not need to a separate license for the distribution (see the Licensing FAQ for more information).
However, you need to distribute the corresponding DevExpress runtime assemblies, because they obviously are not installed on clients' machines. This approach is common for distributing 3-rd party products. Consult the DevExpress support for further clarification.

How to "Install"/"Enable" .Net 3.5 SP1 under Windows 7?

I'm writing a deployment application that should install all required components before load main module. But I has an issue with dotnet 3.5 SP1 installation on Windows 7. Windows 7 incorporate the dotnet 3.5 SP1, but some times that component disabled by user/manufacturer/...
User can enable it from the Control Panel, but I can't ask him to do that.
How can I enable it from my software, I should exclude a all manual configuration from the deployment process.
I found a way by myself, through ocsetup.exe.
The final command is:
%systemroot%\system32\ocsetup.exe NetFx3
Update:
ocsetup is not available at Winodws 8+, you should use dism to achive the same result.
For Winodws 8+ you have to use the following command:
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All
Being a Win7 user that has had unending problems with .NET 3.5 and would prefer it just stay disabled because it's corrupt, doesn't work right anyway, and once in this state is unfixable in Win7 without a whole new, fresh install of Windows, I wish programmers would just NOT require it be installed. .NET 4.1+ are 3.5.1 backwards compatible and if you write your code properly so that you are looking for 3.5 functionality rather than 3.5 itself, it works and if you coded it right in the first place, you could just install 4.2 instead of 3.5 and it would work, but I have a small handful of programs, including all of MS's own email applications (like outlook) that just insist on using .NET 3.5 and you know what? None of them work on my system.
I would also like to add that if I did install some piece of software that turned on or off windows features on my system without asking for permission first, you'd be getting hate mail from me and that software would be off my system as quickly as I could uninstall it and delete it's folders.

Silent Installer - to install scripting langues from winform Application

I am developing Winform application, using C# on .NET 4.0, which need to install scripting langue(s) based on the user selection. What is the best way to detect if a particular scripting environment/Engine for a given langue(Ruby, python, Perl, etc) is installed on client machine and silently install it if not already installed.
Though I agree with idea that a truly "silent" install might not be desirable for the users, there are many different installer packages that support silent installation.
This page actually has a good breakdown of the various installers and the command arguments needed to do unattended and silent installations. I am more familiar with MSI and it has lots of options.
So if you go this route, you'd fire up a Process (uh, Task I guess in C# 4) and run an installer.

Categories

Resources