Re: PostgreSQL without cygwin. - Mailing list pgsql-cygwin

From Todd F. Peterson
Subject Re: PostgreSQL without cygwin.
Date
Msg-id Pine.GSO.4.44.0302171141380.10909-100000@screamer.ncgr.org
Whole thread Raw
In response to Re: PostgreSQL without cygwin.  (Ben Clewett <B.Clewett@roadrunner.uk.com>)
List pgsql-cygwin

On Mon, 17 Feb 2003, Ben Clewett wrote:

> Hi Todd.
>
> I like the installation.  Espeicailly the size, being less than MySQL,
> SAP and definitelly less than any MS SQL server.  That's not hard, but
> I'd worry if it was :)
>
> I've been playing with your files trying to get them into Install
> Sheild.  Although it's easy to get the program to put everything in the
> right place, I'm not sure what to do now, post-loading.
shouldn't have to do much, maybe cleanup any files that won't be used
again. not sure what those would be.

here is install.bat that i package with my application that uses Postgres:

setlocal
set HOME=%~d0%~p0
echo installing in %HOME%
set PATH=%PATH%;%HOME%\cygmin\bin
cd %HOME%cygmin\bin
call mount-directories.bat %HOME%cygmin
bash /install.sh
cd %HOME%
echo install successful!
endlocal

crude and not really that robust, but gets the job done.
the other piece of my install looks like this:

#!/bin/sh

JAVA_BIN=`which java`
if [ -n "$JAVA_BIN" ]; then
JAVA_VERSION=`java -version`
echo java version $JAVA_VERSION found
else
echo java not found, either install it or put it in
echo your PATH
return
fi
echo "checking for Postgres"
PG_BIN=`which psql`
if [ -n "$PG_BIN" ]; then
PG_VERSION=`psql -V`
echo postgres $PG_VERSION found
else
echo psql not found, either install Postgres or put
echo it in your PATH
return
fi
echo "required components found"

echo "installing GeneX-Lite database"
createdb genexlite
createuser -D -A genexlite
psql -U genexlite -d genexlite -f db/create-postgres-schema.sql
psql -U genexlite -d genexlite -f db/create-postgres-sequences.sql
psql -U genexlite -d genexlite -f db/create-views.sql
psql -U genexlite -d genexlite -f db/setup-attributes.sql
psql -U genexlite -d genexlite -f db/create-cont-vocabs.sql
echo "install complete"

>
> Do you call you mount-directories.bat first?  Is this where cygwin
> learns where root and all else is?

yep

>
> Then I would guess you'd run your install.bat.  This would be run using
> bash.exe?
>
> DOS>  bash.exe install.sh
>

see above

> This is a one-time executable.  On boot of the PC, another script would
> be needed to restart the server again?
>

yes, or install as service which is painful

> Is there anything more which cygwin would need to correctly initiate?
> You mension stuff for the Registry for instance?
>
> My registry only shows valid data in: 'My
> Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Mounts v2\'
>   Where it lists the current mount points.
>

that's how cygwin knows where / etc. is. the mount commands do this

> Also, I ask as I have no idea, it might be nice to isolate this
> instalation in a safe area away from the users main 'cygwin' stuff.
> Like, as InstallSheild would prefure, in c:\Program Files\PostgreSQL
> where the /bin /tmp /usr could be built.  If this could be set as the
> root in cygwin, AND not conflict with any other cygwin which might be
> running on the system.  Sort of like UML with Cygwin, UMC...

that would be messy. i do have a script called set-cyghome.bat in the
install to do this. i don't like it much, it's ugly but it works. i'm
getting pretty tired of Windows and may just abandon support for it.
especially the cygmin portion due to the source issues. it was a pain to
create the cygmin with just the executables and dlls. gathering the source
for everything would be a burden. you will have to consider that problem,
too.

>
> This would have the advantage of InstallShield not messing up the users
> own installed Cygwin, and also the user installing Cygwin messing up
> PostgreSQL?
>

multiple cygwins could just use different mount point names so you could
have /cygwin1 and /cygwin2 and set the environments up differently
depending on which to use.

> If this was possible, then an entire instalation could be embedded into
> a 2Mb image which could be (as I want) attached to an application for
> download over the Internet.
>

good luck.

todd

> Regards,
>
> Ben Clewett.
>
>
>
>
> Todd F. Peterson wrote:
> > whoops...no 's' at the end of download:
> >
> > http://genebox.ncgr.org/download/genex-lite/
> >
> > Todd
> >
> > On Fri, 14 Feb 2003 Steve_Miller@sil.org wrote:
> >
> >
> >>Todd,
> >>
> >>I for one wouldn't mind seeing it. But I can't get to the site you listed
> >>below.
> >>
> >>Steve Miller
> >>SIL International
> >>
> >>
> >>On 02/14/2003 03:17:37 PM pgsql-cygwin-owner wrote:
> >>
> >>
> >>>i have assembled the minimum components and an install script for
> >>>postgres on windows. see
> >>>
> >>>http://genex.ncgr.org/downloads/genex-lite
> >>>
> >>>specifically, cygmin.tgz (minimum cygwin for postgres) includes the
> >>>necessary components to get postgres working on windows. note that the
> >>>windows registry must be modified for the whole thing to work. the
> >>>included install.bat does the needed mods to the registry (as i recall).
> >>>
> >>>Todd Peterson
> >>>Sr. Developer
> >>>The National Center for Genome Resources
> >>>Santa Fe, New Mexico USA
> >>>
> >>>On Fri, 14 Feb 2003, Ben Clewett wrote:
> >>>
> >>>
> >>>>Stand alone PostgrSQL.
> >>>>
> >>>>How hard would it be to make PostgreSQL stand-alone without cgywin?  And
> >>>>if not, if there a sort of minumim configuration of .dll's which could
> >>>>be used to build, say, an InstallShield which got the product up and
> >>>>running?
> >>>>
> >>>>As well, if anybody knows, how the development of the stand-alone NT
> >>>>version of PostgreSQL is progressing?
> >>>>
> >>>>Thanks
> >>>>
> >>>>
> >>>>---------------------------(end of broadcast)---------------------------
> >>>>TIP 5: Have you checked our extensive FAQ?
> >>>>
> >>>>http://www.postgresql.org/users-lounge/docs/faq.html
> >>>>
> >>>
> >>>
> >>>---------------------------(end of broadcast)---------------------------
> >>>TIP 5: Have you checked our extensive FAQ?
> >>>
> >>>http://www.postgresql.org/users-lounge/docs/faq.html
> >>
> >>
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> >>
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>
>


pgsql-cygwin by date:

Previous
From: George
Date:
Subject: problem after install
Next
From: "Yann.G"
Date:
Subject: What could be the cause?