]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/blobdiff - rpp/rpp/rpp_setup.m
Change license to MIT
[pes-rpp/rpp-simulink.git] / rpp / rpp / rpp_setup.m
index 65266502135e19cba8481365e789ac86fc28cfd6..5045a7378a8a9fd5a22dffce8de6217ce3b2d49c 100644 (file)
@@ -3,10 +3,26 @@
 % Authors:
 %     - Carlos Jenkins <carlos@jenkins.co.cr>
 %
-% This document contains proprietary information belonging to Czech
-% Technical University in Prague. Passing on and copying of this
-% document, and communication of its contents is not permitted
-% without prior written authorization.
+% Permission is hereby granted, free of charge, to any person
+% obtaining a copy of this software and associated documentation
+% files (the "Software"), to deal in the Software without
+% restriction, including without limitation the rights to use,
+% copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the
+% Software is furnished to do so, subject to the following
+% conditions:
+
+% The above copyright notice and this permission notice shall be
+% included in all copies or substantial portions of the Software.
+
+% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+% OTHER DEALINGS IN THE SOFTWARE.
 %
 % File : rpp_setup.m
 % Abstract:
@@ -38,6 +54,11 @@ function rpp_setup(varargin)
     currentPath = pwd();
     targetPath = currentPath(1:end-length('/rpp'));
 
+    if ~exist(fullfile(targetPath, 'rpp', 'rpp_setup.m'), 'file'),
+        error('rpp:wrong_setup_dir', ['rpp_setup called from directory ' ...
+                            'other than .../rpp/rpp']);
+    end
+
     if nargin == 0,
         % Ask user setup variables
         if ispref('rpp', 'CompilerRoot')
@@ -106,6 +127,7 @@ function rpp_setup(varargin)
     disp(['        CCSRoot      : ', CCSRoot]);
     disp(['        TargetRoot   : ', TargetRoot]);
     disp(['        RppLibRoot   : ', RppLibRoot]);
+    disp(['        Hardware     : ', rpp_get_target]);
     disp('Explore <a href="matlab:cd([getpref(''rpp'',''TargetRoot''),''/../demos''])">demos</a> directory.');
     %disp('Explore <a href="matlab:cd([getpref(''rpp'',''TargetRoot''),''/../demos''])">demos</a> directory and access <a href="matlab:doc -classic">documentation</a>');
 end