• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョン95e2fe7e2aa7d778483c37127b5e2e6dbc78564a (tree)
日時2011-10-15 23:00:33
作者toshinagata1964 <toshinagata1964@a2be...>
コミッターtoshinagata1964

ログメッセージ

On Windows, Molby::{Mbsf,Resource,Script}Path return slash-separated strings instead of backslash-separated strings.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@142 a2be9bc6-48de-4e38-9406-05402d4bc13c

変更サマリ

差分

--- a/Documents/src/molby_rb/Kernel.html
+++ b/Documents/src/molby_rb/Kernel.html
@@ -39,11 +39,11 @@ The methods described here are the extension of the standard "Kernel" module. Th
3939 <div class="method-detail">
4040 <a name="molbyresourcepath"></a>
4141 <div class="method-heading">
42-<span class="method-name">MolbyResourcePath</span>
42+<span class="method-name">MolbyResourcePath (deprecated)</span>
4343 </div>
4444 <div class="method-description">
4545 <p>
46-A String describing the full path of the directory containing <code>Scripts</code> and <code>amber11</code> resources. On Windows, it is something like <code>"C:\\Program Files\\Molby"</code>. On Mac, it is something like <code>"/Applications/Molby/Molby.app/Contents/Resources"</code>.
46+This constant is now available as <a href="MolbyModule.html#resourcepath">Molby::ResourcePath</a>.
4747 </p>
4848 </div>
4949 </div>
--- /dev/null
+++ b/Documents/src/molby_rb/MolbyModule.html
@@ -0,0 +1,97 @@
1+<?xml version="1.0" encoding="utf-8"?>
2+<!DOCTYPE html
3+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5+
6+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7+<head>
8+<title>Module: Molby</title>
9+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10+<meta http-equiv="Content-Script-Type" content="text/javascript" />
11+<link rel="stylesheet" href="rdoc-style.css" type="text/css" media="screen" />
12+</head>
13+<body>
14+
15+<div id="navi">
16+<a href="../index.html">[Molby Document Home]</a>
17+<a href="../ruby_ref.html">[Contents]</a>
18+</div>
19+
20+<div id="classHeader">
21+<table class="header-table">
22+<tr>
23+<td><strong>Module:</strong></td>
24+<td class="class-name-in-header">Molby</td>
25+</tr>
26+</table>
27+</div>
28+
29+<div id="section">
30+<h3 class="section-bar">Description</h3>
31+<p>
32+<a href="">Molby</a> is the module that bundles Molby-specific classes. Under Molby, the following classes are defined.
33+</p>
34+<ul>
35+<li><a href="AtomRef.html">AtomRef</a></li>
36+<li><a href="Dialog.html">Dialog</a></li>
37+<li><a href="DialogItem.html">DialogItem</a></li>
38+<li><a href="IntGroup.html">IntGroup</a></li>
39+<li><a href="MDArena.html">MDArena</a></li>
40+<li><a href="MolEnumerable.html">MolEnumerable</a></li>
41+<li><a href="Molecule.html">Molecule</a></li>
42+<li><a href="Parameter.html">Parameter</a></li>
43+<li><a href="ParameterRef.html">ParameterRef</a></li>
44+<li><a href="ParEnumerable.html">ParEnumerable</a></li>
45+<li><a href="Transform.html">Transform</a></li>
46+<li><a href="Vector3D.html">Vector3D</a></li>
47+<li><a href="MolbyError.html">MolbyError</a></li>
48+</ul>
49+
50+</div>
51+
52+<div id="constants">
53+<h3 class="section-bar">Constant</h3>
54+
55+<div class="method-detail">
56+<a name="mbsfpath"></a>
57+<div class="method-heading">
58+<span class="method-name">MbsfPath</span>
59+</div>
60+<div class="method-description">
61+<p>
62+A String describing the full path of the directory containing pre-defined mbsf files. It is equivalent to <code>Molby::ResourcePath + "/Scripts/Mbsf"</code>.
63+</p>
64+</div>
65+</div>
66+
67+<div class="method-detail">
68+<a name="resourcepath"></a>
69+<div class="method-heading">
70+<span class="method-name">ResourcePath</span>
71+</div>
72+<div class="method-description">
73+<p>
74+A String describing the full path of the directory containing <code>Scripts</code> and <code>amber11</code> resources. On Windows, it is something like <code>"C:/Program Files/Molby"</code>. On Mac, it is something like <code>"/Applications/Molby/Molby.app/Contents/Resources"</code>.
75+</p>
76+<p>
77+Note: up to 0.5.6, this constant was defined as <a href="Kernel.html#molbyresourcepath">Kernel::MolbyResourcePath</a>. The old name is still available for backward compatibility. Also up to 0.5.6, the string on Windows contained backslashes instead of slashes. This changed in 0.5.7, to be more consistent with <a href="Molecule.html#M000209">Molecule#dir</a> or <a href="Molecule.html#M000208">Molecule#path</a>.
78+</p>
79+</div>
80+</div>
81+
82+<div class="method-detail">
83+<a name="scriptpath"></a>
84+<div class="method-heading">
85+<span class="method-name">ScriptPath</span>
86+</div>
87+<div class="method-description">
88+<p>
89+A String describing the full path of the directory containing pre-defined Ruby scripts. It is equivalent to <code>Molby::ResourcePath + "/Scripts"</code>.
90+</p>
91+</div>
92+</div>
93+
94+</div>
95+
96+</body>
97+</html>
\ No newline at end of file
--- a/MolLib/Ruby_bind/ruby_bind.c
+++ b/MolLib/Ruby_bind/ruby_bind.c
@@ -8591,7 +8591,7 @@ Molby_startup(const char *script, const char *dir)
85918591 p = strrchr(respath, PATH_SEPARATOR);
85928592 if (p != NULL)
85938593 *p = 0;
8594- val = rb_str_new2(respath);
8594+ val = Ruby_NewFileStringValue(respath);
85958595 rb_define_global_const("MolbyResourcePath", val);
85968596 free(respath);
85978597
@@ -8600,10 +8600,10 @@ Molby_startup(const char *script, const char *dir)
86008600 RubyDialogInitClass();
86018601
86028602 rb_define_const(rb_mMolby, "ResourcePath", val);
8603- val = rb_str_new2(dir);
8603+ val = Ruby_NewFileStringValue(dir);
86048604 rb_define_const(rb_mMolby, "ScriptPath", val);
86058605 asprintf(&p, "%s%c%s", dir, PATH_SEPARATOR, "mbsf");
8606- val = rb_str_new2(p);
8606+ val = Ruby_NewFileStringValue(p);
86078607 rb_define_const(rb_mMolby, "MbsfPath", val);
86088608 free(p);
86098609
--- a/Scripts/md.rb
+++ b/Scripts/md.rb
@@ -1172,7 +1172,7 @@ class Molecule
11721172 end
11731173 return unless ambertools_dialog("resp")
11741174 nc = get_global_settings("antechamber.nc")
1175- ante_dir = MolbyResourcePath + "/amber11/bin"
1175+ ante_dir = Molby::ResourcePath + "/amber11/bin"
11761176
11771177 # Create the temporary directory
11781178 dname = create_ante_log_dir((self.path ? File.basename(self.path, ".*") : self.name), "rs")
旧リポジトリブラウザで表示