Re: Questions I should have asked



Nix N. Nix wrote:

- Check if the dropline.net/gtk Runtime Environment is installed
 -  If not, it pops a message box telling the user that installation
    cannot proceed, and points them to dropline.net/gtk, asking them to
    download the GTK runtime environment
- If yes, the installer picks up the GTK Runtime installation path from the registry and adds it to the AppPaths registry key for
    your_application.exe.

Making your app dependant of another installation isn't very friendly. You should suggest the installation, but not require it. Sometimes the user already have the GTK+ DLLs installed in the path. Then the user have to install the dropline/whatever GTK+ setup, install the app, and then uninstall the dropline/whatever setup (to use the previous installed DLLs). I gave up installing some GTK+ apps on my windows box because of that. I always recommend to try a LoadLibrary() call if it can't find the correct setup in the registry, just in case the user manually installed the runtime libs.


[Code]

var
 Exists: Boolean;
 GtkPath: String;

function GetGtkInstalled (): Boolean;
begin
 Exists := RegQueryStringValue (HKLM, 'Software\GTK\2.0', 'Path', GtkPath);
 if not Exists then begin
   Exists := RegQueryStringValue (HKCU, 'Software\GTK\2.0', 'Path', GtkPath);
 end;
  Result := Exists
end;

function GetGtkPath (S: String): String;
begin
   Result := GtkPath;
end;

function InitializeSetup(): Boolean;
begin
 Result := GetGtkInstalled ();
 if not Result then begin
   MsgBox ('Please install the GTK+ 2.0 Runtime Environment before installing QCADesigner.  You can obtain 
GTK+ from http://www.dropline.net/gtk .', mbError, MB_OK);
 end;
end;

THIS is the kind of setup I was talking about! :-(



Daniel K. O.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]