1+ <?xml version =" 1.0" encoding =" windows-1252" ?>
2+ <!--
3+ The MIT License (MIT)
4+ Copyright (c) 2019 Upendo Ventures, LLC
5+
6+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
7+ software and associated documentation files (the "Software"), to deal in the Software
8+ without restriction, including without limitation the rights to use, copy, modify,
9+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10+ permit persons to whom the Software is furnished to do so, subject to the following
11+ conditions:
12+
13+ The above copyright notice and this permission notice shall be included in all copies
14+ or substantial portions of the Software.
15+
16+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
17+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
18+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
20+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
21+ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+ -->
23+ <Project ToolsVersion =" 3.5" DefaultTargets =" Build" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
24+ <Import Project =" MSBuild.Community.Tasks.Targets" />
25+ <Target Name =" PackageModule" Condition =" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " >
26+ <XmlRead Prefix =" n"
27+ Namespace =" http://schemas.microsoft.com/developer/msbuild/2003"
28+ XPath =" dotnetnuke/packages/package[1]/@version"
29+ XmlFileName =" $(DNNFileName).dnn" >
30+ <Output TaskParameter =" Value" PropertyName =" Version" />
31+ </XmlRead >
32+
33+ <ItemGroup >
34+ <InstallInclude Include =" *.dnn" Exclude =" **\obj\**;**\_ReSharper*\**;packages\**;*_Symbols.dnn" />
35+ <InstallInclude Include =" ReleaseNotes.txt;License.txt" />
36+ </ItemGroup >
37+
38+ <ItemGroup >
39+ <SymbolsBinInclude Include =" $(MSBuildProjectDirectory)\bin\*.pdb" />
40+ <SymbolsBinInclude Include =" $(MSBuildProjectDirectory)\bin\*.xml" />
41+ </ItemGroup >
42+
43+ <!-- Install Package -->
44+ <Copy SourceFiles =" @(InstallInclude)" DestinationFolder =" $(MSBuildProjectDirectory)\Package" />
45+ <Copy SourceFiles =" @(BinInstallInclude)" DestinationFolder =" $(MSBuildProjectDirectory)\ResourcesZip\bin" />
46+
47+ <CreateItem Include =" $(MSBuildProjectDirectory)\ResourcesZip\**\*.*" >
48+ <Output TaskParameter =" Include" ItemName =" ResourcesContent" />
49+ </CreateItem >
50+
51+ <Zip Files =" @(ResourcesContent)" WorkingDirectory =" $(MSBuildProjectDirectory)\ResourcesZip" ZipFileName =" Resources.$(Extension)" />
52+ <Copy SourceFiles =" $(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder =" Package\" />
53+
54+ <CreateItem Include =" $(MSBuildProjectDirectory)\Package\**\*.*" >
55+ <Output TaskParameter =" Include" ItemName =" OutputContent" />
56+ </CreateItem >
57+
58+ <Zip Files =" @(OutputContent)" WorkingDirectory =" $(MSBuildProjectDirectory)\Package" ZipFileName =" $(PackageName)_$(Version)_Install.$(Extension)" />
59+
60+ <!-- Copy the Install package to the Packages folder -->
61+ <Copy SourceFiles =" $(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder =" $(WebsiteInstallPath)" />
62+
63+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\Package" />
64+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\ResourcesZip\bin" />
65+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\ResourcesZip" />
66+ <Delete Files =" $(MSBuildProjectDirectory)\Resources.$(Extension)" />
67+
68+ <!-- Symbols Package -->
69+ <Copy SourceFiles =" @(SymbolsInclude)" DestinationFolder =" $(MSBuildProjectDirectory)\Package" />
70+ <Copy SourceFiles =" @(SymbolsBinInclude)" DestinationFolder =" $(MSBuildProjectDirectory)\ResourcesZip\bin" />
71+
72+ <CreateItem Include =" $(MSBuildProjectDirectory)\ResourcesZip\**\*.*" >
73+ <Output TaskParameter =" Include" ItemName =" ResourcesContent" />
74+ </CreateItem >
75+
76+ <Zip Files =" @(ResourcesContent)" WorkingDirectory =" $(MSBuildProjectDirectory)\ResourcesZip" ZipFileName =" Resources.$(Extension)" />
77+ <Copy SourceFiles =" $(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder =" Package\" />
78+
79+ <CreateItem Include =" $(MSBuildProjectDirectory)\Package\**\*.*" >
80+ <Output TaskParameter =" Include" ItemName =" OutputSource" />
81+ </CreateItem >
82+
83+ <Zip Files =" @(OutputSource)" WorkingDirectory =" $(MSBuildProjectDirectory)\Package" ZipFileName =" $(PackageName)_$(Version)_Symbols.$(Extension)" />
84+ <Copy SourceFiles =" $(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Symbols.$(Extension)" DestinationFolder =" $(WebsiteInstallPath)" />
85+
86+ <!-- Cleanup -->
87+ <Delete Files =" $(MSBuildProjectDirectory)\Resources.$(Extension)" />
88+ <Delete Files =" $(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" />
89+ <Delete Files =" $(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Symbols.$(Extension)" />
90+
91+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\Package" />
92+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\ResourcesZip\bin" />
93+ <RemoveDir Directories =" $(MSBuildProjectDirectory)\ResourcesZip" />
94+
95+ </Target >
96+ </Project >
0 commit comments