public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* setup.exe: How specify web proxy by command line parameters
@ 2009-09-15 15:01 Dr. Christoph Gille
  2009-09-15 15:14 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 8+ messages in thread
From: Dr. Christoph Gille @ 2009-09-15 15:01 UTC (permalink / raw)
  To: cygwin

Hi all,

I am developing a computer program
http://www.bioinformatics.org/strap/ which uses Cygwin.  Cygwin
is installed automatically by the program. The user does not need
to interact with setup.exe.  This is done by downloading and
starting setup.exe programmatically, with some command line options.

My problem: I need to specify the Web-proxy.  I have looked for
command line parameters, environment variables, registry
entries and files, but have not found anything.

How can I programmatically specify the Web proxy for invocation of setup.exe?

There had been discussion on this previously:

http://www.nabble.com/-Patch--Proxy-command-line-argument-td14989738.html
http://www.mail-archive.com/cygwin@cygwin.com/msg35204.html

Many thanks for your help

Christoph


--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: How specify web proxy by command line parameters
  2009-09-15 15:01 setup.exe: How specify web proxy by command line parameters Dr. Christoph Gille
@ 2009-09-15 15:14 ` Larry Hall (Cygwin)
  2009-09-15 16:28   ` Dr. Christoph Gille
  0 siblings, 1 reply; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2009-09-15 15:14 UTC (permalink / raw)
  To: cygwin

On 09/15/2009 11:00 AM, Dr. Christoph Gille wrote:
> Hi all,
>
> I am developing a computer program
> http://www.bioinformatics.org/strap/ which uses Cygwin.  Cygwin
> is installed automatically by the program. The user does not need
> to interact with setup.exe.  This is done by downloading and
> starting setup.exe programmatically, with some command line options.
>
> My problem: I need to specify the Web-proxy.  I have looked for
> command line parameters, environment variables, registry
> entries and files, but have not found anything.
>
> How can I programmatically specify the Web proxy for invocation of setup.exe?
>
> There had been discussion on this previously:
>
> http://www.nabble.com/-Patch--Proxy-command-line-argument-td14989738.html
> http://www.mail-archive.com/cygwin@cygwin.com/msg35204.html

Sounds like you want Cygwin 1.7's setup.exe -> <http://cygwin.com/setup-1.7.exe>


-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: How specify web proxy by command line parameters
  2009-09-15 15:14 ` Larry Hall (Cygwin)
@ 2009-09-15 16:28   ` Dr. Christoph Gille
  2009-09-15 16:31     ` Charles Wilson
  2009-09-15 17:25     ` Larry Hall (Cygwin)
  0 siblings, 2 replies; 8+ messages in thread
From: Dr. Christoph Gille @ 2009-09-15 16:28 UTC (permalink / raw)
  To: cygwin

Hi Larry,

>> http://www.bioinformatics.org/strap/ which uses Cygwin.  Cygwin
>> My problem: I need to specify the Web-proxy.
> Sounds like you want Cygwin 1.7's setup.exe -> <http://cygwin.com/setup-1.7.exe>
Yes, that is what I need. It is great!
There is also the text search field that I missed so many years!
Why is it not yet the default setup.exe?

I would prefere a stable URL without the version number in the URL, something like
http://cygwin.com/setup-current.exe
Otherwise my program would need to probe several URLs with increasing version number.

Using this improved setup.exe there would be only one user interaction left:
The user needs to mark the closest mirror.
I do not think that this could be done automatically at the moment or what do you think?

Many thanks again
Christoph



--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: How specify web proxy by command line parameters
  2009-09-15 16:28   ` Dr. Christoph Gille
@ 2009-09-15 16:31     ` Charles Wilson
  2009-09-15 17:25     ` Larry Hall (Cygwin)
  1 sibling, 0 replies; 8+ messages in thread
From: Charles Wilson @ 2009-09-15 16:31 UTC (permalink / raw)
  To: cygwin

Dr. Christoph Gille wrote:
>> Sounds like you want Cygwin 1.7's setup.exe -> <http://cygwin.com/setup-1.7.exe>
> Yes, that is what I need. It is great!
> There is also the text search field that I missed so many years!
> Why is it not yet the default setup.exe?

Because it will install the beta version of cygwin, cygwin-1.7.  Once
cygwin-1.7(.1) is officially released, then setup-1.7 will become the
default -- and lose the version number.  But not until then.

--
Chuck

--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: How specify web proxy by command line parameters
  2009-09-15 16:28   ` Dr. Christoph Gille
  2009-09-15 16:31     ` Charles Wilson
@ 2009-09-15 17:25     ` Larry Hall (Cygwin)
  2009-09-16  8:27       ` setup.exe: Determine Geographically closest mirror programmatically Dr. Christoph Gille
  1 sibling, 1 reply; 8+ messages in thread
From: Larry Hall (Cygwin) @ 2009-09-15 17:25 UTC (permalink / raw)
  To: cygwin

On 09/15/2009 12:28 PM, Dr. Christoph Gille wrote:
> Hi Larry,
>
>>> http://www.bioinformatics.org/strap/ which uses Cygwin.  Cygwin
>>> My problem: I need to specify the Web-proxy.
>> Sounds like you want Cygwin 1.7's setup.exe ->  <http://cygwin.com/setup-1.7.exe>
> Yes, that is what I need. It is great!
> There is also the text search field that I missed so many years!
> Why is it not yet the default setup.exe?

It will be when 1.7 is released.  That will happen "soon".

> I would prefere a stable URL without the version number in the URL, something like
> http://cygwin.com/setup-current.exe
> Otherwise my program would need to probe several URLs with increasing
> version number.

When 1.7 is released, the "setup-1.7.exe" link will become 
<http://cygwin.com/setup.exe>
as Chuck said.

> Using this improved setup.exe there would be only one user interaction
> left: The user needs to mark the closest mirror. I do not think that this
> could be done automatically at the moment or what
> do you think?

Closest mirror?  I'm not sure what you mean by this.  'setup.exe' does not 
require
this as a setting.  Actually, there is no such concept.  You need to specify 
a mirror
to work with but you can do that with '-s'.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* setup.exe: Determine Geographically closest mirror programmatically
  2009-09-15 17:25     ` Larry Hall (Cygwin)
@ 2009-09-16  8:27       ` Dr. Christoph Gille
  2009-09-16  9:36         ` Dave Korn
  2009-09-16 12:10         ` Ralph Hempel
  0 siblings, 2 replies; 8+ messages in thread
From: Dr. Christoph Gille @ 2009-09-16  8:27 UTC (permalink / raw)
  To: cygwin


> Closest mirror?  I'm not sure what you mean by this.  'setup.exe' does not
> require this as a setting.  Actually, there is no such concept.  You need to specify
> a mirror to work with but you can do that with '-s'.

With each superfluous click I lose a user, so it would be best if setup.exe would be run within http://3d-alignment.eu/  without
user interaction.

I am not a network specialist, but
I see two possibilities how I could determine the closest cygwin mirror:

(I) I could compare the IP numbers  of all mirrors to the IP number of the client and make a guess of the geographically closest site.
I would use the site where the first digits of the IP match best and I would then probe a short file to check whether the mirror is indeed working.

(II) This is what I am currently using to determine the fastest database mirror for 3D-structures:
I fetch a tiny probe file from each database mirror and take the one with the shortest respond time.
This method is more simple  but as there are that many cygwin mirrors, I am not sure whether I would run into problems.

When I have the mirror I would set it with the command line option of setup.exe.
I think this would work and could be done easily. Do you have  other ideas?

Could you please tell me the URL of the file with the cygwin mirror list?

Cheers

Christoph





--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: Determine Geographically closest mirror programmatically
  2009-09-16  8:27       ` setup.exe: Determine Geographically closest mirror programmatically Dr. Christoph Gille
@ 2009-09-16  9:36         ` Dave Korn
  2009-09-16 12:10         ` Ralph Hempel
  1 sibling, 0 replies; 8+ messages in thread
From: Dave Korn @ 2009-09-16  9:36 UTC (permalink / raw)
  To: cygwin

Dr. Christoph Gille wrote:
>> Closest mirror?  I'm not sure what you mean by this.  'setup.exe' does
>> not require this as a setting.  Actually, there is no such concept.  You
>> need to specify a mirror to work with but you can do that with '-s'.
> 
> With each superfluous click I lose a user, so it would be best if setup.exe
> would be run within http://3d-alignment.eu/  without user interaction.

  You could very simply compile a custom version of setup.exe for your users
which had a different URL for the mirrors list, pointing to a custom list on
your own server that only had one entry on it for 3d-alignment.eu.  (You could
even take advantage of the opportunity to replace the public key embedded in
it with one that you could use for signing on your own server; otherwise your
users will need to run setup.exe using the -X command-line flag to ignore
security, or you'd need to distribute a key file to all your users somehow.)

> I am not a network specialist, but I see two possibilities how I could
> determine the closest cygwin mirror:
> 
> (I) I could compare the IP numbers  of all mirrors to the IP number of the
> client and make a guess of the geographically closest site. I would use the
> site where the first digits of the IP match best and I would then probe a
> short file to check whether the mirror is indeed working.
> 
> (II) This is what I am currently using to determine the fastest database
> mirror for 3D-structures: I fetch a tiny probe file from each database
> mirror and take the one with the shortest respond time. This method is more
> simple  but as there are that many cygwin mirrors, I am not sure whether I
> would run into problems.

  Just as one further possibility, there's a bit of scripting on the page at
the cygwin website about how to setup your own package server that uses a
utility called 'netselect' to determine which is the fastest server in the
mirrors list:

    http://sourceware.org/cygwin-apps/package-server.html

  You might (or perhaps might not) find it adaptable to suit your purposes.

> When I have the mirror I would set it with the command line option of
> setup.exe. I think this would work and could be done easily. Do you have
> other ideas?

  If you wanted to be really cool, the URL that points to the alternative
mirrors list on your own server can in fact be a CGI script of some kind that
selects a geographically-nearest server based on the client's browser request
headers, and returns a dynamically generated mirrors.lst with one entry
customised just for that user.

> Could you please tell me the URL of the file with the cygwin mirror list?

  http://cygwin.com/mirrors.lst

  In the setup.exe source code, this is defined in IDS_MIRROR_LST in res.rc.

    cheers,
      DaveK

--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: setup.exe: Determine Geographically closest mirror programmatically
  2009-09-16  8:27       ` setup.exe: Determine Geographically closest mirror programmatically Dr. Christoph Gille
  2009-09-16  9:36         ` Dave Korn
@ 2009-09-16 12:10         ` Ralph Hempel
  1 sibling, 0 replies; 8+ messages in thread
From: Ralph Hempel @ 2009-09-16 12:10 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 627 bytes --]

Dr. Christoph Gille wrote:
>> Closest mirror?  I'm not sure what you mean by this.  'setup.exe' does not
>> require this as a setting.  Actually, there is no such concept.  You need to specify
>> a mirror to work with but you can do that with '-s'.
> 
> With each superfluous click I lose a user, so it would be best if setup.exe would be run within http://3d-alignment.eu/  without
> user interaction.

Or you could modify the attached Windows batch file (I've made it
a TXT file so it passes through most filters) and change the
mirror name to one that's closer.

You might have to make one batch file per country :-)

Ralph

[-- Attachment #2: setupCygwin.txt --]
[-- Type: text/plain, Size: 1034 bytes --]

@ECHO OFF
REM --------------------------------------------------------------------------
REM batch file to automate setup of Cygwin from the command line

SETLOCAL
  FOR /F %%D in ("%CD%") DO SET DRIVE=%%~dD

  SET DFLTSITE=http://mirror.csclub.uwaterloo.ca/cygwin/

  SET DFLTLOCALDIR=%CD%/download
  SET DFLTROOTDIR=%DRIVE%/cygwinTest

  SET SITE=-s %DFLTSITE%
  SET LOCALDIR=-l %DFLTLOCALDIR%
  SET ROOTDIR=-R %DFLTROOTDIR%

REM --------------------------------------------------------------
REM Here's where I keep track of which packages I've loaded for
REM different types of work

REM C development: gcc4-core make readline

  SET PACKAGES=-P gcc4-core,make,readline

REM General      : diffutils ctags

  SET PACKAGES=%PACKAGES%,diffutils,ctags

REM Packaging     : cygport

  SET PACKAGES=%PACKAGES%,cygport

  setup -q -n -D -L %SITE% %LOCALDIR% %PACKAGES%

ECHO Cygwin installation is updated

REM --------------------------------------------------------------

ENDLOCAL

EXIT /B 0

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-16 12:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 15:01 setup.exe: How specify web proxy by command line parameters Dr. Christoph Gille
2009-09-15 15:14 ` Larry Hall (Cygwin)
2009-09-15 16:28   ` Dr. Christoph Gille
2009-09-15 16:31     ` Charles Wilson
2009-09-15 17:25     ` Larry Hall (Cygwin)
2009-09-16  8:27       ` setup.exe: Determine Geographically closest mirror programmatically Dr. Christoph Gille
2009-09-16  9:36         ` Dave Korn
2009-09-16 12:10         ` Ralph Hempel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).