-
Notifications
You must be signed in to change notification settings - Fork 0
/
lans_paths.m
105 lines (75 loc) · 3.35 KB
/
lans_paths.m
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
% paths necessary for running Look@NanoSIMS
global be_verbous
be_verbous = 1;
if exist('start_lans_quietly')
be_verbous = ~start_lans_quietly;
end
% path to the core LANS functions
addpath([pwd,filesep,'fnc'],'-end');
% path to add-on functions required for post-processing (processing metafiles)
addpath([pwd,filesep,'postprocess'],'-end');
% OS-specific settings; modify with care!
if ismac
% Warning: MAC-OS users may have a bit of trouble to get things working
% and look good
% path to fig files that define the graphical user interface (GUI)
addpath([pwd,filesep,'figs_win'],'-end');
if be_verbous
fprintf(1,'Starting Look@NanoSIMS on a Mac-OS platform.\n');
end
% make sure that the PATH to pdflatex, epstopdf and gs binaries are correct
LATEXDIR = '/Library/TeX/texbin/';
GSDIR = '/usr/local/bin/';
% no need to make any changes here
oldpath = getenv('PATH');
if isempty(strfind(oldpath,GSDIR))
setenv('PATH', [oldpath ':' GSDIR]);
end
if ~exist([GSDIR 'gs'])==2
if be_verbous
fprintf(1,'ERROR: gs not found. Please install Ghostscript to enable PDF conversion.\n');
end
end
% Command for unzipping im.zip files, including the command options.
% Here unzip is used, which is by default available on MacOS systems.
UNZIP_COMMAND = 'unzip -q';
ZIP_COMMAND = 'zip -r';
% PDF viewer (path to the pdf viewer on the system)
PDF_VIEWER = 'open';
GUI_FONTSIZE = 10;
elseif isunix
% unix/linux users have it easy
% path to fig files that define the graphical user interface (GUI)
addpath([pwd,filesep,'figs'],'-end');
if be_verbous
fprintf(1,'Starting Look@NanoSIMS on a Unix/Linux platform.\n');
end
% Command for unzipping im.zip files, including the command options.
% Here unzip is used, which is normally available on a unix system.
UNZIP_COMMAND = 'unzip -q';
ZIP_COMMAND = 'zip -r';
% PDF viewer; normally this should work, but (see next)
%PDF_VIEWER = 'xreader';
% Sometimes, calling system(PDF_VIEWER) without the LD_LIBRARY_PATH
% set properly gives a segmentation fault. In this case, this should fix it:
PDF_VIEWER = 'LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu; xreader';
GUI_FONTSIZE = 10;
elseif ispc
% Windows users also have it relatively easy
% path to fig files that define the graphical user interface (GUI)
addpath([pwd,filesep,'figs_win'],'-end');
if be_verbous
fprintf(1,'Starting Look@NanoSIMS on a MS-Windows platform.\n');
end
% Command for unzipping im.zip files, including the command options.
% Here 7zip is used, which is a freeware program available for MS Windows.
% Note that the full path to the program needs to be specified here,
% because, based on anecdotal experience, the path to the program is not,
% or may not be, known within the Matlab environment.
UNZIP_COMMAND = '"c:\Program Files\7-Zip\7z.exe" e';
ZIP_COMMAND = '"c:\Program Files\7-Zip\7z.exe" a';
% PDF viewer (SumatraPDF is recommended: not the prettiest, but it is
% a very small file and automatically reloads the PDF when PDF is updated)
PDF_VIEWER = '"c:\Program Files\SumatraPDF\SumatraPDF.exe"';
GUI_FONTSIZE = 8;
end