1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) 2011-2012 - DIGITEO - Allan CORNET
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution. The terms
7 // are also available at
8 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9 // =============================================================================
10 function generatef2csln(defaultSLNpath)
12 // generates scilab_f2c.sln from scilab.sln
13 // scilab_f2c.sln for visual studio express 2010
15 C_GUID = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
16 FORTRAN_GUID = "{6989167D-11E4-40FE-8C1A-2192A86A7E90}";
18 VCPROJ = "_f2c.vcxproj";
19 SLN_NAME_F2C = "Scilab_f2c.sln";
20 SLN_NAME = "Scilab.sln";
22 if ~isdef('defaultSLNpath') then
25 if (type(defaultSLNpath) <> 10) then
26 error(999, msprintf(gettext("%s: Wrong type for input argument #%d: A String expected.\n"),"generatef2csln",1));
30 if ~isdir(defaultSLNpath) then
31 error(999, msprintf(gettext("%s: Wrong value for input argument #%d: A valid path expected.\n"),"generatef2csln",1));
34 fullFilenameSLN = fullfile(defaultSLNpath, SLN_NAME);
35 if ~isfile(fullFilenameSLN) then
36 error(999, msprintf(gettext("%s: Wrong value for input argument #%d: %s not found.\n"),"generatef2csln",1,SLN_NAME));
39 SLN = mgetl(fullFilenameSLN);
40 F2CSLN = strsubst(SLN, FORTRAN_GUID, C_GUID);
41 F2CSLN = strsubst(F2CSLN, VFPROJ, VCPROJ);
42 mputl(F2CSLN, fullfile(defaultSLNpath, SLN_NAME_F2C));
44 // =============================================================================
47 // =============================================================================