]> cygwin.com Git - cygwin-apps/setup.git/blame - postinstall.cc
2002-05-19 Robert Collins <rbtcollins@hotmail.com>
[cygwin-apps/setup.git] / postinstall.cc
CommitLineData
f57c332f 1/*
31324d15 2 * Copyright (c) 2000, 2001 Red Hat, Inc.
f57c332f
DD
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by DJ Delorie <dj@cygnus.com>
13 *
14 */
15
16/* The purpose of this file is to run all the post-install scripts
17 in their various forms. */
18
b24c88b3
RC
19#if 0
20static const char *cvsid =
21 "\n%%% $Id$\n";
22#endif
8507f105 23
f57c332f
DD
24#include "dialog.h"
25#include "find.h"
a351e48c 26#include "mount.h"
8e9aa511 27#include "script.h"
b401ef47 28#include "FindVisitor.h"
f57c332f 29
b401ef47 30class RunFindVisitor : public FindVisitor
f57c332f 31{
b401ef47
RC
32public:
33 RunFindVisitor (){}
34 virtual void visitFile(String const &basePath, const WIN32_FIND_DATA *theFile)
35 {
36 run_script ("/etc/postinstall/", theFile->cFileName);
37 }
38 virtual ~ RunFindVisitor () {}
39protected:
40 RunFindVisitor (RunFindVisitor const &);
41 RunFindVisitor & operator= (RunFindVisitor const &);
42};
43
f57c332f 44void
ab57ceaa 45do_postinstall (HINSTANCE h, HWND owner)
f57c332f
DD
46{
47 next_dialog = 0;
8e9aa511 48 init_run_script ();
3c054baf 49 SetCurrentDirectory (get_root_dir ().cstr_oneuse());
b401ef47
RC
50 RunFindVisitor myVisitor;
51 String postinst = cygpath ("/etc/postinstall");
52 Find (postinst).accept (myVisitor);
f57c332f 53}
This page took 0.036109 seconds and 5 git commands to generate.