From 2f0abeb4e9f0176af4daa1376cc14cc86462614e Mon Sep 17 00:00:00 2001 From: Llaurence Date: Thu, 17 Jan 2019 18:19:30 +0100 Subject: [PATCH 01/13] Update 'Building and Running' in README.md --- README.md | 65 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a2f6472371..3dd96773f2 100644 --- a/README.md +++ b/README.md @@ -13,23 +13,68 @@ We are accepting bug reports (please report with as much detail as possible). Fe - A desktop platform with the [.NET Core SDK 2.2](https://www.microsoft.com/net/learn/get-started) or higher installed. - When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio Community Edition](https://www.visualstudio.com/) (Windows), [Visual Studio Code](https://code.visualstudio.com/) (with the C# plugin installed) or [Jetbrains Rider](https://www.jetbrains.com/rider/) (commercial). -# Building and running +# Running osu! -If you are not interested in developing the game, please head over to the [releases](https://github.com/ppy/osu/releases) to download a precompiled build with automatic updating enabled (download and run the install executable for your platform). +## Releases -Clone the repository including submodules +If you are not interested in developing the game, please head over to the [releases](https://github.com/ppy/osu/releases) to download a precompiled build with automatic updating enabled. -`git clone --recurse-submodules https://github.com/ppy/osu` +- Windows 64 bit users should download and run `install.exe`. +- MacOS users should download and run `osu.app.zip`. -Build and run +There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see bellow). -- Using Visual Studio 2017, Rider or Visual Studio Code (configurations are included) -- From command line using `dotnet run --project osu.Desktop`. When building for non-development purposes, add `-c Release` to gain higher performance. -- To run with code analysis, instead use `powershell ./build.ps1` or `build.sh`. This is currently only supported under windows due to [resharper cli shortcomings](https://youtrack.jetbrains.com/issue/RSRP-410004). Alternative, you can install resharper or use rider to get inline support in your IDE of choice. +## Downloading the source code -Note: If you run from command line under linux, you will need to prefix the output folder to your `LD_LIBRARY_PATH`. See `.vscode/launch.json` for an example +Clone the repository **including submodules**: -If you run into issues building you may need to restore nuget packages (commonly via `dotnet restore`). Visual Studio Code users must run `Restore` task from debug tab before attempt to build. +``` +git clone --recurse-submodules https://github.com/ppy/osu +cd osu +``` + +> If you forgot the `--recurse-submodules` option, run this command inside the `osu` directory: +> +> `git submodule update --init --recursive` + +To update the source code to the latest commit, run the following command inside the `osu` directory: + +``` +git pull --recurse-submodules +``` + +## Building + +Configuration for Visual Studio 2017, Rider and Visual Studio Code is included in the source code. + +> Visual Studio Code users must run the `Restore` task before any build attempt. + +You can also build osu! from the command-line, with `dotnet`: + +``` +dotnet restore +dotnet run --project osu.Desktop -c Release +``` + +The `-c Release` option **must be omitted** when building for development purposes. + +### A note for Linux users + +On Linux, the environment variable `LD_LIBRARY_PATH` must point to the build directory (replace `Release` with `Debug` in the following paths if you do not want to include the `-c Release` flag). + +The build directory is located at `osu.Desktop/bin/Release/netcoreappX.X`, where `X.X` is the version of the .NET Core SDK (see Requirements). The required value can be found in `osu.Desktop/osu.Desktop.csproj`, look for a line starting with "TargetFramework". + +For example, you can run osu! with the following commands: + +``` +export NETCORE_VERSION="$(grep TargetFramework osu.Desktop/osu.Desktop.csproj | sed -r 's/.*>(.*)<\/.*/\1/')" +export LD_LIBRARY_PATH="$(pwd)/osu.Desktop/bin/Release/$NETCORE_VERSION" +dotnet run --project osu.Desktop -c Release +``` + +## Code analysis + +Code analysis can be run with `powershell ./build.ps1` or `build.sh`. This is currently only supported under windows due to [resharper cli shortcomings](https://youtrack.jetbrains.com/issue/RSRP-410004). Alternative, you can install resharper or use rider to get inline support in your IDE of choice. # Contributing From 0c26145fd105fff9470fa46dc9455f9b00ece4e8 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Thu, 17 Jan 2019 19:23:44 +0000 Subject: [PATCH 02/13] bellow -> below Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3dd96773f2..36dfe4fc7c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ If you are not interested in developing the game, please head over to the [relea - Windows 64 bit users should download and run `install.exe`. - MacOS users should download and run `osu.app.zip`. -There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see bellow). +There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see below). ## Downloading the source code From 209deb842af7769308f7de07e691fe1a48bb0419 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 16:14:52 +0900 Subject: [PATCH 03/13] Add note about iOS --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 36dfe4fc7c..9c484503fe 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ If you are not interested in developing the game, please head over to the [relea - Windows 64 bit users should download and run `install.exe`. - MacOS users should download and run `osu.app.zip`. +- iOS users can join the [TestFlight beta program](https://t.co/xQJmHkfC18). There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see below). From 32940074afe8ed640a67809bb1fa080d62f71c5c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 08:50:36 +0000 Subject: [PATCH 04/13] Windows 64 bit -> Windows (x64) Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c484503fe..955c38d0b4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We are accepting bug reports (please report with as much detail as possible). Fe If you are not interested in developing the game, please head over to the [releases](https://github.com/ppy/osu/releases) to download a precompiled build with automatic updating enabled. -- Windows 64 bit users should download and run `install.exe`. +- Windows (x64) users should download and run `install.exe`. - MacOS users should download and run `osu.app.zip`. - iOS users can join the [TestFlight beta program](https://t.co/xQJmHkfC18). From 55286922602ef99c5dd3b68e2260ef2014a11d0b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 08:51:06 +0000 Subject: [PATCH 05/13] Specify macOS version Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 955c38d0b4..59a2f821c6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ We are accepting bug reports (please report with as much detail as possible). Fe If you are not interested in developing the game, please head over to the [releases](https://github.com/ppy/osu/releases) to download a precompiled build with automatic updating enabled. - Windows (x64) users should download and run `install.exe`. -- MacOS users should download and run `osu.app.zip`. +- macOS users (10.12 "Sierra" and higher) should download and run `osu.app.zip`. - iOS users can join the [TestFlight beta program](https://t.co/xQJmHkfC18). There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see below). From 6aaedb880837fdb82991a0622ae0be2cab97e597 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 08:51:57 +0000 Subject: [PATCH 06/13] Reword the "other platforms have no prebuilt binaries" sentence Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 59a2f821c6..c6fd17ad2d 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ If you are not interested in developing the game, please head over to the [relea - macOS users (10.12 "Sierra" and higher) should download and run `osu.app.zip`. - iOS users can join the [TestFlight beta program](https://t.co/xQJmHkfC18). -There is currently no release for Windows 32 bit, Linux, or any other platform. If you are not running Windows 64 bit or MacOS, you should build osu! from the source code (see below). +If your platform is not listed above, there is still a chance you can manually build it by following the instructions below. ## Downloading the source code From 94648658f79af3c576f2dbb29b86f0999e8995cf Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 08:52:31 +0000 Subject: [PATCH 07/13] Links to ides sites Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6fd17ad2d..cd813704d4 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ git pull --recurse-submodules ## Building -Configuration for Visual Studio 2017, Rider and Visual Studio Code is included in the source code. +Build configurations for [Visual Studio 2017+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/) and [Visual Studio Code](https://code.visualstudio.com/) are included in the source code. > Visual Studio Code users must run the `Restore` task before any build attempt. From 2db28468821b747f83845b1287ece0956f834d44 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 18 Jan 2019 08:52:52 +0000 Subject: [PATCH 08/13] Remove "with dotnet" Co-Authored-By: Llaurence <40535137+Llaurence@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd813704d4..8faf83786f 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Build configurations for [Visual Studio 2017+](https://visualstudio.microsoft.co > Visual Studio Code users must run the `Restore` task before any build attempt. -You can also build osu! from the command-line, with `dotnet`: +You can also build osu! from the command-line: ``` dotnet restore From c3c1e1930148ecc6efffef6e85090ea126775608 Mon Sep 17 00:00:00 2001 From: Llaurence Date: Fri, 18 Jan 2019 10:07:42 +0100 Subject: [PATCH 09/13] Release -> Debug by default, linux note rewrite --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 8faf83786f..1961f59ef5 100644 --- a/README.md +++ b/README.md @@ -53,24 +53,23 @@ Build configurations for [Visual Studio 2017+](https://visualstudio.microsoft.co You can also build osu! from the command-line: ``` -dotnet restore -dotnet run --project osu.Desktop -c Release +dotnet run --project osu.Desktop ``` -The `-c Release` option **must be omitted** when building for development purposes. +If you are not interested in debugging osu!, you can add `-c Release` to gain performance. In this case, you must replace `Debug` with `Release` in the following section. + +If the build fails, try to restore nuget packages with `dotnet restore`. ### A note for Linux users -On Linux, the environment variable `LD_LIBRARY_PATH` must point to the build directory (replace `Release` with `Debug` in the following paths if you do not want to include the `-c Release` flag). +On Linux, the environment variable `LD_LIBRARY_PATH` must point to the build directory, located at `osu.Desktop/bin/Debug/$NETCORE_VERSION`. -The build directory is located at `osu.Desktop/bin/Release/netcoreappX.X`, where `X.X` is the version of the .NET Core SDK (see Requirements). The required value can be found in `osu.Desktop/osu.Desktop.csproj`, look for a line starting with "TargetFramework". +`$NETCORE_VERSION` is the version of .NET Core SDK. You can have it with `grep TargetFramework osu.Desktop/osu.Desktop.csproj | sed -r 's/.*>(.*)<\/.*/\1/'`. -For example, you can run osu! with the following commands: +For example, you can run osu! with the following command: ``` -export NETCORE_VERSION="$(grep TargetFramework osu.Desktop/osu.Desktop.csproj | sed -r 's/.*>(.*)<\/.*/\1/')" -export LD_LIBRARY_PATH="$(pwd)/osu.Desktop/bin/Release/$NETCORE_VERSION" -dotnet run --project osu.Desktop -c Release +LD_LIBRARY_PATH="$(pwd)/osu.Desktop/bin/Debug/netcoreapp2.2" dotnet run --project osu.Desktop ``` ## Code analysis From e5610b61eb7ab130eaacb2c36d2cb6968660de0e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 20 Jan 2019 11:13:15 +0900 Subject: [PATCH 10/13] Final pass --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1961f59ef5..c031b10ccd 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ We are accepting bug reports (please report with as much detail as possible). Fe # Requirements - A desktop platform with the [.NET Core SDK 2.2](https://www.microsoft.com/net/learn/get-started) or higher installed. -- When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio Community Edition](https://www.visualstudio.com/) (Windows), [Visual Studio Code](https://code.visualstudio.com/) (with the C# plugin installed) or [Jetbrains Rider](https://www.jetbrains.com/rider/) (commercial). +- When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio 2017+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/) or [Visual Studio Code](https://code.visualstudio.com/). # Running osu! @@ -29,7 +29,7 @@ If your platform is not listed above, there is still a chance you can manually b Clone the repository **including submodules**: -``` +```shell git clone --recurse-submodules https://github.com/ppy/osu cd osu ``` @@ -40,19 +40,19 @@ cd osu To update the source code to the latest commit, run the following command inside the `osu` directory: -``` +```shell git pull --recurse-submodules ``` ## Building -Build configurations for [Visual Studio 2017+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/) and [Visual Studio Code](https://code.visualstudio.com/) are included in the source code. +Build configurations for the recommended IDEs (listed above) are included. You should use the provided Build/Run functionality of your IDE to get things going. When testing or building new components, it's highly encouraged you use the `VisualTests` project/configuration. More information on this provided below. > Visual Studio Code users must run the `Restore` task before any build attempt. You can also build osu! from the command-line: -``` +```shell dotnet run --project osu.Desktop ``` @@ -68,7 +68,7 @@ On Linux, the environment variable `LD_LIBRARY_PATH` must point to the build dir For example, you can run osu! with the following command: -``` +```shell LD_LIBRARY_PATH="$(pwd)/osu.Desktop/bin/Debug/netcoreapp2.2" dotnet run --project osu.Desktop ``` From ffed411eafe2263ba71f3d3ad4314c304ded9676 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 20 Jan 2019 11:23:33 +0900 Subject: [PATCH 11/13] Minor fixes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c031b10ccd..fc9ef51c6b 100644 --- a/README.md +++ b/README.md @@ -50,13 +50,13 @@ Build configurations for the recommended IDEs (listed above) are included. You s > Visual Studio Code users must run the `Restore` task before any build attempt. -You can also build osu! from the command-line: +You can also build and run osu! from the command-line with a single command: ```shell dotnet run --project osu.Desktop ``` -If you are not interested in debugging osu!, you can add `-c Release` to gain performance. In this case, you must replace `Debug` with `Release` in the following section. +If you are not interested in debugging osu!, you can add `-c Release` to gain performance. In this case, you must replace `Debug` with `Release` in any commands mentioned in this document. If the build fails, try to restore nuget packages with `dotnet restore`. From 521b11dfcbb57eda7b5eb59f3a62676b4cad5e9c Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Sun, 20 Jan 2019 18:51:17 +1030 Subject: [PATCH 12/13] Use QuadBatch rather than LinearBatch of quads for LogoVisualisation GL_QUADS is deprecated, and is not supported at all on OpenGL ES. This fixes the logo visualisation not drawing on iOS. --- osu.Game/Screens/Menu/LogoVisualisation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/LogoVisualisation.cs b/osu.Game/Screens/Menu/LogoVisualisation.cs index 70a01a5c9f..d991e6e1df 100644 --- a/osu.Game/Screens/Menu/LogoVisualisation.cs +++ b/osu.Game/Screens/Menu/LogoVisualisation.cs @@ -150,7 +150,7 @@ namespace osu.Game.Screens.Menu private class VisualiserSharedData { - public readonly LinearBatch VertexBatch = new LinearBatch(100 * 4, 10, PrimitiveType.Quads); + public readonly QuadBatch VertexBatch = new QuadBatch(100, 10); } private class VisualisationDrawNode : DrawNode From fa6dd8c99efc305d9a1e0333eb1b8241a3768cb2 Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Sun, 20 Jan 2019 19:03:06 +1030 Subject: [PATCH 13/13] Code sanity --- osu.Game/Screens/Menu/LogoVisualisation.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/Menu/LogoVisualisation.cs b/osu.Game/Screens/Menu/LogoVisualisation.cs index d991e6e1df..8bc9a1f59a 100644 --- a/osu.Game/Screens/Menu/LogoVisualisation.cs +++ b/osu.Game/Screens/Menu/LogoVisualisation.cs @@ -3,7 +3,6 @@ using osuTK; using osuTK.Graphics; -using osuTK.Graphics.ES30; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Framework.Graphics.Batches;