summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/settings.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-09 00:26:15 +0000
committerKarl Berry <karl@freefriends.org>2010-05-09 00:26:15 +0000
commit0114fbc0beecd9a094b260d78cccdc6ff3e85f1e (patch)
tree53f68a7eb4cd90f611560e9b477b55c671b94717 /Build/source/utils/asymptote/settings.cc
parent539c0d5c885fa1c451a55ef8e7e1a2bbf1a32861 (diff)
asy 1.94
git-svn-id: svn://tug.org/texlive/trunk@18161 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/settings.cc')
-rw-r--r--Build/source/utils/asymptote/settings.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/utils/asymptote/settings.cc b/Build/source/utils/asymptote/settings.cc
index 7197095f304..4ea29ebabe5 100644
--- a/Build/source/utils/asymptote/settings.cc
+++ b/Build/source/utils/asymptote/settings.cc
@@ -87,6 +87,7 @@ string systemDir=ASYMPTOTE_SYSDIR;
bool msdos=false;
string HOME="HOME";
+string docdir=ASYMPTOTE_DOCDIR;
const char pathSeparator=':';
string defaultPSViewer="gv";
#ifdef __APPLE__
@@ -97,7 +98,6 @@ string defaultPDFViewer="acroread";
string defaultGhostscript="gs";
string defaultDisplay="display";
string defaultAnimate="animate";
-string docdir=ASYMPTOTE_DOCDIR;
void queryRegistry() {}
const string dirsep="/";
@@ -105,6 +105,7 @@ const string dirsep="/";
bool msdos=true;
string HOME="USERPROFILE";
+string docdir="c:\\Program Files\\Asymptote";
const char pathSeparator=';';
//string defaultPSViewer="gsview32.exe";
string defaultPSViewer="cmd";
@@ -115,7 +116,6 @@ string defaultGhostscript="gswin32c.exe";
string defaultDisplay="cmd";
//string defaultAnimate="animate";
string defaultAnimate="cmd";
-string docdir;
const string dirsep="\\";
#include <dirent.h>
@@ -187,7 +187,9 @@ void queryRegistry()
defaultPDFViewer;
if(defaultPSViewer != "cmd")
defaultPSViewer=getEntry("Ghostgum/GSview/*")+"\\gsview\\"+defaultPSViewer;
- docdir=getEntry("Microsoft/Windows/CurrentVersion/App Paths/Asymptote/Path");
+ string s;
+ s=getEntry("Microsoft/Windows/CurrentVersion/App Paths/Asymptote/Path");
+ if(!s.empty()) docdir=s;
// An empty systemDir indicates a TeXLive build
if(!systemDir.empty() && !docdir.empty())
systemDir=docdir;
@@ -1594,6 +1596,9 @@ void setOptions(int argc, char *argv[])
Setting("sysdir")=sysdir;
+ if(docdir.empty())
+ docdir=getSetting<string>("dir");
+
#ifdef USEGC
if(verbose == 0 && !getSetting<bool>("debug")) GC_set_warn_proc(no_GCwarn);
#endif