Skip to content

Commit

Permalink
make.fsx: GTK front on dotnet6+xbuild build lanes
Browse files Browse the repository at this point in the history
  • Loading branch information
aarani committed Aug 21, 2023
1 parent a73308f commit e15b622
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/fsx
41 changes: 38 additions & 3 deletions scripts/make.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ open System.Xml.Linq
open System.Xml.XPath

#if !LEGACY_FRAMEWORK
#r "nuget: Fsdk, Version=0.6.0--date20230812-0646.git-2268d50"
#r "nuget: Fsdk, Version=0.6.0--date20230818-1152.git-83d671b"
#else
#r "System.Configuration"
open System.Configuration
Expand Down Expand Up @@ -53,6 +53,18 @@ let GetSolution (solType: SolutionFile) =

Path.Combine("src", solFileName)

type ProjectFile =
| XFFrontend
| GtkFrontend

let GetProject (projFile: ProjectFile) =
let projFileName =
match projFile with
| GtkFrontend -> Path.Combine("GWallet.Frontend.XF.Gtk", "GWallet.Frontend.XF.Gtk.fsproj")
| XFFrontend -> Path.Combine("GWallet.Frontend.XF", "GWallet.Frontend.XF.fsproj")

Path.Combine("src", projFileName)

let BACKEND = "GWallet.Backend"

type Frontend =
Expand Down Expand Up @@ -142,7 +154,6 @@ FRONTEND_PATH="$DIR_OF_THIS_SCRIPT/../lib/$UNIX_NAME/$GWALLET_PROJECT.exe"
exec mono "$FRONTEND_PATH" "$@"
"""

#if LEGACY_FRAMEWORK
let NugetRestore projectOrSolutionRelativePath =
let nugetArgs =
sprintf
Expand Down Expand Up @@ -180,7 +191,6 @@ let PrintNugetVersion () =
Console.WriteLine()
Console.Out.Flush()
failwith "nuget process' output contained errors ^"
#endif

let BuildSolution
(buildToolAndBuildArg: string*string)
Expand Down Expand Up @@ -342,7 +352,32 @@ let JustBuild binaryConfig maybeConstant: Frontend*FileInfo =
Frontend.Console

| _ -> Frontend.Console
elif buildTool = "dotnet" then
match maybeLegacyBuildTool with
| Some legacyBuildTool when legacyBuildTool = "xbuild" ->
if FsxHelper.AreGtkLibsPresent Echo.All then
BuildSolution
(buildTool, buildArg)
(GetProject ProjectFile.XFFrontend)
binaryConfig
maybeConstant
String.Empty

let buildSeparateNetStandardFlag = "/p:SeparateNetStandardBuildEngine=true"

let gtkFrontendProject = GetProject ProjectFile.GtkFrontend
NugetRestore gtkFrontendProject
BuildSolution
(legacyBuildTool, buildSeparateNetStandardFlag)
gtkFrontendProject
binaryConfig
maybeConstant
"/t:Build"

Frontend.Gtk
else
Frontend.Console
| _ -> Frontend.Console
else
Frontend.Console

Expand Down

0 comments on commit e15b622

Please sign in to comment.