Mono install on windows, mac? - windows

Is it possible to install Mono and Gtk on a Windows computer, copy that to a local folder, and run from that? Can I do the same on Mac?
I'm trying to create an all-in-one folder with everything included so that users can run without needing anything that is not in the folder. mkbundle did not work, and I'd rather have a complete Mono so I can dynamically load additional Mono libraries at runtime.
Are there any 64-bit vs 32-bit issues?
Can I avoid the GAC by using MONO_PATH?
Do either the Mac Mono or Windows Mono require that any files be in a global place? Any hardcoded paths?
I want my distributed program to be as easy to use as possible for new users (eg, no additional installs).

You may want to check Banshee's source code to find out how it's done there.
For Mac, bockbuild is used so all libraries are bundled in the package.
For Windows, a WiX installer is used. It doesn't bundle Mono because with .NET it's enough. Not sure if this bundles the rest though (gtk#), you should double check.

Related

MinGW install on offline Windows for Matlab R2018a

I've seen this post and this other one. The list goes on.
However, I need to install MinGW (preferably the latest version) in a Windows machine which is purposefully isolated from the internet. The purpose is to use soem features of Matlab 2018b that require a compiler. I can upload files to it within some restrictions, but I can neither use the default MinGW installer, nor can I use the "Get Add-On" menu command.
By the way, the machine works with windows server.
How can I get an installer or a set of files that would allow me to install MinGW?
For versions 2016b and newer, MathWorks provides a tool that allows downloading support packages and sending them to off-line environments. The tool can be downloaded here and will require admin permission to install. With it, you can select packages to download at a target folder, and later transfer them to the off-line environment.
For each package there will be a readme file with the relevant instructions.

Compiling a standalone gtk#

When I build my project, the resulting exe requires Gtk# in order to run. Are there any settings in MonoDevelop (or something) to statically link the Gtk# libraries in the compiled binary?
I'm developing on Windows 7 64bit, but I chose C# Gtk because I thought the code could be compiled for multiple OSs. However, I believe that a program as small as the one I'm working on should not force the user to install developer tools like Gtk.
Edit: I have found the Embedding Mono webpage, but it looks like that deals with C code, GCC and Mono instead of C# code, Gtk# and MonoDevelop.
As far as I know, the best thing you can do is simply package gtk# with your application (it's a matter of copying a few dlls). However remember that gtk# is not a managed rewrite of gtk, it's just a set of wrapper libraries. As such, they need the native gtk to be present. You can of course ship that with your application too, but that enlarges your package by about 16MB. You can include the gtk installer or an already unpacked version that your end-users won't need to set up. Both solutions have merits.

What are the different platforms/languages in which an app can be compiled and run on Windows without any prerequisites?

What are the different platforms/languages in which an app can be compiled and run on Windows without any prerequisites? I know of .NET but it requires the specific version of .NET to be present in the Windows installation.
C and C++, but Visual Studio defaults to dynamically linked library. Change the default to static and you will be fine.
That being said, ther are no compilers that come with windows. You must install a compiler to build the a program that will run everywhere after that. There are free version of the compiler in the Platform SDK and in mingw (Cygwin requires a dll).
If you are using Visual C++ as language and development tool, you may switch to Statically bound DLLs, which would produce larger binaries, but would run without any runtime-prerequisites. Visual C++ Runtimes are easily installable, can be distributed, or users may be asked to install them directly. If users are using Windows Update, they would anyhow get the latest VC runtimes.

How to create MSI package, which can install Windows installer itself

Is it possible to create MSI package, which will run without Windows installer installed in system, but first will install Windows installer itself, and then continue installing other components?
The goal is to create prerequisite package for our software, which must install some components, including some operation system service packs. We also prefer using MSI package. But it's obviously to us that our software will be installed on clean operation system. Though there will not be needed Windows installer present. Is it possible to create such prerequisite package using MSI?
No, there is no way to install an .MSI package without Windows Installer already being present in the OS.
However, Windows Installer has been a native part of Windows since Windows 2000. Are you really developing installers for Windows 95/98/NT4? That would be the only case where there is no Windows Installer support and you'd need to install a redistributable MSI package first.
Unless you meant to say that you require a higher version of Windows Installer than is native to one of the older OSes? (e.g. MSI 3.1 for WinXP) In that case, you'll need to bundle the .MSI redistributable for the MSI package you desire and run that first. Sometimes a reboot is required, other times not. YMMV.
One way, you can write an application in cpp or c or any language that does not require any additional frameworks or SDKs, to check for the installer and install it programatically.
It sounds like you need a bootstrapped with two or more msi files in it. Take look at the WiX documentation. WiX has build-in bootstrapped
Hope this helps
s

Installing Qt4 on Windows - do I need to fully install MinGW or just have local copies

That is, can I get away with DLLs in the install directory or does the installer need to ensure that MingW is fully installed?
If you install the Qt SDK, it will actually install its own MinGW tree.
This does not directly answer your question, but generally speaking, to ensure I have all the right dependencies when creating an installer, I do the following:
Use Depends, a Microsoft tool that shows what DLLs a Windows executable (.exe or another .dll) depends on. This will not show dynamically loaded DLLs though, such as QT plugins. I believe Depends is part of the Platform SDK (it used to be, anyway), which you should be able to download. See here for example.
Use a virtualization tool (like VirtualBox or VMWare) to install a fresh copy of Windows and your application. If it complains of missing DLLs on startup, you missed something in the install package.
You should be aware of any dependencies on the Visual C++ run-time. There are many different versions out there, and if your app depends on them, you need to install the correct version to the Windows\WinSxS directory. Microsoft provides a redistributable for each version of Visual C++ (including the express edition, which you can get for free). I only mention this because I noticed when installing Qt SDK that the VC++ redistributable was getting installed, so the Qt DLLs may have a dependency on the VC++ run-time.

Resources