-
Notifications
You must be signed in to change notification settings - Fork 13
Building OpenSimulator
The Sasquatch sources are organized as multiple C# projects with a top level solution that builds all the projects. Until recently a tool called "prebuild" was used to generate the xml based project (csproj) files used to build. In 2017 Microsoft introduced a much simplified updated format for csproj files that also supports the integration of third party libraries using NuGet. Rather than support translating from one XML format to another the Sasquatch project moved to directly support the msbuild csproj files so there is no need to run prebuild. The project and solution files are directly in the tree and tracked in git with the code.
The build process supports Debug and Release build targets. All of the build artifacts are compiled into the top level obj directory (obj isn't spread around amongst all the source files now) and a Debug or Release build targeting the current (net48) runtime is assembled in build. This again is different than the previous build process. Previously the compilation output was assembled in "bin" which was also a source controlled directory. The "bin" directory is now used for local resources (some libs and resource files) and is copied into build when the solution is built. You can delete the "build" directory with no impact to the sources. And the "bin" directory now includes only source controlled files. Note: if you previously had built in the source tree you're using with the prebuild based approach your "bin" directory will include copies of all the old DLL's from previous builds, exes, etc. If that's the case I recommend you take the time to clean up the directory so that the build process doesn't copy old artifacts to the new build directory. Using git clean may be helpful in this regard.
The output in "build" is a complete runnable release. Essentially what used to be assembled into bin. When we make a release the deliverables will include the "build" output and a tagged version of the sources used to generate that build.
You can build Sasquatch in Visual Studio (VS 2019 Community is recommended). You can also use the msbuild tools or use the newer "dotnet" environment tools directly. Development and debugging works well in both the VS environment on Windows or using VS Code on Linux. A linux build can also be performed using the CLI based tools directly on Linux to support assembling a "release" on the same platform they target running on.