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
|
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2011-2012 - DIGITEO - Allan CORNET
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
// =============================================================================
function generatef2csln(defaultSLNpath)
// generates scilab_f2c.sln from scilab.sln
// scilab_f2c.sln for visual studio express 2010
C_GUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
FORTRAN_GUID = "{6989167D-11E4-40FE-8C1A-2192A86A7E90}";
VFPROJ = "_f.vfproj";
VCPROJ = "_f2c.vcxproj";
SLN_NAME_F2C = "Scilab_f2c.sln";
SLN_NAME = "Scilab.sln";
if ~isdef("defaultSLNpath") then
defaultSLNpath = SCI;
else
if (type(defaultSLNpath) <> 10) then
error(999, msprintf(gettext("%s: Wrong type for input argument #%d: A String expected.\n"),"generatef2csln",1));
end
end
if ~isdir(defaultSLNpath) then
error(999, msprintf(gettext("%s: Wrong value for input argument #%d: A valid path expected.\n"),"generatef2csln",1));
end
fullFilenameSLN = fullfile(defaultSLNpath, SLN_NAME);
if ~isfile(fullFilenameSLN) then
error(999, msprintf(gettext("%s: Wrong value for input argument #%d: %s not found.\n"),"generatef2csln",1,SLN_NAME));
end
SLN = mgetl(fullFilenameSLN);
F2CSLN = strsubst(SLN, FORTRAN_GUID, C_GUID);
F2CSLN = strsubst(F2CSLN, VFPROJ, VCPROJ);
mputl(F2CSLN, fullfile(defaultSLNpath, SLN_NAME_F2C));
endfunction
// =============================================================================
// main
generatef2csln();
// =============================================================================
|