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

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).

Related

How do you programatically find out where NuGet.exe is installled on a given machine?

Assuming that I have a script that will be run on a clean build server with Nuget.exe installed on it, what is the best way to programatically determine the path for where NuGet.exe is installed?
Is there a way to infer its location by going through NuGet.targets, or reading some sort of external config file, or following some sort of convention?
Note: The closest question I've seen so far is this one that points to where NuGet can be downloaded, but I'm not interested in downloading NuGet manually. I need a way to determine where it is installed, but I'm not sure if there's a convention that I can follow to determine where it might be installed.
In general, nuget.exe is not shipped with any product. Most people need to manually download it.
The only exception is for people who install Mono. Mono ships nuget.exe, but that's generally limited to people developing on Linux or Mac. But people who use .NET Core exclusively don't need Mono, even on Linux/Mac, so they won't have it either.
Few developers on Windows install Mono, so chances are you don't have a nuget.exe on your system unless you downloaded it yourself, or someone checked it into a repo that you cloned.

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.

Qt5 exe not running in windows8

I have a qt application which was in qt4.7 and I ported it to qt5.0. It is working fine if it is run from a PC where qt5 is installed. But it is not running or not even giving any error message if it is run from a pc where qt is not installed even though it has all the dlls in the same folder.
But if I install qt and try from the same folder the application will work without even setting the environment variable. In some questions i have seen people replied about adding the dlls and i have tried adding all the dlls specified by them. But nothing helped. Any body has an idea how to handle this.
Qt 5 introduced the use of some DLLs that are loaded at run-time (as opposed to launch-time). These DLLs can only be detected by Dependency Walker if you use the "profiling" feature, which is not on by default.
I'm assuming that you're using the precompiled package from the Qt Project website. The community found a silent dependency on libEGL.dll, and a less-silent dependency on qwindows.dll, which must be placed relative to your .exe with this folder structure:
app.exe
libEGL.dll
platforms\qwindows.dll
Also, see if you can find anything useful at http://doc-snapshot.qt-project.org/qt5-stable/qtdoc/deployment-windows.html
There is a bug report on bugreports.qt-project.org. It can help.

Including Missing DLLs

I am developing in DX 10/11, & when I tried the code on another computer with a NV 660, it said that d3dx11d_43 was not found. I reinstalled the Visual C++ 2012 32/64 bit & DirectX Runtime, but still says that. I think that the user needs to install the SDK or something.
I get the warning that the debug info cant be found.
From what I have reading, it is because I have something that depends on something debug related. No idea what though.
Is there a way to make the game compile with most, if not all, of the DLLs? I dont mind the extra size. The content of many games out-weigh the extra DLLs that are used.
I did compile as Release.
Edit:
Removed 1st question, since no one answered it.
You can add the dlls you need to the resource file, then compile the resource file to your exe file, and at last, parse the resource file at run time to get the dlls you need. here is a similar question, you can take a look.
d3dx11d_43 is a debug version of d3dx11_43 which your program links with when you do a debug build rather than a release build. The debug version is not included in the directx runtime installer, only in the SDK.
The license does not allow you to distribute it either.
You should build and distribute release versions of the code, or else require users to install the SDK which probably wouldn't be so popular!

Cocoa - How to copy files to /usr/share?

I'm developing an "installation" like cocoa application wich needs to take care of some http request, some file system reading, copying files to /usr/share, set up cron (not launchd) and ask some information to user.
I discarded PackageMaker since I need more flexibility.
Currently everything is going well, but on my last installation step, I need to:
Delete my previously installed application folder (if exists). It's always the same path: /usr/share/MY_APP
Create again the application folder at: /usr/share/MY_APP
Copy application files to /usr/share/MY_APP
Update a cron job
It's very important that /usr/share/MY_APP keeps protected with administrative privileges, so a regular shouldn't delete it.
What would be the best approach to implement those steps?
BTW, I'm using Xcode 3.2.
Thanks a lot!
Carlos.
Between the preflight script, the postflight script, and perhaps an Installer plug-in for the custom UI, I see no reason why you can't do all of this in PackageMaker.
Note: “Installer plug-in” is a little misleading. The user does not have to install the plug-in somewhere as a separate step; you include the plug-in inside your package, and Installer will use it from there.
The relevant document is a ReadMe file in a sample code project. There's also an Installer plug-in project template in Xcode since 2.0.
Also, an Installer plug-in won't get used if the user does a command-line installation. Of course, they can't install from the command line at all (which includes remote installation onto an office or lab full of machines) if you write your own custom installer.
By the way: Why /usr/share? What are you putting there? There may be a better way to do what you're really trying to accomplish.