NOTICE: Account creation on the wiki has been temporarily disabled until the wiki is moved to OpenID. If you need an account before then, please request one here: http://forum.xbmc.org/showthread.php?tid=165868
HOW-TO:Compile XBMC for Windows using Git
| |
This page or section may require cleanup, updating, spellchecking, reformatting and/or updated images. Please improve this page if you can. The discussion page may contain suggestions. |
| |
NOTICE: Needs merging with HOW-TO:Compile XBMC for Windows |
Git is a distributed revision control system (think Subversion, but with a central repository for each person) -- See HOW-TO compile XBMC for Windows from source code. Unfortunately for the Windows users out there, there is no magical TortoiseSVN solution (...yet! Work is being done to add shell-integration to Git). Therefore, this guide assumes a basic understanding of the command line and the Git commands. help.github.com is a good place to familiarize yourself with basic Git usage.
Contents |
1 Software
see HOW-TO:Compile_XBMC_for_Windows
2 $ git clone
The XBMC source code will be installed to C:/Users/Username/Documents. You should use a different directory (i.e. C:\XBMC) and adjust this guide accordingly if any of the following conditions are true:
- Your Windows username has a space in it
- You wish to use a different directory (no spaces)
- You are using Windows XP
If you are familiar with cloning a repository from GitHub, then skip to the next section. Otherwise, these steps (based on the guide at http://help.github.com/forking) will get you up and running. Additionally, more information can be found at Git Usage.
- Create a free GitHub account, generate a SSH key for yourself and set your user and email in git.
- Visit the central XBMC project page and click the Fork button. This will put your own personal fork of XBMC in your list of public repos.
- Launch Git Bash and cd into Documents ($ cd Documents)
- Clone the new fork of XBMC locally ($ git clone git@github.com:gituser/xbmc.git). Note the use of the fork's private URL. Sit back, as this will download about a gigabyte of data.$ git clone git@github.com:garbear/xbmc.git
Cloning into xbmc...
Enter passphrase for key '/c/Users/Garbear/.ssh/id_rsa':
remote: Counting objects: 468274, done.
remote: Compressing objects: 100% (111888/111888), done.
remote: Total 468274 (delta 351100), reused 467072 (delta 350219)
Receiving objects: 100% (468274/468274), 1022.39 MiB | 488 KiB/s, done.
Resolving deltas: 100% (351100/351100), done. - When your clone completes, you will have created a remote named "origin" that points to your fork on GitHub (not to the original XBMC repo). To keep track of the original XBMC repo, cd into the xbmc directory ($ cd xbmc) and add another remote named "upstream" ($ git remote add upstream git://github.com/xbmc/xbmc.git). Note that upstream uses the public clone URL, so we can't push changes directly to XBMC.
2.1 Pushing changes
Again, more information can be found at Git Usage.
- Commit changes locally
- From the xbmc directory ($ cd Documents/xbmc in Git Bash if you aren't already there), push your updated branch back to GitHub: $ git push origin master
- If you wish for a XBMC developer to review your fork for inclusion in the main branch, notify a team member of your changes. The best way to do this is by sending a pull request.
3 Setting up the build environment
see HOW-TO:Compile_XBMC_for_Windows
4 Compiling in Visual Studio
see HOW-TO:Compile_XBMC_for_Windows
5 Comments
So where to go from here? For additional tips and steps to build a full release installer, see HOW-TO compile XBMC for Windows from source code#Additional hints.
6 Tips
Most Windows users are used to using spaces in file names without issues. This should be avoided when selecting where to save your GIT repository or unforeseen errors could arise.