You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-platform .NET Module/Plugin platform for Garry's Mod powered by [__.NET Core__](https://dotnet.microsoft.com/).
6
+
Cross-platform .NET Module/Plugin platform for Garry's Mod powered by [__.NET__](https://dotnet.microsoft.com/).
8
7
9
8
## About
10
9
@@ -13,17 +12,13 @@ and other .NET languages which runs across all platforms (Windows,
13
12
Linux, Mac Os). Gmod.NET allows you to develop cross-platform Garry's Mod extensions without
14
13
need to close or reload your game or server.
15
14
16
-
## Similar projects
17
-
18
-
Check out [gmod_csModuleLoader](https://github.com/dedady157/gmod_csModuleLoader) by [Bailey Drahoss](https://github.com/dedady157).
19
-
20
-
## Current features
21
-
22
-
GmodNET provides functionality to write Garry's Mod modules in C# or any other CIL-compiled language as [__.NET Core 3.1__](https://dotnet.microsoft.com/) class libraries. For more information on modules and API check out [project's wiki](https://github.com/GlebChili/GmodDotNet/wiki). Only `x86_64` version of Garry's Mod is currently supported.
15
+
Gmod.NET allows you to write Garry's Mod modules in C# or any other CIL-compiled language as [__.NET 6.0__](https://dotnet.microsoft.com/) class libraries.
16
+
For more information on modules and API check out [our documentation](https://docs.gmodnet.xyz/).
17
+
Only `x86_64` version of Garry's Mod is currently supported.
23
18
24
19
## Need help?
25
20
26
-
Check out our [wiki](https://github.com/GlebChili/GmodDotNet/wiki) or join our [discord server](https://discord.gg/9bP8nMT).
21
+
Check out [our docs](https://docs.gmodnet.xyz/) and join our [discord server](https://discord.gg/9bP8nMT).
27
22
28
23
## Building and contributing
29
24
@@ -37,7 +32,7 @@ To build GmodDotNet you need to have following software installed and registered
37
32
38
33
3. Latest version of dotnet SDK
39
34
40
-
4. (On Windows) Latest version of Visual Studio 2019 with C++ package
35
+
4. (On Windows) Latest version of Visual Studio 2019 with C++ workload
41
36
42
37
5. (On macOS) Latest version of Xcode
43
38
@@ -49,7 +44,7 @@ Build steps:
49
44
50
45
2. In the root of the cloned repository run `dotnet build runtime.csproj -c Debug` or `dotnet build runtime.csproj -c Release` instruction in your command prompt.
51
46
52
-
__NOTE__: `runtime.csproj` is not a real C# project file but a kind of build script. To work with the managed part of GmodDotNet open `gm_dotnet_managed/gm_dotnet_managed.sln` solution file in your IDE instead.
47
+
__NOTE__: `runtime.csproj` is not a real C# project file but a kind of build script. To work with the managed part of Gmod.NET open `gm_dotnet_managed/gm_dotnet_managed.sln` solution file in your IDE instead.
53
48
54
49
`runtime.csproj` build script will produce following folders in the root of repository:
55
50
@@ -59,22 +54,9 @@ __NOTE__: `runtime.csproj` is not a real C# project file but a kind of build scr
You may also want to copy the content of `lua` folder to the corresponding destinations in `garrysmod/lua`.
63
-
64
-
### Folder structure
65
-
66
-
Gmod.NET is subdivided into three subprojects.
67
-
68
-
Garry's Mod binary native module and helper libraries are
69
-
contained in `gm_dotnet_native` folder and organized as CMake project.
70
-
71
-
Managed part is contained in `gm_dotnet_managed` folder and organized with .NET soultion file `gm_dotnet_managed.sln`.
72
-
73
-
Bootstrap Lua scripts are contained in `lua` folder.
74
-
75
57
### Nightly builds
76
58
77
-
You can find latest nightly builds GmodDotNet runtime at http://nightly.gmodnet.xyz/. To use nightly NuGet packages connect to [our nightly NuGet feed](https://dev.azure.com/GmodNET/gmodnet-artifacts/_packaging?_a=feed&feed=gmodnet-packages).
59
+
You can find latest nightly builds of Gmod.NET runtime at http://nightly.gmodnet.xyz/. To use our nightly NuGet packages connect to [our nightly NuGet feed](https://dev.azure.com/GmodNET/gmodnet-artifacts/_packaging?_a=feed&feed=gmodnet-packages).
78
60
79
61
## Installation and usage
80
62
@@ -84,32 +66,18 @@ You can find latest nightly builds GmodDotNet runtime at http://nightly.gmodnet.
84
66
85
67
3. Create a `Modules` folder inside `garrysmod/lua/bin/`.
86
68
87
-
4. Download and copy `gm_dotnet_server.lua` to `garrysmod/lua/autorun/server` folder.
88
-
89
-
5. Download and copy `gm_dotnet_client.lua` to `garrysmod/lua/autorun/client` folder.
69
+
4. Place your .NET module, ...deps.json file, and all dependencies in `Modules/%exact_name_of_the_module_without_dll%/` folder.
90
70
91
-
6. Place your .NET module, ...deps.json file, and all dependencies in `Modules/%exact_name_of_the_module_without_dll/` folder.
71
+
5. Load Gmod.NET runtime in game by executing Lua function `require("dotnet")`.
92
72
93
-
7. If you signed your module with [GmodNetModuleSigner](https://github.com/GlebChili/GmodNetModuleSigner), copy `[name_of_your_module].modulekey` and `[name_of_your_module].modulesign` to the same folder as above (`Modules/%exact_name_of_the_module_without_dll/`).
73
+
6. Load your module by running Lua function `dotnet.load("%exact_name_of_the_module_without_dll%")`.
94
74
95
-
8. If you want your module to be serverside (clientside) only then add file `TYPE` to `Modules/%exact_name_of_the_module_without_dll/` with content `server` (`client`).
96
-
97
-
9. Use `gmod_net_load_all` (`gmod_net_load_all_cl` for client-side) console command to load all managed modules and `gmod_net_unload_all` (`gmod_net_unload_all_cl`) to unload them. Modules can be hot-reloaded, so one doesn't need to quit game to see changes.
75
+
For more info check out [our quick start guide](https://docs.gmodnet.xyz/articles/tutorials/hello-world/index.html).
98
76
99
77
## License
100
78
101
79
Whole project is licensed under MIT License.
102
80
103
81
## Dependencies and code usage
104
82
105
-
Gmod.NET is making use of or borrows code from the following projects:
106
-
107
-
1.[CoreCLR](https://github.com/dotnet/coreclr), [CoreFX](https://github.com/dotnet/corefx), and [core-setup](https://github.com/dotnet/core-setup) by [.NET Foundation](https://github.com/dotnet) (MIT License)
108
-
109
-
2.[pure_lua_SHA](https://github.com/Egor-Skriptunoff/pure_lua_SHA) by [Egor Skriptunoff](https://github.com/Egor-Skriptunoff) (MIT License)
110
-
111
-
3.[NSec](https://nsec.rocks/) by [Klaus Hartke](https://github.com/ektrah) (MIT License)
112
-
113
-
4.[Libsodium](http://libsodium.org) by [Frank Denis](https://github.com/jedisct1) (ISC License)
0 commit comments