]> git.tdb.fi Git - builder.git/blobdiff - source/install.h
Split class Package into SourcePackage and BinaryPackage
[builder.git] / source / install.h
index 3c179c6dc71264798bcabef86fd21b13375fece8..672161580c8ee3b2bc67b5ac5d7d8396c3d62f2b 100644 (file)
@@ -1,29 +1,28 @@
+/* $Id$
+
+This file is part of builder
+Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #ifndef INSTALL_H_
 #define INSTALL_H_
 
-#include <msp/core/thread.h>
-#include <msp/path/path.h>
-#include "action.h"
+#include "sourcepackage.h"
+#include "target.h"
 
-class Install: public Action
+/**
+Represents the installation of a file.
+*/
+class Install: public Target
 {
 public:
-       Install(const Msp::Path::Path &, const Msp::Path::Path &);
+       Install(Builder &, const SourcePackage &, Target &);
+       const char *get_type() const { return "Install"; }
+       void       check_rebuild();
+       Action     *build();
 private:
-       class Worker: public Msp::Thread
-       {
-       public:
-               Worker(Install &i): install(i), done(false) { launch(); }
-       private:
-               Install &install;
-               bool done;
-
-               void main();
-       };
-
-       Msp::Path::Path src;
-       Msp::Path::Path dest;
-       Worker worker;
+       std::string generate_target_name(const Target &);
 };
 
 #endif