-
Notifications
You must be signed in to change notification settings - Fork 0
/
DNNSkin.targets
163 lines (141 loc) · 9.51 KB
/
DNNSkin.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- PLEASE NOTE THAT CHANGES TO THIS FILE WILL NOT TAKE AFFECT UNTIL YOU UNLOAD AND RELOAD YOUR PROJECT! -->
<PropertyGroup>
<CompanyName>AARSYS</CompanyName>
<SkinName>MetroPackage</SkinName>
<DotNetNukeDir>D:\InetPub\DNN920</DotNetNukeDir>
<RootDir>$(MSBuildProjectDirectory)\..</RootDir>
<DeployDir>$(RootDir)\_default\deploy</DeployDir>
<InstallDir>$(MSBuildProjectDirectory)\installation</InstallDir>
<MSBuildDir>$(RootDir)\_default\lib\msbuild</MSBuildDir>
<BackupDotNetNukeDir>$(DotNetNukeDir)</BackupDotNetNukeDir>
</PropertyGroup>
<ItemGroup>
<deployTargetFile Include="$(MSBuildProjectDirectory)\DNNSkin.targets" />
<dnnFile Include="$(MSBuildProjectDirectory)\AarsysMetro_*.dnn.resources" />
</ItemGroup>
<ItemGroup>
<!--<InstallInclude Include="" Exclude="" /> -->
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\Banner\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\DNNMetro\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\DNNMetro\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7\js\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\Banner\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\DNNMetro\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\DNNMetro\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Green\js\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\Banner\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\DNNMetro\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\DNNMetro\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Orange\js\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\Banner\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\DNNMetro\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\DNNMetro\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\images\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Skins\Metro7_Red\js\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Containers\Metro7\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Containers\Metro7_Green\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Containers\Metro7_Orange\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\Containers\Metro7_Red\*.*" />
<InstallInclude Include="$(MSBuildProjectDirectory)\*.dnn7" Exclude="" />
<InstallInclude Include="$(MSBuildProjectDirectory)\version.txt" Exclude="" />
<InstallInclude Include="$(MSBuildProjectDirectory)\*.html" Exclude="" />
</ItemGroup>
<ItemGroup>
<SourceInclude Include="$(MSBuildProjectDirectory)\*_*.dnn.resources" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\*.targets" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\*.vbproj" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\*.sln" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\*.vssscc" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\*.vspscc" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\Lib\*.*" Exclude="" />
<SourceInclude Include="$(MSBuildProjectDirectory)\Lib\MSBuild\*.*" Exclude="" />
</ItemGroup>
<!-- Import to use Common Targets\Tasks -->
<Import Project="$(MSBuildDir)\MSBuild.Community.Tasks.Targets"/>
<Target Name="Build">
<CallTarget Targets="BeforeBuild" />
<!-- Don't build anything -->
<CallTarget Targets="AfterBuild" />
</Target>
<Target Name="BeforeBuild">
<CallTarget Targets="SetVersionInfo" />
</Target>
<Target Name="AfterBuild">
<CallTarget Targets="DeployFiles" />
</Target>
<Target Name="SetVersionInfo">
<!-- Obtain Version information from version.txt -->
<Version BuildType="None" RevisionType="BuildIncrement" VersionFile="$(MSBuildProjectDirectory)\version.txt" StartDate="4/1/2009">
<Output TaskParameter="Major" PropertyName="Major" />
<Output TaskParameter="Minor" PropertyName="Minor" />
<Output TaskParameter="Build" PropertyName="Build" />
<Output TaskParameter="Revision" PropertyName="Revision" />
</Version>
<!-- DNN requires single digits to be prefixed with a zero -->
<CreateProperty Value="0$(Major)" Condition="$(Major) <= 9" >
<Output TaskParameter="Value" PropertyName="Major" />
</CreateProperty>
<CreateProperty Value="0$(Minor)" Condition="$(Minor) <= 9" >
<Output TaskParameter="Value" PropertyName="Minor" />
</CreateProperty>
<CreateProperty Value="0$(Build)" Condition="$(Build) <= 9" >
<Output TaskParameter="Value" PropertyName="Build" />
</CreateProperty>
<CreateProperty Value="0$(Revision)" Condition="$(Revision) <= 9" >
<Output TaskParameter="Value" PropertyName="Revision" />
</CreateProperty>
<!-- Write new version to assemblyinfo.cs -->
<FileUpdate Files="@(dnnFile)" Regex="<version>.*</version>" ReplacementText="<version>$(Major).$(Minor).$(Build).$(Revision)</version>" />
<FileUpdate Files="@(dnnFile)" Regex=""Skin" version=".*"" ReplacementText=""Skin" version="$(Major).$(Minor).$(Build).$(Revision)"" />
</Target>
<!-- Deploy install package to Install folder -->
<Target Name="DeployFiles">
<MakeDir Directories="$(DeployDir)" />
<CallTarget Targets="ZipFiles" />
<CallTarget Targets="CopyFilesToDotNetNuke" Condition="'$(DotNetNukeDir)'!=''" />
</Target>
<!-- Create Install Package -->
<Target Name="ZipFiles" DependsOnTargets="SetVersionInfo">
<!-- Obtain reference to installation files -->
<Copy SourceFiles="AarsysMetro_install.dnn.resources" DestinationFiles="$(MSBuildProjectDirectory)\AarsysMetro.dnn7" />
<CreateItem Include="@(InstallInclude);">
<Output TaskParameter="Include" ItemName="InstallZipFiles" />
</CreateItem>
<!-- Zip installation files -->
<Zip Files="@(InstallZipFiles)" WorkingDirectory="$(MSBuildProjectDirectory)\" ZipFileName="$(DeployDir)\$(CompanyName).$(SkinName).install.v$(Major).$(Minor).$(Build).$(Revision).zip" />
<!-- Create exclude file list -->
<CreateItem Include="**\*.template;**\*.template.resources;**\*.vssscc;**\*.vbproj.vspscc;**\.svn\**;**\obj\**;**\bin\**;**\*.user;**\*.suo;**\*.zip;**\installation\**;**\_ReSharper.AarsysMetro\**;**\_ReSharper.AarsysMetro2008\**;**\_ReSharper.AarsysMetro2010\**;**\cache\**;**\EventQueue\**;**\Logs\**;**\MergedTemplate\**;**\Smileys\**;**\Templates\**;**Users\**;aarsysMetro.5.1.ReSharper.user;*.resx;*.tmp;*.temp;*.css;subhost.*;**\Containers\_*\**;**\Containers\dark*\**;**\Skins\_*\**;**\Skins\dark*\**;">
<Output TaskParameter="Include" ItemName="DefaultExclude" />
</CreateItem>
<!-- Obtain reference to source files -->
<!-- Create Source Package -->
<Copy SourceFiles="AarsysMetro_source.dnn.resources" DestinationFiles="$(MSBuildProjectDirectory)\AarsysMetro.dnn7" />
<CreateItem Include="@(SourceInclude);@(InstallInclude);" Exclude="@(DefaultExclude);">
<Output TaskParameter="Include" ItemName="SourceZipFiles"/>
</CreateItem>
<!-- Reset DNN Dir for distribution code -->
<FileUpdate Files="@(deployTargetFile)" Regex="<DotNetNukeDir>.*</DotNetNukeDir>" ReplacementText="<DotNetNukeDir></DotNetNukeDir>" />
<Zip Files="@(SourceZipFiles)" WorkingDirectory="$(MSBuildProjectDirectory)" ZipFileName="$(DeployDir)\$(CompanyName).$(SkinName).source.v$(Major).$(Minor).$(Build).$(Revision).zip" />
<!-- Reset DNN Dir to its original value -->
<FileUpdate Files="@(deployTargetFile)" Regex="<DotNetNukeDir>.*</DotNetNukeDir>" ReplacementText="<DotNetNukeDir>$(DotNetNukeDir)</DotNetNukeDir>" />
<!-- Change hardcoded path for msbuild (needed for initial setup) to relative one -->
<FileUpdate Files="@(deployTargetFile)" Regex="<MSBuildDir>.*</MSBuildDir>" ReplacementText="<MSBuildDir>%24(RootDir)\_default\lib\msbuild</MSBuildDir>" />
</Target>
<Target Name="CopyFilesToDotNetNuke">
<!-- Obtain reference to installation files -->
<CreateItem Include="$(DeployDir)\$(CompanyName).$(SkinName).install.v$(Major).$(Minor).$(Build).$(Revision).zip">
<Output TaskParameter="Include" ItemName="InstallZip" />
</CreateItem>
<!-- Copy Files to DotNetNuke Installation -->
<Copy SourceFiles="@(InstallZip)" DestinationFolder="$(DotNetNukeDir)\Install\skin\" SkipUnchangedFiles="false" ContinueOnError="true" />
</Target>
</Project>