Update README.md
This commit is contained in:
parent
dacdd61c15
commit
45838ac416
1 changed files with 24 additions and 16 deletions
40
README.md
40
README.md
|
|
@ -34,8 +34,9 @@ accepted if they don't have a large maintenance burden.
|
||||||
|
|
||||||
This is the preferred method to get started.
|
This is the preferred method to get started.
|
||||||
|
|
||||||
1) Pick a folder in which you would like to start a raylib project. For example, "HelloRaylibCS."
|
1. Pick a folder in which you would like to start a raylib project. For example, "HelloRaylibCS."
|
||||||
2) Then from a terminal (for example, a VSCode terminal), whilst in the directory you just created
|
|
||||||
|
2. Then from a terminal (for example, a VSCode terminal), whilst in the directory you just created
|
||||||
run the following commands. (Please keep in mind .NET should already be installed on your system)
|
run the following commands. (Please keep in mind .NET should already be installed on your system)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
@ -47,23 +48,29 @@ dotnet add package Raylib-cs
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/Raylib-cs/)
|
[](https://www.nuget.org/packages/Raylib-cs/)
|
||||||
|
|
||||||
If you need to edit the Raylib-cs source, then you will need to add the bindings as a project (see below).
|
|
||||||
|
|
||||||
If you are new to using NuGet (or you've forgotten) and are trying to run the above command in the command prompt,
|
If you are new to using NuGet (or you've forgotten) and are trying to run the above command in the command prompt,
|
||||||
remember that you need to be *inside the intended project directory* (not just inside the solution directory);
|
remember that you need to be *inside the intended project directory* (not just inside the solution directory);
|
||||||
otherwise the command won't work.
|
otherwise the command won't work.
|
||||||
|
|
||||||
## Installation - Manual
|
## Installation - Source
|
||||||
|
|
||||||
1. Download/clone the repo
|
1. Pick a folder in which you would like to start a raylib project. For example, "HelloRaylibCS."
|
||||||
|
|
||||||
2. Add [Raylib-cs/Raylib-cs.csproj](Raylib-cs/Raylib-cs.csproj) to your project as an existing project.
|
2. Download or clone the repo.
|
||||||
|
|
||||||
3. Download/build the native libraries for the platforms you want using the [official 6.0 release](https://github.com/raysan5/raylib/releases/tag/6.0). **NOTE: the MSVC version is required for Windows platforms**
|
3. Add [Raylib-cs/Raylib-cs.csproj](Raylib-cs/Raylib-cs.csproj) to your project as an existing project.
|
||||||
|
|
||||||
4. Set up the native libraries, so they are in the same directory as the executable/can be found in the [search path](https://www.mono-project.com/docs/advanced/pinvoke/).
|
4. Choose one of the following options to include the native libraries.
|
||||||
|
|
||||||
5. Start coding!
|
Automatic:
|
||||||
|
|
||||||
|
1. Import [Raylib-cs/Raylib-cs.targets](Raylib-cs/Raylib-cs.targets) into your project to add native libraries automatically.
|
||||||
|
|
||||||
|
Manual:
|
||||||
|
|
||||||
|
1. Download or build the native libraries for the platforms you want using the [official 6.0 release](https://github.com/raysan5/raylib/releases/tag/6.0). **NOTE: the MSVC version is required for Windows platforms**.
|
||||||
|
|
||||||
|
2. Set up the native libraries, so they are in the same directory as the executable/can be found in the [search path](https://www.mono-project.com/docs/advanced/pinvoke/).
|
||||||
|
|
||||||
## Hello, World!
|
## Hello, World!
|
||||||
|
|
||||||
|
|
@ -79,7 +86,7 @@ internal static class Program
|
||||||
[System.STAThread]
|
[System.STAThread]
|
||||||
public static void Main()
|
public static void Main()
|
||||||
{
|
{
|
||||||
Raylib.InitWindow(800, 480, "Hello World");
|
Raylib.InitWindow(800, 480, "Hello, World");
|
||||||
|
|
||||||
while (!Raylib.WindowShouldClose())
|
while (!Raylib.WindowShouldClose())
|
||||||
{
|
{
|
||||||
|
|
@ -96,9 +103,9 @@ internal static class Program
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Building from source
|
## Development
|
||||||
|
|
||||||
The `Examples` and `Raylib-cs.Tests` projects reference the sibling `Raylib-cs` project by default, so local changes to the the bindings are picked up directly:
|
The `Examples` and `Raylib-cs.Tests` projects reference the sibling `Raylib-cs` project by default, so local changes to the bindings are picked up directly:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
dotnet run --project Examples
|
dotnet run --project Examples
|
||||||
|
|
@ -107,9 +114,10 @@ dotnet run --project Examples
|
||||||
dotnet test
|
dotnet test
|
||||||
```
|
```
|
||||||
|
|
||||||
Both projects can also consume the binding as a NuGet package but the in-repo version may not be published on nuget.org
|
Both projects can also consume the binding as a NuGet package but the in-repo version may not be published on
|
||||||
yet. Pack it once into the local feed before the first build. Then to run against the Raylib-cs NuGet package (the
|
nuget.org yet. Pack it once into the local feed before the first build. Then to run against the Raylib-cs NuGet
|
||||||
version set by `RaylibCsVersion` in [Directory.Build.props](Directory.Build.props)), set `UseRaylibCsPackage`:
|
package (the version set by `RaylibCsVersion` in [Directory.Build.props](Directory.Build.props)), set
|
||||||
|
`UseRaylibCsPackage`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
dotnet pack Raylib-cs -c Release -o nuget
|
dotnet pack Raylib-cs -c Release -o nuget
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue