Configuration Files
4 posts
• Page 1 of 1
Configuration Files
When I install a new version of Dyalog APL, I want to make one or zero changes and have it fire up with all my settings, colors, custom user commands, code loaded in ⎕SE, make coffee, etc.
Setting the UserConfigFile seems like it should be the way to do this.
So I have folder somewhere that contains this UserConfigFile, and other assets necessary for my setup (like custom user commands).
I would like to be able to specify file path parameters in this config file that point to file and folders that are in the folder that holds the config file. For example:
Is there a way to do this?
Setting the UserConfigFile seems like it should be the way to do this.
So I have folder somewhere that contains this UserConfigFile, and other assets necessary for my setup (like custom user commands).
I would like to be able to specify file path parameters in this config file that point to file and folders that are in the folder that holds the config file. For example:
- Code: Select all
Load: "[The place where my config file is]/SomeNameSpace.aplns",
SALT/CommandFolder: "[The place where my config file is]"
etc.
Is there a way to do this?
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Configuration Files
It looks like some parameters will default their path to the location of the config file itself (good!) but others will not (not good):
I wonder if we need a formal way to specify the config file dir, it it does not already exist.
{
Settings: {
MyRandomSetting: "Hello There",
Default_IO:0,
Load: "StartupFoo.aplf", //This works
DyalogStartup: 'c:/APLStartup/mystartup.dyalog', //works
// DyalogStartup: 'mystartup.dyalog', // Fails
SALT: {
CommandFolder: "c:/APLSTartup/UCMDs;[dyalog]/SALT/spice", //Works
// CommandFolder: "UCMDs;[dyalog]/SALT/spice" //Fails
}
}
}
I wonder if we need a formal way to specify the config file dir, it it does not already exist.
- paulmansour
- Posts: 420
- Joined: Fri Oct 03, 2008 4:14 pm
Re: Configuration Files
Hi Paul,
I will use CFGDIR to mean the location where my config file is, but I will need to explicitly set it.
You can do this in config files:
WSPATH: ["[DYALOG]/ws", "d:/182ws", ""],
CFGDIR: "D:/temp/cfgfiles",
SESSION_FILE: "[CFGDIR]/c182uni64.dse",
log_file: "[CFGDIR]/mylog182u64.dlf",
SALT: {
CommandFolder:
"[CFGDIR]/dUCMDs;[DYALOG]/SALT/spice", //Works
},
Regards,
Vince
I will use CFGDIR to mean the location where my config file is, but I will need to explicitly set it.
You can do this in config files:
WSPATH: ["[DYALOG]/ws", "d:/182ws", ""],
CFGDIR: "D:/temp/cfgfiles",
SESSION_FILE: "[CFGDIR]/c182uni64.dse",
log_file: "[CFGDIR]/mylog182u64.dlf",
SALT: {
CommandFolder:
"[CFGDIR]/dUCMDs;[DYALOG]/SALT/spice", //Works
},
⍝⍝Then in a Dyalog using the above configuration file:
+2 ⎕nq '.' 'getenvironment' 'session_file'
D:/temp/cfgfiles/c182uni64.dse
+2 ⎕nq '.' 'getenvironment' 'log_file'
D:/temp/cfgfiles/mylog182u64.dlf
]settings cmddir
D:/temp/cfgfiles/dUCMDs;C:\Program Files\Dyalog\Dyalog APL-64 18.2 Unicode/SALT/spice
+2 ⎕nq '.' 'getenvironment' 'wspath'
C:\Program Files\Dyalog\Dyalog APL-64 18.2 Unicode/ws;d:/182ws;
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
Re: Configuration Files
Hi Paul,
Also, I have logged your request for "a formal way to specify the config file dir" as RFE 19723.
Regards,
Vince
Also, I have logged your request for "a formal way to specify the config file dir" as RFE 19723.
Regards,
Vince
- Vince|Dyalog
- Posts: 413
- Joined: Wed Oct 01, 2008 9:39 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group