diff --git a/scripts/fsx b/scripts/fsx index 2268d5059..5488853b1 160000 --- a/scripts/fsx +++ b/scripts/fsx @@ -1 +1 @@ -Subproject commit 2268d505970604f38738bda758ffac44a2a77e54 +Subproject commit 5488853b17fedb44707e8459480297b618cffad0 diff --git a/scripts/make.fsx b/scripts/make.fsx index cd3bb551e..e3a3ab466 100644 --- a/scripts/make.fsx +++ b/scripts/make.fsx @@ -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 @@ -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 = @@ -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 @@ -180,7 +191,6 @@ let PrintNugetVersion () = Console.WriteLine() Console.Out.Flush() failwith "nuget process' output contained errors ^" -#endif let BuildSolution (buildToolAndBuildArg: string*string) @@ -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