-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompilemod.hoc
55 lines (34 loc) · 1.3 KB
/
compilemod.hoc
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
// Salto
// (c) Charles CH Cohen, 2014-present
// this software is released to the public under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
// International license (CC BY-NC-ND 4.0, in English).
// for any questions, please email c.cohen@gmx.com
// ------------------------------Directories---------------------------------------
strdef root
root = getcwd()
strdef lib, ses
strdef cwd
sprint(lib, "%s%s", root, "lib/")
sprint(ses, "%s%s", root, "ses/")
// --------------------------------------------------------------------------------
// -------------------------------Libraries----------------------------------------
load_file("stdgui.hoc")
chdir(lib)
load_file("startlib.hoc")
// --------------------------------------------------------------------------------
strdef modqstr
modqstr = "Compile mod files for this system?\t[y/n]\n(Mod files are required for running active and passive models, even though active mechanisms are not implemented in passive models)"
ans = sred(modqstr, "y", "ny")
if (ans) {
if (unix_mac_pc() != 3) {
print "\nUNIX/LINUX detected...\n"
system("ls", tempstr)
if (strf.substr(tempstr, "x86_64\n") > - 1) {
system("rm -rf x86_64")
}
system("nrnivmodl")
print "\nPlease restart the model"
}
} else {
print "Mod files not compiled"
}