|
| 1 | +# Setting up your development environment |
| 2 | + |
| 3 | +The developer container is a combination of s2client-game and s2client-api. |
| 4 | + |
| 5 | +The API code has been omitted because it's assumed you will be cloning the repo |
| 6 | +and working with GIT to manipuate the API code. |
| 7 | + |
| 8 | +This container will copy your git configuration and system username to the |
| 9 | +development container. If you want to override this process see below. |
| 10 | + |
| 11 | +To get setup for developing API code on linux: |
| 12 | + |
| 13 | +~~~ |
| 14 | + ./all.sh |
| 15 | +~~~ |
| 16 | + |
| 17 | +You will see your github.com public key as the last step of the build process: |
| 18 | + |
| 19 | +~~~ |
| 20 | +... |
| 21 | +Successfully built 11c71c8b3a9b |
| 22 | +==== Your github.com SSH public key for the container is: |
| 23 | +ssh-rsa XXXXXXXXXXXX2EAAAADAQABAAABAQDf1N64V0NHQEcat3oiE+gTU/q7VPpXvJztRtaQ0X0/rHqGohFI+RVTCAGTsUyzNeVxJDuiPMhV/j9X1rqVV73pcLyM7flgYnriroo19Y3S9np4dPgyR+IeSztBhfCaLSmrVhvscIUlFCcXM8o1mgy8/mUSn5UJJxBdGdRfRt8TrWT7WVnbkLKNv6xUoBWssSNJds6itD/qBjEkZfD4BCP3dXEJL6U6y+HYnIGqv3lByxHhLK+dJ5pU2lGtyypj1/0IsWQVW4F6EaEBtyEy8cOmh17j9FusfhJkply2Xf2q81jm6nHRNsfd1thOAFe2quc0cTfZzX4ZqC9RE9gxwXI/ jrepp@8089fe031125 |
| 24 | +~~~ |
| 25 | + |
| 26 | +You should copy the ssh-rsa .. user@container_id into your github.com settings under the section for SSH keys. |
| 27 | + |
| 28 | + |
| 29 | +To run the developer container: |
| 30 | +~~~ |
| 31 | + ./run.sh |
| 32 | +~~~ |
| 33 | + |
| 34 | +If you want to configure the container by hand see the docker commands in **./make-container.sh** for the --build-arg overrides needed to setup your git account without a working shell. |
| 35 | + |
| 36 | + |
| 37 | +# Using the development environment |
| 38 | + |
| 39 | +Once your ssh key is imported to github.com you're ready to start working with the API: |
| 40 | + |
| 41 | +Clone the repository: |
| 42 | +~~~ |
| 43 | + git clone [email protected]:Blizzard/s2client-api.git |
| 44 | +~~~ |
| 45 | + |
| 46 | +Generate the project build files: |
| 47 | +~~~ |
| 48 | + cd ~/s2client-api |
| 49 | + mkdir -p build |
| 50 | + cd build && cmake -G "Unix Makefiles" .. |
| 51 | +~~~ |
| 52 | + |
| 53 | +# To save your work between sessions |
| 54 | + |
| 55 | +Now that you've gotten your container up and running you will want to snapshot your changes: |
| 56 | +~~~ |
| 57 | + ./commit-container.sh |
| 58 | +~~~ |
| 59 | + |
| 60 | +If you want to move files out of your container consider cloning into a volume mount (e.g.: /code): |
| 61 | +~~~ |
| 62 | + docker run -v code:/code -it s2client-username |
| 63 | +~~~ |
| 64 | + |
| 65 | +Alternative you can copy the files out using 'docker cp': |
| 66 | +~~~ |
| 67 | + .. run your container |
| 68 | + export DEV_CONTAINER=`docker ps -l -q` |
| 69 | + docker cp $DEV_CONTAINER:/home/username/myfile.txt . |
| 70 | +~~~ |
| 71 | + |
| 72 | +# Resuming or attaching |
| 73 | + |
| 74 | +To resume your work after **./commit-container.sh**: |
| 75 | + |
| 76 | +~~~ |
| 77 | +./run-user.sh |
| 78 | +~~~ |
| 79 | + |
| 80 | + |
| 81 | +To attach an additional TTY to a running container: |
| 82 | +~~~ |
| 83 | +./attach-user.sh |
| 84 | +~~~ |
| 85 | + |
| 86 | +# Additional Notes |
| 87 | + |
| 88 | +The game executable will be located in: |
| 89 | + |
| 90 | + **/SC2/${GAME_VERSION}/StarCraftII/Versions/Base${BUILD_VERSION}/SC2_x64 |
0 commit comments