Skip to content

Compiling from source

oxygen-dioxide edited this page Dec 8, 2023 · 5 revisions

Compiling OpenUtau from source

Compiling OpenUtau can be done easily.

Prerequisites

You will need the .NET 6.0 SDK.

For Windows and Mac you can get it here

On Ubuntu, Debian, or any derivatives (e.g. Linux Mint):

sudo apt install dotnet-sdk-6.0

On an Arch-based distro:

sudo pacman -S dotnet-sdk

For other instructions see the link above.

You will also neet Git. Windows | Mac | Linux

Download source code

Once you have the prerequisites set up, run the following command to clone the repository

git clone https://github.com/stakira/OpenUtau.git

Building in Visual Studio

Visual Studio is an IDE for .NET that supports Windows.

Download and install Visual Studio Community 2022 from Visual Studio Official Website. Choose ".NET Desktop Development" workload when installing.

Open "OpenUtau.sln" with Visual Studio.

Choose "OpenUtau" and click the green ▶ icon to run.

Building in Visual Studio Code

Visual Studio Code (aka. VSCode) is a lightweight code editor that supports Windows, MacOS and Linux.

Download and install VSCode from VSCode official website

Launch VSCode, search and install the C# extension.

image

Open the directory where you've downloaded the source code of OpenUtau and open any .cs file. A notification saying "Required assets to build and debug are missing from 'OpenUtau'. Add them?" will pop up. Click "Yes".

image

Open .vscode/launch.json, change the "OpenUtau.dll" to the executable file name on your OS, like "OpenUtau.exe" on windows.

image

Click "Run → Start Debugging"

Building in GitHub Codespaces

GitHub Codespaces is an online linux environment provided by GitHub with a vscode webui. Users can access to GitHub Codespaces from any device with a browser.

On OpenUtau's repo page, click "Code → Codespaces → +"

image

Open any .cs file under the OpenUtau folder, and click the Debug button

image

Ports → Add Port → input 6080 → Open In Browser

image

In the noVNC page poped up, connect → input vscode

image

Successfully connected to the remote desktop of GitHub Codespaces.

image

Building from command line

Navigate to the directory via command line

cd OpenUtau

And finally, to compile, run the following commands:

dotnet restore OpenUtau

dotnet build OpenUtau

The executable files will be in the directory OpenUtau/OpenUtau/bin/Debug/net6.0