|
| 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 | + <BinInstallInclude Include="$(MSBuildProjectDirectory)\bin\*.dll" Exclude="$(MSBuildProjectDirectory)\bin\DotNetNuke*;$(MSBuildProjectDirectory)\bin\Telerik*;$(MSBuildProjectDirectory)\bin\System.*;$(MSBuildProjectDirectory)\bin\Microsoft.*;$(MSBuildProjectDirectory)\bin\Newtonsoft.Json.*" /> |
| 35 | + </ItemGroup> |
| 36 | + |
| 37 | + <ItemGroup> |
| 38 | + <InstallInclude Include="*.dnn" Exclude="**\obj\**;**\_ReSharper*\**;packages\**;*_Symbols.dnn" /> |
| 39 | + <InstallInclude Include="ReleaseNotes.txt;License.txt" /> |
| 40 | + </ItemGroup> |
| 41 | + |
| 42 | + <ItemGroup> |
| 43 | + <SymbolsBinInclude Include="$(MSBuildProjectDirectory)\bin\*.pdb" Exclude="$(MSBuildProjectDirectory)\bin\DotNetNuke*;$(MSBuildProjectDirectory)\bin\Telerik*;$(MSBuildProjectDirectory)\bin\System.*;$(MSBuildProjectDirectory)\bin\Microsoft.*;$(MSBuildProjectDirectory)\bin\Newtonsoft.Json.*" /> |
| 44 | + <SymbolsBinInclude Include="$(MSBuildProjectDirectory)\bin\*.xml" Exclude="$(MSBuildProjectDirectory)\bin\DotNetNuke*;$(MSBuildProjectDirectory)\bin\Telerik*;$(MSBuildProjectDirectory)\bin\System.*;$(MSBuildProjectDirectory)\bin\Microsoft.*;$(MSBuildProjectDirectory)\bin\Newtonsoft.Json.*" /> |
| 45 | + </ItemGroup> |
| 46 | + |
| 47 | + <!-- Install Package --> |
| 48 | + <Copy SourceFiles="@(InstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\Package"/> |
| 49 | + <Copy SourceFiles="@(BinInstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\bin"/> |
| 50 | + |
| 51 | + <CreateItem Include="$(MSBuildProjectDirectory)\ResourcesZip\**\*.*"> |
| 52 | + <Output TaskParameter="Include" ItemName="ResourcesContent" /> |
| 53 | + </CreateItem> |
| 54 | + |
| 55 | + <Zip Files="@(ResourcesContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" /> |
| 56 | + <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="Package\" /> |
| 57 | + |
| 58 | + <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*"> |
| 59 | + <Output TaskParameter="Include" ItemName="OutputContent" /> |
| 60 | + </CreateItem> |
| 61 | + |
| 62 | + <Zip Files="@(OutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" /> |
| 63 | + |
| 64 | + <!-- Copy the Install package to the Packages folder --> |
| 65 | + <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="$(WebsiteInstallPath)" /> |
| 66 | + |
| 67 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\Package" /> |
| 68 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\ResourcesZip\bin" /> |
| 69 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\ResourcesZip" /> |
| 70 | + <Delete Files="$(MSBuildProjectDirectory)\Resources.$(Extension)" /> |
| 71 | + |
| 72 | + <!-- Symbols Package --> |
| 73 | + <Copy SourceFiles="@(SymbolsInclude)" DestinationFolder="$(MSBuildProjectDirectory)\Package"/> |
| 74 | + <Copy SourceFiles="@(SymbolsBinInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\bin"/> |
| 75 | + |
| 76 | + <CreateItem Include="$(MSBuildProjectDirectory)\ResourcesZip\**\*.*"> |
| 77 | + <Output TaskParameter="Include" ItemName="ResourcesContent" /> |
| 78 | + </CreateItem> |
| 79 | + |
| 80 | + <Zip Files="@(ResourcesContent)" WorkingDirectory="$(MSBuildProjectDirectory)\ResourcesZip" ZipFileName="Resources.$(Extension)" /> |
| 81 | + <Copy SourceFiles="$(MSBuildProjectDirectory)\Resources.$(Extension)" DestinationFolder="Package\" /> |
| 82 | + |
| 83 | + <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*"> |
| 84 | + <Output TaskParameter="Include" ItemName="OutputSource" /> |
| 85 | + </CreateItem> |
| 86 | + |
| 87 | + <Zip Files="@(OutputSource)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Symbols.$(Extension)" /> |
| 88 | + <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Symbols.$(Extension)" DestinationFolder="$(WebsiteInstallPath)" /> |
| 89 | + |
| 90 | + <!-- Cleanup --> |
| 91 | + <Delete Files="$(MSBuildProjectDirectory)\Resources.$(Extension)" /> |
| 92 | + <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" /> |
| 93 | + <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Symbols.$(Extension)" /> |
| 94 | + |
| 95 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\Package" /> |
| 96 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\ResourcesZip\bin" /> |
| 97 | + <RemoveDir Directories="$(MSBuildProjectDirectory)\ResourcesZip" /> |
| 98 | + |
| 99 | + </Target> |
| 100 | +</Project> |
0 commit comments