Fix Xamarin project compiles (#725)

* Fix Generator.Rewrite failing on iOS builds

* Fix incorrect path

* Directly link to Xamarin.iOS facades

* Fix Xamarin.Mac framework directory

* Add TVOS/WatchOS framework directories

* Add Android framework directory

* Remove unused framework dirs for now

Maybe we can add these back in later, when we have compiling support for these platforms.

* Remove ProjectExtensions
This commit is contained in:
Dan Balasescu 2018-01-23 18:13:27 +09:00 committed by Jarl Gullberg
parent f17fa4bc2d
commit b16e7faacc
2 changed files with 12 additions and 5 deletions

View file

@ -53,7 +53,14 @@ namespace OpenTK.Rewrite
var framework_dir = Path.GetDirectoryName(typeof(object).Module.FullyQualifiedName);
var framework_dirs = on_mono
? new[] { framework_dir, Path.Combine(framework_dir, "Facades") }
? new[]
{
framework_dir,
Path.Combine(framework_dir, "Facades"),
"/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS",
"/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades",
"/Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mono/2.1"
}
: new[] { framework_dir };
if (IsZero(name.Version))

View file

@ -247,10 +247,10 @@
</Target>
-->
<Target Name="AfterBuild">
<Exec Command="$(OutputPath)..\..\..\..\Generator.Rewrite\bin\Debug\Rewrite.exe $(OutputPath)OpenTK.dll ..\..\OpenTK.snk -dllimport -debug" Condition="$(OS) == 'Windows_NT' and $(Configuration) == 'Debug'" />
<Exec Command="$(OutputPath)..\..\..\..\Generator.Rewrite\bin\Release\Rewrite.exe $(OutputPath)OpenTK.dll ..\..\OpenTK.snk -dllimport" Condition="$(OS) == 'Windows_NT' and $(Configuration) == 'Release'" />
<Exec WorkingDirectory="$(SolutionDir)src/Generator.Rewrite/bin/Debug/" Command="mono ./Rewrite.exe $(SolutionDir)src/OpenTK/bin/Debug/iOS/OpenTK.dll $(SolutionDir)OpenTK.snk -dllimport -debug" Condition="$(OS) != 'Windows_NT' and $(Configuration) == 'Debug'" />
<Exec WorkingDirectory="$(SolutionDir)src/Generator.Rewrite/bin/Release" Command="mono ./Rewrite.exe $(SolutionDir)src/OpenTK/bin/Release/iOS/OpenTK.dll $(SolutionDir)OpenTK.snk -dllimport" Condition="$(OS) != 'Windows_NT' and $(Configuration) == 'Release'" />
<Exec Condition="$(OS) == 'Windows_NT' and $(Configuration) == 'Debug'" Command="$(OutputPath)..\..\..\..\Generator.Rewrite\bin\Debug\Rewrite.exe --assembly $(OutputPath)OpenTK.dll --signing-key ..\..\OpenTK.snk --debug" />
<Exec Condition="$(OS) == 'Windows_NT' and $(Configuration) == 'Release'" Command="$(OutputPath)..\..\..\..\Generator.Rewrite\bin\Release\Rewrite.exe --assembly $(OutputPath)OpenTK.dll --signing-key ..\..\OpenTK.snk" />
<Exec Condition="$(OS) != 'Windows_NT' and $(Configuration) == 'Debug'" Command="mono $(OutputPath)../../../../Generator.Rewrite/bin/Debug/Rewrite.exe --assembly $(OutputPath)OpenTK.dll --signing-key ../../OpenTK.snk --debug" />
<Exec Condition="$(OS) != 'Windows_NT' and $(Configuration) == 'Release'" Command="mono $(OutputPath)../../../../Generator.Rewrite/bin/Release/Rewrite.exe --assembly $(OutputPath)OpenTK.dll --signing-key ../../OpenTK.snk" />
</Target>
<ItemGroup>
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll">