summaryrefslogtreecommitdiff
path: root/configs/maintainer.txt
blob: 30ee5ac05f227dbfdf39506208c96e8a27081154 (plain)
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
maintainer.txt:

General notes for the configs directory, root/configs.
'root' refers to the toplevel of the linuxcnc git tree.

-------------------------------------------------------

The configs dir contains a hierarchy of configurations,
each with one or more ini files, that are intended to:

  1) run as-is on a RIP (run-in-place) build
  2) run when copied to a user ~/linuxcnc directory
     by the configuration picker (pickconfig.tcl)

Additionally, demonstration scripts identified by a file
extension .demo, can run standalone to show linuxcnc-related
functionality without requiring start-up of linuxcnc.
A configs directory should not contain both .ini and .demo
files.

Directories for .demo applications by default are offered
for copying to a user directory.  Some apps are not usefully
copied so a directory containing .demo files (and
no .ini files) will not be copied if the directory includes a
file named 'nodemocopy'.

When a desktop shortcut is made for a copied .demo application,
the shortcut will execute the .demo file.  The environment
for files executed by .desktop files  is limited so extra care
is required to ensure that a desktop shortcut created for
a .demo file is usable.

-------------------------------------------------------

The configuraton picker (pickconfig.tcl) walks through
existing _user_ configurations in ~linuxcnc/configs and the
distribution's root/configs directory.  It presents both
existing user configurations and sample configurations.
When a sample configuration is selected the configuration
picker:

  1) creates a directory in ~/linuxcnc/configs for the
     selected item and copies all relevant files and
     directories to the newly created directory.  When
     a name clash occurs, the picker appends a number
     to the directory name to make it distinct.

  2) creates a directory ~/linuxcnc/nc_files (if it
     does not exist).  It creates links in this directory
     to the system locations for examples and libraries
     (examples, ngcgui_lib, gladevcp_lib)

  3) edits all ini files being copied so that
     [DISPLAY]PROGRAM_PREFIX = ~/linuxcnc/nc_files.

A similar process occurs for demonstration (.demo) files when
directories for .demo files are copied (only when no file
named 'nodemocopy' exists).

Most general purpose demonstration scripts can be located
in the directory named: root/configs/apps and its
subdirectories.

-------------------------------------------------------

A configuration directory may contain subdirectories.

If a subdirectory contains a file with a .ini or .demo
suffix, it is considered to be a selectable configuration
directory and will be included in the selection tree
provided by the configuraton picker.

Subdirectories required for other purposes must not
contain a file with a .ini or .demo suffix.

When a subdirectory requires file or directory resources
that are shared by other configurations, it should use a
symlink to a parent's file or directory.  The configuration
picker copies the file or directory referred to by
the symlink.  Use of symlinks in this manner reduces
the number of real files in the git tree.

-------------------------------------------------------

Occasional relocation of configuration directories within
the root/configs tree is anticipated.  To minimize the
editing of files required for such moves, the following
guidelines apply:

Ini files may need to refer to root/nc_files resources.
The most common case, [DISPLAY]PROGRAM_PREFIX is handled
as described above.  Other examples include path items
such as:
   [RS274NGC]SUBROUTINE_PATH
   [RS274NGC]USER_M_PATH

Items like these should refer to ../../nc_files and use
appropriate symlinks within the configuration directory.

Example:
   A configuration named: root/configs/sim/axis/ngcgui
   could, for example, refer to:
   [RS274NGC]SUBROUTINE_PATH = ../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs

   The root/configs/sim directory must contain a symlink:
      root/configs/sim/nc_files --> ../../nc_files
   so that the ini file reference will work in rip builds.

These conventions work because:

   1) Copied user configurations
      have configs located in --------- ~/linuxcnc/configs/
      and nc_files located as --------- ~/linuxcnc/nc_files/

      So if ini files always refer to root/nc_files as
        ../../nc_files
      they will not require modifications when copied to
      users' directories nor when moved within the
      distribution tree

  2) Since symlinks are usually required to make ../../nc_files
     resolve to root/nc_files (for RIP usage).

     Because of this, symlinks for nc_files are never copied
     to user dirs.


-------------------------------------------------------
Any configuration directory may include a file named
  maintainer.txt
to include comments or details about maintaining the
configuration.  These files will not be copied to user's
configuration directories.