?
Solved

delphi and interbase

Posted on 2005-03-02
4
Medium Priority
?
299 Views
Last Modified: 2010-04-05
Dear experts

  is there any way to make an installar for my application that installs my softwar + interbase so the user do not need to install interbase then the software separetly

Thank you
0
Comment
Question by:omarmf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
mikelittlewood earned 800 total points
ID: 13437609
Are you using the borland install express that comes with Delphi.

There should be an optioin to build the application with the inclusion of any interbase files that need to be installed on client PC's along with your program.
0
 
LVL 12

Assisted Solution

by:esoftbg
esoftbg earned 400 total points
ID: 13438022
You may create a Setup application, which to check about the InterBase (and FireBird) is installed and should install it if it is not. Then Setup will check about your application and it is not installed it should install it ....
The answer is yes, there is a way to do it.
0
 
LVL 17

Assisted Solution

by:TheRealLoki
TheRealLoki earned 800 total points
ID: 13442802
Wise Solutions has an install program which can bundle the interbase client
several others, such as InstallShield which used to be avbailable with Delphi in the earlier days on the cd
Try InnoSetup if youwant a "free" option. I am unsure if it supports interbase though

btw, the interbase client is simply installing the gds32.dll into windows\system32
and you might need to add the line
gds_db           3050/tcp
to your windows\system32\drivers\etc\services file
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 13444607
unit Unit1_Q_21334438;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, Registry, IdGlobal, ShellAPI, ComCtrls;

type
  TForm1 = class(TForm)
      spb_Install: TSpeedButton;
      Edit_Target: TEdit;
      Edit_Result: TEdit;
      spb_FireBird: TSpeedButton;
      Memo: TMemo;
      rbt_Overwrite: TRadioButton;
      chbx_Details: TCheckBox;
      ProgressBar: TProgressBar;
      procedure FormCreate(Sender: TObject);
      function  InstallApp: Boolean;
      procedure spb_InstallClick(Sender: TObject);
      procedure spb_FireBirdClick(Sender: TObject);
      procedure chbx_DetailsClick(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function  CheckAboutFireBird: Boolean;
var
  S:      string;
  Reg:    TRegistry;
begin
  Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_LOCAL_MACHINE;
    Reg.LazyWrite := False;
    Reg.OpenKey('SOFTWARE\Firebird Project\Firebird Server\Instances', False);
    S := Reg.ReadString('DefaultInstance');
  finally
    Result := DirectoryExists(S);
    Reg.CloseKey;
    Reg.Free;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  if not CheckAboutFireBird then
  begin
    ShellExecute(handle, 'open', PChar('Firebird-1.5.2.4731-Win32.exe'), '', '', SW_SHOWNORMAL);
  end;
end;

function  TForm1.InstallApp: Boolean;
var
  Bexe:   Boolean;
  Bgdb:   Boolean;
  SPath:  string;
  SFile:  string;
  TPath:  string;
  TFile:  string;
begin
  Bexe := True;
  Bgdb := True;
  try
    Memo.Clear;
    ProgressBar.Position := 0;
    SPath := ExtractFilePath(Application.ExeName);
    SFile := SPath + 'App.exe';
    TPath := Edit_Target.Text;
    while (TPath[Length(TPath)]='\') do
      Delete(TPath, Length(TPath), 1);
    ForceDirectories(TPath);
    TFile := TPath + '\App.exe';
    if not FileExists(TFile) then
      Memo.Lines.Add('App.exe is not installed ')
    else
    begin
      Memo.Lines.Add('App.exe is already installed ');
      if (DeleteFIle(TFile)) then
        Memo.Lines.Add('App.exe is deleted ');
    end;
    if not FileExists(TFile) or rbt_Overwrite.Checked then
    begin
      Bexe := CopyFileTo(SFile, TFile);
      case Bexe of
        True: Memo.Lines.Add('Installation of App.exe is successfull');
        else  Memo.Lines.Add('Installation of App.exe is not successfull');
      end;
    end;
    ProgressBar.Position := (ProgressBar.Max div 2);
    SFile := SPath + 'MTV.GDB';
    TFile := TPath + '\MTV.GDB';
    if FileExists(TFile) then
      Memo.Lines.Add('MTV.GDB already exists')
    else
    begin
      Memo.Lines.Add(TFile);
      Bgdb := CopyFileTo(SFile, TFile);
      case Bgdb of
        True: Memo.Lines.Add('Installation of MTV.GDB is successfull');
        else  Memo.Lines.Add('Installation of MTV.GDB is not successfull');
      end;
    end;
  finally
    Result := Bexe and Bgdb;
    ProgressBar.Position := ProgressBar.Max;
  end;
end;

procedure TForm1.spb_InstallClick(Sender: TObject);
var
  S:      string;
begin
  if not CheckAboutFireBird then
  begin
    S := 'Firebird is not Installed. Please install it first.';
  end
  else
  begin
    case InstallApp of
      True: S := 'Installation of App.exe is successfull';
      else  S := 'Installation of App.exe is not successfull';
    end;
    Edit_Result.Text := S;
  end;
end;

procedure TForm1.spb_FireBirdClick(Sender: TObject);
begin
  ShellExecute(handle, 'open', PChar('Firebird-1.5.2.4731-Win32.exe'), '', '', SW_SHOWNORMAL);
end;

procedure TForm1.chbx_DetailsClick(Sender: TObject);
begin
  case chbx_Details.Checked of
    True: Height := 256;
    else  Height := 128;
  end;
end;

end.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question