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
{{ message }}
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/contributing/how-to-build.md
+25-14Lines changed: 25 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,18 @@ This repository is LFS-enabled. To clone it, you should use a git client that su
6
6
7
7
### Windows
8
8
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
10
11
-`UnityEngine.dll` and `UnityEditor.dll`.
11
12
- 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
12
13
13
14
### MacOS
14
15
15
-
- Mono 4.x. Mono 5.x will likely not work
16
+
- Mono 4.x required.
17
+
- Mono 5.x will not work
16
18
-`UnityEngine.dll` and `UnityEditor.dll`.
17
19
- 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
18
20
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
-
30
21
## How to Build
31
22
32
23
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
39
30
git submodule update
40
31
```
41
32
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
+
42
42
### Visual Studio
43
43
44
44
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.
49
49
50
50
## Build Output
51
51
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.
53
53
54
54
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).
55
55
56
56
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