-
-
Notifications
You must be signed in to change notification settings - Fork 444
Use the 3.0 branch for the 2.X website build #2414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
da98d3f
0e95cda
4448b86
bd842c4
c260024
960f29d
ca36450
35071f9
520d24f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <Project> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <Project> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Nuke.Common; | ||
| using Serilog; | ||
| using System.IO; | ||
| using System; | ||
| using System.Linq; | ||
| using Nuke.Common.Tooling; | ||
| using static Nuke.Common.IO.FileSystemTasks; | ||
| using static Nuke.Common.Tools.Git.GitTasks; | ||
|
|
||
| partial class Build | ||
| { | ||
| [Parameter | ||
| ( | ||
| "When enabled, pulls the latest changes for local clone of the 3.0 branch to build the website. Automatically true if the local clone doesn't exist yet." | ||
| )] | ||
| readonly bool PullBaseSite; | ||
|
|
||
| [Parameter("Arguments for website generation on the 3.0 branch.")] | ||
| readonly string[]? SiteBuildArgs; | ||
|
Check warning on line 22 in build/nuke/Build.Website.cs
|
||
|
|
||
| Target Website => CommonTarget | ||
| ( | ||
| x => x.Executes | ||
| ( | ||
| () => | ||
| { | ||
| string? path; | ||
|
Check warning on line 30 in build/nuke/Build.Website.cs
|
||
| if (!File.Exists(RootDirectory / "dir.log") || !Directory.Exists(path = File.ReadAllText(RootDirectory / "dir.log"))) | ||
| { | ||
| Log.Information("3.0 clone not found, cloning..."); | ||
| path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); | ||
| Directory.CreateDirectory(path); | ||
| Git($"clone \"https://github.com/dotnet/Silk.NET\" --depth 1 --branch develop/3.0 {path}"); | ||
| File.WriteAllText(RootDirectory / "dir.log", path); | ||
| } | ||
| else if (PullBaseSite) | ||
| { | ||
| if (Directory.Exists($"{path}/eng/submodules/silk.net-2.x/documentation")) | ||
| { | ||
| Directory.Delete($"{path}/eng/submodules/silk.net-2.x/documentation", true); | ||
| } | ||
|
|
||
| if (File.Exists($"{path}/eng/submodules/silk.net-2.x/documentation/version.txt")) | ||
| { | ||
| File.Delete($"{path}/eng/submodules/silk.net-2.x/documentation/version.txt"); | ||
| } | ||
|
|
||
| Git("pull", path); | ||
| } | ||
| else | ||
| { | ||
| Directory.Delete($"{path}/eng/submodules/silk.net-2.x/documentation", true); | ||
| } | ||
| CopyDirectoryRecursively(RootDirectory / "documentation", $"{path}/eng/submodules/silk.net-2.x/documentation"); | ||
| File.WriteAllText($"{path}/eng/submodules/silk.net-2.x/documentation/version.txt", Git($"describe --tags --abbrev=0").First(x => x.Type == OutputType.Std).Text.Trim()); | ||
| InheritedShell($"{(OperatingSystem.IsWindows() ? ".\\build.cmd" : "./build.sh")} website {string.Join(' ', (SiteBuildArgs ?? Enumerable.Empty<string>()).Select(x => $"--{x}"))}", path).AssertZeroExitCode(); | ||
| if (Directory.Exists(RootDirectory / "website")) | ||
| { | ||
| Directory.Delete(RootDirectory / "website", true); | ||
| } | ||
|
|
||
| CopyDirectoryRecursively($"{path}/artifacts/docs", RootDirectory / "website"); | ||
| } | ||
| ) | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| title: "Welcome" | ||
| id: "index" | ||
| description: 'Get Started with Silk.NET' | ||
| slug: '/' | ||
| --- | ||
|
|
||
| import DocCardList from '@theme/DocCardList'; | ||
| import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client' | ||
|
|
||
| # Welcome to Silk.NET! | ||
|
|
||
| ## Getting Started | ||
|
|
||
| To get started, install the relevant NuGet packages. They add start with `Silk.NET`, and the next inner namespace after | ||
| that indicates the binding or High-Level Utility (HLU, e.g. Windowing or Input) that package belongs. Here' some example | ||
| commands to install such NuGet packages: | ||
|
|
||
| ```bash | ||
| dotnet add package Silk.NET.Assimp | ||
| dotnet add package Silk.NET.Input | ||
| dotnet add package Silk.NET.Maths | ||
| dotnet add package Silk.NET.Direct2D | ||
| dotnet add package Silk.NET.Direct3D.Compilers | ||
| dotnet add package Silk.NET.Direct3D9 | ||
| dotnet add package Silk.NET.Direct3D11 | ||
| dotnet add package Silk.NET.Direct3D12 | ||
| dotnet add package Silk.NET.DirectComposition | ||
| dotnet add package Silk.NET.DirectStorage | ||
| dotnet add package Silk.NET.DXGI | ||
| dotnet add package Silk.NET.DXVA | ||
| dotnet add package Silk.NET.XAudio | ||
| dotnet add package Silk.NET.XInput | ||
| dotnet add package Silk.NET.OpenAL | ||
| dotnet add package Silk.NET.OpenCL | ||
| dotnet add package Silk.NET.OpenGL | ||
| dotnet add package Silk.NET.OpenGL.Legacy | ||
| dotnet add package Silk.NET.OpenGLES | ||
| dotnet add package Silk.NET.OpenXR | ||
| dotnet add package Silk.NET.Shaderc | ||
| dotnet add package Silk.NET.SPIRV.Cross | ||
| dotnet add package Silk.NET.SPIRV.Reflect | ||
| dotnet add package Silk.NET.Vulkan | ||
| dotnet add package Silk.NET.WebGPU | ||
| dotnet add package Silk.NET.Windowing | ||
| ``` | ||
|
|
||
| If you don't know which API you'd like to start with, try OpenGL if you'd like to draw graphics - it's an old but tested | ||
| API that has universal compatibility on most platforms. It is succeeded by Vulkan, but there is a large jump in | ||
| difficulty thereafter. Alternatively, if you only care about Microsoft platforms, try Direct3D 11! Note that the same | ||
| caveat for Vulkan vs OpenGL applies to Direct3D 12 vs Direct3D 11. | ||
|
|
||
| If you can't decide on one for now, we maintain a "metapackage" that pulls in most of Silk.NET's core packages from all | ||
| bindings and High-Level Utilities (HLUs). You can install that as follows: | ||
|
|
||
| ```bash | ||
| dotnet add package Silk.NET | ||
| ``` | ||
|
|
||
| As always, we're happy to help in our Discord server with whatever questions you have, no matter how far along you are! | ||
|
|
||
| ## Find Documentation | ||
|
|
||
| Now that you've pulled in the APIs you would like to use, it's time to find documentation to follow. Most Silk.NET APIs | ||
| (other than our High-Level Utilities) map 1:1 directly into a native API signature that should be easily searchable by | ||
| its API name (e.g. `GL.GetString` becomes `glGetString`). Note that these rules are not consistent and it is expected | ||
Perksey marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| that you have at least some familiarity with how the native API is structured. | ||
|
|
||
| Of course, there are some bindings for which we have our own introductory documentation for, which presents a good | ||
| jumping-off point for new users to Silk.NET - regardless of whether you've used the native API before (e.g. with C/C++) | ||
| or you've never seen anything about it before! To that end, you can find our own documentation indexed below or | ||
| throughout this site. | ||
|
|
||
| <DocCardList items={useDocsSidebar().items.filter((e) => e.label != "Welcome")} /> | ||
|
|
||
| Have fun! We always look forward to seeing what people can create with Silk.NET and would love to hear how you get on in | ||
| our Discord server. | ||
Perksey marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.