Newer
Older
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
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="FinalHTML" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputDirectory>.\bin\</OutputDirectory>
<JSMoudleFileName>fc.js</JSMoudleFileName>
</PropertyGroup>
<PropertyGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'X64' ">
<ArchitectureSuffix>64</ArchitectureSuffix>
</PropertyGroup>
<PropertyGroup Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)' == 'X86' ">
<ArchitectureSuffix>86</ArchitectureSuffix>
</PropertyGroup>
<PropertyGroup Condition=" '$([MSBuild]::IsOsPlatform(Windows))' ">
<TweeGoExe>tweego_win$(ArchitectureSuffix).exe</TweeGoExe>
</PropertyGroup>
<PropertyGroup Condition=" '$([MSBuild]::IsOsPlatform(Linux))' ">
<TweeGoExe>tweego_nix$(ArchitectureSuffix)</TweeGoExe>
</PropertyGroup>
<PropertyGroup Condition=" '$([MSBuild]::IsOsPlatform(OSX))' ">
<TweeGoExe>tweego_osx$(ArchitectureSuffix)</TweeGoExe>
</PropertyGroup>
<Target Name="DisplayMessages">
<Message Text="ArchitectureSuffix: $(ArchitectureSuffix)" Importance="high" />
<Message Text="TweeGoExe: $(TweeGoExe)" Importance="high" />
<Message Text="PA: $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture)" />
</Target>
<Target Name="createDirs">
<MakeDir Directories="$(OutputDirectory)\resources"/>
</Target>
<Target Name="JSModule" DependsOnTargets="createDirs;DisplayMessages">
<ItemGroup>
<jsScripts Include=".\js\**\*.js"></jsScripts>
</ItemGroup>
<!-- Read the contents of the files preserving tabs/spaces. -->
<ItemGroup>
<FileContents Include="$([System.IO.File]::ReadAllText(%(jsSCripts.FullPath)))"/>
</ItemGroup>
<WriteLinesToFile File="$(OutputDirectory)\$(JSMoudleFileName)" Lines="@(FileContents)" Overwrite="true" />
</Target>
<Target Name="tmpOutput" DependsOnTargets="JSModule">
<Exec Command="devTools\tweeGo\$(TweeGoExe) --module=$(OutputDirectory)\$(JSMoudleFileName) --head devTools\head.html -o $(OutputDirectory)\tmp.html src\" />
</Target>
<Target Name="FinalHTML" DependsOnTargets="tmpOutput">
<Delete Files="$(OutputDirectory)\$(JSMoudleFileName)" />
<Move SourceFiles="$(OutputDirectory)\tmp.html" DestinationFiles="$(OutputDirectory)\FC_pregmod.html" />
</Target>
</Project>