This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: setup.exe sizes openldap-2-2-15
- From: Reini Urban <rurban at x-ray dot at>
- To: 'Cygwin Apps' <cygwin-apps at cygwin dot com>
- Date: Tue, 26 Oct 2004 04:46:03 +0200
- Subject: Re: setup.exe sizes openldap-2-2-15
- References: <E1CMGkp-0002LE-00@mailcheck1.inode.at>
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 <rurban@x-ray.at>
* 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.000000000 +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.orig 2002-07-01 21:58:46.000000000 +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.000000000 +0100
+++ setup/res.rc 2004-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
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_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 DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup - Disable Virus Scanner?"
FONT 8, "MS Shell Dlg"
@@ -63,9 +63,9 @@
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,101,69,115,10
CONTROL "&Leave Virus scanner alone",IDC_LEAVE_AV,"Button",
BS_AUTORADIOBUTTON | WS_TABSTOP,101,84,115,10
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Choose whether to disable your virus scanner while installing.",IDC_STATIC_HEADER_TITLE,7,0,
258,8,NOT WS_GROUP
LTEXT "Some Antivirus programs, notably McAfee, cause a blue screen on Windows NT/2000/XP computers during installation of Cygwin.",
@@ -74,7 +74,7 @@
IDC_STATIC,21,32,239,24,NOT WS_GROUP
END
-IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup - Select Local Package Directory"
FONT 8, "MS Shell Dlg"
@@ -82,16 +82,16 @@
EDITTEXT IDC_LOCAL_DIR,58,83,165,15,ES_AUTOHSCROLL | WS_GROUP
PUSHBUTTON "B&rowse...",IDC_LOCAL_DIR_BROWSE,223,83,34,14
GROUPBOX "Local Package Directory",IDC_STATIC,53,67,210,45
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Select a directory where you want Setup to store the installation files it downloads. The directory will be created if it does not already exist.",
IDC_STATIC,21,9,248,16,NOT WS_GROUP
LTEXT "Select Local Package Directory",IDC_STATIC_HEADER_TITLE,
7,0,258,8,NOT WS_GROUP
END
-IDD_ROOT DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_ROOT DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup - Choose Installation Directory"
FONT 8, "MS Shell Dlg"
@@ -109,41 +109,41 @@
WS_GROUP | WS_TABSTOP,170,120,90,8
CONTROL "&Unix",IDC_ROOT_BINARY,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,170,135,90,8
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Select the directory where you want to install Cygwin. Also choose a few installation parameters.",
IDC_STATIC,21,9,239,16,NOT WS_GROUP
LTEXT "Select Root Install Directory",IDC_STATIC_HEADER_TITLE,
7,0,258,8,NOT WS_GROUP
END
-IDD_SITE DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_SITE DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "Cygwin Setup - Choose Download Site(s)"
FONT 8, "MS Shell Dlg"
BEGIN
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
- LISTBOX IDC_URL_LIST,66,45,185,110,LBS_NOINTEGRALHEIGHT |
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
+ LISTBOX IDC_URL_LIST,66,45,385,310,LBS_NOINTEGRALHEIGHT |
LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_GROUP |
WS_TABSTOP
LTEXT "Available Download Sites:",IDC_STATIC,66,34,183,8,NOT
WS_GROUP
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Choose a site from this list, or add your own sites to the list",
IDC_STATIC,21,9,239,16,NOT WS_GROUP
LTEXT "Choose A Download Site",IDC_STATIC_HEADER_TITLE,7,0,258,
8,NOT WS_GROUP
- EDITTEXT IDC_EDIT_USER_URL,65,160,185,14,ES_AUTOHSCROLL |
+ EDITTEXT IDC_EDIT_USER_URL,65,360,385,14,ES_AUTOHSCROLL |
WS_GROUP
- LTEXT "User URL:",IDC_STATIC,15,162,45,8,NOT WS_GROUP
- PUSHBUTTON "Add",IDC_BUTTON_ADD_URL,250,160,50,14
+ LTEXT "User URL:",IDC_STATIC,15,362,45,8,NOT WS_GROUP
+ PUSHBUTTON "Add",IDC_BUTTON_ADD_URL,450,360,50,14
END
-IDD_NET DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_NET DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup - Select Connection Type"
FONT 8, "MS Shell Dlg"
@@ -163,16 +163,16 @@
NOT WS_GROUP
RTEXT "Por&t",IDC_STATIC,85,125,30,12,SS_CENTERIMAGE | NOT
WS_GROUP
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Setup needs to know how you want it to connect to the internet. Choose the appropriate settings below.",
IDC_STATIC,21,9,239,16,NOT WS_GROUP
LTEXT "Select Your Internet Connection",
IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT WS_GROUP
END
-IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_CENTER | WS_CHILD | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Cygwin Setup"
@@ -182,17 +182,17 @@
LTEXT "(PKG)",IDC_INS_PKG,45,70,205,8,NOT WS_GROUP
LTEXT "(FILE)",IDC_INS_FILE,45,85,205,8,NOT WS_GROUP
CONTROL "Progress1",IDC_INS_DISKFULL,"msctls_progress32",
- PBS_SMOOTH | WS_BORDER,95,130,155,10
+ PBS_SMOOTH | WS_BORDER,95,130,355,10
CONTROL "Progress1",IDC_INS_IPROGRESS,"msctls_progress32",
- PBS_SMOOTH | WS_BORDER,95,115,155,10
+ PBS_SMOOTH | WS_BORDER,95,115,355,10
CONTROL "Progress1",IDC_INS_PPROGRESS,"msctls_progress32",
- PBS_SMOOTH | WS_BORDER,95,100,155,10
+ PBS_SMOOTH | WS_BORDER,95,100,355,10
LTEXT "Package:",IDC_INS_BL_PACKAGE,45,100,47,8,NOT WS_GROUP
LTEXT "Total:",IDC_INS_BL_TOTAL,45,115,48,8,NOT WS_GROUP
LTEXT "Disk:",IDC_INS_BL_DISK,45,130,47,8,NOT WS_GROUP
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "This page displays the progress of the download or installation.",
IDC_STATIC,21,9,239,16,NOT WS_GROUP
LTEXT "Progress",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT
@@ -233,7 +233,7 @@
PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
END
-IDD_SPLASH DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_SPLASH DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup"
@@ -252,7 +252,7 @@
IDC_STATIC,115,33,195,54
END
-IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_3DLOOK | DS_CENTER | WS_CHILD | WS_VISIBLE |
WS_CAPTION | WS_SYSMENU
CAPTION "Cygwin Setup - Create Icons"
@@ -262,9 +262,9 @@
BS_AUTOCHECKBOX,108,78,100,8
CONTROL "Add icon to &Start Menu",IDC_ROOT_MENU,"Button",
BS_AUTOCHECKBOX,108,93,100,8
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
LTEXT "Tell setup if you want it to create a few icons for convenient access to the Cygwin environment.",
IDC_STATIC,21,9,239,16,NOT WS_GROUP
LTEXT "Create Icons",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT
@@ -288,7 +288,8 @@
PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
END
-IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 317, 179
+//IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 317, 179
+IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 517, 379
STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Cygwin Setup - Select Packages"
@@ -302,17 +303,17 @@
175,30,25,10
CONTROL "E&xp",IDC_CHOOSE_EXP,"Button",BS_AUTORADIOBUTTON ,
210,30,25,10
- PUSHBUTTON "&View",IDC_CHOOSE_VIEW,245,30,20,10,WS_GROUP
+ PUSHBUTTON "&View",IDC_CHOOSE_VIEW,445,30,20,10,WS_GROUP
CONTROL "",IDC_HEADSEPARATOR,"Static",SS_BLACKFRAME | SS_SUNKEN,0,28,
- 317,1
+ 517,1
CONTROL "",IDC_LISTVIEW_POS,"Static",SS_BLACKFRAME | NOT
- WS_VISIBLE,7,41,303,134
- ICON IDI_CYGWIN,IDC_HEADICON,290,0,21,20
+ WS_VISIBLE,7,41,503,334
+ ICON IDI_CYGWIN,IDC_HEADICON,490,0,21,20
LTEXT "Select the packages you want setup to install.",
IDC_CHOOSE_INST_TEXT,21,9,239,16,NOT WS_GROUP
LTEXT "Select Packages",IDC_STATIC_HEADER_TITLE,7,0,258,8,NOT
WS_GROUP
- LTEXT "",IDC_CHOOSE_VIEWCAPTION,270,30,40,10
+ LTEXT "",IDC_CHOOSE_VIEWCAPTION,470,30,40,10
END
@@ -370,37 +371,37 @@
BEGIN
IDD_SOURCE, DIALOG
BEGIN
- RIGHTMARGIN, 285
- BOTTOMMARGIN, 158
+ RIGHTMARGIN, 485
+ BOTTOMMARGIN, 358
END
IDD_LOCAL_DIR, DIALOG
BEGIN
- RIGHTMARGIN, 305
- BOTTOMMARGIN, 157
+ RIGHTMARGIN, 505
+ BOTTOMMARGIN, 357
END
IDD_ROOT, DIALOG
BEGIN
- RIGHTMARGIN, 285
- BOTTOMMARGIN, 158
+ RIGHTMARGIN, 485
+ BOTTOMMARGIN, 358
END
IDD_SITE, DIALOG
BEGIN
- BOTTOMMARGIN, 178
+ BOTTOMMARGIN, 378
END
IDD_NET, DIALOG
BEGIN
- RIGHTMARGIN, 285
- BOTTOMMARGIN, 133
+ RIGHTMARGIN, 485
+ BOTTOMMARGIN, 333
END
IDD_INSTATUS, DIALOG
BEGIN
- RIGHTMARGIN, 252
- BOTTOMMARGIN, 157
+ RIGHTMARGIN, 452
+ BOTTOMMARGIN, 357
END
IDD_PROXY_AUTH, DIALOG
@@ -415,14 +416,14 @@
IDD_SPLASH, DIALOG
BEGIN
- RIGHTMARGIN, 247
- BOTTOMMARGIN, 116
+ RIGHTMARGIN, 447
+ BOTTOMMARGIN, 316
END
IDD_DESKTOP, DIALOG
BEGIN
- RIGHTMARGIN, 285
- BOTTOMMARGIN, 158
+ RIGHTMARGIN, 485
+ BOTTOMMARGIN, 358
END
IDD_FTP_AUTH, DIALOG
@@ -433,9 +434,9 @@
IDD_CHOOSE, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 310
+ RIGHTMARGIN, 510
TOPMARGIN, 7
- BOTTOMMARGIN, 172
+ BOTTOMMARGIN, 372
END
END
#endif // APSTUDIO_INVOKED