How to require / add a dependency to Mono with PackageMaker or MonoMac? - mono

I'm building an application which is made of four .app packages: a launcher, a client, a server manager and a runtime.
The launcher's .app is distributed in a .pkg file generated by MonoMac's packaging option. The other .app files are downloaded/auto-updated as ZIP by the launcher.
Bundling a copy of Mono within every single one of those .app files would be a waste of bandwidth / diskspace, but even more than that, I have a Mono server .exe file which is cross-platform and as such doesn't come in an .app bundle nor should pack any platform-specific DLLs. So bundling a private copy of Mono isn't an option.
Is there a way for me to create a .pkg file which has a dependency/requirement on a globally-installed Mono?
I see PackageMaker has a Requirements pane which can run scripts but I have no idea how to properly check whether Mono has been installed without relying on some hardcoded paths and stuff like that.
I'd like to have the installer check whether Mono is installed and if it isn't, install it (or, failing that, display a message with a link to the Mono website for instance).

I ended up switching to Packages which is a pretty neat tool.
I added a pre-install requirement of type "Shell script returns true". My shell script just checks for the "mono" executable using the "which" command:
#!/bin/bash
which mono
$(exit $?)
When the script returns false, I configured Packages to spit out an informative error message with a link to download Mono (for lack of a way to trigger download / installation of Mono).

Related

azuresphere real-time applications -- generating .image files from compatible, pre-built ELF (.out) files

i have a separate build-flow that can produce .out files for the MT3620/M4 core using the same gcc-arm compiler.... for reasons beyond the scope of this question, it's not practical for me to migrate this build-flow into cmake....
once i generate the .out file, my thinking was to simply envelop it within a project structure identical to the samples -- with an conforming app_manifest.json file.... from here, i could effectively run just the final step of the cmake build -- which generates the image package....
before i go down this path, is there anything obvious i'm missing here????
As of today you will need to decide to install Azure Sphere SDK Preview for Visual Studio or Azure Sphere SDK Preview for Windows (You cannot install both SDKs on the same PC.)
To develop applications, however, you need to set up your development environment and possibly install additional tools. The Azure Sphere SDK for Windows supports development with the CLI only. If you've installed this version of the SDK, you'll need to install CMake and Ninja on your PC.
If you plan to develop real-time capable applications (RTApps), you might need to install a compiler for the embedded processor and set up hardware to display output from the app.
Both Quickstarts "Build an RTapp on cmd" and "Build an RTApp with Visual Studio" require that you use CMake at some stage and those are the supported methods.
Update: New documentation improvements will be done soon to address the option of using a different build system to cmake and "yes" it should work as you suggest.

Relocate Qt5 installation on Linux

Does anyone know, how to relocate the QT5 installation on Linux? Especially, all the set paths of the files in the mkspecs directory?
Any tool or script letting Qt5 create these files again is o.k.
I'd like to deploy the files of QT5's "lib/bin/mkspecs..." via a central repository on other computers to be able to seemingless do the compilation.
And no, I really don't want to use the systems QT5 by some package manager.
Thanks for your help!
I have attempted this a few times. It gets really hairy really fast, and my only recommendation is that you re-install to the new location.
The reason is that the path of the installation is hard-coded into so many files in so many locations that even search-replacing them all is really error prone.
1) Download source and make your custom Qt build - http://doc.qt.io/qt-5/build-sources.html
2) Make own package\installer of your builded Qt libraries.
If you want own Qt build for run particular application. Then make right installer for that application include all necessary files.

Is there a way for cmake to automatically extend the system PATH variable to compiled executables?

Can cmake configuration files also be used to automatically extend the system PATH variable to include the directory paths to all the installed executable applications and if it is possible (and a standard practice), how can I do this?
This way, as soon as I configure all the CMakeLists.txt files and everything compiles (and hopefully runs) nicely, I can start using the applications, and the path configuration would be packaged together with the build process. I am working with Linux and my code is written in C++, but since cmake is cross-platform, the question extends to other systems as well.
I'm unaware of any capability in CMake to do this. However, we based what we do what Cantera does. They upgraded to SCONS recently instead of their old build system, but the idea still applies.
Anyway, there's a script that CMake configures with the paths during the configure step and then installs somewhere. So once built on Linux, one would run make install then source ~/setup_cantera and it sets up all the variables needed.
We do the same thing for our libraries built with CMake. It's possible to detect which shell the user is running and configure an appropriate template script.

How do I create a redistributable RPM for Mono.Fuse?

First, I obviously tried to get a binary release of Mono.Fuse project, but the only available downloads were the source files. (And actually it seems that latest release has a syntax error in an override)
So I tried to install it on a Linux box from git, successfully, but I'll soon need to bring it to a production server together with my Xcopy-deployable application.
I don't like compiling software on a production machine, especially because I need to install loooooooooooots of development tools from YaST. So now I have this git-cloned directory with all source and compiled files.
How can I create an RPM package that I can install on multiple production machines with a simple command without resolving configure.sh's dependencies with lots of unneeded libraries like glib-2.0-devel?
Take a look at Open Build Service.

Is it possible that GTK or gtksharp on Windows hardcodes the loader DLLs?

I have just completed my GTK#/Mono application and am preparing to build an installer. (I'm working in .NET Framework 3.5 and the Most recent stable Mono, 2.6.7, which installs Gtk 2.10.0) I would prefer to make the install as local as possible and not force people to go installing GTK# for .NET on their own. I looked at the installer for banshee (http://banshee.fm) to guide me, and I got almost all of the way there. Unfortunately, the PNG resources I had embedded in my application were not loading.
After an hour or so of intimacy with procmon (http://sysinternals.com), I find that the file libpixbufloader-png.dll isn't being loaded. It's being searched for in only one place: c:\program files\GtkSharp\2.12\lib\gtk-2.0\2.10.0\loaders. If I create just that folder tree and stick the file there, it works.
It seems slightly insane that GTK#/GTK would only look in a single hardcoded location for this file -- not even in the folder the application is in. Can someone tell me if a) this is indeed expected behavior, and b) if there's anything I can do about it, short of having my installer make this path itself? I know I can also just spawn out the GTK# installer, but I was hoping to keep all the Mono/GTK stuff local to my installation, to avoid later confusions over versions, etc.
I think your installer needs to run this at the end:
C:\Program Files\GtkSharp\2.12\bin\gdk-pixbuf-query-loaders.exe
See the Wix for the official Gtk# installer here:
https://github.com/mono/gtk-sharp/blob/gtk-sharp-2-12-branch/msi/unmanaged/unmanaged.wxs
You don't have to call the .exe mentioned my jpobst, because you can enter relative paths into the gdk-pixbuf.loaders config file (btw as you see the paths are not hard coded).