build fails if weaver fails

This commit is contained in:
JohnCorby 2022-01-13 19:19:45 -08:00
parent bf2a9223dd
commit 63efda975b
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ namespace MirrorWeaver
var weaver = new Weaver(log);
if (!weaver.Weave(assembly, resolver, out _))
{
throw new Exception("weaving failed");
Environment.Exit(1);
}
assembly.Write(new WriterParameters { WriteSymbols = true });

View File

@ -15,11 +15,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
</PropertyGroup>
<Target Name="weave qsb" BeforeTargets="PostBuildEvent" Condition="Exists($(GameDir))">
<Exec Command='"$(SolutionDir)\MirrorWeaver\bin\$(Configuration)\MirrorWeaver" "$(OutputPath)\QSB.dll" "$(GameDir)"' />
</Target>
<PropertyGroup>
<PostBuildEvent Condition="Exists($(UnityAssetsDir)) and Exists($(GameDir)) and Exists($(OwmlDir))">
:: weave qsb
"$(SolutionDir)\MirrorWeaver\bin\$(Configuration)\MirrorWeaver" "$(OutputPath)\QSB.dll" "$(GameDir)"
:: copy output to unity project
copy /y "$(OutputPath)" "$(UnityAssetsDir)"
:: copy game assembly to unity project