Skip to content

Commit

Permalink
Move non-main solutions to src/
Browse files Browse the repository at this point in the history
This way they don't get confused with the main solution
(and still can be used by make.fsx to build with the command
line).
  • Loading branch information
knocte committed Aug 13, 2023
1 parent d572428 commit 2e829d9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions scripts/make.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,26 @@ open GWallet.Scripting
let UNIX_NAME = "geewallet"
let CONSOLE_FRONTEND = "GWallet.Frontend.Console"
let GTK_FRONTEND = "GWallet.Frontend.XF.Gtk"
let DEFAULT_SOLUTION_FILE =

type SolutionFile =
| Default
| Linux
| Mac

let GetSolution (solType: SolutionFile) =
let solFileName =
match solType with
| Default ->
#if !LEGACY_FRAMEWORK
"gwallet.core.sln"
"gwallet.core.sln"
#else
"gwallet.core-legacy.sln"
"gwallet.core-legacy.sln"
#endif
let LINUX_SOLUTION_FILE = "gwallet.linux-legacy.sln"
let MAC_SOLUTION_FILE = "gwallet.mac-legacy.sln"
| Linux -> "gwallet.linux-legacy.sln"
| Mac -> "gwallet.mac-legacy.sln"

Path.Combine("src", solFileName)

let BACKEND = "GWallet.Backend"

type Frontend =
Expand Down Expand Up @@ -247,7 +259,7 @@ let BuildSolution

let JustBuild binaryConfig maybeConstant: Frontend*FileInfo =
let maybeBuildTool = Map.tryFind "BuildTool" buildConfigContents
let solutionFileName = DEFAULT_SOLUTION_FILE
let solutionFileName = GetSolution SolutionFile.Default
let buildTool,buildArg =
match maybeBuildTool with
| None ->
Expand Down Expand Up @@ -299,7 +311,7 @@ let JustBuild binaryConfig maybeConstant: Frontend*FileInfo =

//this is because building in release requires code signing keys
if binaryConfig = BinaryConfig.Debug then
let solution = MAC_SOLUTION_FILE
let solution = GetSolution SolutionFile.Mac
#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: just finish migrating to MAUI(dotnet restore)
Expand All @@ -310,7 +322,7 @@ let JustBuild binaryConfig maybeConstant: Frontend*FileInfo =
Frontend.Console
| Misc.Platform.Linux ->
if FsxHelper.AreGtkLibsPresent Echo.All then
let solution = LINUX_SOLUTION_FILE
let solution = GetSolution SolutionFile.Linux
#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: just finish migrating to MAUI(dotnet restore)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2e829d9

Please sign in to comment.