Re: Need help creating a script that is ran from a batch file.

2012-08-19 Thread Paul Thompson
The cygwin and unix world is a "help yourself" world. You must do some
work. No one is here to do it for you.

What I did in your position was to look for a bash script, and copy
it. Then you modify it. When you get stuck, use google to look for
help. I have just written a number perl programs knowing nothing about
perl, just use google to search for help. There's a lot of stuff out
there.

Using this basic approach, I have learned how to write bash scripts,
do perl, etc etc. You start, and ask for help when you get stuck.

On Sun, Aug 19, 2012 at 1:54 PM, Michael Steele  wrote:
> I know very little about creating a script under cygwin. I have a particular
> tack that doesn't change and I'm running it manually. I'm thinking that since
> it doesn't change that it could be automated. As you can see below I'm
> compiling three programs and the last program is my executable.
>
> The first time I setup the cygwin environment it doesn't need to 'make clean'.
> I'm not sure if it hurts to run 'make clean' if it doesn't need to. Maybe a
> check in place would be prudent if it shouldn't be running 'make clean if it
> doesn't need to?
>
> Here are the commands I run from within cygwin:
>
> Open the Cygwin terminal
>
> cd /cygdrive/e/development/cygwin/mysql-5.5.25a/
> make clean
> perl cmake/configure.pl
> make && make mysqlclient && make install
>
> cd /cygdrive/e/development/cygwin/postgresql-9.1.4/
> make clean
> ./configure
> make && make install
>
> cd /cygdrive/e/development/cygwin/barnyard2/
> make clean
> ./autogen.sh
> ./configure --with-mysql --with-postgresql
> make && make install
>
> When it completesw the process I need it to create a folder and copy all the
> prudent files and folder. I'm not sure if the below are correct syntax.
>
> mkdir /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/barnyard2/src/.libs/barnyard2.exe 
> /cygdrive/e/cygwin/barn
> /
>
> cp /cygdrive/e/cygwin/barnyard2/etc/ /cygdrive/e/cygwin/barn/etc/
>
> cp /cygdrive/e/cygwin/barnyard2/schemas/ /cygdrive/e/cygwin/barn/schemas/
>
> cp /cygdrive/e/cygwin/barnyard2/etc/barnyard2.conf /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/bin/cyggcc_s-1.dll /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/bin/cygwin1.dll /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/bin/cygz.dll /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/usr/local/mysql/lib/cygmysqlclient-
> 18.dll /cygdrive/e/cygwin/barn/
>
> cp /cygdrive/e/cygwin/usr/local/pgsql/lib/cygpq.dll /cygdrive/e/cygwin/barn/
>
> then exit
>
>
> --
> Problem reports:   http://cygwin.com/problems.html
> FAQ:   http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-14 Thread Paul Thompson
Marco gets the diagnostic prize!! Font name was the issue. Used -font
Helvetica, and all went like a charm!!

So, thank you, Marco.


> use a font name recognized by unix and not a windows one,
> eg  -font Helvetica
>
> to look on font name a use xfontsel from xterm.
>
>

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-14 Thread Paul Thompson
> Paul,
> it is not a rebase error.
> It is ImageMagick mishandling the missing font.
>
> GraphickMagick equivalent is correctly handling the case and the
> error message is more clear.
>
> $ gm  montage -label "D Brausch Wedding,1951" zimg002.miff -font Arial
> -pointsize 20 -frame 40 -geometry +0+0 zimg002.png
> gm montage: Unable to read font (arial.ttf) [No such file or directory].
>
> The workaround for both "montage" and "gm montage" is to copy arial.ttf
> in the current directory
> something like
> "cp /cygdrive/c/Windows/Fonts/arial.ttf ."
>
> ImageMagick is also able to use the TTF font if installed in the X
> directory  /usr/share/fonts/TTF and montage is run inside xterm
> instead of mintty.
> GM is not handling such case, but I have no time to investigate.
>
> Regards
> Marco
>

I will try that tonight. The other install of ImageMagick also gave me
the arial font error, but handled it more gracefully.

Is there some way to getting the fonts on to the path so that I don't
need to do the copy around? It seems odd that fonts cannot be located
in some sensible manner.
>

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-14 Thread Paul Thompson
>There's autorebase, which is called from setup, but the method is not
>entirely foolproof.  If you installed exactly once and then don't start
>setup again unless new packages are available, you're ok, but if you
>start setup a couple of times to install more packages you forgot in
>the first run, then autorebase won't be triggered and the DLLs installed
>in the subsequent setup runs won't be rebased.  A manual rebaseall
>will fix that.


And that is exactly what I did - I ran setup several times to add stuff.

I will do the manual rebaseall

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-14 Thread Paul Thompson
>
> Wow.  That's rather unexpected.  Unfortunately the error code -2 is just
> an artefact, not the actual error code.  I fixed that in CVS.  Did you
> try if rebaseall fixes this issue?
>
>

OK, I just learned about rebaseall. I am not actually on the machine
in question, and will try this tonight. I will report tomorrow on
results.

I will say that I did just do a fresh install of cygwin for this.
Should cygwin work straight out of the box, or is the rebaseall needed
to tailor to specific machine?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-13 Thread Paul Thompson
marco atzeri  gmail.com> writes:

> 
>
> 
> 

Marco: I followed the error reporting directions. How long is the usual wait for
a response?





--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



imagemagick errors under cygwin on 64-bit Win 7 system

2012-08-12 Thread Paul Thompson
I have installed cygwin. I am trying to use a combination of bash, imagemagick,
LaTeX, and a few other packages. I have issues with imagemagick. If I run
imagemagick installed externally, i get no problems - run cleanly. 

When I try to run imagemagick (specifically, the montage tool) by a bash shell,
I get:

  0 [main] montage 8856 C:\cygwin\bin\montage.exe: *** fatal error in forked
process - failed to create new win32 semaphore, error -2
  0 [main] montage 6456 C:\cygwin\bin\montage.exe: *** fatal error in forked
process - failed to create new win32 semaphore, error -2
montage: unable to read font `/usr/share/fonts/TTF/arial.ttf' @
error/annotate.c/RenderFreetype/1120.
montage: `%s' (%d) "gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT
-dMaxBitmap=5 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha"
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -g40x40 
"-sOutputFile=/tmp/magick-gsqYxLxw--001" "-f/tmp/magick-quUeEm7z"
"-f/tmp/magick-EejJYmzy" @ error/utility.c/SystemCommand/1856.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Problems installing/uninstalling

2006-12-26 Thread Paul Thompson
I have had recently considerable problems both installing and uninstalling 
cygwin.


XP-pro box

Version: 2.510.2.2

1st try - downloaded all updates, and install from local disk
Install stops dead and does not proceed at

/etc/postinstall/01bash.bat

After this, I attempted to uninstall the entire package to reinstall fresh

At this point, uninstall hangs at

Running preremove script...
base-files

I attempted to delete the installed program by hand, but cannot delete bash.exe

Suggestions?

Paul A. Thompson, Ph.D.
Division of Biostatistics
Washington University School of Medicine
660 S. Euclid, St. Louis, MO 63110
314-747-3793

[EMAIL PROTECTED]


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cygwin/rsync Hang Problem Testing Results

2003-10-04 Thread Paul Thompson
Mark Thornton wrote:

So, based on my testing, I would conclude that the infamous cygwin 
rsync hang bug was introduced somewhere in the coding for 2.4.6. As 
for myself, I plan to go ahead and just use version 2.4.0, as it is 
the most recent version of rsync that worked for all three tests. If 
I can be of any more help, including testing patches, please let me 
know.

Can you suggest a download source for 2.4.0? I have only been able to 
find 2.4.6, 2.5.6-1 and 2.5.6-2. By the way were either of your 
machines dual processors (or hyperthreaded)?


rsync ftp site -

   http://rsync.samba.org/ftp/rsync/old-versions/rsync-2.4.0.tar.gz
   http://rsync.samba.org/ftp/rsync/old-versions/
And one of my machines is dual processored. However, the machine that I 
did all of my testing on was a normal Pentium-4 laptop. No 
hyperthreading, I think...

Paul

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Cygwin/rsync Hang Problem Testing Results

2003-10-02 Thread Paul Thompson
People of cygwin & rsync,

I recently attempted to get cygwin and rsync working to solve a 
backup/mirroring need in my computer life. Well, as you might guess, I 
ran into a little but of trouble.

Strangely enough, rsync seemed to be regularly hanging when I attempted 
to do a "get" (sycronize a remote to a local dir). Well, considering I 
want to automate this, that was not going to work. So I searched the 
web, mailing lists, etc, and came across all of the posts on the 
subject, but no solution.

Then I stumbled across an idea - to test previous versions of rsync to 
if any of them worked better with cygwin. Here are the (hopefully 
helpful) results of those tests. I did three tests for each version of 
cygwin:

 locallist:
   rsync -n --stats --recursive --rsh=ssh sync/ /home/drsync/
 get:
   RSYNC_CMD="rsync --verbose --progress --stats -auz -e ssh"
   $RSYNC_CMD [EMAIL PROTECTED]:sync/ sync/
 put:
   RSYNC_CMD="rsync --verbose --progress --stats -auz -e ssh"
   $RSYNC_CMD sync/ [EMAIL PROTECTED]:sync/
When rsync was hanging, it did so usually by the third time I ran the 
command. So I figured running each 10ish times should probably show the 
error.

So I downloaded the last pile of rsync releases and started testing at 
intervals, starting back at 2.3.0 and splitting the difference as I 
zeroed in on the offending release. Here are the results:

   Version   locallist   get   put
   ---
   2.3.0 success success   success
   2.4.0 success success   success
   2.4.1 success success   failure
   2.4.2 success success   failure
   2.4.3 success success   failure
   2.4.4 success success   failure
   2.4.5 success success   failure
   2.4.6 failure failure   failure
   2.5.0 failure failure   success
   2.5.6 failure failure   success
The failures of the put test (v. 2.4.1 - 2.4.6) happened EVERY time I 
ran the test and returned an error of:

   read error: Connection reset by peer

As those did not occur after 2.4.6, I assume that was a fixed bug, 
unrelated to the hanging problem that was the reason for my tests.

Anyhow, when the locallist and get tests failed, rsync would just plain 
hang - no explanation, error, I could leave it there for an hour and it 
wouldn't have changed. And then, when I ctrl-c killed the process (in my 
cygwin/bash shell), the actual rsync process would stick around and 
require killing via the windows task manager.

So, based on my testing, I would conclude that the infamous cygwin rsync 
hang bug was introduced somewhere in the coding for 2.4.6. As for 
myself, I plan to go ahead and just use version 2.4.0, as it is the most 
recent version of rsync that worked for all three tests. If I can be of 
any more help, including testing patches, please let me know.

Thanks for all of the hard work on cygwin and rsync, folks.

Sincerely,
Paul Thompson
[EMAIL PROTECTED]
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/