File: plugin-proxy-rgi.html

package info (click to toggle)
gwyddion 2.52-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 46,588 kB
  • sloc: ansic: 367,740; python: 7,788; sh: 5,245; makefile: 4,317; xml: 3,631; cpp: 2,550; pascal: 418; perl: 154; ruby: 130
file content (128 lines) | stat: -rw-r--r-- 5,853 bytes parent folder | download
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RGI Registration Method: Gwyddion Module Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Gwyddion Module Library Reference Manual">
<link rel="up" href="PluginProxyReference.html" title="Plug-in Proxy Reference">
<link rel="prev" href="plugin-proxy-dump.html" title="Dump Format">
<link rel="next" href="api-index-all.html" title="Index of all symbols">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="PluginProxyReference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="plugin-proxy-dump.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="api-index-all.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="plugin-proxy-rgi"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">RGI Registration Method</span></h2>
<p>RGI Registration Method — 
      Alternate plug-in registration method using RGI files
    </p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id-1.4.6.3"></a><h2>Overview</h2>
<p>
      The original and standard plug-in registration procedure consists of
      querying (i.e., running) each plug-in by plug-in proxy on <span class="application">Gwyddion</span>
      start-up.  The queried plug-in prints its registration information
      to standard output and plug-in proxy captures and parses it.
    </p>
<p>
      The standard method has two problems:
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
          On some systems (particularly various MS Windows versions) there
          are troubles with capturing standard otuput of some programs
          (particularly those compiled by Pascal/Delphi compilers).
          It is not clear, why it doesn't work, but it simply doesn't
          (any insight would be highly appreciated).
        </li>
<li class="listitem">
          It is slow, namely on systems with expensive process creation,
          like MS Windows.
        </li>
</ul></div>
<p>
    </p>
<p>
      Thus an alternate plug-in registration method was implemented, using
      RGI (ReGistration Information) files.
    </p>
</div>
<div class="refsect1">
<a name="id-1.4.6.4"></a><h2>RGI registration</h2>
<p>
      When plug-in proxy finds an executable plug-in, let's call it
      <code class="filename">foo.exe</code>, before trying to run it it looks for
      following files (in this order):
      </p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td><code class="filename">foo.exe.rgi</code></td></tr>
<tr><td><code class="filename">foo.exe.RGI</code></td></tr>
<tr><td><code class="filename">foo.rgi</code></td></tr>
<tr><td><code class="filename">foo.RGI</code></td></tr>
</table>
<p>
      If the plug-in filename has no extension, only the first two are
      tried.  If it has more extensions, only the last one is replaced.
    </p>
<p>
      The first file found (if any) is used instead of the standard output
      of <code class="filename">foo.exe</code>, i.e., as its registration data.
      If none of them is present, the registration continues as usual by
      running <code class="filename">foo.exe</code> with a <code class="option">register</code>
      argument.
    </p>
<p>
      After a successfull registration, there's no difference in actual
      execution of plug-ins registered by running them or using a RGI file.
    </p>
<p>
      The easiest way to create a RGI file for an existing plug in
      is to make it dump the registration information to a file:
      </p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="normal">foo</span><span class="symbol">.</span><span class="usertype">exe</span><span class="normal"> </span><span class="keyword">register</span><span class="normal"> </span><span class="symbol">&gt;</span><span class="normal">foo</span><span class="symbol">.</span><span class="normal">exe</span><span class="symbol">.</span><span class="normal">rgi</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p>
    </p>
</div>
<div class="refsect1">
<a name="id-1.4.6.5"></a><h2>Problems</h2>
<p>
      The main problem is that the contents of a RGI file must be kept up to
      date with corresponding plug-in, if its specification changes.
    </p>
<p>
      The RGI method also allows to register a plug-in that is not possible to
      actually execute on a given system, and thus confusing the user.
      For example, it's possible to register a Python plug-in where
      Python interpeter is not available, or executables for a different
      operating system.
    </p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>