Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 62a5d5c

Browse files
authored
Merge pull request #81 from github-for-unity/build-doc-tweaks
Add required prebuild setup instructions
2 parents 279303d + 8e28614 commit 62a5d5c

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

docs/contributing/how-to-build.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,18 @@ This repository is LFS-enabled. To clone it, you should use a git client that su
66

77
### Windows
88

9-
- Visual Studio 2015+ or Mono 4.x + bash shell (git bash). Mono 5.x will not work
9+
- Visual Studio 2015+ or Mono 4.x + bash shell (git bash).
10+
- Mono 5.x will not work
1011
- `UnityEngine.dll` and `UnityEditor.dll`.
1112
- If you've installed Unity in the default location of `C:\Program Files\Unity` or `C:\Program Files (x86)\Unity`, the build will be able to reference these DLLs automatically. Otherwise, you'll need to copy these DLLs from your Unity installation into the `lib` directory in order for the build to work
1213

1314
### MacOS
1415

15-
- Mono 4.x. Mono 5.x will likely not work
16+
- Mono 4.x required.
17+
- Mono 5.x will not work
1618
- `UnityEngine.dll` and `UnityEditor.dll`.
1719
- If you've installed Unity in the default location of `/Applications/Unity`, the build will be able to reference these DLLs automatically. Otherwise, you'll need to copy these DLLs from your Unity installation into the `lib` directory in order for the build to work
1820

19-
## Solution organization
20-
21-
The `GitHub.Unity.sln` solution includes several projects:
22-
23-
- dotnet-httpclient35 and octokit: external dependencies for threading and github api support, respectively. These are the submodules.
24-
- packaging: empty projects with build rules that copy DLLs to various locations for testing
25-
- Tests: unit and integration test projects
26-
- GitHub.Logging: A logging helper library
27-
- GitHub.Api: The core of the extension. This project is C#6 and includes async/await threading and other features that Unity cannot currently compile.
28-
- GitHub.Unity: Unity-specific code. This project is compilable by Unity
29-
3021
## How to Build
3122

3223
Clone the repository and its submodules in a git GUI client that supports Git LFS or via the command line with the following commands
@@ -39,6 +30,15 @@ git submodule deinit script
3930
git submodule update
4031
```
4132

33+
### Important pre-build steps
34+
35+
To be able to authenticate in GitHub for Unity, you'll need to:
36+
37+
- [Register a new developer application](https://github.com/settings/developers) in your profile.
38+
- Copy [common/ApplicationInfo_Local.cs-example](common/ApplicationInfo_Local.cs-example) to `common/ApplicationInfo_Local.cs` and fill out the clientId/clientSecret fields for your application.
39+
40+
The build needs to reference `UnityEngine.dll` and `UnityEditor.dll`. These DLLs are included with Unity. If you've installed Unity in the default location, the build will be able to find them automatically. If not, copy these DLLs from your Unity installation into the `lib` directory in order for the build to work.
41+
4242
### Visual Studio
4343

4444
To build with Visual Studio 2015 open the solution file `GitHub.Unity.sln`. Select `Build Solution` in the `Build` menu.
@@ -49,8 +49,19 @@ To build with Mono 4.x and Bash execute `build.sh` in a bash shell.
4949

5050
## Build Output
5151

52-
Once you've built the solution for the first time, you can open `src/UnityExtension/Assets/Editor/GitHub.Unity` in Unity. This folder contains the `GitHub.Unity` project and all the Unity UI and other Unity-specific code that you can have Unity compile as normal for quick testing and prototyping.
52+
Once you've built the solution for the first time, you can open `src/UnityExtension` in Unity. This folder contains the `GitHub.Unity` project and all the Unity UI and other Unity-specific code that you can have Unity compile as normal for quick testing and prototyping.
5353

5454
The build also creates a Unity test project called `GitHubExtension` inside a directory called `github-unity-test` next to your local clone. For instance, if the repository is located at `c:\Projects\Unity` the test project will be at `c:\Projects\github-unity-test\GitHubExtension`. You can use this project to test binary builds of the extension in a clean environment (all needed DLLs will be copied to it every time you build).
5555

5656
Note: some files might be locked by Unity if have one of the build output projects open when you compile from VS or the command line. This is expected and shouldn't cause issues with your builds.
57+
58+
## Solution organization
59+
60+
The `GitHub.Unity.sln` solution includes several projects:
61+
62+
- dotnet-httpclient35 and octokit: external dependencies for threading and github api support, respectively. These are the submodules.
63+
- packaging: empty projects with build rules that copy DLLs to various locations for testing
64+
- Tests: unit and integration test projects
65+
- GitHub.Logging: A logging helper library
66+
- GitHub.Api: The core of the extension. This project is C#6 and includes async/await threading and other features that Unity cannot currently compile.
67+
- GitHub.Unity: Unity-specific code. This project is compilable by Unity

0 commit comments

Comments
 (0)