From ddeea840acde2f9f95f4e7c27206d96578db8c5d Mon Sep 17 00:00:00 2001 From: Erik Repo <84872500+BiologyTools@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:44:16 +0200 Subject: [PATCH] Update BUILDING.md Updated building instructions adding BioGTKApp setup. --- BUILDING.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index f8678fc..79a17ab 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,10 +1,41 @@ # Building BioGTK -- Clone the repository then run the following dotnet build script based on your platform and CPU. +- Clone the BioGTK repository then create a new .NET8 project named "BioGTKApp" + - Add the following code to Program.cs +``` +using Gtk; +using BioGTK; +using Application = Gtk.Application; + +namespace BioGTKApp +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main(string[] args) + { + Console.WriteLine("Initializing GTK."); + Application.Init(); + Console.WriteLine("Creating NodeView."); + BioGTK.NodeView node = BioGTK.NodeView.Create(args); + Console.WriteLine("Show NodeView."); + node.Show(); + Console.WriteLine("Application.Run()"); + Application.Run(); + Console.WriteLine("Application Started."); + } + } +} +``` +- Then run the following dotnet build script based on your platform and CPU. - dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-x64 -p:Configuration=Release - dotnet msbuild -t:BundleApp -p:RuntimeIdentifier=osx-arm64 -p:Configuration=Release - dotnet msbuild BioGTKApp.csproj /t:CreateTarball /p:RuntimeIdentifier=linux-arm64 /p:Configuration=Release - dotnet msbuild BioGTKApp.csproj /t:CreateTarball /p:RuntimeIdentifier=linux-x64 /p:Configuration=Release + - dotnet publish -c Release -r win-x64 --self-contained false /p:Platform="Any CPU" -o ./publish # Building Micro-SAM ONNX models. - Recommended to just download the pre-built models from [Zenodo releases](https://zenodo.org/records/14343909). Due to the large amount of dependencies etc. required to install & run Micro-SAM repository.