mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-03 15:45:45 +00:00
Fix issues with GenerateBindings target
generateBindings was let bound as a value and thus ran at startup before any other target. Changed so all the code for generating the bindings is in the target and the target is added a build dependency.
This commit is contained in:
parent
9610f20258
commit
0aa963c84e
26
build.fsx
26
build.fsx
|
@ -99,17 +99,6 @@ let runtimeProjects =
|
||||||
let activeProjects =
|
let activeProjects =
|
||||||
Seq.concat [buildProjects; runtimeProjects]
|
Seq.concat [buildProjects; runtimeProjects]
|
||||||
|
|
||||||
let generateBindings =
|
|
||||||
if not (File.Exists(".bindingsGenerated")) then
|
|
||||||
buildProjects
|
|
||||||
|> MSBuildRelease "" "Build"
|
|
||||||
|> ignore
|
|
||||||
let bindingProcess = new Process()
|
|
||||||
bindingProcess.StartInfo.FileName <- Path.Combine("src", "Generator.Bind", "bin", "Release", "Bind.exe")
|
|
||||||
bindingProcess.Start() |> ignore
|
|
||||||
bindingProcess.WaitForExit() |> ignore
|
|
||||||
File.Create(".bindingsGenerated").Close() |> ignore
|
|
||||||
|
|
||||||
|
|
||||||
// Generate assembly info files with the right version & up-to-date information
|
// Generate assembly info files with the right version & up-to-date information
|
||||||
Target "AssemblyInfo" (fun _ ->
|
Target "AssemblyInfo" (fun _ ->
|
||||||
|
@ -165,15 +154,23 @@ Target "Clean" (fun _ ->
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
// Build generator projects, and generate bindings if neccesary
|
// Build generator projects, and generate bindings if neccesary
|
||||||
Target "GenerateBindings" (fun _ ->
|
Target "GenerateBindings" (fun _ ->
|
||||||
generateBindings
|
if not (File.Exists(".bindingsGenerated")) then
|
||||||
|> ignore
|
buildProjects
|
||||||
|
|> MSBuildRelease "" "Build"
|
||||||
|
|> ignore
|
||||||
|
let bindingProcess = new Process()
|
||||||
|
bindingProcess.StartInfo.FileName <- Path.Combine("src", "Generator.Bind", "bin", "Release", "Bind.exe")
|
||||||
|
if bindingProcess.Start() then
|
||||||
|
bindingProcess.WaitForExit()
|
||||||
|
File.Create(".bindingsGenerated").Close()
|
||||||
|
else
|
||||||
|
failwith "Could not start Bind.exe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
// Build library & test project
|
// Build library & test project
|
||||||
|
|
||||||
Target "Build" (fun _ ->
|
Target "Build" (fun _ ->
|
||||||
generateBindings
|
|
||||||
activeProjects
|
activeProjects
|
||||||
|> MSBuildRelease "" "Build"
|
|> MSBuildRelease "" "Build"
|
||||||
|> ignore
|
|> ignore
|
||||||
|
@ -221,6 +218,7 @@ Target "All" DoNothing
|
||||||
|
|
||||||
"Clean"
|
"Clean"
|
||||||
==> "AssemblyInfo"
|
==> "AssemblyInfo"
|
||||||
|
==> "GenerateBindings"
|
||||||
==> "Build"
|
==> "Build"
|
||||||
==> "CopyBinaries"
|
==> "CopyBinaries"
|
||||||
==> "RunTests"
|
==> "RunTests"
|
||||||
|
|
Loading…
Reference in a new issue