Creating an Independant Application

Started by Bob Pawleyover 19 years ago11 messagesgeneral
Jump to latest
#1Bob Pawley
rjpawley@shaw.ca

Hi

I have managed to turn my host software into an executable. It runs well using my installed database and server.

What files in PostgreSQL do I need to include to have the host software, the PostgreSQL server and database run as an independant application??

Bob Pawley

#2John McCawley
nospam@hardgeus.com
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

I'm not quite sure I understand your question, do you mean that you wish
to distribute an "all-in-one" installer for a client machine that will
include both your app and PostgreSQL?

It all depends on the complexity of your database backend. If this is
small, quick-and-dirty app, I don't know if PostgreSQL is the best
match for a setup like that. Other people on this list may disagree,
but I tend to think that a full-blown RDBMS is overkill for that sort of
problem. If your app is in C/C++, you may want to check out SQLite:

http://www.sqlite.org/

If you're programming in a Windows-centric environment, you may want to
consider using an Access .mdb backend and programming to it through ADO.

Bob Pawley wrote:

Show quoted text

Hi

I have managed to turn my host software into an executable. It runs
well using my installed database and server.

What files in PostgreSQL do I need to include to have the host
software, the PostgreSQL server and database run as an independant
application??

Bob Pawley

#3Bob Pawley
rjpawley@shaw.ca
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

I've already built the PostgreSQL database. Now I want to turn it and the
Delphi interface (host) into a distributable application.

I am using Installshield and I need to pick up the files in Postgres to
include.

Bob Pawley

----- Original Message -----
From: "John McCawley" <nospam@hardgeus.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Monday, December 18, 2006 10:57 AM
Subject: Re: [GENERAL] Creating an Independant Application

Show quoted text

I'm not quite sure I understand your question, do you mean that you wish
to distribute an "all-in-one" installer for a client machine that will
include both your app and PostgreSQL?

It all depends on the complexity of your database backend. If this is
small, quick-and-dirty app, I don't know if PostgreSQL is the best match
for a setup like that. Other people on this list may disagree, but I tend
to think that a full-blown RDBMS is overkill for that sort of problem. If
your app is in C/C++, you may want to check out SQLite:

http://www.sqlite.org/

If you're programming in a Windows-centric environment, you may want to
consider using an Access .mdb backend and programming to it through ADO.

Bob Pawley wrote:

Hi
I have managed to turn my host software into an executable. It runs well
using my installed database and server.
What files in PostgreSQL do I need to include to have the host software,
the PostgreSQL server and database run as an independant application??
Bob Pawley

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

#4Johann Campbell
johann.campbell@gmail.com
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

I think Postgres has to be installed as a service. Seems as if what you are
looking for is more of an embeddable solution in which the libraries can
move with the app per se.

Johann.

"Bob Pawley" <rjpawley@shaw.ca> wrote in message
news:006401c72300$b4953d00$8e904618@owner...

Show quoted text

I've already built the PostgreSQL database. Now I want to turn it and the
Delphi interface (host) into a distributable application.

I am using Installshield and I need to pick up the files in Postgres to
include.

Bob Pawley

----- Original Message -----
From: "John McCawley" <nospam@hardgeus.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Monday, December 18, 2006 10:57 AM
Subject: Re: [GENERAL] Creating an Independant Application

I'm not quite sure I understand your question, do you mean that you wish
to distribute an "all-in-one" installer for a client machine that will
include both your app and PostgreSQL?

It all depends on the complexity of your database backend. If this is
small, quick-and-dirty app, I don't know if PostgreSQL is the best match
for a setup like that. Other people on this list may disagree, but I
tend to think that a full-blown RDBMS is overkill for that sort of
problem. If your app is in C/C++, you may want to check out SQLite:

http://www.sqlite.org/

If you're programming in a Windows-centric environment, you may want to
consider using an Access .mdb backend and programming to it through ADO.

Bob Pawley wrote:

Hi
I have managed to turn my host software into an executable. It runs
well using my installed database and server.
What files in PostgreSQL do I need to include to have the host
software, the PostgreSQL server and database run as an independant
application??
Bob Pawley

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

#5John McCawley
nospam@hardgeus.com
In reply to: Bob Pawley (#3)
Re: Creating an Independant Application

Here is a link to the source for the current Windows PostgreSQL installer:

http://pgfoundry.org/projects/pginstaller/

I'm not an expert on the architecture of the PostgreSQL server
installer, but I'd venture a guess that there is more to it than simply
copying files over and registering DLL files. PostgreSQL is registered
as a service IIRC, and doing that in an installer, while do-able, is not
simple. Assuming that you get that up and running perfectly, you still
have to set up your database, create your users, etc., unless you made
your installer copy over the exact backend that you're currently using.

If I were going to try to tackle this I would do the following:

1) Dig through the PostgreSQL Windows installer source to see what it is
doing

2) Make a decision to either shell out to the existing PostgreSQL
Windows installer, or wrap up its functionality into my own

3) Make a decision to either make the installer install my database "as
is" (use my current backend as the source files, if that's even
possible), or make my installer run scripts to setup my user/database
environment. I'd probably also put some sort of testing functionality
into the installer to make sure the environment is setup as my app is
expecting.

As I said in my last message, I think this approach is overkill for a
small project. I know I wouldn't want to do all of this unless I had a
really good reason to be using PostgreSQL on the client side! One other
thing: It's possible that someone has put together some project for
exactly what you're trying to do. I haven't seen anything of the sort,
but that's not to say one doesn't exist. So, my actual step 1) would be:

1) Look for an existing installer project, or HOWTO specifically geared
towards "rolling your own" custom Windows PostgreSQL installer.

Bob Pawley wrote:

Show quoted text

I've already built the PostgreSQL database. Now I want to turn it and
the Delphi interface (host) into a distributable application.

I am using Installshield and I need to pick up the files in Postgres
to include.

Bob Pawley

----- Original Message ----- From: "John McCawley" <nospam@hardgeus.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Monday, December 18, 2006 10:57 AM
Subject: Re: [GENERAL] Creating an Independant Application

I'm not quite sure I understand your question, do you mean that you
wish to distribute an "all-in-one" installer for a client machine
that will include both your app and PostgreSQL?

It all depends on the complexity of your database backend. If this
is small, quick-and-dirty app, I don't know if PostgreSQL is the
best match for a setup like that. Other people on this list may
disagree, but I tend to think that a full-blown RDBMS is overkill for
that sort of problem. If your app is in C/C++, you may want to check
out SQLite:

http://www.sqlite.org/

If you're programming in a Windows-centric environment, you may want
to consider using an Access .mdb backend and programming to it
through ADO.

Bob Pawley wrote:

Hi
I have managed to turn my host software into an executable. It runs
well using my installed database and server.
What files in PostgreSQL do I need to include to have the host
software, the PostgreSQL server and database run as an independant
application??
Bob Pawley

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

#6Bob Pawley
rjpawley@shaw.ca
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

Yes

I want to include the service and the tables, triggers etc. as an
installable application for one, or more, users.

I don't know if this is considered embedded or not, but there seems to be a
lack of infomation on how to accomplish this.

Bob

----- Original Message -----
From: "Johann Campbell" <johann.campbell@gmail.com>
To: <pgsql-general@postgresql.org>
Sent: Monday, December 18, 2006 6:39 PM
Subject: Re: [GENERAL] Creating an Independant Application

Show quoted text

I think Postgres has to be installed as a service. Seems as if what you are
looking for is more of an embeddable solution in which the libraries can
move with the app per se.

Johann.

"Bob Pawley" <rjpawley@shaw.ca> wrote in message
news:006401c72300$b4953d00$8e904618@owner...

I've already built the PostgreSQL database. Now I want to turn it and the
Delphi interface (host) into a distributable application.

I am using Installshield and I need to pick up the files in Postgres to
include.

Bob Pawley

----- Original Message -----
From: "John McCawley" <nospam@hardgeus.com>
To: "Bob Pawley" <rjpawley@shaw.ca>
Cc: "Postgresql" <pgsql-general@postgresql.org>
Sent: Monday, December 18, 2006 10:57 AM
Subject: Re: [GENERAL] Creating an Independant Application

I'm not quite sure I understand your question, do you mean that you wish
to distribute an "all-in-one" installer for a client machine that will
include both your app and PostgreSQL?

It all depends on the complexity of your database backend. If this is
small, quick-and-dirty app, I don't know if PostgreSQL is the best
match for a setup like that. Other people on this list may disagree,
but I tend to think that a full-blown RDBMS is overkill for that sort of
problem. If your app is in C/C++, you may want to check out SQLite:

http://www.sqlite.org/

If you're programming in a Windows-centric environment, you may want to
consider using an Access .mdb backend and programming to it through ADO.

Bob Pawley wrote:

Hi
I have managed to turn my host software into an executable. It runs
well using my installed database and server.
What files in PostgreSQL do I need to include to have the host
software, the PostgreSQL server and database run as an independant
application??
Bob Pawley

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

#7Tony Caduto
tony_caduto@amsoftwaredesign.com
In reply to: Bob Pawley (#6)
Re: Creating an Independant Application

Bob Pawley wrote:

Yes

I want to include the service and the tables, triggers etc. as an
installable application for one, or more, users.

I don't know if this is considered embedded or not, but there seems to
be a lack of infomation on how to accomplish this.

Bob

-

Hi Bob,
You can easily accomplish it using Inno setup and the full installer I
created for Postgresql,
you simply have to add you app to the Inno setup script and your done.

Complete source is available here:
http://www.amsoftwaredesign.com/downloads/pg_installer_setup.zip
and I licensed the script as BSD.

You can get all the Inno setup stuff here:
http://www.jrsoftware.org/isinfo.php

Hope this helps you out.

Later,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration

#8Bob Pawley
rjpawley@shaw.ca
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

Thanks Tony

What PostgreSQL files do I use?

Bob
----- Original Message -----
From: "Tony Caduto" <tony_caduto@amsoftwaredesign.com>
To: "Bob Pawley" <rjpawley@shaw.ca>; <pgsql-general@postgresql.org>
Sent: Tuesday, December 19, 2006 8:53 AM
Subject: Re: [GENERAL] Creating an Independant Application

Show quoted text

Bob Pawley wrote:

Yes

I want to include the service and the tables, triggers etc. as an
installable application for one, or more, users.

I don't know if this is considered embedded or not, but there seems to
be a lack of infomation on how to accomplish this.

Bob

-

Hi Bob,
You can easily accomplish it using Inno setup and the full installer I
created for Postgresql,
you simply have to add you app to the Inno setup script and your done.

Complete source is available here:
http://www.amsoftwaredesign.com/downloads/pg_installer_setup.zip
and I licensed the script as BSD.

You can get all the Inno setup stuff here:
http://www.jrsoftware.org/isinfo.php

Hope this helps you out.

Later,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

#9Tony Caduto
tony_caduto@amsoftwaredesign.com
In reply to: Bob Pawley (#8)
Re: Creating an Independant Application

Bob Pawley wrote:

Thanks Tony

What PostgreSQL files do I use?

Bob

Hi Bob,
you need these files:
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=binary%2Fv8.1.5%2Fwin32%2Fpostgresql-8.1.5-1-binaries-no-installer.zip

You will need to modify the Inno script so it points to the correct
location on your system.

I have not tested it with 8.2.

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration

#10Bob Pawley
rjpawley@shaw.ca
In reply to: Bob Pawley (#1)
Re: Creating an Independant Application

What is the best way of installing the tables, triggers etc? Do I add a
project dump file or generate them from an sql file?

Bob

----- Original Message -----
From: "Tony Caduto" <tony_caduto@amsoftwaredesign.com>
To: "Bob Pawley" <rjpawley@shaw.ca>; <pgsql-general@postgresql.org>
Sent: Tuesday, December 19, 2006 9:57 AM
Subject: Re: [GENERAL] Creating an Independant Application

Show quoted text

Bob Pawley wrote:

Thanks Tony

What PostgreSQL files do I use?

Bob

Hi Bob,
you need these files:
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=binary%2Fv8.1.5%2Fwin32%2Fpostgresql-8.1.5-1-binaries-no-installer.zip

You will need to modify the Inno script so it points to the correct
location on your system.

I have not tested it with 8.2.

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

#11Tony Caduto
tony_caduto@amsoftwaredesign.com
In reply to: Bob Pawley (#10)
Re: Creating an Independant Application

Bob Pawley wrote:

What is the best way of installing the tables, triggers etc? Do I add
a project dump file or generate them from an sql file?

Bob

Bob,

I would just have a sql script with the create database etc and then
after the server is up and running, execute the script via psql or you
could add a delphi DLL to do it with
Zeos or some other PG component set.

The script uses Pascal scripting to start the service, so you will know
when and if it started successfully.

Later,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration