In a recent post about restoring the work of the Android git repository, many have complained that there is no web interface to access the sources from Windows either. This is not true, there is git under Windows and they can be easily picked up. The only thing that does not work without a kick is
repo , which is very convenient for pumping raw materials. However, the kick requires a minimum, the name of the kick is
Cygwin . This post is about how to put Cygwin from scratch, which packages to choose for repo performance and how to download everything to Windows users. Understanding the post requires the ability to work with the console at a basic level, to understand what an invitation is, to be able to type text and press Enter.
Cygwin is a POSIX userland implementation for Windows with a bunch of familiar tools for all occasions. The
installer is available for free on the project’s home page,
www.cygwin.com/install.html , simply called
setup.exe and serves as a graphical package manager. Download the installer, run it. First, a bunch of standard questions: where to put, where to download the archives, the choice of the mirror nearest to you and so on. After specifying all the options you need to select the right packages. A minimal set is required for repo to work, so we calmly leave defaults and select the following binary packages:
python ,
git ,
curl ,
gnupg and
openssl . All additional dependencies in the form of libraries and auxiliary binarics will be added to the set automatically, so you can not worry about them. We click Next, we will be shown a list of additional dependencies, agree and wait for the progress to be completed. Not difficult, is it? But for full-fledged work it is necessary to twist a few bolts.
')
First of all, it is necessary to fix the binarik relocation, for some reason it is beaten. To do this, open the usual Windows console console (
Win + R ,
cmd ,
Enter ), stamp into the folder with the cygwin binaries (for example,
C: \ cygwin \ bin ) and run
ash . Now we start the relocation process:
/ bin / rebaseall . It will end quickly, but will not write anything. In general, we saw the console's invitation again - the process ended. The console console can be closed. Now all work will be done in
bash , run it (
Start -> Cygwin -> Cygwin Bash Shell ) and read on.
Next you need to install the root certificates, cygwin comes without them. We work in bash, do not forget? So:
$ mkdir -p /usr/ssl/certs
$ cd /usr/ssl/certs
$ curl http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > "cert" n ".pem"}'
$ c_rehash
The dollar sign is not necessary to print, if that. Now you can follow the official
documentation of Google . Create a folder for
repo and set up the environment:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
I note that with each new
bash opening, the line
$ PATH = ~ / bin: $ PATH will have to be re-entered. In order not to do this, edit the
.bash_profile file (
C: \ cygwin \ home \% USERNAME% \. Bash_profile ), everything is already there, you just need to uncomment (remove the # symbol at the beginning of the lines) in order to:
# Set PATH so it includes user's private bin if it exists
if [ -d "${HOME}/bin" ] ; then
PATH="${HOME}/bin:${PATH}"
fi
Now we will create a folder for the source code, initialize the repository of the
master branch and download the source code:
$ cd ~/
$ mkdir android
$ cd android
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo sync
If you need to download the source from another branch, then everything is written in the docks. Also on Google’s docks there is information about source verification and a lot of interesting things, but this information is not relevant to the topic of the post.
Conclusion: Downloading Android source for Windows is as easy as for Linux. It will be necessary to install additional packages in both cases, and under Windows there are only two small additional steps - relocation of binarik addresses and installation of root certificates for cygwin.
And now - DISK!
