Skip to content

Building Bloxstrap from source

Matt edited this page Oct 5, 2024 · 19 revisions

Warning

The .NET 9 SDK is not yet supported. If you're having issues with building, try uninstalling it and get the .NET 8 SDK instead.

These are instructions for people who want to compile and build the source code for contributing, debugging, etc. If you simply just want to download and install Bloxstrap, see the Installing section in the README. If you're just looking to use a commit that doesn't have a published release, obtain a build artifact from GitHub Actions.

Note that this can only be done on Windows as this uses the .NET Desktop Runtime.

First, download the source repository using either git clone or GitHub Desktop. Don't download it as a ZIP archive as you'll just run into problems without using git.

> git clone https://github.com/pizzaboxer/bloxstrap.git
> cd bloxstrap
> git submodule init 
> git submodule update

From there, there's two ways to build the source code. If you don't already have Visual Studio installed, it's recommended to just build with .NET CLI.

Note that these instructions are for building a release binary. Otherwise, you can just use the Visual Studio debugger.

Build with Visual Studio

Open Bloxstrap.sln in Visual Studio, right-click the Bloxstrap project in the Solution Explorer, and select 'Publish'. Configure your build options if you need to (though you shouldn't have to change anything), and click 'Publish'.

image image

Build with .NET CLI

If you don't have Visual Studio installed, you can just download and install the .NET 6 SDK for this one.

Open a terminal, and set your location to the folder containing Bloxstrap.sln. Then, run the following command:

> dotnet publish Bloxstrap /p:PublishProfile=Publish-x64

If you need to configure any build options, run dotnet help publish to learn how to configure options for publishing.

After you've finished building

Navigate to the Bloxstrap folder (the one containing Bloxstrap.csproj), where the compiled binaries are located in bin\Release\net6.0-windows\publish. From there, you can either run and install it fresh, or copy it into your Bloxstrap install location.

image

If you've come this far, you may also want to disable automatic updating for convenience.

Clone this wiki locally