diff options
author | jofret | 2009-05-05 15:08:55 +0000 |
---|---|---|
committer | jofret | 2009-05-05 15:08:55 +0000 |
commit | 587f2a238bfe506e476cd6c8558c30d7207bae22 (patch) | |
tree | 644b615b30cd06d9954e5b5439140759ed89e8db /macros | |
parent | 031fc8bf6a5328ebd8b99df586e3f75e837c9e4a (diff) | |
download | scilab2c-587f2a238bfe506e476cd6c8558c30d7207bae22.tar.gz scilab2c-587f2a238bfe506e476cd6c8558c30d7207bae22.tar.bz2 scilab2c-587f2a238bfe506e476cd6c8558c30d7207bae22.zip |
Toolbox integration
Diffstat (limited to 'macros')
-rw-r--r-- | macros/LaunchMultiRunSCI2C.sci | 12 | ||||
-rw-r--r-- | macros/LaunchRunSCI2C.sci | 14 | ||||
-rw-r--r-- | macros/runsci2c.sci | 30 | ||||
-rw-r--r-- | macros/runscicode.sci | 22 |
4 files changed, 42 insertions, 36 deletions
diff --git a/macros/LaunchMultiRunSCI2C.sci b/macros/LaunchMultiRunSCI2C.sci index bc1e118a..307e4f42 100644 --- a/macros/LaunchMultiRunSCI2C.sci +++ b/macros/LaunchMultiRunSCI2C.sci @@ -1,11 +1,12 @@ // Before launching this script, please
-// check all the paths below.
+// check all the paths below.
// User should change parameters only in (USER PARAMETERS) sections.
// cd C:\Nutricato\OpenProjects\FP6_hArtes\WP2_SCI2C\Software\Scilab2C; exec LaunchMultiRunSCI2C.sci
+function LaunchMultiRunSCI2C()
// --- CLEAN WORKSPACE ---
-exec full_reset.sce;
-mode(-1);
+//exec full_reset.sce;
+//mode(-1);
// --- GENERAL SETTINGS (USER PARAMETERS) ---
RunsDirectory = pwd(); // Path of the SCI2CRuns directory
@@ -20,7 +21,7 @@ WorkingListSCI2CInputPrmFiles = ... [...
'D:\Nutricato_GAPSVN\PROGETTI_APERTI\POLIBA\hArtes\WP2_SCI2C\Software\Version_alpha\SCI2CTests\test999_WorkingDir\SCI2CInputParameters.sce';...
];
-
+
// Select one of the two lists above.
ListSCI2CInputPrmFiles = WorkingListSCI2CInputPrmFiles;
@@ -46,7 +47,7 @@ for cnttransl = 1:NTranslations // --- ASK USER FOR CONTINUATION. ---
userchoice = input('Start translation [y/n]?','s');
if (userchoice == 'y')
-
+
// --- LAUNCH SCI2C ---
cd(SCI2CDirectory)
getf("runsci2c.sci");
@@ -78,3 +79,4 @@ cd (RunsDirectory); // ------------------------
// --- This must be the last instruction. ---
mclose('all');
+endfunction
\ No newline at end of file diff --git a/macros/LaunchRunSCI2C.sci b/macros/LaunchRunSCI2C.sci index a686b71d..a30b9161 100644 --- a/macros/LaunchRunSCI2C.sci +++ b/macros/LaunchRunSCI2C.sci @@ -3,10 +3,10 @@ // User should change parameters only in (USER PARAMETERS) sections. // cd C:\SCI2CTests\SCI2CRuns; exec LaunchRunSCI2C.sci -function sci2c() +function LaunchRunSCI2C() // --- CLEAN WORKSPACE --- -exec full_reset.sce; -//mode(-1); +// exec full_reset.sce; +// mode(-1); // --- GENERAL SETTINGS (USER PARAMETERS) --- RunsDirectory = pwd(); // Path of the SCI2CRuns directory @@ -17,16 +17,16 @@ SCI2CDirectory = '.'; SCI2CInputPrmFileName = '../SCI2CTests/test999_WorkingDir/SCI2CInputParameters.sce'; // --- LAUNCH USER SCI CODE TO TEST IT BEFORE TRANSLATING IT!!! --- -cd(SCI2CDirectory) -getf("runscicode.sci"); +//cd(SCI2CDirectory) +//getf("runscicode.sci"); runscicode(SCI2CInputPrmFileName); // --- ASK USER FOR CONTINUATION. --- userchoice = input('Start translation [y/n]?','s'); if (userchoice == 'y') // --- LAUNCH SCI2C --- - cd(SCI2CDirectory); - getf("runsci2c.sci"); + //cd(SCI2CDirectory); + //getf("runsci2c.sci"); runsci2c(SCI2CInputPrmFileName); cd(SCI2CDirectory); end diff --git a/macros/runsci2c.sci b/macros/runsci2c.sci index 387e0283..9356a0b3 100644 --- a/macros/runsci2c.sci +++ b/macros/runsci2c.sci @@ -1,4 +1,4 @@ -function runsci2c(SCI2CInputPrmFile)
+function runsci2c(UserScilabMainFile, UserSciFilesPaths, SCI2COutputPath, Runmode)
// function runsci2c(SCI2CInputPrmFile)
// -----------------------------------------------------------------
// === hArtes/PoliBa/GAP SCI2C tool ===
@@ -26,8 +26,8 @@ function runsci2c(SCI2CInputPrmFile) // -------------------
// --- Soft reset. ---
// -------------------
-mode(-1);
-clc;
+//mode(-1);
+//clc;
// -----------------------
// --- End Soft reset. ---
// -----------------------
@@ -44,30 +44,31 @@ RunSci2CMainDir = pwd(); // --- Perform Intializations. ---
// -------------------------------
// --- Load SCI2C directories and files. ---
-cd(fullfile(RunSci2CMainDir,'ToolInitialization'));
-exec('INIT_SCI2CLoader.sce');
-cd(RunSci2CMainDir);
+//cd(fullfile(RunSci2CMainDir,'ToolInitialization'));
+//exec('INIT_SCI2CLoader.sce');
+//cd(RunSci2CMainDir);
// --- Initialize the SCI2C tool directories and files. ---
-[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(SCI2CInputPrmFile);
-
+[FileInfoDatFile,SharedInfoDatFile] = INIT_SCI2C(UserScilabMainFile, ...
+ UserSciFilesPaths, SCI2COutputPath, RunMode);
+
// --- Load RunMode. ---
load(SharedInfoDatFile,'SharedInfo');
RunMode = SharedInfo.RunMode;
clear ShareInfo
-
+
// --- Generation of the library structure. ---
if (RunMode == 'GenLibraryStructure' | RunMode == 'All')
INIT_GenLibraries(FileInfoDatFile);
end
-
+
// --- Load Library Info. ---
INIT_LoadLibraries(FileInfoDatFile);
-
+
// -----------------------------------
// --- End Perform Intializations. ---
// -----------------------------------
-
+
// ----------------------------------
// --- Perform SCI2C Translation. ---
// ----------------------------------
@@ -81,7 +82,7 @@ if (RunMode == 'All' | RunMode == 'Translate') FlagContinueTranslation = ManageNextConversion(FileInfoDatFile);
end
end
-
+
// --------------------------
// --- Generate Makefile. ---
// --------------------------
@@ -90,7 +91,7 @@ load(SharedInfoDatFile,'SharedInfo'); C_GenerateMakefile(FileInfo,SharedInfo);
clear FileInfo
clear SharedInfo
-
+
// -----------------
// --- Epilogue. ---
// -----------------
@@ -101,3 +102,4 @@ elseif (RunMode == 'GenLibraryStructure') PrintStepInfo('Library Structure Successfully Created!!!',FileInfo.GeneralReport,'both');
end
clear FileInfo
+endfunction
\ No newline at end of file diff --git a/macros/runscicode.sci b/macros/runscicode.sci index 79184d1d..6a34a931 100644 --- a/macros/runscicode.sci +++ b/macros/runscicode.sci @@ -1,4 +1,4 @@ -function runscicode(SCI2CInputPrmFile) +function runscicode(UserScilabMainFile, UserSciFilesPaths) // function runscicode(SCI2CInputPrmFile) // ----------------------------------------------------------------- // === hArtes/PoliBa/GAP SCI2C tool === @@ -24,8 +24,8 @@ function runscicode(SCI2CInputPrmFile) // ------------------- // --- Soft reset. --- // ------------------- -mode(-1); -clc; +//mode(-1); +//clc; // ----------------------- // --- End Soft reset. --- // ----------------------- @@ -33,17 +33,17 @@ clc; // ------------------------- // --- Input Parameters. --- // ------------------------- -RunSci2CMainDir = pwd(); +//RunSci2CMainDir = pwd(); // ----------------------------- // --- End input Parameters. --- // ----------------------------- -cd(fullfile(RunSci2CMainDir,'ToolInitialization')); -exec('INIT_SCI2CLoader.sce'); -cd(RunSci2CMainDir); +//cd(fullfile(RunSci2CMainDir,'ToolInitialization')); +//exec('INIT_SCI2CLoader.sce'); +//cd(RunSci2CMainDir); // --- Read user parameters. --- -exec(SCI2CInputPrmFile); +//exec(SCI2CInputPrmFile); // --- Add all user paths. --- @@ -55,10 +55,12 @@ end disp('-----------------------------------'); disp('--- Executing your SCILAB code. ---'); disp('-----------------------------------'); +getf(UserScilabMainFile); [tmppath,tmpfile,tmpext] = fileparts(UserScilabMainFile); -cd(tmppath); +//cd(tmppath); execstr(tmpfile); -cd(RunSci2CMainDir); +//cd(RunSci2CMainDir); disp('------------------------------------------'); disp('--- End Execution of your SCILAB code. ---'); disp('------------------------------------------'); +endfunction
\ No newline at end of file |