forked from CoderLine/alphaTab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAlphaTab.targets
130 lines (114 loc) · 5.38 KB
/
AlphaTab.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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(SolutionDir)\packages\Saltarelle.Compiler.2.5.0\tools\SCTask.dll" TaskName="SCTask"/>
<ItemGroup>
<IntermediateScript Include="$(IntermediateOutputPath)$(TargetName).js" Condition="'@(IntermediateScript)'==''"/>
<IntermediateScriptMin Include="$(IntermediateOutputPath)$(TargetName).min.js" Condition="'@(IntermediateScriptMin)'==''"/>
</ItemGroup>
<Target Name="AfterCompile" DependsOnTargets="CoreCompile"
Inputs="$(MSBuildAllProjects);
$(AssemblyOriginatorKeyFile);
@(Compile);
@(ReferencePath);
@(EmbeddedResource);
@(CustomAdditionalCompileInputs)"
Outputs="@(DocFileItem);
@(IntermediateScript);
@(CustomAdditionalCompileOutputs)"
Returns="">
<PropertyGroup>
<EmitDebugScript>false</EmitDebugScript>
<NoStdLib>True</NoStdLib>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(DebugType)'=='pdbonly' Or '$(DebugType)'=='full'">
<EmitDebugScript>true</EmitDebugScript>
<DefineConstants>TRACE;DEBUG;JavaScript</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(AlreadyCompiled)'==''">
<AlreadyCompiled>true</AlreadyCompiled>
<DefineConstants>TRACE;JavaScript</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Remove="PresentationCore" />
<Reference Remove="PresentationFramework" />
<Reference Remove="System" />
<Reference Remove="System.Core" />
<Reference Remove="Microsoft.CSharp" />
<Reference Remove="System.Drawing" />
<Reference Remove="System.Xaml" />
<Reference Remove="System.Xml" />
<Reference Remove="System.Windows.Forms" />
<Reference Remove="WindowsBase" />
<Reference Include="$(SolutionDir)packages\Saltarelle.Runtime.2.5.0\tools\Assemblies\mscorlib.dll">
</Reference>
<Reference Include="$(SolutionDir)packages\Saltarelle.Web.3.1.0\lib\Saltarelle.Web.dll">
</Reference>
</ItemGroup>
<SCTask AdditionalLibPaths="$(AdditionalLibPaths)"
DefineConstants="$(DefineConstants)"
DisabledWarnings="$(NoWarn)"
EmitDebugInformation="$(EmitDebugScript)"
OutputScript="@(IntermediateScript)"
References="@(Reference);@(ReferenceDependencyPaths)"
Sources="@(Compile)"
TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
WarningLevel="$(WarningLevel)"
WarningsAsErrors="$(WarningsAsErrors)"
WarningsNotAsErrors="$(WarningsNotAsErrors)"
MainEntryPoint="$(StartupObject)"
TargetType="$(OutputType)"
AlreadyCompiled="$(AlreadyCompiled)"
/>
</Target>
<Target Name="AfterBuild">
<!-- Copy C# Output -->
<Copy SourceFiles="$(TargetPath)"
DestinationFolder="$(SolutionDir)Build\CSharp"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" >
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<!-- Copy XML Documentation script. -->
<Copy SourceFiles="@(DocFileItem)"
DestinationFolder="$(SolutionDir)Build\CSharp"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<!-- Copy JavaScript File -->
<Copy SourceFiles="@(IntermediateScript)"
DestinationFolder="$(SolutionDir)Build\JavaScript"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" >
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<!-- Minimize JavaScript File -->
<Exec Command="uglifyjs @(IntermediateScript) -o @(IntermediateScriptMin) -c" />
<!-- Copy Minimized JavaScript File -->
<Copy SourceFiles="@(IntermediateScriptMin)"
DestinationFolder="$(SolutionDir)Build\JavaScript"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" >
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<!-- Copy JavaScript mscorlib -->
<Copy SourceFiles="$(SolutionDir)\packages\Saltarelle.Runtime.2.5.0\mscorlib.js;
$(SolutionDir)\packages\Saltarelle.Runtime.2.5.0\mscorlib.min.js"
DestinationFolder="$(SolutionDir)Build\JavaScript"
SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" >
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
</Target>
</Project>