From bd8ad41458d7c2c1a73fb8c371ba5e81ee3eee3b Mon Sep 17 00:00:00 2001 From: ezsh <ezsh.junk@gmail.com> Date: Mon, 27 Apr 2020 01:05:52 +0200 Subject: [PATCH] Add basic MSBuild project file --- fc-pregmod.proj | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 fc-pregmod.proj diff --git a/fc-pregmod.proj b/fc-pregmod.proj new file mode 100644 index 00000000000..1febb914e23 --- /dev/null +++ b/fc-pregmod.proj @@ -0,0 +1,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> -- GitLab