Include all files in Documents except .cs files

This commit is contained in:
2023-09-12 21:50:49 +02:00
parent 77cee53f2d
commit 80ed90941d
4 changed files with 6 additions and 20 deletions

View File

@ -1,12 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="DocumentTemplateComponents" Directory="ConfigFolderResources">
<Component>
<File Source="$(TargetDir)\paged.polyfill.js" />
</Component>
<Component>
<File Source="$(var.ElwigProjectDir)\Documents\style.css" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View File

@ -23,10 +23,10 @@
-->
<xsl:key
name="FileToRemove"
match="wix:Component[ substring( wix:File/@Source, string-length( wix:File/@Source ) - 6 ) != '.cshtml' ]"
match="wix:Component[ substring( wix:File/@Source, string-length( wix:File/@Source ) - 2 ) = '.cs' ]"
use="@Id"
/>
<!-- Get the last 4 characters of a string using `substring( s, len(s) - 3 )`, it uses -3 and not -4 because XSLT uses 1-based indexes, not 0-based indexes. -->
<!-- Get the last 3 characters of a string using `substring( s, len(s) - 2 )`, it uses -2 and not -3 because XSLT uses 1-based indexes, not 0-based indexes. -->
<!-- By default, copy all elements and nodes into the output... -->
<xsl:template match="@*|node()">

View File

@ -25,14 +25,13 @@
</Task>
</UsingTask>
<Target Name="CustomBeforeBuild" BeforeTargets="BeforeBuild">
<Exec Command="curl -s -L &quot;https://unpkg.com/pagedjs/dist/paged.polyfill.js&quot; -o &quot;$(TargetDir)paged.polyfill.js&quot;" />
<Exec Command="curl -s &quot;http://www.columbia.edu/~em36/PDFtoPrinter.exe&quot; -z &quot;$(TargetDir)PDFtoPrinter.exe&quot; -o &quot;$(TargetDir)PDFtoPrinter.exe&quot;" />
<Exec Command="dotnet publish &quot;$(SolutionDir)Elwig\Elwig.csproj&quot; &quot;/p:PublishProfile=$(SolutionDir)\Elwig\Properties\PublishProfiles\FolderProfile.pubxml&quot;" />
<GetFileVersion AssemblyPath="..\Elwig\bin\Publish\Elwig.exe">
<Output TaskParameter="Version" PropertyName="ElwigFileVersion" />
</GetFileVersion>
<PropertyGroup>
<DefineConstants>ProductVersion=$(ElwigFileVersion);BuildPath=..\Elwig\bin\Publish;DocumentTemplatesPath=..\Elwig\Documents;ElwigProjectDir=..\Elwig</DefineConstants>
<DefineConstants>ProductVersion=$(ElwigFileVersion);BuildPath=..\Elwig\bin\Publish;DocumentPath=..\Elwig\Documents;ElwigProjectDir=..\Elwig</DefineConstants>
</PropertyGroup>
</Target>
<ItemGroup>
@ -50,13 +49,13 @@
<ComponentGroupName>DocumentTemplates</ComponentGroupName>
<DirectoryRefId>ConfigFolderResources</DirectoryRefId>
<SuppressRootDirectory>true</SuppressRootDirectory>
<PreprocessorVariable>DocumentTemplatesPath</PreprocessorVariable>
<Transforms>DocumentTemplatesTransform.xslt</Transforms>
<PreprocessorVariable>DocumentPath</PreprocessorVariable>
<Transforms>DocumentTransform.xslt</Transforms>
</HarvestDirectory>
<BindPath BindName="DocumentTemplateBindPath" Include="../Elwig/Documents" />
</ItemGroup>
<ItemGroup>
<None Include="DocumentTemplatesTransform.xslt" />
<None Include="DocumentTransform.xslt" />
<None Include="BuildFilesTransform.xslt" />
<None Include="Files\config.ini" />
</ItemGroup>

View File

@ -11,7 +11,6 @@
<ComponentGroupRef Id="MainComponents"/>
<ComponentGroupRef Id="BuildFiles"/>
<ComponentGroupRef Id="DocumentTemplates"/>
<ComponentGroupRef Id="DocumentTemplateComponents"/>
</Feature>
</Package>
</Wix>