Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Parser build
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSawczyn-AWH committed Jan 28, 2020
1 parent 47efaed commit 360d5f3
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 66 deletions.
3 changes: 0 additions & 3 deletions .gitattributes

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -9,4 +9,3 @@ docs/_site
/c-o-s-space differences.txt
/docs/api/Working
*.bak
/dist/Sawczyn.EFDesigner.EFModel.DslPackage.vsix
3 changes: 3 additions & 0 deletions dist/Sawczyn.EFDesigner.EFModel.DslPackage.vsix
Git LFS file not shown
18 changes: 4 additions & 14 deletions src/Dsl/CustomCode/Utilities/Import/AssemblyProcessor.cs
Expand Up @@ -62,14 +62,9 @@ public bool Process(string filename)

string[] paths =
{
@"Parsers\net472\EF6Parser.exe"
, @"Parsers\netcoreapp3.1\EF6Parser.exe"
, @"Parsers\net472\EFCore2Parser.exe"
, @"Parsers\netcoreapp2.2\EFCore2Parser.exe"
, @"Parsers\netcoreapp3.1\EFCore2Parser.exe"
, @"Parsers\net472\EFCore3Parser.exe"
, @"Parsers\netcoreapp2.2\EFCore3Parser.exe"
, @"Parsers\netcoreapp3.1\EFCore3Parser.exe"
@"Parsers\EF6Parser.exe"
, @"Parsers\EFCore2Parser.exe"
, @"Parsers\EFCore3Parser.exe"
};

foreach (string path in paths)
Expand All @@ -78,12 +73,7 @@ public bool Process(string filename)
return DoProcessing(outputFilename);
}

ErrorDisplay.Show(@"Error processing assembly.
Input assembly requirements:
EF6: must be .NET Framework 4.72 (or above) or .NETCore 3.1 (or above)
EFCore2 and EFCore3: must be .NET Framework 4.72 (or above) or .NETCore 2.1 (or above)
");
ErrorDisplay.Show($@"Error processing assembly. See {Path.ChangeExtension(outputFilename, "log")} for further information");

return false;
}
Expand Down
51 changes: 6 additions & 45 deletions src/DslPackage/DslPackage.csproj
Expand Up @@ -203,22 +203,13 @@
<Content Include="Microsoft.Data.ConnectionUI.dll">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EF6_net472_Parser.exe">
<Content Include="Parsers\EF6Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EF6_netcoreapp3.1_Parser.exe">
<Content Include="Parsers\EFCore2Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EFCore2_netcoreapp2.2_Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EFCore2_netcoreapp3.1_Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EFCore3_net472_Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="Parsers\EFCore3_netcoreapp3.1_Parser.exe">
<Content Include="Parsers\EFCore3Parser.exe">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>
<Content Include="ProjectItemTemplates\EFModel.xsd">
Expand Down Expand Up @@ -441,53 +432,23 @@
<PropertyGroup>
<PreBuildEvent>copy /y "$(SolutionDir)Dsl\GeneratedCode\EFModelSchema.xsd" "$(ProjectDir)ProjectItemTemplates\EFModel.xsd"

dotnet tool update -g dotnet-warp

rem =================================
set EFVER=EF6
set NETVER=net472
call :framework

set EFVER=EF6
set NETVER=netcoreapp3.1
set EFVER=EF6
call :netcore3

rem =================================
set EFVER=EFCore2
set NETVER=netcoreapp2.2
call :netcore2

set EFVER=EFCore2
set NETVER=netcoreapp3.1
call :netcore3

rem =================================
set EFVER=EFCore3
set NETVER=net472
call :framework

set EFVER=EFCore3
set NETVER=netcoreapp3.1
call :netcore3

if "$(ConfigurationName)"=="Release" del "$(ProjectDir)Parsers\*.pdb

exit /b

:framework
"%25UserProfile%25\.dotnet\tools\.store\dotnet-warp\1.1.0\dotnet-warp\1.1.0\tools\netcoreapp2.1\any\warp\windows-x64.warp-packer.exe" --arch windows-x64 --input_dir "$(SolutionDir)Utilities\%25EFVER%25Parser\bin\$(ConfigurationName)\%25NETVER%25\win-x64" --exec %25EFVER%25Parser.exe --output $(ProjectDir)Parsers\%25EFVER%25_%25NETVER%25_Parser.exe
exit /b

:netcore2
cd "$(SolutionDir)Utilities\%25EFVER%25Parser"
dotnet-warp "$(SolutionDir)Utilities\%25EFVER%25Parser\%25EFVER%25Parser.csproj" -p:TargetFramework=%25NETVER%25 -o $(ProjectDir)Parsers\%25EFVER%25_%25NETVER%25_Parser.exe -v
exit /b

:netcore3
cd "$(SolutionDir)Utilities\%25EFVER%25Parser"
dotnet publish -c $(ConfigurationName) -r win-x64 -f %25NETVER%25 --self-contained -o $(ProjectDir)Parsers /p:PublishSingleFile=true
del "$(ProjectDir)Parsers\%25EFVER%25_%25NETVER%25_Parser.exe"
rename "$(ProjectDir)Parsers\%25EFVER%25Parser.exe" "%25EFVER%25_%25NETVER%25_Parser.exe"
rem cd "$(SolutionDir)Utilities\%25EFVER%25Parser"
dotnet publish -c $(ConfigurationName) -r win-x64 -f %25NETVER%25 --no-build --nologo --self-contained -o $(ProjectDir)Parsers /p:PublishSingleFile=true "$(SolutionDir)Utilities\%25EFVER%25Parser\%25EFVER%25Parser.csproj"
exit /b
</PreBuildEvent>
</PropertyGroup>
Expand Down
Binary file added src/DslPackage/Parsers/EF6Parser.exe
Binary file not shown.
Binary file added src/DslPackage/Parsers/EFCore2Parser.exe
Binary file not shown.
Binary file added src/DslPackage/Parsers/EFCore3Parser.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Utilities/EF6Parser/EF6Parser.csproj
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/EFCore2Parser/EFCore2Parser.csproj
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.2;netcoreapp3.1</TargetFrameworks>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/EFCore3Parser/EFCore3Parser.csproj
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
Expand Down

0 comments on commit 360d5f3

Please sign in to comment.