Allow to run on Windows lacking CreateSymbolicLinkW()
[cygwin-setup.git] / prereq.h
blob2f4da7da3b16b4ec676febc83ba12f2644b62899
1 #ifndef SETUP_PREREQ_H
2 #define SETUP_PREREQ_H
4 #include <map>
5 #include "proppage.h"
6 #include "PackageTrust.h"
7 #include "package_meta.h"
9 // keeps the map sorted by name
10 struct packagemeta_ltcomp
12 bool operator() ( const packagemeta *m1, const packagemeta *m2 )
13 { return casecompare(m1->name, m2->name) < 0; }
17 class PrereqPage:public PropertyPage
19 public:
20 PrereqPage ();
21 virtual ~PrereqPage () { };
22 bool Create ();
23 virtual void OnInit ();
24 virtual void OnActivate ();
25 virtual long OnNext ();
26 virtual long OnBack ();
27 virtual long OnUnattended ();
30 class PrereqChecker
32 public:
33 // returns true if no dependency problems exist
34 bool isMet ();
36 // formats 'unmet' as a string for display
37 void getUnmetString (std::string &s);
39 // finialize the transaction list
40 void finalize ();
42 void augment ();
44 static void setTestPackages (bool t) { use_test_packages = t; };
46 private:
47 static bool use_test_packages;
48 static SolverTasks q;
51 #endif /* SETUP_PREREQ_H */