Re: setup.exe sizes openldap-2-2-15

2004-10-31 Thread Max Bowsher
Gary R. Van Sickle wrote:
[snip]
An argument for demand-downloaded .mo files, then?
An argument for simply adding the translations to res.rc as
localized STRINGTABLES.
   
  MESSAGETABLES
Then you can use FormatMessage() and things are much less brain-bamaging.
But then you need some extra software to compile the messagetables.
Unless binutils has grown support for this recently, we can't use 
messagetables.

Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-31 Thread Reini Urban
Max Bowsher schrieb:
Gary R. Van Sickle wrote:
An argument for demand-downloaded .mo files, then?
An argument for simply adding the translations to res.rc as
localized STRINGTABLES.
   
  MESSAGETABLES
Then you can use FormatMessage() and things are much less brain-bamaging.

But then you need some extra software to compile the messagetables.
Unless binutils has grown support for this recently, we can't use 
messagetables.
windres cannot compile them?
The man or info page doesn't say that certain ressourcetypes are 
unsupported. But I haven't tried that yet.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Max Bowsher
Reini Urban wrote:
Reini Urban schrieb:
Dr. Volker Zell schrieb:
Christopher Faylor writes:
 I don't see it anywhere.  The closest thing I see is:
 libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
That's ok. I don't know what Reini is seeing.
Unfortunately I didn't make a screenshot and did't backup this setup.ini
in question.
But it is fixed now indeed.
Looks like a ini parser problem.
Ok, I reproduced it and have a screenshot:
http://xarch.tu-graz.ac.at/publ/cygwin/temp/setup-libopenldap-2-15-2.png
This is with my setup fixes, which substr's the version at 45.
I'll debug the setup.ini in question to find out why it looped.
Probably there is a corrupt line in /etc/setup/installed.db
Another size problem:
With the configure instructions from the website setup.exe is 9.8MB,
stripped 808960 byte compared to the currently small 268800byte.
Is that my fault or does you, Max, also have such a size increase?
At the end of the new exe there are all the string ressources in utf-16,
which I cannot detect in the current setup.exe. but from 270 = 810?
Release setup.exes are compressed using upx.
Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Robert Collins
On Wed, 2004-10-27 at 04:03 +0200, Reini Urban wrote:
 Brian Dessent schrieb:
  Reini Urban wrote:
 Esp. Replaces: sh-utils fileutils textutils would be needed for
 coreutils. And it doesn't require additional user-input.
  
  It's not strictly necessary.  There's already the _ZZZRemovedPackages
  thing where you can stick dummy empty packages of things that have gone
  away.
 
 Sure, but this is ugly, and Robert has already written most of the 
 Replaces: codepath and much more.
 My upset patch for this is on the way (well, I attach it), and the 
 setup.exe needs further testing.

I'm glad that code is getting used now :)

Rob




signature.asc
Description: This is a digitally signed message part


RE: setup.exe sizes

2004-10-27 Thread Buchbinder, Barry (NIH/NIAID)
There are command line options to avoid this; see
http://sources.redhat.com/ml/cygwin-apps/2003-03/msg00526.html
   -n --no-shortcuts   Disable creation of desktop and start
   -N --no-startmenu   Disable creation of start menu shortcut
   -d --no-desktop Disable creation of desktop shortcut

At Monday, October 25, 2004 10:14 PM, Thomas Wolff wrote:
 * setup does not remember the user preferences about the final two
   questions; it especially annoys me that I have to click off
   the option to create a desktop icon every time


RE: setup.exe sizes

2004-10-27 Thread Sergey Okhapkin
I wonder if most of people have any knoweladge about setup command line
arguments, I believe in most  cases setup is being started directly from
cygwin web page.

It's the most important rule of any GUI program design - all settings
must be available in GUI.

On Wed, 2004-10-27 at 08:07, Buchbinder, Barry (NIH/NIAID) wrote:
 There are command line options to avoid this; see
 http://sources.redhat.com/ml/cygwin-apps/2003-03/msg00526.html
-n --no-shortcuts   Disable creation of desktop and start
-N --no-startmenu   Disable creation of start menu shortcut
-d --no-desktop Disable creation of desktop shortcut
 
 At Monday, October 25, 2004 10:14 PM, Thomas Wolff wrote:
  * setup does not remember the user preferences about the final two
questions; it especially annoys me that I have to click off
the option to create a desktop icon every time
 



RE: setup.exe sizes

2004-10-27 Thread Buchbinder, Barry (NIH/NIAID)
At Wednesday, October 27, 2004 8:34 AM, Sergey Okhapkin wrote:
 I wonder if most of people have any knowledge about setup command
 line arguments, I believe in most  cases setup is being started
 directly from cygwin web page.
 
 It's the most important rule of any GUI program design - all settings
 must be available in GUI.

I would say that they are available in the GUI, but not with an option to be
remembered.  I have
  c:\cygwin\arc\setup.exe -R c:\cygwin -s ftp://mirrors.rcn.net -n -q
in my startup folder to keep me up-to-date without any manual intervention.
If Mr. Wolff uses the command-line options form a short-cut, he will
eliminate the annoyance in question.

 On Wed, 2004-10-27 at 08:07, Buchbinder, Barry (NIH/NIAID) wrote:
 There are command line options to avoid this; see
 http://sources.redhat.com/ml/cygwin-apps/2003-03/msg00526.html
-n --no-shortcuts   Disable creation of desktop and start
-N --no-startmenu   Disable creation of start menu shortcut
-d --no-desktop Disable creation of desktop shortcut
 
 At Monday, October 25, 2004 10:14 PM, Thomas Wolff wrote:
 * setup does not remember the user preferences about the final two
   questions; it especially annoys me that I have to click off
   the option to create a desktop icon every time


Re: setup.exe sizes

2004-10-27 Thread Reini Urban
Buchbinder, Barry (NIH/NIAID) schrieb:
At Wednesday, October 27, 2004 8:34 AM, Sergey Okhapkin wrote:
I wonder if most of people have any knowledge about setup command
line arguments, I believe in most  cases setup is being started
directly from cygwin web page.
It's the most important rule of any GUI program design - all settings
must be available in GUI.
but setup.exe --help should print something to the console, not to 
setup.log :) (we discussed that before)
if it would print something people would be aware of it. the log is not 
so visible.

I would say that they are available in the GUI, but not with an option to be
remembered.  I have
  c:\cygwin\arc\setup.exe -R c:\cygwin -s ftp://mirrors.rcn.net -n -q
in my startup folder to keep me up-to-date without any manual intervention.
If Mr. Wolff uses the command-line options form a short-cut, he will
eliminate the annoyance in question.
But Mr. Wolff complaint is still valid. it should remember the last 
selected options, if no cmdline override is given.
we don't use the registry so far, to store such prefs.
for the last-selected site we use files.
maybe we can use files also for the other prefs.
remembering the initial packageview view_mode might also be useful.
now it always starts with view_mode = views::Category.

At Monday, October 25, 2004 10:14 PM, Thomas Wolff wrote:
* setup does not remember the user preferences about the final two
 questions; it especially annoys me that I have to click off
 the option to create a desktop icon every time
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Igor Pechtchanski
On Wed, 27 Oct 2004, Reini Urban wrote:

 Reini Urban schrieb:
  Dr. Volker Zell schrieb:
Christopher Faylor writes:
I don't see it anywhere.  The closest thing I see is:
libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
  
   That's ok. I don't know what Reini is seeing.
 
  Unfortunately I didn't make a screenshot and did't backup this setup.ini in
  question.
  But it is fixed now indeed.
  Looks like a ini parser problem.

 Ok, I reproduced it and have a screenshot:
 http://xarch.tu-graz.ac.at/publ/cygwin/temp/setup-libopenldap-2-15-2.png
 This is with my setup fixes, which substr's the version at 45.
 [snip]

This raises another interesting feature request -- internationalizing
setup's messages and dialogs.  Same way that the Back, Next, and
Cancel buttons are translated into German...  We could have a translate
Cygwin setup into your language effort similar to Google's (though likely
not with the same response rate)...
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Max Bowsher
Igor Pechtchanski wrote:
On Wed, 27 Oct 2004, Reini Urban wrote:
Reini Urban schrieb:
Dr. Volker Zell schrieb:
Christopher Faylor writes:
 I don't see it anywhere.  The closest thing I see is:
 libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
That's ok. I don't know what Reini is seeing.
Unfortunately I didn't make a screenshot and did't backup this setup.ini 
in
question.
But it is fixed now indeed.
Looks like a ini parser problem.
Ok, I reproduced it and have a screenshot:
http://xarch.tu-graz.ac.at/publ/cygwin/temp/setup-libopenldap-2-15-2.png
This is with my setup fixes, which substr's the version at 45.
[snip]
This raises another interesting feature request -- internationalizing
setup's messages and dialogs.  Same way that the Back, Next, and
Cancel buttons are translated into German...  We could have a translate
Cygwin setup into your language effort similar to Google's (though likely
not with the same response rate)...
AFAIK, there are 2 ways to do it.
1. Insist that *every* string in setup ends up in a windows resource.
2. Try to come up with some way to use gettext.
I much prefer having english strings in the source code, rather than 
#defined constants, which is what the windows resource solution requires.

Max.



Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Reini Urban
Igor Pechtchanski schrieb:
On Wed, 27 Oct 2004, Reini Urban wrote:

Reini Urban schrieb:
Dr. Volker Zell schrieb:
Christopher Faylor writes:
I don't see it anywhere.  The closest thing I see is:
libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
That's ok. I don't know what Reini is seeing.
Unfortunately I didn't make a screenshot and did't backup this setup.ini in
question.
But it is fixed now indeed.
Looks like a ini parser problem.
Ok, I reproduced it and have a screenshot:
http://xarch.tu-graz.ac.at/publ/cygwin/temp/setup-libopenldap-2-15-2.png
This is with my setup fixes, which substr's the version at 45.
[snip]
This raises another interesting feature request -- internationalizing
setup's messages and dialogs.  Same way that the Back, Next, and
Cancel buttons are translated into German...  We could have a translate
Cygwin setup into your language effort similar to Google's (though likely
not with the same response rate)...
Well, you do the Russian, I (and maybe Gerrit and Corinna) the German 
translation.
Using gettext would be fine but we must link everything statically, and
I doubt that is worth the effort to put the mo's into the exe as some 
data ressource, dump it at start to some dirs and use it then. Can 
gettext() use internals ressources? Can it use some kind of 
MapViewOfFile handle, which points some some location inside the exe?
If not the MS solution is by far better.

But what concerns me really is the download size. 270kb is fine, but now 
with 800kb I'm concerned. xemacs also uses our setup.exe.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Max Bowsher
Reini Urban wrote:
Using gettext would be fine but we must link everything statically, and
I doubt that is worth the effort to put the mo's into the exe as some
data ressource, dump it at start to some dirs and use it then. Can
gettext() use internals ressources? Can it use some kind of
MapViewOfFile handle, which points some some location inside the exe?
If not the MS solution is by far better.
But what concerns me really is the download size. 270kb is fine, but now
with 800kb I'm concerned.
An argument for demand-downloaded .mo files, then?
xemacs also uses our setup.exe.
That version forked some time ago, AFAIK.
Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Reini Urban
Max Bowsher schrieb:
Reini Urban wrote:
Using gettext would be fine but we must link everything statically, and
I doubt that is worth the effort to put the mo's into the exe as some
data ressource, dump it at start to some dirs and use it then. Can
gettext() use internals ressources? Can it use some kind of
MapViewOfFile handle, which points some some location inside the exe?
If not the MS solution is by far better.
But what concerns me really is the download size. 270kb is fine, but now
with 800kb I'm concerned.
An argument for demand-downloaded .mo files, then?
An argument for simply adding the translations to res.rc as localized 
STRINGTABLES. That doesn't extract the strings from the source code 
automatically, but most of our strings are in the rc anyway.

xemacs also uses our setup.exe.
That version forked some time ago, AFAIK.
Ah, I'll have a look, what they improved.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Max Bowsher
Reini Urban wrote:
Max Bowsher schrieb:
Reini Urban wrote:
Using gettext would be fine but we must link everything statically, and
I doubt that is worth the effort to put the mo's into the exe as some
data ressource, dump it at start to some dirs and use it then. Can
gettext() use internals ressources? Can it use some kind of
MapViewOfFile handle, which points some some location inside the exe?
If not the MS solution is by far better.
But what concerns me really is the download size. 270kb is fine, but now
with 800kb I'm concerned.
An argument for demand-downloaded .mo files, then?
An argument for simply adding the translations to res.rc as localized
STRINGTABLES. That doesn't extract the strings from the source code
automatically, but most of our strings are in the rc anyway.
I'm not so sure that most is accurate.
Also, I've been planning to get rid of the string tables and start putting 
the strings back into the code, to make the code more readable. I really 
dislike this #defined constant scheme we partially have now. Practically the 
entirety of setup recompiles just because you add a new string!

Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Reini Urban
Max Bowsher schrieb:
Reini Urban wrote:
Max Bowsher schrieb:
Reini Urban wrote:
Using gettext would be fine but we must link everything statically, and
I doubt that is worth the effort to put the mo's into the exe as some
data ressource, dump it at start to some dirs and use it then. Can
gettext() use internals ressources? Can it use some kind of
MapViewOfFile handle, which points some some location inside the exe?
If not the MS solution is by far better.
But what concerns me really is the download size. 270kb is fine, but 
now
with 800kb I'm concerned.
An argument for demand-downloaded .mo files, then?
An argument for simply adding the translations to res.rc as localized
STRINGTABLES. That doesn't extract the strings from the source code
automatically, but most of our strings are in the rc anyway.
I'm not so sure that most is accurate.
Also, I've been planning to get rid of the string tables and start 
putting the strings back into the code, to make the code more readable. 
I really dislike this #defined constant scheme we partially have now. 
Practically the entirety of setup recompiles just because you add a new 
string!
Yes, this is a huge problem. Hmm.
But I want first only think about the new missing feature (Replaces:) 
for coreutils (which replaces 3 other packages) and bugs
(iniparser? overlong strings and columns, proper resizing), and later 
about adding new stuff, like i18n support, mingw-bzip2 integration, tty 
detection (--help  stdout), or the persistent prefs.

But before that I have to hunt down a suspected bug in cygserver.
While I'm writing this, the latest postgresql always fails with more 
than two concurrent connections. Last month it took up to 50.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Max Bowsher
Reini Urban wrote:
But I want first only think about ... mingw-bzip2 integration
I've done some work on this, but currently given up for the moment, contact 
me for a status update before speding time on this one.

Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Reini Urban
Max Bowsher schrieb:
Reini Urban wrote:
But I want first only think about ... mingw-bzip2 integration
I've done some work on this, but currently given up for the moment, 
contact me for a status update before speding time on this one.
:) This is really the tiniest problem of all. I will spend no second on 
that. Thanks for letting me know. :)

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


RE: setup.exe sizes openldap-2-2-15

2004-10-27 Thread Gary R. Van Sickle
[snip]
  An argument for demand-downloaded .mo files, then?
 
 An argument for simply adding the translations to res.rc as 
 localized STRINGTABLES.

   MESSAGETABLES

Then you can use FormatMessage() and things are much less brain-bamaging.

-- 
Gary R. Van Sickle
 



Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Max Bowsher
Reini Urban wrote:
Attached is my ugly patch to make the dialogs larger by 200, to limit
the package version string to max 45 chars and to limit the max package
column width to 500 pixel (better than nothing). My calculation if the
max column width from the parent window was too fragile. Maybe someone
wants to try.
If you want to apply this patch you probably need an assignment.
Setup doesn't require assignments. (I think, because there is no Red Hat 
closed source buy-out licence).

Max.


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Christopher Faylor
On Tue, Oct 26, 2004 at 10:04:54AM +0100, Max Bowsher wrote:
Reini Urban wrote:
Attached is my ugly patch to make the dialogs larger by 200, to limit
the package version string to max 45 chars and to limit the max package
column width to 500 pixel (better than nothing).  My calculation if the
max column width from the parent window was too fragile.  Maybe someone
wants to try.

If you want to apply this patch you probably need an assignment.

Setup doesn't require assignments.  (I think, because there is no Red
Hat closed source buy-out licence).

Actually, it's because...  hh...  I never mentioned the
existence of setup to anyone who'd take notice within Red Hat...

cgf


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Dr. Volker Zell
 Reini Urban writes:

 But nevertheless since we have now just another broken package version
 string - openldap-2-2-15 - which makes the Current header exceed the
 window width, I've made some tiny changes to limit this width to the
 max window size.

It shouldn't be in there anymore. And if it is, please remove it.

Ciao
  Volker



Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Christopher Faylor
On Tue, Oct 26, 2004 at 06:00:05PM +0200, Dr. Volker Zell wrote:
 Reini Urban writes:
But nevertheless since we have now just another broken package version
string - openldap-2-2-15 - which makes the Current header exceed the
window width, I've made some tiny changes to limit this width to the
max window size.

It shouldn't be in there anymore.  And if it is, please remove it.

I don't see it anywhere.  The closest thing I see is:

libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2

cgf


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Dr. Volker Zell
 Christopher Faylor writes:

 I don't see it anywhere.  The closest thing I see is:

 libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2

That's ok. I don't know what Reini is seeing.

 cgf

Ciao
  Volker



Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Reini Urban
Dr. Volker Zell schrieb:
Christopher Faylor writes:
 I don't see it anywhere.  The closest thing I see is:
 libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
That's ok. I don't know what Reini is seeing.
Unfortunately I didn't make a screenshot and did't backup this setup.ini 
in question.
But it is fixed now indeed.
Looks like a ini parser problem.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes

2004-10-26 Thread Thomas Wolff
 I started to beautify setup.exe, because I don't want to resize it 
 everytime manually.

As you are working on setup.exe, could you please consider to fix 
the following two small but annoying bugs?

* setup remembers web access settings (e.g. which proxy to use) but it 
  forgets the proxy port number (which is different from 80 here) and 
  resets it to 80 every time

* setup does not remember the user preferences about the final two 
  questions; it especially annoys me that I have to click off 
  the option to create a desktop icon every time

Thanks a lot and kind regards,
Thomas Wolff


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Reini Urban
Reini Urban schrieb:
Attached is my ugly patch to make the dialogs larger by 200, to limit 
the package version string to max 45 chars and to limit the max package 
column width to 500 pixel (better than nothing). My calculation if the 
max column width from the parent window was too fragile. Maybe someone 
wants to try.
Well, sorry. This patch is not very good. It forbids to resize to 
smaller then the initial size. I'll make a better one.

And I'm testing some new setup.ini options which Robert initially 
implemented but obviously got stuck somewhere:

Recommends Replaces Depends Pre-Depends Build-Depends
Conflicts Suggests Provides
Maintainer Architecture Source Binary Standards-Version
Priority Files Directory
Esp. Replaces: sh-utils fileutils textutils would be needed for 
coreutils. And it doesn't require additional user-input.


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Brian Dessent
Reini Urban wrote:

 Esp. Replaces: sh-utils fileutils textutils would be needed for
 coreutils. And it doesn't require additional user-input.

It's not strictly necessary.  There's already the _ZZZRemovedPackages
thing where you can stick dummy empty packages of things that have gone
away.

Brian


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Reini Urban
Brian Dessent schrieb:
Reini Urban wrote:
Esp. Replaces: sh-utils fileutils textutils would be needed for
coreutils. And it doesn't require additional user-input.
It's not strictly necessary.  There's already the _ZZZRemovedPackages
thing where you can stick dummy empty packages of things that have gone
away.
Sure, but this is ugly, and Robert has already written most of the 
Replaces: codepath and much more.
My upset patch for this is on the way (well, I attach it), and the 
setup.exe needs further testing.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
? mksetup
? upset.patch
Index: upset
===
RCS file: /cvs/sourceware/infra/bin/cygwin/upset,v
retrieving revision 1.25
diff -u -b -r1.25 upset
--- upset   19 Sep 2003 17:18:42 -  1.25
+++ upset   27 Oct 2004 01:57:10 -
@@ -26,8 +26,15 @@
 my $package = new Cygwin::Setup;
 
 $. = 0;
-if ($u  open(U, $u)) {
+if ($u  open(U, '', $u)) {
 $initfn = $u;
+if ($u =~ /.bz2$/) {
+  $initfn =~ s/\.bz2$//;
+  if (system bunzip2 $u) {
+   $u = $initfn;
+   open(U, '', $u);
+  }
+}
 while ($package-iniparse ($u, \*U)) {
next;
 }
@@ -100,15 +107,25 @@
 } else {
print category: , 'Misc', \n;
 }
-if ($pkgbase-{'requires'}) {
-   foreach my $r (split(' ', $pkgbase-{'requires'})) {
+# keys which take multiple packages (only partial setup.exe support yet)
+foreach my $key (@Cygwin::Setup::pkgkeys) {
+  if ($pkgbase-{$key}) {
+   foreach my $r (split(' ', $pkgbase-{$key})) {
if (!defined($package-{$r})) {
-   warn upset: *** warning package $p requires non-existent package 
$r\n;
+   warn upset: *** warning package $p $key non-existent package $r\n;
+   }
+   }
+   print $key, : , $pkgbase-{$key}, \n;
+   delete $pkgbase-{$key};
+  }
+}
+# other new keys
+foreach my $key (@Cygwin::Setup::otherkeys) {
+  if ($pkgbase-{$key}) {
+   print $key, : , $pkgbase-{$key}, \n;
+   delete $pkgbase-{$key};
}
}
-   print requires: , $pkgbase-{'requires'}, \n;
-   delete $pkgbase-{'requires'};
-};
 for my $g ('', 'prev', 'test') {
my $ver = $pkg-{$g} or next;
print [$g]\n if length($g);
@@ -148,6 +165,8 @@
 
 if ($u) {
 my $changed = 0;
+die Couldnt open $u unless $initfn;
+close(U);
 open(STDOUT, /dev/null);
 system  qw/diff -I^setup-timestamp -w -B -q/, $initfn, $newfn and do {
system 'mv', $newfn, $initfn;
Index: Cygwin/Setup.pm
===
RCS file: /cvs/sourceware/infra/bin/cygwin/Cygwin/Setup.pm,v
retrieving revision 1.13
diff -u -b -r1.13 Setup.pm
--- Cygwin/Setup.pm 1 Mar 2003 05:21:34 -   1.13
+++ Cygwin/Setup.pm 27 Oct 2004 01:57:11 -
@@ -8,7 +8,15 @@
 BEGIN {
 $Cygwin::Setup::stringkeys = qr!^(?:sdesc|ldesc)$!io;
 $Cygwin::Setup::validstates = qr!^(?:curr|test|prev|exp)!;
-$Cygwin::Setup::replacekeys = 
qr!^(?:sdesc|ldesc|category|requires|skip|verpat|external-source)$!io;
+@Cygwin::Setup::pkgkeys = 0 ? qw(requires Recommends Replaces Depends Pre-Depends 
Build-Depends
+Conflicts Suggests Provides)
+: qw(requires);
+@Cygwin::Setup::otherkeys = 0 ? qw(Maintainer Architecture Source Binary 
Standards-Version
+  Priority Files Directory)
+: ();
+@Cygwin::Setup::replacekeys = qw( sdesc ldesc category requires skip verpat 
external-source );
+push(@Cygwin::Setup::replacekeys, (@Cygwin::Setup::pkgkeys, 
@Cygwin::Setup::otherkeys));
+$Cygwin::Setup::replacekeys = qr!^(?:@{[join('|' = 
@Cygwin::Setup::replacekeys)]})$!io;
 $Cygwin::Setup::skipkeys = qr!^(?:version|install|source)$!io;
 $Cygwin::Setup::validinikeys = qr!^(?:setup-timestamp|setup-version)$!io;
 }


Re: setup.exe sizes openldap-2-2-15

2004-10-26 Thread Reini Urban
Reini Urban schrieb:
Dr. Volker Zell schrieb:
Christopher Faylor writes:
 I don't see it anywhere.  The closest thing I see is:
 libopenldap2_2_7/libopenldap2_2_7-2.2.17-1.tar.bz2
That's ok. I don't know what Reini is seeing.
Unfortunately I didn't make a screenshot and did't backup this setup.ini 
in question.
But it is fixed now indeed.
Looks like a ini parser problem.
Ok, I reproduced it and have a screenshot:
http://xarch.tu-graz.ac.at/publ/cygwin/temp/setup-libopenldap-2-15-2.png
This is with my setup fixes, which substr's the version at 45.
I'll debug the setup.ini in question to find out why it looped.
Another size problem:
With the configure instructions from the website setup.exe is 9.8MB, 
stripped 808960 byte compared to the currently small 268800byte.
Is that my fault or does you, Max, also have such a size increase?

At the end of the new exe there are all the string ressources in utf-16, 
which I cannot detect in the current setup.exe. but from 270 = 810?
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


Re: setup.exe sizes

2004-10-25 Thread Max Bowsher
Reini Urban wrote:
I started to beautify setup.exe, because I don't want to resize it
everytime manually.
* Is it ok to assume a new size 517, 379 instead of 317, 179?
(simply add 200)
Unfortunately most of the rc entries are hardcoded and are not
calculated at init. I'd prefer to calc them at init and place the
ressources then relatively from left, up, right and bottom, but this
looks like a lot of work.
I've read that 640x480 screensize should be default and the upper limit.
If setup is still usable on a 640x480 screen after your modifications, then 
I'll be glad to commit them.

* PickView::init_headers()
Better initial propsheet Current headers.width, which is awfully
incorrect. There's still some major miscalculation.
Have to step through PickView::init_headers()
Are you asking a question? Reporting a bug? Saying you might have a patch 
later?

Max.


Re: setup.exe sizes

2004-10-25 Thread Reini Urban
Max Bowsher schrieb:
Reini Urban wrote:
I started to beautify setup.exe, because I don't want to resize it
everytime manually.
* Is it ok to assume a new size 517, 379 instead of 317, 179?
(simply add 200)
Unfortunately most of the rc entries are hardcoded and are not
calculated at init. I'd prefer to calc them at init and place the
ressources then relatively from left, up, right and bottom, but this
looks like a lot of work.
I've read that 640x480 screensize should be default and the upper limit.
If setup is still usable on a 640x480 screen after your modifications, 
then I'll be glad to commit them.
There are still some aesthetics issues and some technical ones,
then I'll post the patch.
sf.net announced it's change surprisingly fast, so at first I have to 
catch up with my sf.net project.

* PickView::init_headers()
Better initial propsheet Current headers.width, which is awfully
incorrect. There's still some major miscalculation.
Have to step through PickView::init_headers()
Are you asking a question? Reporting a bug? Saying you might have a 
patch later?
All three of them :)
The question is:
Is this assumption correct or is there another hidden mis-calculation 
somewhere. Or some analysis by robert why it's broken now? Or did it 
break with Frank Richter's resizable stuff?
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


RE: setup.exe sizes

2004-10-25 Thread Gary R. Van Sickle
[snip]
 Unfortunately most of the rc entries are hardcoded and are 
 not calculated at init. I'd prefer to calc them at init and 
 place the ressources then relatively from left, up, right and 
 bottom, but this looks like a lot of work.

It is.

-- 
Gary R. Van Sickle
 



Re: setup.exe sizes openldap-2-2-15

2004-10-25 Thread Reini Urban
Gary R. Van Sickle schrieb:
Unfortunately most of the rc entries are hardcoded and are 
not calculated at init. I'd prefer to calc them at init and 
place the ressources then relatively from left, up, right and 
bottom, but this looks like a lot of work.
It is.
Ah, I see. Not much work.
But nevertheless since we have now just another broken package version 
string - openldap-2-2-15 - which makes the Current header exceed the 
window width, I've made some tiny changes to limit this width to the max 
window size.

Shouldn't we also truncate the max package version string length in 
setup to something like 30?
This becomes annoying. Not the first time.


openldap-2-2-15 has a broken setup.hint!

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


RE: setup.exe sizes openldap-2-2-15

2004-10-25 Thread Gary R. Van Sickle
 Gary R. Van Sickle schrieb:
 Unfortunately most of the rc entries are hardcoded and are not 
 calculated at init. I'd prefer to calc them at init and place the 
 ressources then relatively from left, up, right and bottom, 
 but this 
 looks like a lot of work.
  
  It is.
 
 Ah, I see. Not much work.
 

???

 But nevertheless since we have now just another broken 
 package version string - openldap-2-2-15 - which makes the 
 Current header exceed the window width, I've made some tiny 
 changes to limit this width to the max window size.
 

Makes sense.

 Shouldn't we also truncate the max package version string 
 length in setup to something like 30?

Well, I guess the first step would be ensuring that the version strings
aren't wrong in the first place.  Beyond that, setup should probably:

- Place some sort of sensical limit on column widths.
- Handle strings which exceed the current cell's width by truncating it (as
it does now), and displaying the full text as a mouseover popup (the yellow
box with text things) (which it does not do now).

-- 
Gary R. Van Sickle
 



Re: setup.exe sizes openldap-2-2-15

2004-10-25 Thread Reini Urban
Attached is my ugly patch to make the dialogs larger by 200, to limit 
the package version string to max 45 chars and to limit the max package 
column width to 500 pixel (better than nothing). My calculation if the 
max column width from the parent window was too fragile. Maybe someone 
wants to try.

If you want to apply this patch you probably need an assignment.
So I would prefer naturally that someone who already did this, picks my 
ideas and writes the straightforward features by his own. (That's why I 
wrote ugly. Don't look at it, when you want to do it by yourself.)

Gary R. Van Sickle schrieb:
Gary R. Van Sickle schrieb:
Unfortunately most of the rc entries are hardcoded and are not 
calculated at init. I'd prefer to calc them at init and place the 
ressources then relatively from left, up, right and bottom, 
but this 

looks like a lot of work.
It is.
Ah, I see. Not much work.
???
At first sight it looked dramaticly hacked, but then it suddenly made sense.
But nevertheless since we have now just another broken 
package version string - openldap-2-2-15 - which makes the 
Current header exceed the window width, I've made some tiny 
changes to limit this width to the max window size.
Makes sense.
Shouldn't we also truncate the max package version string 
length in setup to something like 30?
Well, I guess the first step would be ensuring that the version strings
aren't wrong in the first place.  Beyond that, setup should probably:
- Place some sort of sensical limit on column widths.
- Handle strings which exceed the current cell's width by truncating it (as
it does now), and displaying the full text as a mouseover popup (the yellow
box with text things) (which it does not do now).
Something like this is up to you or max.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
ChangeLog

2004-10-26  Reini Urban  [EMAIL PROTECTED]

* res.rc: enlarged windows by 200 x+y: 317, 179 = 517, 379
* PickView.cc (set_headers): max 500 package column width.
* cygpackage.cc (setCanonicalVersion): max 45 chars, against too 
long strings from overflown parser.

--- setup/PickView.cc.orig  2003-10-26 20:38:30.0 +0100
+++ setup/PickView.cc   2004-10-26 03:24:41.792272800 +0100
@@ -122,7 +122,7 @@
 }
   int i;
   for (i = 0; i = last_col; i++)
-DoInsertItem (listheader, i, headers[i].width, (char *) headers[i].text);
+DoInsertItem (listheader, i, min(headers[i].width, 500), (char *) 
headers[i].text);
 }
 
 void
@@ -515,6 +515,7 @@
   SetWindowPos (listheader, wp.hwndInsertAfter, wp.x, wp.y,
 wp.cx, wp.cy, wp.flags | SWP_SHOWWINDOW);
 
+  //header_width = wp.cx;
   header_height = wp.cy;
 
   view_mode = PickView::views::Package;
--- setup/cygpackage.cc.orig2002-07-01 21:58:46.0 +0100
+++ setup/cygpackage.cc 2004-10-26 03:30:55.256242400 +0100
@@ -82,18 +82,22 @@
 void
 cygpackage::setCanonicalVersion (String const version)
 {
+  if (version.size()  45)
+canonical = version.substr(0,45);
+  else
   canonical = version;
   char *start = strchr (canonical.cstr_oneuse(), '-');
-  char*curr=start;
+  char *curr=start;
   if (curr)
 {
   char *next;
-  while ((next = strchr (curr + 1, '-')))
+  int i = 0;
+  while ((next = strchr (curr + 1, '-')) and i++  5)
curr = next;
   /* curr = last - in the version string */
   packagev = curr + 1;
-  char tvendor [version.size() +1];
-  strcpy (tvendor, version.cstr_oneuse());
+  char tvendor [canonical.size() +1];
+  strcpy (tvendor, canonical.cstr_oneuse());
   tvendor[curr - start] = '\0';
   vendor=tvendor;
 }
--- setup/res.rc.orig   2004-08-29 17:59:40.0 +0100
+++ setup/res.rc2004-10-26 01:03:58.994310400 +0100
@@ -34,7 +34,7 @@
 // this topic is at:
 //   http://sources.redhat.com/ml/cygwin-apps/2003-05/msg00177.html
 
-IDD_SOURCE DIALOG DISCARDABLE  0, 0, 317, 179
+IDD_SOURCE DIALOG DISCARDABLE  0, 0, 517, 379
 STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
 CAPTION Cygwin Setup - Choose Installation Type
 FONT 8, MS Shell Dlg
@@ -45,16 +45,16 @@
 BS_AUTORADIOBUTTON | WS_TABSTOP,101,84,115,10
 CONTROL Install from Local Directory,IDC_SOURCE_CWD,Button,
 BS_AUTORADIOBUTTON | WS_TABSTOP,101,99,115,10
-ICONIDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ICONIDI_CYGWIN,IDC_HEADICON,490,0,21,20
 CONTROL ,IDC_HEADSEPARATOR,Static,SS_BLACKFRAME | SS_SUNKEN,0,28,
-317,1
+517,1
 LTEXT   Choose A Download Source,IDC_STATIC_HEADER_TITLE,7,0,
 258,8,NOT WS_GROUP
 LTEXT   Choose whether to install or download from the internet, or 
install from files in a local directory.,
 IDC_STATIC,21,9,239,16,NOT WS_GROUP
 END
 
-IDD_VIRUS DIALOG DISCARDABLE  0, 0, 317, 179
+IDD_VIRUS DIALOG DISCARDABLE  0, 0, 517, 379
 STYLE