-
Notifications
You must be signed in to change notification settings - Fork 0
/
CheckingOutTheMantidCode.html
220 lines (180 loc) · 13.4 KB
/
CheckingOutTheMantidCode.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Checking out the Mantid Code</title>
<link rel="stylesheet" href="_static/basic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-3.3.6/css/bootstrap-theme.min.css" type="text/css" />
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '3.12.20180326.1618',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="_static/bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="_static/bootstrap-sphinx.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-59110517-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body role="document">
<div id="navbar" class="navbar navbar-default ">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="http://www.mantidproject.org"><img src="_static/Mantid_Logo_Transparent.png">
</a>
<span class="navbar-text navbar-version pull-left"><b>3.12</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li class="divider-vertical"></li>
<li><a href="http://www.mantidproject.org">Home</a></li>
<li><a href="http://download.mantidproject.org">Download</a></li>
<li><a href="http://www.mantidproject.org/Documentation">Documentation</a></li>
<li><a href="http://www.mantidproject.org/Contact">Contact Us</a></li>
</ul>
<form class="navbar-form navbar-right" action="search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12 content">
<div class="section" id="checking-out-the-mantid-code">
<span id="checkingoutthemantidcode"></span><h1>Checking out the Mantid Code<a class="headerlink" href="#checking-out-the-mantid-code" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#set-up-git" id="id2">Set up Git</a></li>
<li><a class="reference internal" href="#extra-windows-step-do-not-skip-this" id="id3">Extra Windows Step (Do Not Skip This!)</a></li>
<li><a class="reference internal" href="#cloning-the-repository" id="id4">Cloning the repository</a></li>
<li><a class="reference internal" href="#getting-the-dependencies-linux-and-os-x" id="id5">Getting the dependencies (Linux and OS X)</a></li>
<li><a class="reference internal" href="#mac-osx" id="id6">Mac OSX</a></li>
<li><a class="reference internal" href="#linux" id="id7">Linux</a></li>
</ul>
</div>
<p>We use <a class="reference external" href="http://www.git-scm.com/">git</a> as our version control system (VCS). The master copies of our repositories are located at <a class="reference external" href="http://github.com/mantidproject">GitHub</a>. We have a number of repositories, of which the main one (the one containing all the source code for Mantid itself) is called simply <a class="reference external" href="http://github.com/mantidproject/mantid">mantid</a>.</p>
<p>Naturally, you will require git installed on your machine. Windows and Mac OSX downloads are available at <a class="reference external" href="http://www.git-scm.com/">http://www.git-scm.com/</a>. Linux users should install via their package manager. This will give you access to git via the command line, with the Windows and Mac installers also including a simple graphical tool (Git Gui). Other graphical tools include <a class="reference external" href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> (for windows) and a Visual Studio extension. There are others (do add your favourite!). Git is also available within Eclipse and QtCreator.</p>
<div class="section" id="set-up-git">
<h2><a class="toc-backref" href="#id2">Set up Git</a><a class="headerlink" href="#set-up-git" title="Permalink to this headline">¶</a></h2>
<p>Follow the instructions on <a class="reference external" href="http://help.github.com/set-up-git-redirect">GitHub</a>. This boils down to install git and set your name and email. It’s very important for the integrity of the repository that everyone sets this on their machine (to match their github account).</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global user.name <span class="s2">"Firstname Lastname"</span>
git config --global user.email <span class="s2">"[email protected]"</span>
</pre></div>
</div>
<p>You can have multiple email addresses associated with a single github account, so pick the one you want people to send to about mantid.</p>
<p>A further setting that everyone should put in place will ensure that our line endings are consistent.
Linux/Mac users should set the following:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global core.autocrlf input
</pre></div>
</div>
<p>For Windows users, the ‘input’ should be changed to ‘true’ - though the git installer will have set it to this by default.</p>
<p>Have a global ignored files list for all git repositories</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global core.excludesfile <span class="o">=</span> ~/.gitexcludes
</pre></div>
</div>
<p>Create tracking branches by default</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global push.default tracking
</pre></div>
</div>
<p>If you are using an older git client</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global push.default current
git config --global branch.autosetupmerge <span class="nb">true</span>
</pre></div>
</div>
<p>And some bonus ways to look at diffs (the one without a name is the default when you <code class="docutils literal"><span class="pre">git</span> <span class="pre">difftool</span></code>)</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span><span class="o">[</span>difftool <span class="s2">"kompare"</span><span class="o">]</span>
<span class="nv">external</span> <span class="o">=</span> kompare
<span class="nv">prompt</span> <span class="o">=</span> <span class="nb">false</span>
<span class="o">[</span>difftool<span class="o">]</span>
<span class="nv">external</span> <span class="o">=</span> meld
<span class="nv">prompt</span> <span class="o">=</span> <span class="nb">false</span>
<span class="o">[</span>difftool <span class="s2">"sourcetree"</span><span class="o">]</span>
<span class="nv">cmd</span> <span class="o">=</span> opendiff <span class="se">\"</span><span class="nv">$LOCAL</span><span class="se">\"</span> <span class="se">\"</span><span class="nv">$REMOTE</span><span class="se">\"</span>
<span class="nv">path</span> <span class="o">=</span>
<span class="o">[</span>mergetool <span class="s2">"sourcetree"</span><span class="o">]</span>
<span class="nv">cmd</span> <span class="o">=</span> /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh <span class="se">\"</span><span class="nv">$LOCAL</span><span class="se">\"</span> <span class="se">\"</span><span class="nv">$REMOTE</span><span class="se">\"</span> -ancestor <span class="se">\"</span><span class="nv">$BASE</span><span class="se">\"</span> -merge <span class="se">\"</span><span class="nv">$MERGED</span><span class="se">\"</span>
<span class="nv">trustExitCode</span> <span class="o">=</span> <span class="nb">true</span>
</pre></div>
</div>
</div>
<div class="section" id="extra-windows-step-do-not-skip-this">
<h2><a class="toc-backref" href="#id3">Extra Windows Step (Do Not Skip This!)</a><a class="headerlink" href="#extra-windows-step-do-not-skip-this" title="Permalink to this headline">¶</a></h2>
<p>On Windows, third party libraries are automatically pulled in when cmake is run. This requires Git LFS to be installed first. Download <a class="reference external" href="https://git-lfs.github.com/">git lfs</a> and install it. <strong>At ISIS make sure you install this using the admin account in to Program Files</strong>.</p>
<p>Once the installation has competed open a new Git bash prompt and type <code class="docutils literal"><span class="pre">git</span> <span class="pre">lfs</span> <span class="pre">install</span></code>.</p>
</div>
<div class="section" id="cloning-the-repository">
<h2><a class="toc-backref" href="#id4">Cloning the repository</a><a class="headerlink" href="#cloning-the-repository" title="Permalink to this headline">¶</a></h2>
<p>If you are at ISIS then please run the following commands ‘’‘before’‘’ cloning the repository:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global [email protected]:mantidproject.insteadOf http://mantidweb.nd.rl.ac.uk/mirror/git/
</pre></div>
</div>
<p>This will speed up the clone and intial cmake run considerably.</p>
<p>There are a number of URLs via which the code can be checked out using various protocols. The easiest way to get the one you want is to select the protocol you want on the right side of the [<a class="reference external" href="https://github.com/mantidproject/mantid">https://github.com/mantidproject/mantid</a> repository page on github] and copy the url into your clipboard. The way to clone the repository via ssh on the command line, into a directory called Mantid, is:</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git clone [email protected]:mantidproject/mantid.git
</pre></div>
</div>
<p>If at ISIS now remove the config section above</p>
<div class="highlight-sh"><div class="highlight"><pre><span></span>git config --global --unset [email protected]:mantidproject
</pre></div>
</div>
</div>
<div class="section" id="getting-the-dependencies-linux-and-os-x">
<h2><a class="toc-backref" href="#id5">Getting the dependencies (Linux and OS X)</a><a class="headerlink" href="#getting-the-dependencies-linux-and-os-x" title="Permalink to this headline">¶</a></h2>
<p>Additional information on this can be found at [[Mantid Prerequisites]].</p>
</div>
<div class="section" id="mac-osx">
<h2><a class="toc-backref" href="#id6">Mac OSX</a><a class="headerlink" href="#mac-osx" title="Permalink to this headline">¶</a></h2>
<p>The procedure on OS X is described [<a class="reference external" href="https://github.com/mantidproject/mantid/wiki/Building-Mantid-on-OS-X-10.9-&-10.10-using-clang-and-Xcode">https://github.com/mantidproject/mantid/wiki/Building-Mantid-on-OS-X-10.9-&-10.10-using-clang-and-Xcode</a> here].</p>
</div>
<div class="section" id="linux">
<h2><a class="toc-backref" href="#id7">Linux</a><a class="headerlink" href="#linux" title="Permalink to this headline">¶</a></h2>
<p>Debian and RPM developer packages exist to pull in the dependencies. For example, those on RedHat just need to run <code>sudo yum install mantid-developer</code>.</p>
<p><a class="reference internal" href="BuildingWithCMake.html#buildingwithcmake"><span class="std std-ref">Building with CMake</span></a></p>
</div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<ul class="nav navbar-nav" style=" float: right;">
<li><a href="#">Back to top</a></li>
</ul>
<p>
</p>
</div>
</footer>
</body>
</html>