diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..29e13f251 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,11 @@ +# NOTE: newer commits are above, older ones below + +# GitHubCI: cosmetic, use `--yes` instead of `-y` +3e02b8291c7ae377222f67bb18a0f6222a74c46f + +# scripts/make.fsx: cosmetic, use longer flag name +94aadcc339724f6528cba39e22581dc6fe16717b + +# scripts/make.fsx: cosmetic, use longer flag name +ae83bae269359e9431ec670764d20e5bb452b15e + diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b103ec130..896b4e941 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -218,7 +218,7 @@ jobs: - name: check mono version run: mono --version - name: install GTK libs (dependency of GTK frontend) - run: sudo apt install -y libgtk2.0-cil-dev + run: sudo apt install --yes libgtk2.0-cil-dev - name: configure run: ./configure.sh - name: build in DEBUG mode (retry 3 times because of flakey XamForms restore) @@ -248,7 +248,11 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl fsharp nunit-console + run: | + # needed by fsx submodule + sudo apt install --yes curl + + sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make fsharp nunit-console # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround @@ -284,7 +288,7 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl dotnet6 + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround @@ -326,7 +330,7 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl dotnet6 + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 - name: install last version of mono (Microsoft APT repositories) run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh @@ -370,8 +374,9 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl dotnet6 mono-xbuild - + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make dotnet6 mono-xbuild fsharp + - name: install GTK libs (dependency of GTK frontend) + run: sudo apt install --yes libgtk2.0-cil-dev # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround run: git config --global --add safe.directory '*' @@ -412,7 +417,7 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make curl fsharp nunit-console + run: sudo DEBIAN_FRONTEND=noninteractive apt install --yes git make fsharp nunit-console - name: install last version of mono (Microsoft APT repositories) run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh @@ -423,7 +428,7 @@ jobs: - name: check mono version run: mono --version - name: install GTK libs (dependency of GTK frontend) - run: sudo apt install -y libgtk2.0-cil-dev + run: sudo apt install --yes libgtk2.0-cil-dev - name: configure run: ./configure.sh - name: build in DEBUG mode (retry 3 times because of flakey XamForms restore) @@ -477,7 +482,7 @@ jobs: - name: check mono version run: mono --version - name: install GTK libs (dependency of GTK frontend) - run: sudo apt install -y libgtk2.0-cil-dev + run: sudo apt install --yes libgtk2.0-cil-dev - name: configure run: ./configure.sh - name: build in DEBUG mode (retry 3 times because of flakey XamForms restore) @@ -507,7 +512,11 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo apt install --yes git make curl fsharp nunit-console + run: | + # needed by fsx submodule + sudo apt install --yes curl + + sudo apt install --yes git make fsharp nunit-console # workaround for https://github.com/actions/runner/issues/2033 - name: ownership workaround @@ -543,7 +552,7 @@ jobs: - name: install sudo run: apt update && apt install --yes sudo - name: install all dependencies - run: sudo apt install --yes git make curl fsharp nunit-console + run: sudo apt install --yes git make fsharp nunit-console - name: install last version of mono (Microsoft APT repositories) run: sudo ./scripts/install_mono_from_microsoft_deb_packages.sh @@ -554,7 +563,7 @@ jobs: - name: check mono version run: mono --version - name: install GTK libs (dependency of GTK frontend) - run: sudo apt install -y libgtk2.0-cil-dev + run: sudo apt install --yes libgtk2.0-cil-dev - name: configure run: ./configure.sh - name: build in DEBUG mode (retry 3 times because of flakey XamForms restore) @@ -631,15 +640,14 @@ jobs: - name: Install snap tools run: | sudo apt update - sudo ./scripts/install_mono_from_microsoft_deb_packages.sh ./scripts/install_snapcraft.sh - # hack to disable dotnet detection (can't use apt purge because github VM seems to have it installed in different way) - # NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install dotnet pkg, + # hack to disable msbuild detection + # NOTE: you might think an easier way to do this would be use container:\nimage: ubuntu22.04 and then not install msbuild, # but that doesn't work because we get the following error when trying to install snapcraft via `snap install --classic`: # > error: cannot communicate with server: Post "http://localhost/v2/snaps/snapcraft": dial unix /run/snapd.socket: connect: no such file or directory - - name: HACK to emulate dotnet uninstall - run: sudo rm `which dotnet` + - name: HACK to emulate msbuild uninstall + run: sudo rm `which msbuild` - name: Generate snap package run: | diff --git a/.gitignore b/.gitignore index f1d54e208..8c6982c30 100644 --- a/.gitignore +++ b/.gitignore @@ -22,9 +22,6 @@ TestResult.xml # backup files of some editors such as nano *~ -# autogenerated file by configure.sh -before.gwallet.core-legacy.sln.targets - # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 diff --git a/NuGet.Restore.targets b/NuGet.Restore.targets deleted file mode 100644 index f6755a9c2..000000000 --- a/NuGet.Restore.targets +++ /dev/null @@ -1,170 +0,0 @@ - - - - $(MSBuildThisFileDirectory).nuget - https://dist.nuget.org/win-x86-commandline/v5.4.0/nuget.exe - $(NuGetPath)\nuget.exe - mono - $(TMPDIR) - - https://raw.githubusercontent.com/kzu/NuGet.Restore/master/ - $(BaseUrl)curl.exe - -k -f -L - "$(TEMP)\curl.exe" $(CurlArgs) - curl $(CurlArgs) - %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe - - - ErrorAndStop - - quiet - normal - $(MSBuildThisFilename)$(MSBuildThisFileExtension) - - - - - - - - - - Restore - -verbosity $(RestoreLoggingVerbosity) - - - - - - - - - - - - - $([System.IO.Path]::GetDirectoryName('$(SolutionPath)')) - - - - <_NuGet>$(NuGet) - <_RestoreDir>$(RestoreDir) - <_RestoreDir Condition="'$(_RestoreDir)' == ''">%(RestoreSolution.RootDir)%(RestoreSolution.Directory) - - <_NuGet Condition=" '$(RestoreDir)' != ''">$(_NuGet.Replace('$(RestoreDir)', '').TrimStart('/').TrimStart('\')) - - - - - - - - - - - - - - - - - <_RestoreSolution Condition=" '$(OS)' != 'Unix' And '$(_RestoreDir)' != ''">$(_RestoreSolution.Replace('$(_RestoreDir)', '').TrimStart('/').TrimStart('\')) - <_RestoreOutput Condition=" '$(OS)' != 'Unix' And '$(_RestoreOutput)' != '' And '$(_RestoreDir)' != ''">$(_RestoreOutput.Replace('$(_RestoreDir)', '').TrimStart('/').TrimStart('\')) - - <_RestoreCommand Condition=" '$(_RestoreCommand)' == '' ">Restore - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @(ETag) - $(ETag.Substring(5).Trim().TrimStart('"').TrimEnd('"')) - - <Namespace Prefix='msb' Uri='http://schemas.microsoft.com/developer/msbuild/2003'/> - $(MSBuildThisFileFullPath) - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - 1D1D4F4E2A49280 - - - diff --git a/gwallet.sln b/geewallet.sln similarity index 97% rename from gwallet.sln rename to geewallet.sln index 2eef0b56c..a9cc545b1 100644 --- a/gwallet.sln +++ b/geewallet.sln @@ -42,14 +42,13 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GWallet.Frontend.XF", "src\ EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.iOS", "src\GWallet.Frontend.XF.iOS\GWallet.Frontend.XF.iOS.fsproj", "{5DD656CE-3319-46BB-B47F-BBED8CC722FD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "InfraLib", "InfraLib", "{6EE07541-91A1-42C2-A21F-2809BBDC2F50}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fsdk", "Fsdk", "{6EE07541-91A1-42C2-A21F-2809BBDC2F50}" ProjectSection(SolutionItems) = preProject - scripts\fsx\InfraLib\Misc.fs = scripts\fsx\InfraLib\Misc.fs - scripts\fsx\InfraLib\Unix.fs = scripts\fsx\InfraLib\Unix.fs - scripts\fsx\InfraLib\Taiga.fs = scripts\fsx\InfraLib\Taiga.fs - scripts\fsx\InfraLib\Process.fs = scripts\fsx\InfraLib\Process.fs - scripts\fsx\InfraLib\Network.fs = scripts\fsx\InfraLib\Network.fs - scripts\fsx\InfraLib\Git.fs = scripts\fsx\InfraLib\Git.fs + scripts\fsx\Fsdk\Misc.fs = scripts\fsx\Fsdk\Misc.fs + scripts\fsx\Fsdk\Unix.fs = scripts\fsx\Fsdk\Unix.fs + scripts\fsx\Fsdk\Process.fs = scripts\fsx\Fsdk\Process.fs + scripts\fsx\Fsdk\Network.fs = scripts\fsx\Fsdk\Network.fs + scripts\fsx\Fsdk\Git.fs = scripts\fsx\Fsdk\Git.fs EndProjectSection EndProject Global diff --git a/scripts/configure.fsx b/scripts/configure.fsx index 97bf385a9..28c0ebcec 100644 --- a/scripts/configure.fsx +++ b/scripts/configure.fsx @@ -19,120 +19,141 @@ open Fsdk.Process open GWallet.Scripting let rootDir = DirectoryInfo(Path.Combine(__SOURCE_DIRECTORY__, "..")) +let stableVersionOfMono = Version("6.6") + +let buildTool, legacyBuildTool, areGtkLibsAbsentOrDoesNotApply = + + let dotnetCmd = Process.ConfigCommandCheck ["dotnet"] false true -let initialConfigFile, buildTool, areGtkLibsAbsentOrDoesNotApply = match Misc.GuessPlatform() with | Misc.Platform.Windows -> - let buildTool= - match Process.ConfigCommandCheck ["dotnet"] false true with - | Some _ -> "dotnet" + let msbuildCmd = + Console.Write "checking for msbuild... " + match Process.VsWhere "MSBuild\\**\\Bin\\MSBuild.exe" with | None -> - Console.Write "checking for msbuild... " - match Process.VsWhere "MSBuild\\**\\Bin\\MSBuild.exe" with - | None -> - Console.WriteLine "not found" - Console.Out.Flush() - Console.Error.WriteLine "Error, please install 'dotnet' aka .NET (6.0 or newer), and/or .NETFramework 4.x ('msbuild')" - Environment.Exit 1 - failwith "Unreachable" - | Some msbuildPath -> - Console.WriteLine "found" - msbuildPath - - Map.empty, buildTool, true + Console.WriteLine "not found" + None + | Some msbuildPath -> + Console.WriteLine "found" + Some msbuildPath + + dotnetCmd, msbuildCmd, true | platform (* Unix *) -> Process.ConfigCommandCheck ["make"] true true |> ignore - match Process.ConfigCommandCheck ["dotnet"] false true with - | Some _ -> Map.empty, "dotnet", true + match Process.ConfigCommandCheck ["mono"] false true with | None -> + dotnetCmd, None, true + | Some _ -> + + match Process.ConfigCommandCheck ["fsharpc"] false true with + | None -> + dotnetCmd, None, true + | Some _ -> - Process.ConfigCommandCheck ["mono"] true true |> ignore - Process.ConfigCommandCheck ["fsharpc"] true true |> ignore + if platform = Misc.Platform.Mac then + let msBuildOrXBuild = Process.ConfigCommandCheck [ "msbuild"; "xbuild" ] false true + dotnetCmd, msBuildOrXBuild, true + else - // needed by NuGet.Restore.targets & the "update-servers" Makefile target - Process.ConfigCommandCheck ["curl"] true true - |> ignore + let pkgConfig = "pkg-config" - if platform = Misc.Platform.Mac then - match Process.ConfigCommandCheck [ "msbuild"; "xbuild" ] true true with - | Some theBuildTool -> Map.empty, theBuildTool, true - | _ -> failwith "unreachable" - else - let buildTool = - // yes, msbuild tests for the existence of this file path below (a folder named xbuild, not msbuild), - // because $MSBuildExtensionsPath32 evaluates to /usr/lib/mono/xbuild (for historical reasons) - if File.Exists "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/FSharp/Microsoft.FSharp.Targets" then - match Process.ConfigCommandCheck [ "msbuild"; "xbuild" ] true true with - | Some theBuildTool -> theBuildTool - | _ -> failwith "unreachable" - else - // if the above file doesn't exist, even though F# is installed (because we already checked for 'fsharpc'), - // the version installed is too old, and doesn't work with msbuild, so it's better to use xbuild - match Process.ConfigCommandCheck [ "xbuild" ] false true with - | None -> - Console.Error.WriteLine "An alternative to installing mono-xbuild is upgrading your F# installtion to v5.0" - Environment.Exit 1 - failwith "unreachable" - | Some xbuildCmd -> xbuildCmd - - let pkgConfig = "pkg-config" - Process.ConfigCommandCheck [pkgConfig] true true |> ignore - - let pkgName = "mono" - let stableVersionOfMono = Version("6.6") - Console.Write (sprintf "checking for %s v%s... " pkgName (stableVersionOfMono.ToString())) - - let pkgConfigCmd = { Command = pkgConfig - Arguments = sprintf "--modversion %s" pkgName } - let processResult = Process.Execute(pkgConfigCmd, Echo.Off) - let monoVersion = - processResult - .Unwrap("Mono was found but not detected by pkg-config?") - .Trim() - - let currentMonoVersion = Version(monoVersion) - - // NOTE: see what 1 means here: https://learn.microsoft.com/en-us/dotnet/api/system.version.compareto?view=netframework-4.7 - if 1 = stableVersionOfMono.CompareTo currentMonoVersion then - Console.WriteLine "not found" - Console.Error.WriteLine (sprintf "configure: error, package requirements not met:") - Console.Error.WriteLine (sprintf "Please upgrade %s version from %s to (at least) %s" - pkgName - (currentMonoVersion.ToString()) - (stableVersionOfMono.ToString())) - Environment.Exit 1 - Console.WriteLine "found" + match Process.ConfigCommandCheck [ pkgConfig ] false true with + | None -> dotnetCmd, None, true + | Some _ -> - let areGtkLibsAbsentOrDoesNotApply = - if buildTool <> "msbuild" then - // because xbuild cannot build .NETStandard libs (and XF needs to be one) - true - else - Console.Write "checking for GTK (libs)... " - let gtkLibsPresent = FsxHelper.AreGtkLibsPresent Echo.Off - if gtkLibsPresent then - Console.WriteLine "found" - else + // yes, msbuild tests for the existence of this file path below (a folder named xbuild, not msbuild), + // because $MSBuildExtensionsPath32 evaluates to /usr/lib/mono/xbuild (for historical reasons) + let fsharpTargetsFileExists = + File.Exists + "/usr/lib/mono/xbuild/Microsoft/VisualStudio/v16.0/FSharp/Microsoft.FSharp.Targets" + + if not fsharpTargetsFileExists then + Console.Error.WriteLine + "WARNING: old F# version found, only xbuild can work with it (not msbuild, even if installed)" + + Console.Error.WriteLine + "NOTE: an alternative to installing 'mono-xbuild' pkg is upgrading your F# installtion to v5.0" + + let maybeXbuild = Process.ConfigCommandCheck [ "xbuild" ] false true + + let maybeMsbuild = + let msbuildCheck = Process.ConfigCommandCheck [ "msbuild" ] false true + + if fsharpTargetsFileExists then + msbuildCheck + else + None + + let pkgName = "mono" + Console.Write(sprintf "checking for %s v%s... " pkgName (stableVersionOfMono.ToString())) + + let pkgConfigCmd = + { Command = pkgConfig + Arguments = sprintf "--modversion %s" pkgName } + + let processResult = Process.Execute(pkgConfigCmd, Echo.Off) + + let monoVersion = + processResult + .Unwrap("Mono was found but not detected by pkg-config?") + .Trim() + + let currentMonoVersion = Version(monoVersion) + + // NOTE: see what 1 means here: https://learn.microsoft.com/en-us/dotnet/api/system.version.compareto?view=netframework-4.7 + if 1 = stableVersionOfMono.CompareTo currentMonoVersion then Console.WriteLine "not found" - not gtkLibsPresent - - // NOTE: this config entry is actually not being used at the moment by make.fsx, - // but kept, like this, in case we need to use it in the future - // (it can be retrieved with `let monoVersion = Map.tryFind "MonoPkgConfigVersion" buildConfigContents`) - Map.empty.Add("MonoPkgConfigVersion", monoVersion), buildTool, areGtkLibsAbsentOrDoesNotApply - -#if LEGACY_FRAMEWORK -let targetsFileToExecuteNugetBeforeBuild = """ - - - -""" -File.WriteAllText(Path.Combine(rootDir.FullName, "before.gwallet.core-legacy.sln.targets"), - targetsFileToExecuteNugetBeforeBuild) -#endif + dotnetCmd, None, true + else + Console.WriteLine "found" + + let areGtkLibsAbsentOrDoesNotApply = + match dotnetCmd, maybeMsbuild, maybeXbuild with + | None, None, None -> + // well, configure.fsx will not finish in this case anyway + true + | Some _ , None, None -> + // xbuild or msbuild is needed to compile XF.Gtk project + true + | None, None, _ -> + // xbuild alone cannot build .NETStandard2.0 libs (Backend and XF are) + true + | _, _, _ -> + Console.Write "checking for GTK (libs)..." + let gtkLibsPresent = FsxHelper.AreGtkLibsPresent Echo.Off + + if gtkLibsPresent then + Console.WriteLine "found" + else + Console.WriteLine "not found" + + not gtkLibsPresent + + let legacyBuildTool = + if maybeMsbuild.IsSome then + maybeMsbuild + else + maybeXbuild + + dotnetCmd, legacyBuildTool, areGtkLibsAbsentOrDoesNotApply + +if buildTool.IsNone && legacyBuildTool.IsNone then + Console.Out.Flush() + Console.Error.WriteLine "configure: error, package requirements not met:" + + match Misc.GuessPlatform() with + | Misc.Platform.Windows -> + Console.Error.WriteLine "Please install 'dotnet' aka .NET (6.0 or newer), and/or .NETFramework 4.x ('msbuild')" + | _ -> + Console.Error.WriteLine ( + sprintf + "Please install dotnet v6 (or newer), and/or Mono (msbuild or xbuild needed) v%s (or newer)" + (stableVersionOfMono.ToString()) + ) + + Environment.Exit 1 let prefix = DirectoryInfo(Misc.GatherOrGetDefaultPrefix(Misc.FsxOnlyArguments(), false, None)) @@ -166,13 +187,27 @@ let fsxRunner = fsxRunnerBinText buildConfigFile.Name +let configFileToBeWritten = + let initialConfigFile = Map.empty.Add("Prefix", prefix.FullName) + + let configFileStageTwo = + match legacyBuildTool with + | Some theTool -> initialConfigFile.Add("LegacyBuildTool", theTool) + | None -> initialConfigFile + + let finalConfigFile = + match buildTool with + | Some theTool -> configFileStageTwo.Add("BuildTool", theTool) + | None -> configFileStageTwo + + finalConfigFile + let lines = let toConfigFileLine (keyValuePair: System.Collections.Generic.KeyValuePair) = sprintf "%s=%s" keyValuePair.Key keyValuePair.Value - initialConfigFile.Add("Prefix", prefix.FullName) - .Add("BuildTool", buildTool) - |> Seq.map toConfigFileLine + configFileToBeWritten |> Seq.map toConfigFileLine + File.AppendAllLines(buildConfigFile.FullName, lines |> Array.ofSeq) let version = Misc.GetCurrentVersion(rootDir) @@ -180,25 +215,11 @@ let version = Misc.GetCurrentVersion(rootDir) let repoInfo = Git.GetRepoInfo() let frontend = - match buildTool, Misc.GuessPlatform() with - - // NOTE: 'dotnet build' cannot build Xamarin.Forms, and make.fsx doesn't support yet building - // with both dotnet & msbuild yet - | "dotnet", _ -> "Console" - - // because xbuild cannot build .NETStandard projects (and Frontend.XF proj needs to be) - | _, Misc.Platform.Linux -> - if areGtkLibsAbsentOrDoesNotApply then - "Console" - else - "Xamarin.Forms" - - // NOTE: even though Windows has msbuild too, its buildTool value contains full path so it won't - // match with the case below (and this is on purpose, since we don't build WinUI/UWP frontend yet) - | "msbuild", _ -> + if areGtkLibsAbsentOrDoesNotApply then + "Console" + else "Xamarin.Forms" - | _ -> "Console" Console.WriteLine() Console.WriteLine(sprintf @@ -211,9 +232,15 @@ Console.WriteLine(sprintf Console.WriteLine(sprintf "\t* F# script runner: %s" fsxRunner) -Console.WriteLine(sprintf - "\t* .NET build tool: %s" - (if buildTool = "dotnet" then "dotnet build" else buildTool)) + +match buildTool with +| Some _ -> Console.WriteLine "\t* Build tool: dotnet build" +| None -> () + +match legacyBuildTool with +| Some cmd -> Console.WriteLine(sprintf "\t* Legacy build tool: %s" cmd) +| None -> () + Console.WriteLine(sprintf "\t* Frontend: %s" frontend) 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 96d5579e1..71c9e55a1 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 @@ -33,9 +33,38 @@ open GWallet.Scripting let UNIX_NAME = "geewallet" let CONSOLE_FRONTEND = "GWallet.Frontend.Console" let GTK_FRONTEND = "GWallet.Frontend.XF.Gtk" -let DEFAULT_SOLUTION_FILE = "gwallet.core.sln" -let LINUX_SOLUTION_FILE = "gwallet.linux-legacy.sln" -let MAC_SOLUTION_FILE = "gwallet.mac-legacy.sln" + +type SolutionFile = + | Default + | Linux + | Mac + +let GetSolution (solType: SolutionFile) = + let solFileName = + match solType with + | Default -> +#if !LEGACY_FRAMEWORK + "gwallet.core.sln" +#else + "gwallet.core-legacy.sln" +#endif + | Linux -> "gwallet.linux-legacy.sln" + | Mac -> "gwallet.mac-legacy.sln" + + 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 = @@ -125,7 +154,21 @@ 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 + "restore %s -DisableParallelProcessing -SolutionDirectory ." + projectOrSolutionRelativePath + let proc = + Network.RunNugetCommand + FsxHelper.NugetExe + nugetArgs + Echo.All + false + match proc.Result with + | Error _ -> failwith "NuGet Restore failed ^" + | _ -> () + let PrintNugetVersion () = if not (FsxHelper.NugetExe.Exists) then false @@ -148,15 +191,18 @@ let PrintNugetVersion () = Console.WriteLine() Console.Out.Flush() failwith "nuget process' output contained errors ^" -#endif -let BuildSolution +let BuildSolutionOrProject (buildToolAndBuildArg: string*string) - (solutionFileName: string) + (fileName: string) (binaryConfig: BinaryConfig) (maybeConstant: Option) (extraOptions: string) = +#if LEGACY_FRAMEWORK + NugetRestore fileName +#endif + let buildTool,buildArg = buildToolAndBuildArg let configOption = @@ -209,7 +255,7 @@ let BuildSolution configOption let buildArgs = sprintf "%s %s %s %s" buildArg - solutionFileName + fileName configOptions extraOptions let buildProcess = Process.Execute ({ Command = buildTool; Arguments = buildArgs }, Echo.All) @@ -225,17 +271,17 @@ let BuildSolution let JustBuild binaryConfig maybeConstant: Frontend*FileInfo = let maybeBuildTool = Map.tryFind "BuildTool" buildConfigContents - let mainSolution = DEFAULT_SOLUTION_FILE - let buildTool,buildArg,solutionFileName = - match maybeBuildTool with - | None -> - failwith "A BuildTool should have been chosen by the configure script, please report this bug" - | Some "dotnet" -> + let maybeLegacyBuildTool = Map.tryFind "LegacyBuildTool" buildConfigContents + + let solutionFileName = GetSolution SolutionFile.Default + let getBuildToolAndArgs(buildTool: string) = + match buildTool with + | "dotnet" -> #if LEGACY_FRAMEWORK failwith "'dotnet' shouldn't be the build tool when using legacy framework, please report this bug" #endif - "dotnet", "build", mainSolution - | Some otherBuildTool -> + "dotnet", "build" + | otherBuildTool -> #if LEGACY_FRAMEWORK let nugetConfig = Path.Combine( @@ -249,62 +295,52 @@ let JustBuild binaryConfig maybeConstant: Frontend*FileInfo = |> FileInfo File.Copy(legacyNugetConfig.FullName, nugetConfig.FullName, true) - otherBuildTool, String.Empty, "gwallet.core-legacy.sln" + otherBuildTool, String.Empty #else - otherBuildTool, String.Empty, mainSolution + otherBuildTool, String.Empty #endif Console.WriteLine (sprintf "Building in %s mode..." (binaryConfig.ToString())) - BuildSolution - (buildTool, buildArg) - solutionFileName - binaryConfig - maybeConstant - String.Empty + + match maybeBuildTool, maybeLegacyBuildTool with + | Some buildTool, _ + | None, Some buildTool -> + BuildSolutionOrProject + (getBuildToolAndArgs buildTool) + solutionFileName + binaryConfig + maybeConstant + String.Empty + | None, None -> + failwith "A BuildTool or LegacyBuildTool should have been chosen by the configure script, please report this bug" let frontend = - // older mono versions (which only have xbuild, not msbuild) can't compile .NET Standard assemblies - if buildTool = "msbuild" then - -#if LEGACY_FRAMEWORK - // somehow, msbuild doesn't restore the frontend dependencies (e.g. Xamarin.Forms) when targetting - // the {LINUX|MAC}_SOLUTION_FILE below, so we need this workaround. TODO: report this bug - let ExplicitRestore projectOrSolutionRelativePath = - let nugetWorkaroundArgs = - sprintf - "restore %s -SolutionDirectory ." - projectOrSolutionRelativePath - Network.RunNugetCommand - FsxHelper.NugetExe - nugetWorkaroundArgs - Echo.All - true - |> ignore -#endif + match maybeBuildTool, maybeLegacyBuildTool with + | _, Some legacyBuildTool when legacyBuildTool = "msbuild" -> let MSBuildRestoreAndBuild solutionFile = - BuildSolution ("msbuild",buildArg) solutionFile binaryConfig maybeConstant "-target:Restore" - BuildSolution ("msbuild",buildArg) solutionFile binaryConfig maybeConstant "-target:Build" + BuildSolutionOrProject (getBuildToolAndArgs legacyBuildTool) solutionFile binaryConfig maybeConstant "-target:Restore" + // TODO: report as a bug the fact that /t:Restore;Build doesn't work while /t:Restore and later /t:Build does + BuildSolutionOrProject (getBuildToolAndArgs legacyBuildTool) solutionFile binaryConfig maybeConstant "-target:Build" match Misc.GuessPlatform () with | Misc.Platform.Mac -> - //this is because building in release requires code signing keys if binaryConfig = BinaryConfig.Debug then - let solution = MAC_SOLUTION_FILE -#if LEGACY_FRAMEWORK - ExplicitRestore solution -#endif + let solution = GetSolution SolutionFile.Mac + // somehow, msbuild doesn't restore the frontend dependencies (e.g. Xamarin.Forms) when targetting + // the {LINUX|MAC}_SOLUTION_FILE below, so we need this workaround. TODO: just finish migrating to MAUI(dotnet restore) + NugetRestore solution MSBuildRestoreAndBuild solution Frontend.Console | Misc.Platform.Linux -> if FsxHelper.AreGtkLibsPresent Echo.All then - let solution = LINUX_SOLUTION_FILE -#if LEGACY_FRAMEWORK - ExplicitRestore solution -#endif + let solution = GetSolution SolutionFile.Linux + // somehow, msbuild doesn't restore the frontend dependencies (e.g. Xamarin.Forms) when targetting + // the {LINUX|MAC}_SOLUTION_FILE below, so we need this workaround. TODO: just finish migrating to MAUI(dotnet restore) + NugetRestore solution MSBuildRestoreAndBuild solution Frontend.Gtk @@ -312,9 +348,30 @@ let JustBuild binaryConfig maybeConstant: Frontend*FileInfo = Frontend.Console | _ -> Frontend.Console - - else - Frontend.Console + | Some buildTool, Some legacyBuildTool when buildTool = "dotnet" && legacyBuildTool = "xbuild" -> + if FsxHelper.AreGtkLibsPresent Echo.All then + BuildSolutionOrProject + (getBuildToolAndArgs buildTool) + (GetProject ProjectFile.XFFrontend) + binaryConfig + maybeConstant + String.Empty + + let twoPhaseFlag = "/property:TwoPhaseBuildDueToXBuildUsage=true" + + let gtkFrontendProject = GetProject ProjectFile.GtkFrontend + NugetRestore gtkFrontendProject + BuildSolutionOrProject + (legacyBuildTool, twoPhaseFlag) + gtkFrontendProject + binaryConfig + maybeConstant + "/target:Build" + + Frontend.Gtk + else + Frontend.Console + | _ -> Frontend.Console let scriptName = sprintf "%s-%s" UNIX_NAME (frontend.ToString().ToLower()) let launcherScriptFile = @@ -368,6 +425,10 @@ let GetPathToBackend () = Path.Combine (FsxHelper.RootDir.FullName, "src", BACKEND) let MakeAll (maybeConstant: Option) = +#if LEGACY_FRAMEWORK + if not FsxHelper.NugetExe.Exists then + Network.DownloadNugetExe FsxHelper.NugetExe +#endif let buildConfig = BinaryConfig.Debug let frontend,_ = JustBuild buildConfig maybeConstant frontend,buildConfig diff --git a/scripts/snap_build.sh b/scripts/snap_build.sh index f73636d6c..2a6c07e3a 100755 --- a/scripts/snap_build.sh +++ b/scripts/snap_build.sh @@ -3,7 +3,7 @@ set -euxo pipefail # this is the equivalent of using the 'build-packages' (not stage-packages) section in snapcraft # but as we're not using the 'make' plugin, we need to this manually now -DEBIAN_FRONTEND=noninteractive sudo apt install -y fsharp build-essential pkg-config cli-common-dev mono-devel libgtk2.0-cil-dev +DEBIAN_FRONTEND=noninteractive sudo apt install -y fsharp build-essential pkg-config cli-common-dev mono-devel libgtk2.0-cil-dev dotnet6 # just in case this is a retry-run, we want to clean artifacts from previous try rm -rf ./staging diff --git a/scripts/snap_install_as_docker.sh b/scripts/snap_install_as_docker.sh index 3d54327a4..92ea1cd26 100755 --- a/scripts/snap_install_as_docker.sh +++ b/scripts/snap_install_as_docker.sh @@ -133,7 +133,5 @@ echo " done" $SUDO docker exec $CONTNAME snap install core || clean_up echo "container $CONTNAME started ..." -$SUDO docker exec $CONTNAME scripts/install_mono_from_microsoft_deb_packages.sh - print_info rm_builddir diff --git a/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj b/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj index 3d974f42d..7657a1ea9 100644 --- a/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj +++ b/src/GWallet.Backend.Tests/GWallet.Backend.Tests-legacy.fsproj @@ -18,6 +18,7 @@ /warnon:3218 /warnon:0193 + obj\legacy\ true diff --git a/src/GWallet.Frontend.Console/GWallet.Frontend.Console-legacy.fsproj b/src/GWallet.Frontend.Console/GWallet.Frontend.Console-legacy.fsproj index d585a508f..2cf63c863 100644 --- a/src/GWallet.Frontend.Console/GWallet.Frontend.Console-legacy.fsproj +++ b/src/GWallet.Frontend.Console/GWallet.Frontend.Console-legacy.fsproj @@ -19,6 +19,7 @@ /warnon:3218 /warnon:0193 + obj\legacy\ true diff --git a/src/GWallet.Frontend.XF.Gtk/GWallet.Frontend.XF.Gtk.fsproj b/src/GWallet.Frontend.XF.Gtk/GWallet.Frontend.XF.Gtk.fsproj index 95cfb882c..4cbbceac4 100644 --- a/src/GWallet.Frontend.XF.Gtk/GWallet.Frontend.XF.Gtk.fsproj +++ b/src/GWallet.Frontend.XF.Gtk/GWallet.Frontend.XF.Gtk.fsproj @@ -224,6 +224,12 @@ ..\..\packages\Fsdk.0.6.0--date20230530-1155.git-3bb8d08\lib\netstandard2.0\Fsdk.dll + + ..\GWallet.Backend\bin\$(Configuration)\netstandard2.0\GWallet.Backend.dll + + + ..\GWallet.Frontend.XF\bin\$(Configuration)\netstandard2.0\GWallet.Frontend.XF.dll + @@ -240,11 +246,11 @@ logo.png PreserveNewest - + {85236682-6463-4209-B66C-E0643EF12B46} GWallet.Frontend.XF - + GWallet.Backend @@ -253,5 +259,5 @@ - + diff --git a/gwallet-legacy.sln b/src/gwallet-legacy.sln similarity index 88% rename from gwallet-legacy.sln rename to src/gwallet-legacy.sln index 9a069b97d..baf5d9147 100644 --- a/gwallet-legacy.sln +++ b/src/gwallet-legacy.sln @@ -2,57 +2,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy", "src\GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy", "GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "src\GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "src\GWallet.Frontend.Console\GWallet.Frontend.Console-legacy.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "GWallet.Frontend.Console\GWallet.Frontend.Console-legacy.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{9DFD61F8-2CED-47F1-BB3A-48A383D4751D}" - ProjectSection(SolutionItems) = preProject - configure.sh = configure.sh - Makefile = Makefile - scripts\configure.fsx = scripts\configure.fsx - scripts\make.fsx = scripts\make.fsx - scripts\make.sh = scripts\make.sh - scripts\bump.fsx = scripts\bump.fsx - scripts\sanitycheck.fsx = scripts\sanitycheck.fsx - scripts\fsxHelper.fs = scripts\fsxHelper.fs - scripts\snap_release.fsx = scripts\snap_release.fsx - scripts\githubActions.fs = scripts\githubActions.fs - scripts\find.fsx = scripts\find.fsx - scripts\bump.fsx = scripts\bump.fsx - EndProjectSection +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GWallet.Backend", "GWallet.Backend\GWallet.Backend.fsproj", "{D1D192E0-F226-40AD-8D81-687F7E6F7DAB}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GWallet.Backend", "src\GWallet.Backend\GWallet.Backend.fsproj", "{D1D192E0-F226-40AD-8D81-687F7E6F7DAB}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Mac", "GWallet.Frontend.XF.Mac\GWallet.Frontend.XF.Mac.fsproj", "{9E020D62-9160-49AC-A9CD-476CADAE0B87}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Mac", "src\GWallet.Frontend.XF.Mac\GWallet.Frontend.XF.Mac.fsproj", "{9E020D62-9160-49AC-A9CD-476CADAE0B87}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GWallet.Frontend.XF.UWP", "GWallet.Frontend.XF.UWP\GWallet.Frontend.XF.UWP.csproj", "{DD7B4A7D-02E7-4DF7-9894-25743BDEC0C0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GWallet.Frontend.XF.UWP", "src\GWallet.Frontend.XF.UWP\GWallet.Frontend.XF.UWP.csproj", "{DD7B4A7D-02E7-4DF7-9894-25743BDEC0C0}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Gtk", "GWallet.Frontend.XF.Gtk\GWallet.Frontend.XF.Gtk.fsproj", "{578E4F5E-A33D-4C04-BD6C-22B48B789F36}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C90A30F5-1423-44B2-A8D4-ED5FEDD4E36F}" - ProjectSection(SolutionItems) = preProject - CONTRIBUTING.md = CONTRIBUTING.md - ReadMe.md = ReadMe.md - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Android", "GWallet.Frontend.XF.Android\GWallet.Frontend.XF.Android.fsproj", "{24B7E0C6-9113-4430-8614-6E3AED7FE0C0}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Gtk", "src\GWallet.Frontend.XF.Gtk\GWallet.Frontend.XF.Gtk.fsproj", "{578E4F5E-A33D-4C04-BD6C-22B48B789F36}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GWallet.Frontend.XF", "GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{85236682-6463-4209-B66C-E0643EF12B46}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Android", "src\GWallet.Frontend.XF.Android\GWallet.Frontend.XF.Android.fsproj", "{24B7E0C6-9113-4430-8614-6E3AED7FE0C0}" -EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "GWallet.Frontend.XF", "src\GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{85236682-6463-4209-B66C-E0643EF12B46}" -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.iOS", "src\GWallet.Frontend.XF.iOS\GWallet.Frontend.XF.iOS.fsproj", "{5DD656CE-3319-46BB-B47F-BBED8CC722FD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fsdk", "Fsdk", "{6EE07541-91A1-42C2-A21F-2809BBDC2F50}" - ProjectSection(SolutionItems) = preProject - scripts\fsx\Fsdk\Misc.fs = scripts\fsx\InfraLib\Misc.fs - scripts\fsx\Fsdk\Unix.fs = scripts\fsx\InfraLib\Unix.fs - scripts\fsx\Fsdk\Taiga.fs = scripts\fsx\InfraLib\Taiga.fs - scripts\fsx\Fsdk\Process.fs = scripts\fsx\InfraLib\Process.fs - scripts\fsx\Fsdk\Network.fs = scripts\fsx\InfraLib\Network.fs - scripts\fsx\Fsdk\Git.fs = scripts\fsx\InfraLib\Git.fs - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.iOS", "GWallet.Frontend.XF.iOS\GWallet.Frontend.XF.iOS.fsproj", "{5DD656CE-3319-46BB-B47F-BBED8CC722FD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -308,9 +276,6 @@ Global {5DD656CE-3319-46BB-B47F-BBED8CC722FD}.Release|x86.ActiveCfg = Release|iPhoneSimulator {5DD656CE-3319-46BB-B47F-BBED8CC722FD}.Release|x86.Build.0 = Release|iPhoneSimulator EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {6EE07541-91A1-42C2-A21F-2809BBDC2F50} = {CE79AB9D-0FB9-4606-B7C6-A78C0858CC54} - EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection diff --git a/gwallet.core-legacy.sln b/src/gwallet.core-legacy.sln similarity index 68% rename from gwallet.core-legacy.sln rename to src/gwallet.core-legacy.sln index 727ee6368..65787ba68 100644 --- a/gwallet.core-legacy.sln +++ b/src/gwallet.core-legacy.sln @@ -3,22 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "src\GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "src\GWallet.Frontend.Console\GWallet.Frontend.Console-legacy.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "GWallet.Frontend.Console\GWallet.Frontend.Console-legacy.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "src\GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CE79AB9D-0FB9-4606-B7C6-A78C0858CC54}" - ProjectSection(SolutionItems) = preProject - configure.fsx = configure.fsx - configure.sh = configure.sh - fsicheck.sh = fsicheck.sh - Infra.fs = Infra.fs - make.fsx = make.fsx - make.sh = make.sh - Makefile = Makefile - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,8 +28,6 @@ Global {F9448076-88BE-4045-8704-A652D133E036}.Release|Any CPU.ActiveCfg = Release|Any CPU {F9448076-88BE-4045-8704-A652D133E036}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection - GlobalSection(NestedProjects) = preSolution - EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection diff --git a/gwallet.core.sln b/src/gwallet.core.sln similarity index 69% rename from gwallet.core.sln rename to src/gwallet.core.sln index 60cd41057..49bfc8323 100644 --- a/gwallet.core.sln +++ b/src/gwallet.core.sln @@ -3,22 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "src\GWallet.Backend\GWallet.Backend.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "GWallet.Backend\GWallet.Backend.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "src\GWallet.Frontend.Console\GWallet.Frontend.Console.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.Console", "GWallet.Frontend.Console\GWallet.Frontend.Console.fsproj", "{8413EEF5-69F5-499F-AE01-754E9541EF90}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "src\GWallet.Backend.Tests\GWallet.Backend.Tests.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{CE79AB9D-0FB9-4606-B7C6-A78C0858CC54}" - ProjectSection(SolutionItems) = preProject - configure.fsx = configure.fsx - configure.sh = configure.sh - fsicheck.sh = fsicheck.sh - Infra.fs = Infra.fs - make.fsx = make.fsx - make.sh = make.sh - Makefile = Makefile - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "GWallet.Backend.Tests\GWallet.Backend.Tests.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,8 +28,6 @@ Global {F9448076-88BE-4045-8704-A652D133E036}.Release|Any CPU.ActiveCfg = Release|Any CPU {F9448076-88BE-4045-8704-A652D133E036}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection - GlobalSection(NestedProjects) = preSolution - EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection diff --git a/gwallet.linux-legacy.sln b/src/gwallet.linux-legacy.sln similarity index 69% rename from gwallet.linux-legacy.sln rename to src/gwallet.linux-legacy.sln index 59437a551..3e7a6593d 100644 --- a/gwallet.linux-legacy.sln +++ b/src/gwallet.linux-legacy.sln @@ -1,25 +1,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "src\GWallet.Backend\GWallet.Backend.fsproj", "{949A9225-A1BE-4EDA-A1DA-04AC131CFE9B}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "GWallet.Backend\GWallet.Backend.fsproj", "{949A9225-A1BE-4EDA-A1DA-04AC131CFE9B}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF", "src\GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{2C7A1A49-CAD1-4961-866A-D32868AE7D18}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF", "GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{2C7A1A49-CAD1-4961-866A-D32868AE7D18}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Gtk", "src\GWallet.Frontend.XF.Gtk\GWallet.Frontend.XF.Gtk.fsproj", "{578E4F5E-A33D-4C04-BD6C-22B48B789F36}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Gtk", "GWallet.Frontend.XF.Gtk\GWallet.Frontend.XF.Gtk.fsproj", "{578E4F5E-A33D-4C04-BD6C-22B48B789F36}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3703CCD5-CB28-45FE-8FD5-BBE5DFF62706}" - ProjectSection(SolutionItems) = preProject - scripts\configure.fsx = scripts\configure.fsx - scripts\fsicheck.sh = scripts\fsicheck.sh - scripts\Infra.fs = scripts\Infra.fs - scripts\make.fsx = scripts\make.fsx - scripts\make.sh = scripts\make.sh - scripts\replace.fsx = scripts\replace.fsx - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy`", "GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy`", "src\GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "src\GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/gwallet.mac-legacy.sln b/src/gwallet.mac-legacy.sln similarity index 86% rename from gwallet.mac-legacy.sln rename to src/gwallet.mac-legacy.sln index d278dba9e..3cd714e63 100644 --- a/gwallet.mac-legacy.sln +++ b/src/gwallet.mac-legacy.sln @@ -1,27 +1,17 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "src\GWallet.Backend\GWallet.Backend.fsproj", "{949A9225-A1BE-4EDA-A1DA-04AC131CFE9B}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend", "GWallet.Backend\GWallet.Backend.fsproj", "{949A9225-A1BE-4EDA-A1DA-04AC131CFE9B}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF", "src\GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{2C7A1A49-CAD1-4961-866A-D32868AE7D18}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF", "GWallet.Frontend.XF\GWallet.Frontend.XF.fsproj", "{2C7A1A49-CAD1-4961-866A-D32868AE7D18}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{3703CCD5-CB28-45FE-8FD5-BBE5DFF62706}" - ProjectSection(SolutionItems) = preProject - scripts\configure.fsx = scripts\configure.fsx - scripts\fsicheck.sh = scripts\fsicheck.sh - scripts\Infra.fs = scripts\Infra.fs - scripts\make.fsx = scripts\make.fsx - scripts\make.sh = scripts\make.sh - scripts\replace.fsx = scripts\replace.fsx - EndProjectSection +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.iOS", "GWallet.Frontend.XF.iOS\GWallet.Frontend.XF.iOS.fsproj", "{5DD656CE-3319-46BB-B47F-BBED8CC722FD}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.iOS", "src\GWallet.Frontend.XF.iOS\GWallet.Frontend.XF.iOS.fsproj", "{5DD656CE-3319-46BB-B47F-BBED8CC722FD}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Android", "GWallet.Frontend.XF.Android\GWallet.Frontend.XF.Android.fsproj", "{24B7E0C6-9113-4430-8614-6E3AED7FE0C0}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Frontend.XF.Android", "src\GWallet.Frontend.XF.Android\GWallet.Frontend.XF.Android.fsproj", "{24B7E0C6-9113-4430-8614-6E3AED7FE0C0}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy", "GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Legacy", "src\GWallet.Backend\GWallet.Backend-legacy.fsproj", "{96F9B3E5-11F8-4F5F-AADC-51D0D995B3D2}" -EndProject -Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "src\GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "GWallet.Backend.Tests", "GWallet.Backend.Tests\GWallet.Backend.Tests-legacy.fsproj", "{F9448076-88BE-4045-8704-A652D133E036}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution