Bob Hunter wrote:
Are you asking for a patch to trigger gcc with windows
flag? Are you joking? Ah, maybe you are referring to
cygwin? You can see how easy it is by looking at rsync
for windows (main site, unpack the distribution for
windows, and you see that there really is little to do
other than packing the dll). Come on!
Bob
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I already put in my 2 cents. This is going to make it 4.
There may be some issue confusion here. Are we discussing the
generation of a .exe file or a .par file? If the perl script is a pure
perl script there should be no problem packaging up a .par file on a
Linux machine that will run on the target Windows machine, and cygwin
will not be needed.
On the other hand, you are compiling in non-perl code, so I think you
will need to create a .exe. I do not think there is any easy way you
can create it on a Linux machine. I know you are insisting that it
would be easy, or that it should be easy, but I do not think it would
really be that easy.
Consider the cygwin dll you mention for inclusion in the pp'd package.
The cygwin dll does not work in a vacuum. As you can see from the
pastes below, there are plenty of cygwin dll files and plenty of exe
files that scripts need to run under cygwin. This is on my Windows XP
machine.
------------------paste
[EMAIL PROTECTED] /cygdrive/c/cygwin
$ ls -l bin/*.exe | wc
1099 9957 76388
[EMAIL PROTECTED] /cygdrive/c/cygwin
$ ls -l bin/*.dll | wc
172 1548 12488
$ echo $SHELL
/bin/sh
----------------end paste
Here is a simple example. Assume you are running a perl script and you
want to invoke a system command within a cygwin shell. Your script
first needs to invoke something like the
"path_to_end_user_cygwin_area\bin\bash.exe --login" command. Once you
have the shell I suppose you can execute whatever cygwin command you
like, such as "ls.exe" but you need to have the ls.exe, too.
I am not suggesting that you cannot package all of the needed cygwin
commands in your package. The size of my cygwin bin directory is shown
below.
1643 File(s) 212,479,804 bytes
This perhaps might be cut down considerably by an investigation of
exactly what commands your script will be needed, and what commands and
dlls those commands need, and so on, but I do not think that would be
easy either. I do not know if anything else might be involved, but
there always is.
Does cygwin install on Linux, such that you can package up the needed
cygwin files for the target Windows machine? I guess you can just unzip
and untar it, but would that really be all there is to it? Would the
untarring on Linux attempt to create backslashed directories, and
thereby fail to untar? There are always unknown issues that crop up.
You mention cygwin on Linux so I suppose you got the source and compiled
it. Did the output of your compilation create files like "ls.exe"?
I do not think that putting together a package on a Linux machine for
distribution to one or more Windows machines is as easy as you might
think, no matter what language you use, with or without cygwin.
It can of course be done. ActiveState has a product that they guarantee
will package your code so that it will run on different platforms,
including Windows.
Bob, you make it clear that you do not have access to a Windows
machine. That could be such a killer. How would you test your final
product prior to giving it to your end user? I cannot imagine sending
out a piece of software without testing it on a real target machine
first. Mark Twain once suggested that it is not what we think we do not
know that really gets us into trouble. It is what we think we know.
Amongst the things in my life I would like to take back, phrases like
"all we would have to do is", "just need to", "we can always ..." rank
pretty high. With today's low prices of good PC's, I'd try to scrape
together the money to get a Windows machine, just for the sake of
testing. Just for the sake of sanity.
Maybe that was 6 cents worth.
Thanks