JAL-3281 first bit of perl
[jalview.git] / doc / building.html
old mode 100755 (executable)
new mode 100644 (file)
index 2371c89..7114fa3
-<html>
-<!--
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- * 
- * This file is part of Jalview.
- * 
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *  
- * Jalview is distributed in the hope that it will be useful, but 
- * WITHOUT ANY WARRANTY; without even the implied warranty 
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
- * PURPOSE.  See the GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
- * The Jalview Authors are detailed in the 'AUTHORS' file.
--->
-<head>
-<title>Building Jalview from Source</title>
-</head>
-<body>
-<h1>Building Jalview from Source</h1>
-<P>
-<p>
-You will need the following (hopefully):<br>
+<html><head>
+               <meta charset='utf-8'>
+               <meta http-equiv='x-ua-compatible' content='IE=edge'/>
+               <meta name="viewport" content="width=device-width,initial-scale=1.0">
+               <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
+               <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
+               <script>hljs.initHighlightingOnLoad();</script>
+<style media="screen" type="text/css">
+h1,h2,h3,h4,h5,h6{font-weight:400;color:#111;line-height:1em}code,kbd,pre,samp{color:#000;font-family:monospace,monospace;font-size:.98em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}html{font-size:100%;overflow-y:scroll}body{color:#444;font-family:Georgia,Palatino,Palatino Linotype,Times,Times New Roman,serif;font-size:12px;line-height:1.5em;padding:1em;margin:auto;max-width:42em;background:#fefefe}a{color:#0645ad;text-decoration:none}a:visited{color:#0b0080}a:hover{color:#06e;outline:0}a:active{color:#faa700;outline:0}a:focus{outline:thin dotted}::-moz-selection{background:rgba(255,255,0,.3);color:#000}::selection{background:rgba(255,255,0,.3);color:#000}a::-moz-selection{background:rgba(255,255,0,.3);color:#0645ad}a::selection{background:rgba(255,255,0,.3);color:#0645ad}p{margin:1em 0}img{max-width:100%;border:0;vertical-align:middle}h1{font-size:2.5em}h2{font-size:2em}h3{font-size:1.5em}h4{font-weight:700;font-size:1.2em}h5{font-weight:700;font-size:1em}h6{font-weight:700;font-size:.9em}blockquote{color:#666;margin:0;padding-left:3em;border-left:.5em #eee solid}hr{display:block;height:2px;border:0;border-top:1px solid #aaa;border-bottom:1px solid #eee;margin:1em 0;padding:0}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}b{font-weight:700}strong{font-weight:700}dfn{font-style:italic}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:700}sub{bottom:-.25em}sup{top:-.5em}ul{margin:1em 0;padding:0 0 0 2em}ol{margin:1em 0;padding:0 0 0 2em}dd{margin:0 0 0 2em}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}@media only screen and (min-width:480px){body{font-size:14px}}@media only screen and (min-width:768px){body{font-size:16px}}@media print{*{background:0 0!important;color:#000!important;-webkit-filter:none!important;filter:none!important}body{font-size:12pt;max-width:100%}a{text-decoration:underline}a:visited{text-decoration:underline}hr{height:1px;border:0;border-bottom:1px solid #000}pre{border:1px solid #999;padding-right:1em;page-break-inside:avoid}blockquote{border:1px solid #999;padding-right:1em;page-break-inside:avoid}tr{page-break-inside:avoid}img{page-break-inside:avoid;max-width:100%!important}p{orphans:3;widows:3}h2{orphans:3;widows:3;page-break-after:avoid}h3{orphans:3;widows:3;page-break-after:avoid}a[href]:after{content:"(" attr(href) ")"}abbr[title]:after{content:"(" attr(title) ")"}.ir a:after{content:""}a[href^="javascript:"]:after{content:""}a[href^="#"]:after{content:""}}li p:last-child{margin:0}
+</style>
+</head><body>
+<h1 id="building-jalview-from-source">Building Jalview from Source</h1>
+<h2 id="what-you-will-need">What you will need</h2>
+<p>The method here is described in terms of using a command line. You can easily do this on linux or in a Terminal window in macOS. You can do it in Windows.</p>
 <ul>
-<li>Java development kit (JDK1.6 is the recommended platform for developing with Jalview, although JDK1.7 seems to work too!).</li>
-<li>Ant (we think 1.5.4 is quite sufficient to use the simple build
-file supplied, and it seems to work with later versions e.g. 1.7).</li>
+<li>Java 11 compliant JDK</li>
+<li>gradle 5.1 or above</li>
+<li>git</li>
 </ul>
-With any luck, after setting your paths and JAVA_HOME correctly, you
-just need to change to the Jalview directory and run ant (this works
-from JBuilder and eclipse too, but NetBeans is a bit trickier).
-<pre>
-   ant
-</pre>
+<h3 id="java-11-jdk">Java 11 JDK</h3>
+<p>We recommend obtaining an OpenJDK JDK 11 from AdoptOpenJDK: <a href="https://adoptopenjdk.net/?variant=openjdk11&amp;jvmVariant=hotspot" class="uri">https://adoptopenjdk.net/?variant=openjdk11&amp;jvmVariant=hotspot</a>, either the <em>Installer</em> or <code>.zip</code>/<code>.tar.gz</code> variants whichever you prefer (if you&rsquo;re not sure, choose the <em>Installer</em>).</p>
+<h3 id="gradle-and-git"><code>gradle</code> and <code>git</code></h3>
+<p>You should be able to install the latest (or close to the latest) versions of gradle and git using your OS package manager.</p>
+<p>For <strong>macOS</strong> we recommend using <code>brew</code>, which can be installed following the instructions at <a href="https://brew.sh/" class="uri">https://brew.sh/</a>. After installing <code>brew</code>, open a Terminal window and type in (using an Administrator privileged user): <code>brew install gradle git</code> or <code>brew upgrade gradle git</code> if you already have them installed but need to upgrade the version.</p>
+<p>For <strong>linux</strong> this will depend on which distribution you&rsquo;re using. For <em>debian</em> based distributions (e.g.&nbsp;Mint, Ubuntu, Debian) run <code>sudo apt-get install gradle git</code> whilst for RPM-based distributions run (probably) <code>sudo yum install gradle git</code> If you have some other version of linux you&rsquo;ll probably be able to work it out!</p>
+<p>For <em>Windows</em> users, you might do well by using the <strong>Chocolatey</strong> package manager. See install instructions at <a href="https://chocolatey.org/" class="uri">https://chocolatey.org/</a>, and you will just need <code>choco install gradle git</code> Alternatively, you could install a real <code>bash</code> shell and install both <code>gradle</code> and <code>git</code> through <code>apt-get</code>. Another alternative would be to install them separately following the instructions at <a href="https://gradle.org/install/" class="uri">https://gradle.org/install/</a>, and for <code>git</code> here are a couple of suggestions: Git for Windows <a href="https://gitforwindows.org/" class="uri">https://gitforwindows.org/</a> or a real <code>bash</code>-shell <a href="https://devblogs.microsoft.com/commandline/bash-on-ubuntu-on-windows-download-now-3/" class="uri">https://devblogs.microsoft.com/commandline/bash-on-ubuntu-on-windows-download-now-3/</a> !</p>
+<h2 id="section"></h2>
 
-</p>
-<p><strong>Building a webstart version of jalview</strong></p>
-Jalview depends on several libraries contained in the libs directory
-of the distribution.  In order to access them, they must all be signed
-jars - using the same jarsigner key as jalview itself. There is a
-build target in ant to make the signed jar files in a directory called
-dist. But first you need to make your own key:
-<p><strong>Making your own key</strong></p>
-
-  <p>The ant 'makefulldist' target assumes that a keystore exists in
-    a directory 'keys'. To make a key accessible using the default
-    settings in the build.xml file then make the keys directory and add
-    the jarsigner key with the following :</p>
-  <pre>mkdir keys</pre>
-  <pre>keytool -genkey -keystore keys/.keystore -keypass alignmentisfun
-  -storepass alignmentisfun -sigalg SHA1withRSA -keyalg RSA -alias jalview</pre>
-  <em>(you will have to answer some personal questions here)</em>
-  <pre>ant makedist -DWebStartLocation="file://.pathtojalviewsource./dist" -Dapplication.codebase="*"</pre>
-  <p>This should eventually generate a jalview.jnlp file in ./dist
-    along with a set of signed jars using the jalview key). In order to
-    test locally via webstart you'll now need to add 'file:/' to your
-    java webstart security exception list. Then:</p>
-  <pre>javaws file://.pathtojalviewsource./dist/jalview.jnlp</pre>
-  <p>Please remember to remove that entry afterwards, since it will leave
-  your system vulnerable to malicious code.
-  </p>
-  <p>
-               <strong>Building the JalviewLite applet<br>
-               </strong> The JalviewLite applet is compiled using a subset of the packages in
-               the src directory (specifically: MCView, and jalview.{datamodel,
-               analysis, appletgui, utils, schemes, api, structure}, and
-               com.stevesoft.*). Once compiled, these class files are obfuscated to
-               make the code run efficiently. To compile the applet Jar, use the
-               makeApplet task - optionally passing in a 'donotobfuscate' property to
-               the ant build (e.g. -Ddonotobfuscate=true) to disable obfuscation. </p><p>
-               The ant target 'pubapplet' can be used to compile install the
-               jalviewApplet.jar and any dependent jars (under appletlib) into a copy
-               of the examples directory created under the <em>outputDir</em> build
-               property (which defaults to the 'dist' directory).
-       </p>
-       <p>
-<h1>using IDEs to build Jalview</h1>
-       <p>The Jalview source distribution includes project definitions for
-               Eclipse, Netbeans and some rather ancient Borland JBuilder .jpx
-               project files. These files should be sufficient to set up basic source
-               folders and build paths, but you will need to ensure that all .jar
-               files in the lib and appletlib directories are added to the build path
-               for your IDE project, and that the 'buildindices' target in Jalview's
-               build.xml is executed with the 'outputDir' ant property set to the
-               directory where the IDE expects to place compiled classes ('classes'
-               directory for eclipse, 'build/classes' for netbeans).</p>
-       <p>Note: It is generally not recommended that you distribute build
-               artefacts that were generated automatically via an IDE's own packaging
-               mechanism (e.g. Netbeans' executable Jar and dependent lib directory).
-               The hand-crafted ant build.xml is (currently) the only officially
-               supported method of building distributable versions of Jalview.</p>
-<address>
-<a href="mailto:help@jalview.org">Jalview development team</a>
-</address>
-</body>
-</html>
+</body></html>
\ No newline at end of file