Difference between revisions of "OSX"

From GeneWeb
Jump to navigation Jump to search
 
(52 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Installing under OSX=
+
{{DISPLAYTITLE:Installing GeneWeb under OS X}}
 +
{{languages|OSX}}
 +
{{toc right}}
 +
[[File:GeneWeb-Start-simple.png|thumb|320px|Traces in terminal window at GeneWeb start.]]
 +
The simplest install is as follows (process verified on OS X Yosemite):
 +
* [[Download]] the appropriate version. The latest stable version available is {{c|geneweb-6.07.tgz}}.
 +
* Double-clicking on the downloaded .tgz file creates a subfolder {{c|/geneweb-6.07}}.
 +
* Rename this folder to your liking, for instance {{c|/MyGeneWeb}}
 +
* Move this folder where you prefer.
 +
* Start GeneWeb by double-clicking the {{c|GeneWeb.command}} in this folder (not {{c|gwd}} or {{c|gwsetup}}). This should open a terminal window and browser window with the start page of GeneWeb.
 +
[[File:GeneWeb-Start.png|thumb|400px|center|Starting page for GeneWeb.]]
 +
: Note that on recent macOS versions, executable code must be signed for execution to proceed. For unsigned executables (which is currently the case for GeneWeb), one must
 +
: click-right and select the "open" option. After one such process, double-clicking will be accepted.
 +
* If the terminal windows just opened indicated "failure", this may be due to some idiosyncrasies of your environment.
 +
: Try the following:
 +
:* Open the file {{c|GeneWeb.command}} in a text editor
 +
:* Replace the line
 +
: <code>trap 'kill $pids' 1 2</code>
 +
:: by
 +
: <code>killall gwd</code>
 +
: <code>killall gwsetup</code>
 +
:: and save the result back to disk.
 +
:* Start GeneWeb by double-clicking the new {{c|GeneWeb.command}}.
  
==From sources==
+
When GeneWeb is running on a machine, it behave like a web server and will accept [[links|URLs]] following a precise syntax. You can [[man#Starting a GeneWeb server (gwd)|lauch GeneWeb with a lot of parameters]], for example as a Unix daemon or behind a real HTTP server with [[CGI]].
Installing GeneWeb from sources gives total freedom as to where things are.
+
 
 +
With this direct and simple installation approach, the bases created and managed by GeneWeb are located in {{c|/MyGeneWeb/bases}}. To setup GeneWeb in a more elaborate configuration, where code and bases are separated in two distinct folders, see the [[bases]] page.
 +
 
 +
==Multiple versions install==
 +
Installing multiple versions of GeneWeb is possible. The following section describes one approach. One of its benefits is to make more explicit several aspects of the folder structure expected by GeneWeb.
  
 
The first step is to organise a folder structure which will contain the various elements. Although style and taste may vary, here is a proposal for such a structure which is rather general, identifies the various components associated with GeneWeb and is amenable to changes.
 
The first step is to organise a folder structure which will contain the various elements. Although style and taste may vary, here is a proposal for such a structure which is rather general, identifies the various components associated with GeneWeb and is amenable to changes.
  
All the genealogy files are located in a folder called '''Genealogy''' sitting in "Home", and containing two sub-folders "GeneWeb" (sources and binaries.
+
All the genealogy files are located in a folder called '''Genealogy''' sitting in “Home”, and containing two sub-folders "GeneWeb" (sources and binaries), “GeneWeb-Bases” (bases and other base specific data. a specific base may be called '''base''' in the following discussions and examples) and two command files launching each one particular version of '''gwd''' and '''gwsetup''' ([[OSX#Starting gwd and gwsetup|see below]]):
This folder may be called bases in subsequent discussions and examples) and "GeneWeb-Bases" (bases and other base specific data. a specific base may be called '''base''' in the following discussions and examples) and two command files launching each one particular version of '''gwd''' and '''gwsetup''' ([[gwd-start|Starting gwd]]):
 
  
 
<pre>
 
<pre>
Line 25: Line 50:
 
</pre>
 
</pre>
  
[[File:Folder-GeneWeb.png|thumb|320px|right|Folder structure under Mac OSX for GeneWeb (source code and binaries).]]
+
[[File:Folder-GeneWeb.png|thumb|320px|right|Folder structure under Mac OS X for GeneWeb (source code and binaries).]]
 
 
The content of GeneWeb is organized as follows:
 
  
The folders '''gw-x.yy''' contain sources for version x.yy of GeneWeb. Executing the Makefile in this folder (see [[ocaml|Installing Ocaml]]) will create a '''distribution''' folder containing all data necessary for execution if GeneWeb.
+
In this organisation, the {{c|GeneWeb}} folder contains one or several GeneWeb distribution (detailed organisation of one '''[[distribution|distribution folder]]'''), and the {{c|GeneWeb-Bases}} folder contains one or several '''[[bases|genealogy bases]]'''.
 
 
The file gwget-7-00.sh is a shell script that will fetch the latest version of GeneWeb version 7.00 from the GitHub repository, compile it and move the  
 
resulting distribution folder appropriately.
 
 
 
==From a compiled distribution==
 
The folders '''GeneWeb-x.yy-Mac''' contain copies (or moves) of the distribution folders created from sources for each version,
 
or directly downloading (zip file) from a trusted source.
 
 
 
The folder GeneWeb-6.08-Mac contains a bases subfolder because the file <code>gwd.command</code> was executed which creates a bases folder right there. This folder is not used anywhere else in this setup (and could have been removed).
 
  
 
This setup has the advantage of maintaining active at least two running versions of GeneWeb which may be handy for moving bases from one version to the other.
 
This setup has the advantage of maintaining active at least two running versions of GeneWeb which may be handy for moving bases from one version to the other.
In each '''GeneWeb-x.yy-Mac''' folder, a sub-folder '''gw''' contains all the executable files and associated data (default a.gwf, etc, images, lang, src sub-folders). '''gwsetup''' itself uses the setup sub-folder for its data.
 
  
'''gwd.arg''' contains the execution arguments for gwd (see [[gwd|Gwd]]).
+
The two folders gw-6.08-alpha-src and gw-7.00-Mac and file gwget-7-00.sh relate to GeneWeb sources and will be discussed in section [[#From sources]].
  
'''gwd.log''' contains the log traces produced by gwd. May be useful for some debuging!
+
==Starting gwd and gwsetup==
 +
[[File:GeneWeb-Start-terminal.png|thumb|320px|right|Traces in terminal window at GeneWeb start.]]
 +
With this folder organisation, clicking on {{c|$HOME/Genealogy/Gw-Mac-7.00.command}} ([http://download.tuxfamily.org/geneweb/wiki/geneweb.command download it here], you have to execute a chmod +x on this file to use it) will open a terminal window, kill previously running versions of gwd and [[gwsetup]], start a fresh one and open the same start page as above.
  
Note the '''tags.txt''' file containing the list of HTML tags authorized within the notes associated with each person.
+
== From sources ==
 +
Compilation from sources requires installation of [[OCaml|OCaml]]. This is best done with Opam which will handle module dependencies.
  
 +
Once Opam is installed, you can install the appropriate version of Ocaml (4.13.0 or 4.14.0) by running:
 +
<pre>
 +
opam switch create ocaml.4.13.0
 +
</pre>
  
The content of GeneWeb-Bases is organized as follows:
+
Compiling GeneWeb requires installation of a collection of modules:
[[File:Folder-Bases.png|thumb|320px|right|Folder structure under Mac OSX for GeneWeb-Bases (Genealogy data).]]
+
<pre>
 +
opam install benchmark camlp5 camlp-streams cppo dune jingoo markup num odoc ounit ppx_blob
 +
opam install ppx_deriving ppx_import stdlib-shims syslog uucp uunf uutf zarith
 +
opam install calendars.1.0.0
 +
opam install unidecode.0.2.0
 +
</pre>
  
Bases are stored in '''.gwb''' folders. Each base may have its parameter '''.gwf''' file. If no parameter file exist, gwd will use the '''a.gwf''' default parameter file found in GeneWeb-x.yy-Mac/gw
+
Obtaining and compiling the sources of GeneWeb is done through the following set of commands:
 
+
<pre>
Other folders contain the following data:
+
git clone https://github.com/geneweb/geneweb.git
* '''cnt''': contains access count for each base, and possibly a '''robot''' file remembering IP adresses behaving as robots and to be excluded.
+
cd geneweb
* '''etc''': contains base specific '''etc''' files. When searching for etc files, '''gwd''' will scan the file system in the following order:
+
ocaml ./configure.ml
**.../bases/etc/base
+
make distrib
**.../bases/etc
+
</pre>
**.../gw/etc/base
 
**.../gw/etc
 
 
 
* '''images''': each '''base''' sub-folder contains the images associated with each person of a particular base. The naming convention is <code>firstname.occ.lastname.jpg</code>.
 
  
* '''lang''':
+
If some "undefined module" error message appear during compilation, do a {{c|opam install missing_module}} and repeat the {{c|make distrib}} command.
* '''src''': each '''base''' sub-folder contains text files and image files loaded by '''gwd''' with the m=SRC or m=IMH command (see [[Images|Inserting images in notes]]).
 
  
One or several '''.auth''' file may reside here, as referenced in the '''.gwf''' files for friends and/or wizard authentication.
+
Note that the file {{c|dune-project}} contains the list of modules used by GeneWeb.
  
==Starting Gwd and Gwsetup==
+
Successful execution of {{c|make distrib}} creates a {{c|distribution}} folder which you can rename and relocate wherever you whish, and you are in the situation assumed at the start of this chapter.
  
[[File:GeneWeb-Start.png|thumb|320px|right|Starting page for GeneWeb.]]
+
{{manual}}
  
With this folder organisation, clicking on <code>$HOME/Genealogy/Gw-Mac-7.00.command</code> will kill previously running versions of gwd and gwsetup, start a fresh one and open the start page.
+
[[Category:Manual]]

Latest revision as of 16:13, 23 July 2023

150px-Geographylogo svg.png Language:   English • français
Traces in terminal window at GeneWeb start.

The simplest install is as follows (process verified on OS X Yosemite):

  • Download the appropriate version. The latest stable version available is geneweb-6.07.tgz.
  • Double-clicking on the downloaded .tgz file creates a subfolder /geneweb-6.07.
  • Rename this folder to your liking, for instance /MyGeneWeb
  • Move this folder where you prefer.
  • Start GeneWeb by double-clicking the GeneWeb.command in this folder (not gwd or gwsetup). This should open a terminal window and browser window with the start page of GeneWeb.
Starting page for GeneWeb.
Note that on recent macOS versions, executable code must be signed for execution to proceed. For unsigned executables (which is currently the case for GeneWeb), one must
click-right and select the "open" option. After one such process, double-clicking will be accepted.
  • If the terminal windows just opened indicated "failure", this may be due to some idiosyncrasies of your environment.
Try the following:
  • Open the file GeneWeb.command in a text editor
  • Replace the line
trap 'kill $pids' 1 2
by
killall gwd
killall gwsetup
and save the result back to disk.
  • Start GeneWeb by double-clicking the new GeneWeb.command.

When GeneWeb is running on a machine, it behave like a web server and will accept URLs following a precise syntax. You can lauch GeneWeb with a lot of parameters, for example as a Unix daemon or behind a real HTTP server with CGI.

With this direct and simple installation approach, the bases created and managed by GeneWeb are located in /MyGeneWeb/bases. To setup GeneWeb in a more elaborate configuration, where code and bases are separated in two distinct folders, see the bases page.

Multiple versions install

Installing multiple versions of GeneWeb is possible. The following section describes one approach. One of its benefits is to make more explicit several aspects of the folder structure expected by GeneWeb.

The first step is to organise a folder structure which will contain the various elements. Although style and taste may vary, here is a proposal for such a structure which is rather general, identifies the various components associated with GeneWeb and is amenable to changes.

All the genealogy files are located in a folder called Genealogy sitting in “Home”, and containing two sub-folders "GeneWeb" (sources and binaries), “GeneWeb-Bases” (bases and other base specific data. a specific base may be called base in the following discussions and examples) and two command files launching each one particular version of gwd and gwsetup (see below):

iMac-H:Genealogy Henri$ cd ~/Genealogy/
iMac-H:Genealogy Henri$ pwd
/Users/Henri/Genealogy
iMac-H:Genealogy Henri$ ls -al
total 24
drwxr-xr-x   5 Henri  staff    170 14 oct 12:57 .
drwxr-xr-x+ 81 Henri  staff   2754 14 oct 13:28 ..
-rw-r--r--@  1 Henri  staff  10244 14 oct 13:28 .DS_Store
drwxr-xr-x   8 Henri  staff    272 14 oct 12:59 GeneWeb
drwxr-xr-x  13 Henri  staff    442 14 oct 13:04 GeneWeb-Bases
-rwxr-xr-x@  1 Henri  staff   3036  8 sep 12:14 Gw-Mac-6.08.command
-rwxr-xr-x@  1 Henri  staff   3160 20 sep 05:55 Gw-Mac-7.00.command
iMac-H:Genealogy Henri$ 
Folder structure under Mac OS X for GeneWeb (source code and binaries).

In this organisation, the GeneWeb folder contains one or several GeneWeb distribution (detailed organisation of one distribution folder), and the GeneWeb-Bases folder contains one or several genealogy bases.

This setup has the advantage of maintaining active at least two running versions of GeneWeb which may be handy for moving bases from one version to the other.

The two folders gw-6.08-alpha-src and gw-7.00-Mac and file gwget-7-00.sh relate to GeneWeb sources and will be discussed in section #From sources.

Starting gwd and gwsetup

Traces in terminal window at GeneWeb start.

With this folder organisation, clicking on $HOME/Genealogy/Gw-Mac-7.00.command (download it here, you have to execute a chmod +x on this file to use it) will open a terminal window, kill previously running versions of gwd and gwsetup, start a fresh one and open the same start page as above.

From sources

Compilation from sources requires installation of OCaml. This is best done with Opam which will handle module dependencies.

Once Opam is installed, you can install the appropriate version of Ocaml (4.13.0 or 4.14.0) by running:

opam switch create ocaml.4.13.0

Compiling GeneWeb requires installation of a collection of modules:

opam install benchmark camlp5 camlp-streams cppo dune jingoo markup num odoc ounit ppx_blob
opam install ppx_deriving ppx_import stdlib-shims syslog uucp uunf uutf zarith
opam install calendars.1.0.0
opam install unidecode.0.2.0

Obtaining and compiling the sources of GeneWeb is done through the following set of commands:

git clone https://github.com/geneweb/geneweb.git
cd geneweb
ocaml ./configure.ml
make distrib

If some "undefined module" error message appear during compilation, do a opam install missing_module and repeat the make distrib command.

Note that the file dune-project contains the list of modules used by GeneWeb.

Successful execution of make distrib creates a distribution folder which you can rename and relocate wherever you whish, and you are in the situation assumed at the start of this chapter.


GeneWeb Manual

Rembrandt Old Man Reading a Book.jpg

Use and manage genealogical databases

Technical annex