-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Readme Cleanup, dedicated directory for scripts.
- Loading branch information
Karel Hovorka
committed
Nov 15, 2022
1 parent
67a0fd7
commit b918c26
Showing
17 changed files
with
136 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -386,4 +386,5 @@ Desktop.ini | |
.DS_Store | ||
|
||
**/BinaryDependencies/*.dll | ||
se-env.bat | ||
se-env.bat | ||
Scripts/se-env.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# How to build | ||
|
||
First of all, you don't *have to* build it from sources. There are also binary releases (but, of course, the code is usually more up to date). | ||
|
||
The plug-in requires Space Engineers libraries to compile. There are two ways how to provide the libraries: as binaries (DLLs) or as sources. Both options are described below. | ||
|
||
The resulting plug-in (a couple of .NET libraries) works with the official Steam version of Space Engineers without any modification of the game. | ||
|
||
## How to build with game binaries | ||
|
||
We are developing the plugin using source dependencies; therefore, it is necessary to perform a few steps to switch to binary dependencies: provide the library binaries and switch the references to those binaries. We assume you have installed the official release of the game from Steam. | ||
|
||
1. **Obtain the Space Engineers libraries.** Locate the script `copydeps.bat` in the `BinaryDependencies` directory. | ||
1. If you have your Steam installation of Space Engineers in the default path, then just run the script and the binaries will be copied to the directory. The default path is `C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64`. | ||
2. If you have SE in some other path, provide it as the first argument to the script. (Or copy the libraries listed in the script manually.) | ||
2. **Switch references from project dependencies to binary ones.** You can do it manually, or you can apply (cherry-pick) a commit pointed to by the branch `binary-deps-switch`. (The particular commit changes as we rebase it on newer history.) | ||
3. **Open the solution and build it.** Find the VS solution file `Iv4xrPluginBinaryDeps.sln` in the `Solutions` folder. It's just a solution containing only the plugin projects, not the SE projects – the switch to the binaries has to be done in each of the projects, as described in the previous step. Open the solution and build it. You can than run the game with the plugin as described above. | ||
|
||
## How to build if you have SE sources | ||
|
||
There's a VS solution file `SpaceEngineers_ivxr.sln` in this repository (in the `Solutions` folder) that contains the plugin projects as well as Space Engineers projects, some of which are dependencies of the plug-in. For this solution file to work, you need to checkout Space Engineers sources to a specific location relative to this Git repository – the relevant branch (such as "Major") has to be checked-out into a directory called "`se`" located next to the checkout of this Git repository. See the nested list below, which corresponds to the required directory structure: | ||
|
||
* `se-plugin` – just a top level directory, can have any name | ||
* `iv4xr-se-plugin` – a checkout of this Git repository | ||
* `se` – a checkout of a Space Engineers branch (presumably from it's Subversion repository) | ||
|
||
Before starting the build of the solution, make sure a correct build configuration is selected. Either **Debug** or **Release** configuration and the **x64** platform. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Manual installation | ||
|
||
File "install.bat" downloads the dll files directly from the github latest release and copies them into your Space | ||
Engineers game in Program Files as long as the game is in it's typical location. | ||
|
||
You can still do this manually: | ||
|
||
## Plugin libraries | ||
|
||
1. Obtain a binary release of **the plugin**. Look | ||
for [releases](https://github.com/iv4xr-project/iv4xr-se-plugin/releases) in this repository and for Assets of the | ||
chosen release. Download all the DLL libraries. | ||
2. If you want the latest changes or you'd like to edit the code, you can also build it from the sources (even if you | ||
don't have Space Engineers source code), see the section **How to build**. | ||
|
||
All the dependencies need to be put into the folder with the game binaries. A common location is `C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64`. | ||
Tip: It's you can put the libraries into a subfolder (such as `ivxr-debug`). Or, it can be a symbolic link to the build folder of the plugin project. In that case, you must prefix the name of each library with `ivxr-debug\` in the following step. | ||
|
||
|
||
## 3rd party libraries | ||
|
||
Apart from the game libraries, the plugin requires three additional libraries to run: | ||
|
||
* `AustinHarris.JsonRpc.dll` | ||
* `Newtonsoft.Json.dll` | ||
* `ImpromptuInterface.dll` | ||
|
||
There are many ways how to obtain the libraries. For convenience we provide them as special releases in this repository. _They are **not** part of the official releases_ because – among other things – they may have different licenses. Look for "3rd Party Library Dependencies" among releases. | ||
|
||
Another way how to get the libraries is the following: | ||
|
||
* Check-out the [JSON-RPC.NET master branch on GitHub](https://github.com/Astn/JSON-RPC.NET). | ||
* *Side note: The binary releases are not updated (compared to NuGet packages), but the the last [release v1.1.74](https://github.com/Astn/JSON-RPC.NET/releases/tag/v1.1.74) works as well. You can try it if the master branch does not.* | ||
* Build the solution including the test project (tested with Visual Studio 2019). | ||
* You will find the `AustinHarris.JsonRpc.dll` library in this path: | ||
`Json-Rpc\bin\Debug\netstandard2.0` | ||
* And the `Newtonsoft.Json.dll` library in this path: | ||
`AustinHarris.JsonRpcTestN\bin\Debug\netcoreapp3.0` | ||
|
||
Note: If you build the project from the sources as described in the section **How to Build**, the libraries are downloaded via NuGet packages. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Naming convention | ||
|
||
The project contains the plugin in C# and a JVM client in Kotlin. Those 2 languages have different naming conventions. | ||
|
||
- Properties and methods in C# usually begin with uppercase (`PascalCase`), but they begin with lowercase in | ||
Kotlin (`camelCase`). | ||
- Interfaces in C# sometimes have "I" prefix to signal interface. We usually refer to interface without the "I" in the | ||
documentation unless directly referencing a class. | ||
- If you see a reference to a variable or property, always interpret it in the context of the particular language. | ||
- Since the server is implemented in C#, JSON-RPC protocol uses C# conventions and all method names and parameters are | ||
in `PascalCase`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Protocol and API | ||
|
||
The network protocol is based on [JSON-RPC 2.0](https://www.jsonrpc.org/specification). JSON-RPC messages are separated by newlines, batch messages are supported. TCP is used as the transport layer. | ||
|
||
For an up to date list of provided API calls see the interface [ISpaceEngineers](https://github.com/iv4xr-project/iv4xr-se-plugin/blob/main/Source/Ivxr.SpaceEngineers/ISpaceEngineers.cs) in the project **`Ivxr.SpaceEngineers`**. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.