From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10671 invoked by alias); 3 Nov 2006 19:52:26 -0000 Received: (qmail 10659 invoked by uid 22791); 3 Nov 2006 19:52:25 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 03 Nov 2006 19:52:17 +0000 Received: from mail.artimi.com ([192.168.1.3]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 19:52:15 +0000 Received: from rainbow ([192.168.1.165]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 19:52:15 +0000 From: "Dave Korn" To: Subject: FW: Install failing and leaving unusable system Date: Fri, 03 Nov 2006 19:52:00 -0000 Message-ID: <020d01c6ff81$8facd310$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-IsSubscribed: yes Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2006-11/txt/msg00017.txt.bz2 On 30 October 2006 11:28, Dave Korn wrote: > How about just providing an extra option on the "choose installation > type" page: "Re-run failed postinstall scripts", that just jumps > immediately to that stage, and thereby cleans up any leftovers? > > ISTM that would provide all the same functionality in one nice neat > package. I'll look at whipping up a patch for consideration. I'm having a hard time figuring out how control flow works in this thing. I defined a new app-private WM: Index: threebar.h =================================================================== RCS file: /cvs/cygwin-apps/setup/threebar.h,v retrieving revision 2.7 diff -p -u -r2.7 threebar.h --- threebar.h 1 Nov 2003 05:58:46 -0000 2.7 +++ threebar.h 3 Nov 2006 15:57:36 -0000 @@ -34,6 +34,7 @@ // desktop.h: WM_APP_UNATTENDED_FINISH WM_APP+8 #define WM_APP_START_POSTINSTALL WM_APP+9 #define WM_APP_POSTINSTALL_THREAD_COMPLETE WM_APP+10 +#define WM_APP_JUMP_TO_POSTINSTALL WM_APP+11 class ThreeBarProgressPage:public PropertyPage { and in the OnNext method of the source page, I send it if I want to skip to the postinstall: @@ -115,6 +122,14 @@ SourcePage::OnNext () HWND h = GetHWND (); save_dialog (h); + + if (source == IDC_FAILURE_RECOVERY) + { + MessageBox (h, "HELP!", "FOO", MB_OK); + // We want to go straight on to the postinstall. + Window::PostMessage (WM_APP_JUMP_TO_POSTINSTALL); + } + return 0; } where I've added a clause that I hoped would catch it: Index: threebar.cc =================================================================== RCS file: /cvs/cygwin-apps/setup/threebar.cc,v retrieving revision 2.11 diff -p -u -r2.11 threebar.cc --- threebar.cc 30 Mar 2006 20:30:50 -0000 2.11 +++ threebar.cc 3 Nov 2006 15:57:36 -0000 @@ -201,9 +201,18 @@ ThreeBarProgressPage::OnMessageApp (UINT Window::PostMessage (WM_APP_START_POSTINSTALL); break; } + case WM_APP_JUMP_TO_POSTINSTALL: + { + MessageBox (GetOwner ()->GetHWND (), "SPANG!", "BLORT", MB_OK); + // Install is bypassed and we want to go on to the postinstall. + GetOwner ()->SetActivePageByID (IDD_S_POSTINSTALL); + Window::PostMessage (WM_APP_START_POSTINSTALL); + break; + } case WM_APP_START_POSTINSTALL: { // Start the postinstall script thread. + abort (); do_postinstall (GetInstance (), GetHWND ()); break; } but nothing happens; the message gets sent, but it never arrives and setup.exe just carries straight on to the 'choose install directory' page. I don't do an awful lot of win32/mfc coding, I'm sure I'm just going about it the wrong way, can anyone point me in the right direction please? cheers, DaveK -- Can't think of a witty .sigline today....