X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstall.h;h=6c81af9e416e8d18ce915f1228918a3e6c4e76ad;hb=835948343817c0e359330f8522dc4b8a0e025224;hp=3c179c6dc71264798bcabef86fd21b13375fece8;hpb=59ac0a44d6edf179c01604c6ced744873213f855;p=builder.git diff --git a/source/install.h b/source/install.h index 3c179c6..6c81af9 100644 --- a/source/install.h +++ b/source/install.h @@ -1,29 +1,34 @@ +/* $Id$ + +This file is part of builder +Copyright © 2006-2010 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + #ifndef INSTALL_H_ #define INSTALL_H_ -#include -#include -#include "action.h" +#include "sourcepackage.h" +#include "filetarget.h" -class Install: public Action +/** +Represents the installation of a file. +*/ +class Install: public FileTarget { -public: - Install(const Msp::Path::Path &, const Msp::Path::Path &); private: - class Worker: public Msp::Thread - { - public: - Worker(Install &i): install(i), done(false) { launch(); } - private: - Install &install; - bool done; + FileTarget &source; - void main(); - }; +public: + Install(Builder &, const SourcePackage &, FileTarget &, const std::string & =std::string()); + virtual const char *get_type() const { return "Install"; } + FileTarget &get_source() const { return source; } + virtual Target *get_real_target(); +private: + virtual void check_rebuild(); + virtual Action *create_action(); - Msp::Path::Path src; - Msp::Path::Path dest; - Worker worker; + static Msp::FS::Path generate_target_path(const FileTarget &i, const std::string &); }; #endif