-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.html
104 lines (102 loc) · 4.21 KB
/
INSTALL.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
<!DOCTYPE html>
<html>
<head>
<title>Dataset Project</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu" title="link to Caltech Library Homepage"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<li><a href="search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/models">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="installation">Installation</h1>
<p><strong>model</strong> is a Go package but also includes a demo
application called <strong>modelgen</strong>. You can install
<strong>modelgen</strong> via instructions below. NOTE: This is an
experimental proof of concept.</p>
<h2 id="quick-install-with-curl-or-irm">Quick install with curl or
irm</h2>
<p>There is an experimental installer.sh script that can be run with the
following command to install latest table release. This may work for
macOS, Linux and if you’re using Windows with the Unix subsystem. This
would be run from your shell (e.g. Terminal on macOS).</p>
<pre><code>curl https://caltechlibrary.github.io/models/installer.sh | sh</code></pre>
<p>This will install modelgen in your <code>$HOME/bin</code>
directory.</p>
<p>If you are running Windows 10 or 11 use the Powershell command
below.</p>
<pre><code>irm https://caltechlibrary.github.io/models/installer.ps1 | iex</code></pre>
<p>If your want to install a specific verions set the
<code>PKG_VERSION</code> environment variable then download. E.g.
version 2.1.5 in tihs example.</p>
<p>For Linux and macOS</p>
<pre><code>export PKG_VERSION=0.0.1
curl https://caltechlibrary.github.io/models/installer.sh | sh</code></pre>
<p>For Windows</p>
<pre><code>$env:PKG_VERSION = '0.0.1'
irm https://caltechlibrary.github.io/models/installer.ps1 | iex</code></pre>
<h2 id="compiling-from-source">Compiling from source</h2>
<p>You need to have git, Pandoc, Go compiler and Make (GNU Make)
available for this recipe to work. Clone the repository and then compile
in the typical POSIX style. NOTE by default the binaries are installed
in <code>$HOME/bin</code> and that is assumed to be in your path.</p>
<pre class="shell"><code> cd
git clone https://github.com/caltechlibrary/models
cd models
make
# Add any missing dependencies you might need in your Go environment
make test
make install</code></pre>
<p>On Windows you would perform the following in Powershell.</p>
<pre class="shell"><code> cd
git clone https://github.com/caltechlibrary/models
cd models
.\make.bat
# Follow the prompts and instruction in the bat file.</code></pre>
<h3 id="requirements">Requirements</h3>
<ul>
<li>Go version 1.23.1 or better</li>
<li>Pandoc version 3.1 or better</li>
<li>GNU Make</li>
<li>Common POSIX/Unix utilities, e.g. cat, sed, grep</li>
<li>jq >= 1.7.1</li>
</ul>
<h3 id="windows-compilation">Windows compilation</h3>
<p>The tool chain to compile on Windows make several assumptions.</p>
<ol type="1">
<li>You’re using Anaconda shell and have the C tool chain installed for
cgo to work</li>
<li>GNU Make, cat, grep and sed</li>
<li>You have the latest Go installed</li>
</ol>
<p>Since I don’t assume a POSIX shell environment on windows I have made
batch files to perform some of what Make under Linux and macOS would
do.</p>
<ul>
<li>make.bat builds our application and depends on go and jq
commands</li>
</ul>
<p>Compilation assumes <a href="https://github.com/golang/go">Go</a>
v1.23.1 or better.</p>
</section>
<footer>
<span>© 2024 <a href="https://www.library.caltech.edu/copyright">Caltech Library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span><a href="mailto:library@caltech.edu">Email Us</a></span>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
</footer>
</body>
</html>