]> git.tdb.fi Git - builder.git/blobdiff - source/copy.h
Redesign how tools are run
[builder.git] / source / copy.h
index 0a03ae6d2c12edb081b338b8820ae97623c81486..d65bb05a0c70e62b87382cea20fb16950b8b5061 100644 (file)
@@ -1,42 +1,22 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef COPY_H_
 #define COPY_H_
 
-#include <msp/core/thread.h>
-#include <msp/path/path.h>
-#include "internalaction.h"
+#include "tool.h"
 
-class Package;
+class InstalledFile;
 
 /**
-Copies a file to another place.  Used by the Install target.
+Copies a file to another place.  Used by the InstalledFile target.
 */
-class Copy: public InternalAction
+class Copy: public Tool
 {
 public:
-       Copy(Builder &, const Package &, const Msp::Path::Path &, const Msp::Path::Path &);
-private:
-       /**
-       A worker thread that actually does the data transfer.
-       */
-       class Worker: public InternalAction::Worker
-       {
-       public:
-               Worker(Copy &);
-       private:
-               Copy &copy;
+       Copy(Builder &);
 
-               void main();
-       };
+       Target *create_target(const std::vector<Target *> &, const std::string &) override;
 
-       Msp::Path::Path src;
-       Msp::Path::Path dest;
+private:
+       static bool _run(const InstalledFile &);
 };
 
 #endif