-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL.html
More file actions
100 lines (100 loc) · 4.23 KB
/
INSTALL.html
File metadata and controls
100 lines (100 loc) · 4.23 KB
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
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>models</title>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
<link rel="stylesheet" href="https://media.library.caltech.edu/cl-webcomponents/css/code-blocks.css">
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/copyToClipboard.js"></script>
<script type="module" src="https://media.library.caltech.edu/cl-webcomponents/footer-global.js"></script>
</head>
<body>
<header>
<a href="https://library.caltech.edu"><img src="https://media.library.caltech.edu/assets/caltechlibrary-logo.png" alt="Caltech Library logo"></a>
</header>
<a href="#main-content" class="visually-hidden">skip to main content</a>
<nav>
<ul>
<li><a href="/">All Library Apps</a></li>
<li><a href="index.html">Home</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/caltechlibary/models">Code Repository</a></li>
</ul>
</nav>
<section id="main-content">
<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-global></footer-global>
</body>
</html>