ソースを参照

Added MSBuild target to automatically add personal demo files into application package.

Your files must be placed under "addToPackage" folder
Gwenaël Hagenmuller 11 年 前
コミット
d6f6944db2

+ 1 - 0
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJSWinJSApp/BuildOurOwnBabylonJSWinJSApp.jsproj

@@ -86,6 +86,7 @@
     <ProjectReference Include="..\BuildOurOwnBabylonJS\BuildOurOwnBabylonJS.csproj" />
   </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\$(WMSJSProjectDirectory)\Microsoft.VisualStudio.$(WMSJSProject).targets" />
+  <Import Project="packageExtraFiles.targets" />
   <!-- To modify your build process, add your task inside one of the targets below then uncomment
        that target and the DisableFastUpToDateCheck PropertyGroup. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 3 - 0
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJSWinJSApp/addToPackage/readme.md

@@ -0,0 +1,3 @@
+Put your demo files in this folder.
+You can use sub-folders.
+All files/folders will be added to the package during application packaging.

+ 15 - 0
Tools/BuildOurOwnBabylonJS/BuildOurOwnBabylonJSWinJSApp/packageExtraFiles.targets

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\AppxPackage\Microsoft.AppxPackage.Targets
+    must be imported before this file -->
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+    <Target Name="PackageExtraFiles" AfterTargets="GetPackagingOutputs">
+		<ItemGroup>
+            <_AddToPackageFiles Include="$(ProjectDir)\addToPackage\**\*" />
+            <PackagingOutputs Include="@(_AddToPackageFiles -> '%(Identity)')">
+				<OutputGroup>ExtraFiles</OutputGroup>
+				<ProjectName>$(ProjectName)</ProjectName>
+                <TargetPath>addToPackage\%(RecursiveDir)%(Filename)%(Extension)</TargetPath>
+			</PackagingOutputs>
+        </ItemGroup>
+    </Target>
+</Project>