Difference between revisions of "OSX"

From GeneWeb
Jump to: navigation, search
(Simplest install)
m (typo. ; image en doublon ? (déjà utilisée plus bas) ; relecture simplest install ; modèle code)
Line 1: Line 1:
=Installing under OSX=
+
{{DISPLAYTITLE:Installing GeneWeb under OS X}}
 +
{{languages|OSX}}
  
 
==Simplest install==
 
==Simplest install==
 
+
[[File:GeneWeb-Start-simple.png|thumb|320px|Traces in terminal window at GeneWeb start.]]
The simplest install is as follows (process verified on Yosemite):
+
The simplest install is as follows (process verified on OS X Yosemite):
* Download the appropriate version (see [[Download]]). The latest version available from this source is geneweb-6.07.tgz
+
* [[Download]] the appropriate version. The latest version available from this source is {{c|geneweb-6.07.tgz}}.
* Open the .tgz file (double click). This creates, next to where geneweb-6.07.tgz sits, a folder named geneweb-6.07
+
* Double-clicking on the downloaded .tgz file creates a subfolder named {{c|geneweb-6.07}}.
* Move this folder where you prefer
+
* Move this folder where you prefer.
* Open in a text editor the file <code>GeneWeb.command</code>
+
* Open the file {{c|GeneWeb.command}} in a text editor.
* Replace its content by that of [[OSXgwCommand]] and save it back to disk (for some reason, the standard <code>GeneWeb.command</code> does not work with OSX, and I cant figure why! Help and update in the main repository appreciated)
+
* Replace its content by that of [[OSXgwCommand]] and save it back to disk (for some reason, the standard command does not work with OS X, help and update in the main repository appreciated).
* Start GeneWeb by double clicking on <code>GeneWeb.command</code>. This should open a terminal window and browser window with the start page of GeneWeb:
+
* Start GeneWeb by double-clicking the new {{c|GeneWeb.command}}. This should open a terminal window and browser window with the start page of GeneWeb.
 
+
[[File:GeneWeb-Start-simple.png|thumb|320px|center|Traces in terminal window at GeneWeb start.]]
+
[[File:GeneWeb-Start.png|thumb|320px|center|Starting page for GeneWeb.]]
+
  
 
==Multiple versions install==
 
==Multiple versions install==
 
 
Installing multiple versions of GeneWeb is possible. The following section describes one possibility. One of its benefits is to make more explicit several aspects of the folder structure expected by GeneWeb.
 
Installing multiple versions of GeneWeb is possible. The following section describes one possibility. 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.  
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]]):
+
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 39: Line 36:
 
</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).]]
  
 
=== GeneWeb===
 
=== GeneWeb===
Line 47: Line 44:
 
or directly downloading (zip file) from a trusted source.
 
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).
+
The folder GeneWeb-6.08-Mac contains a bases subfolder because the file {{c|gwd.command}} 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.
Line 74: Line 71:
 
**.../gw/etc
 
**.../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>.
+
* '''images''': each '''base''' sub-folder contains the images associated with each person of a particular base. The naming convention is {{c|firstname.occ.lastname.jpg}}.
  
 
* '''lang''':
 
* '''lang''':
Line 82: Line 79:
  
 
==Starting Gwd and Gwsetup==
 
==Starting Gwd and Gwsetup==
 
 
[[File:GeneWeb-Start-terminal.png|thumb|320px|right|Traces in terminal window at GeneWeb start.]]
 
[[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}} (whose content is [[gwd-start|here]]) will open a terminal window, kill previously running versions of gwd and gwsetup, start a fresh one and open the start page.
  
With this folder organisation, clicking on <code>$HOME/Genealogy/Gw-Mac-7.00.command</code> (whose content is [[gwd-start|here]]) will open a terminal window, kill previously running versions of gwd and gwsetup, start a fresh one and open the start page.
+
[[File:GeneWeb-Start.png|thumb|400px|center|Starting page for GeneWeb.]]
 
+
[[File:GeneWeb-Start.png|thumb|320px|center|Starting page for GeneWeb.]]
+
  
 
For the diehards, here are all the parameters that '''gwd''' accepts at launch time:
 
For the diehards, here are all the parameters that '''gwd''' accepts at launch time:
Line 101: Line 96:
 
   -wd <dir>
 
   -wd <dir>
 
       Directory for socket communication (Windows) and access count.
 
       Directory for socket communication (Windows) and access count.
   -cgi  
+
   -cgi
 
       Force cgi mode.
 
       Force cgi mode.
 
   -images_url <url>
 
   -images_url <url>
Line 111: Line 106:
 
   -p <number>
 
   -p <number>
 
       Select a port number (default = 2317); > 1024 for normal users.
 
       Select a port number (default = 2317); > 1024 for normal users.
   -setup_link  
+
   -setup_link
 
       Display a link to local gwsetup in bottom of pages.
 
       Display a link to local gwsetup in bottom of pages.
 
   -allowed_tags <file>
 
   -allowed_tags <file>
Line 119: Line 114:
 
   -friend <passwd>
 
   -friend <passwd>
 
       Set a friend password: access to all dates.
 
       Set a friend password: access to all dates.
   -wjf  
+
   -wjf
 
       Wizard just friend (permanently)
 
       Wizard just friend (permanently)
 
   -lang <lang>
 
   -lang <lang>
 
       Set a default language (default: fr).
 
       Set a default language (default: fr).
   -blang  
+
   -blang
 
       Select the user browser language if any.
 
       Select the user browser language if any.
 
   -only <address>
 
   -only <address>
Line 130: Line 125:
 
       Authorization file to restrict access. The file must hold lines
 
       Authorization file to restrict access. The file must hold lines
 
       of the form "user:password".
 
       of the form "user:password".
   -no_host_address  
+
   -no_host_address
 
       Force no reverse host by address
 
       Force no reverse host by address
   -digest  
+
   -digest
 
       Use Digest authorization scheme (more secure on passwords)
 
       Use Digest authorization scheme (more secure on passwords)
 
   -add_lexicon <lexicon>
 
   -add_lexicon <lexicon>
Line 140: Line 135:
 
   -robot_xcl <cnt>,<sec>
 
   -robot_xcl <cnt>,<sec>
 
       Exclude connections when more than <cnt> requests in <sec> seconds.
 
       Exclude connections when more than <cnt> requests in <sec> seconds.
   -min_disp_req  
+
   -min_disp_req
 
       Minimum number of requests in robot trace (default: 6)
 
       Minimum number of requests in robot trace (default: 6)
 
   -login_tmout <sec>
 
   -login_tmout <sec>
Line 146: Line 141:
 
   -redirect <addr>
 
   -redirect <addr>
 
       Send a message to say that this service has been redirected to <addr>
 
       Send a message to say that this service has been redirected to <addr>
   -trace_failed_passwd  
+
   -trace_failed_passwd
       Print the failed passwords in log (except if option -digest is set)  
+
       Print the failed passwords in log (except if option -digest is set)
   -nolock  
+
   -nolock
 
       Do not lock files before writing.
 
       Do not lock files before writing.
 
   -max_clients <num>
 
   -max_clients <num>
Line 155: Line 150:
 
   -conn_tmout <sec>
 
   -conn_tmout <sec>
 
       Connection timeout (default 120s; 0 means no limit)
 
       Connection timeout (default 120s; 0 means no limit)
   -daemon  
+
   -daemon
 
       Unix daemon mode.
 
       Unix daemon mode.
 
   -chwd <comm>
 
   -chwd <comm>
 
       Call command when wdoc changed
 
       Call command when wdoc changed
iMac-H:gw Henri$  
+
iMac-H:gw Henri$
 
</pre>
 
</pre>
  
 
== From sources ==
 
== From sources ==
 
+
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. Renaming this distribution folder to GeneWeb-x.yy-Mac and moving it into the <code>GeneWeb</code> folder discussed above brings us to a known situation.
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. Renaming this distribution folder to GeneWeb-x.yy-Mac and moving it into the <code>GeneWeb</code> folder discussed above brings us to a known situation.
+
  
 
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.
 
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.
  
 
Of course, the structure above can be extended to more that two versions of GeneWeb, and to more than two bases. Appropriate editing of the shell scripts and command files may be necessary.
 
Of course, the structure above can be extended to more that two versions of GeneWeb, and to more than two bases. Appropriate editing of the shell scripts and command files may be necessary.

Revision as of 01:24, 15 October 2015

150px-Geographylogo svg.png Language: English • français

Simplest install

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 version available from this source is geneweb-6.07.tgz.
  • Double-clicking on the downloaded .tgz file creates a subfolder named geneweb-6.07.
  • Move this folder where you prefer.
  • Open the file GeneWeb.command in a text editor.
  • Replace its content by that of OSXgwCommand and save it back to disk (for some reason, the standard command does not work with OS X, help and update in the main repository appreciated).
  • Start GeneWeb by double-clicking the new GeneWeb.command. This should open a terminal window and browser window with the start page of GeneWeb.

Multiple versions install

Installing multiple versions of GeneWeb is possible. The following section describes one possibility. 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. 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 (Starting gwd):

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).

GeneWeb

The content of GeneWeb is organized as follows:

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 gwd.command 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. 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.log contains the log traces produced by gwd. May be useful for some debuging!

Note the tags.txt file containing the list of HTML tags authorized within the notes associated with each person (see Tags).

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.

GeneWeb-Bases

The content of GeneWeb-Bases is organized as follows:

Folder structure under Mac OSX for GeneWeb-Bases (Genealogy data).

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/GeneWeb-x.yy-Mac/gw

Other folders contain the following data:

  • cnt: contains access count for each base, and possibly a robot file remembering IP adresses behaving as robots and to be excluded.
  • etc: contains base specific etc files. When searching for etc files, gwd will scan the file system in the following order:
    • .../bases/etc/base
    • .../bases/etc
    • .../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 firstname.occ.lastname.jpg.
  • lang:
  • src: each base sub-folder contains text files and image files loaded by gwd with the m=SRC or m=IMH command (see Inserting images in notes).

One or several .auth file may reside here, as referenced in the .gwf files for friends and/or wizard authentication.

Starting Gwd and Gwsetup

Traces in terminal window at GeneWeb start.

With this folder organisation, clicking on $HOME/Genealogy/Gw-Mac-7.00.command (whose content is here) will open a terminal window, kill previously running versions of gwd and gwsetup, start a fresh one and open the start page.

Starting page for GeneWeb.

For the diehards, here are all the parameters that gwd accepts at launch time:

iMac-H:gw Henri$ ./gwd -help
Usage: gwd [options] where options are:
  -hd <dir>
       Directory where the directory lang is installed.
  -dd <dir>
       Directory where the documentation is installed.
  -bd <dir>
       Directory where the databases are installed.
  -wd <dir>
       Directory for socket communication (Windows) and access count.
  -cgi
       Force cgi mode.
  -images_url <url>
       URL for GeneWeb images (default: gwd send them)
  -images_dir <dir>
       Same than previous but directory name relative to current
  -a <address>
       Select a specific address (default = any address of this computer)
  -p <number>
       Select a port number (default = 2317); > 1024 for normal users.
  -setup_link
       Display a link to local gwsetup in bottom of pages.
  -allowed_tags <file>
       HTML tags which are allowed to be displayed. One tag per line in file.
  -wizard <passwd>
       Set a wizard password: access to all dates and updating.
  -friend <passwd>
       Set a friend password: access to all dates.
  -wjf
       Wizard just friend (permanently)
  -lang <lang>
       Set a default language (default: fr).
  -blang
       Select the user browser language if any.
  -only <address>
       Only inet address accepted.
  -auth <file>
       Authorization file to restrict access. The file must hold lines
       of the form "user:password".
  -no_host_address
       Force no reverse host by address
  -digest
       Use Digest authorization scheme (more secure on passwords)
  -add_lexicon <lexicon>
       Add file as lexicon.
  -log <file>
       Redirect log trace to this file.
  -robot_xcl <cnt>,<sec>
       Exclude connections when more than <cnt> requests in <sec> seconds.
  -min_disp_req
       Minimum number of requests in robot trace (default: 6)
  -login_tmout <sec>
       Login timeout for entries with passwords in CGI mode (default 1800s)
  -redirect <addr>
       Send a message to say that this service has been redirected to <addr>
  -trace_failed_passwd
       Print the failed passwords in log (except if option -digest is set)
  -nolock
       Do not lock files before writing.
  -max_clients <num>
       Max number of clients treated at the same time (default: no limit)
       (not cgi).
  -conn_tmout <sec>
       Connection timeout (default 120s; 0 means no limit)
  -daemon
       Unix daemon mode.
  -chwd <comm>
       Call command when wdoc changed
iMac-H:gw Henri$

From sources

The folders gw-x.yy contain sources for version x.yy of GeneWeb. Executing the Makefile in this folder (see Installing OCaml) will create a distribution folder containing all data necessary for execution if GeneWeb. Renaming this distribution folder to GeneWeb-x.yy-Mac and moving it into the GeneWeb folder discussed above brings us to a known situation.

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.

Of course, the structure above can be extended to more that two versions of GeneWeb, and to more than two bases. Appropriate editing of the shell scripts and command files may be necessary.