[tasque/xbuild] [xbuild] Add install target



commit 783f4951e61d6f9eed101400946a7610aad2638a
Author: Antonius Riha <antoniusriha gmail com>
Date:   Tue Sep 18 12:42:15 2012 +0200

    [xbuild] Add install target
    
    All files that are in the InstallFile ItemGroup are being installed. Those
    items also must have the metadata "InstallPath" and "InstallFileName"
    set.
    
    A means to add items to "InstallFile" is provided by  a special hook
    "SetupInstallFile", which can be overridden by any child project for
    that purpose.
    
    Note: The "DestDir" property used in the install destination file path is
    required by automake which likes to prepend a tmp path sometimes.

 build/Tasque.targets |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/build/Tasque.targets b/build/Tasque.targets
index 0645ffa..dac4116 100644
--- a/build/Tasque.targets
+++ b/build/Tasque.targets
@@ -112,6 +112,25 @@
   </Target>
   <Target Name="BeforeTasqueClean" />
   
+  <!-- Install -->
+  <PropertyGroup>
+    <InstallDependsOn>
+      BeforeInstall;
+      SetupInstallFile;
+      CoreInstall;
+      AfterInstall;
+    </InstallDependsOn>
+  </PropertyGroup>
+  <Target Name="Install" DependsOnTargets="$(InstallDependsOn)" />
+  <Target Name="BeforeInstall" />
+  <Target Name="AfterInstall" />
+  <Target Name="CoreInstall">
+    <Copy SourceFiles="@(InstallFile)" DestinationFiles="$(DestDir)%(InstallPath)\%(InstallFileName)" SkipUnchangedFiles="true" />
+  </Target>
+  
+  <!-- Hook for consuming projects to register extra files for install -->
+  <Target Name="SetupInstallFile" />
+  
   <!-- Uninstall -->
   <Target Name="Uninstall" DependsOnTargets="BeforeUninstall;CoreUninstall;AfterUninstall" />
   <Target Name="BeforeUninstall" />



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]