function make_all_install() %%% makefile which installs a complete package for the tech united robot %%% players. run this file and all libraries are automatically installed %%% in the correct directories. !killall trc 1>/dev/null 2>&1 & % Check authority [resultstring,errorcheck]=evalc('system(''cd ~ && pwd'')'); if ~errorcheck, switch resultstring(1:5), case '/root', disp('Authority check passed.'); otherwise, [resultstring,errorcheck]=evalc('system(''whoami'')'); if ~errorcheck, switch resultstring(1:4), case 'root', edlg = errordlg(['You thought ''sudo matlab'' would get you there? Nono you''re still a prutser, restart '... 'Matlab and use ''sudo -i'' or ''sudo su'' this time.']); otherwise, edlg = errordlg('You don''t have root permissions (prutser)! Restart Matlab.'); end waitfor(edlg); end error(['Restart Matlab from a shell with root privileges to make use of the Tech United Eindhoven software or go to '... 'the ''How to make your computer a DevPC'' wiki for instructions on how to obtain a fancy panel launcher button '... 'that does this for you.']); end else disp('WARNING: authority check failed'); end % Run make_all_clean first disp('Cleaning up old files and executables') make_all_clean; % Go to Turtle2 path and save it cd /home/robocup/svn/trunk/src/Turtle2 curdirrobocup = cd; try % Check if buildlibs_once needs to be executed (this check was added at buildlibs_once revision 5984) cd Libs !svn info buildlibs_once | grep "Last Changed Rev: " > libOnceVersionFromSvn libVerSvn = importdata('libOnceVersionFromSvn'); libVerSvn = libVerSvn.data; if libVerSvn ~= 5984 if exist('libOnceVersionInstalled','file') libVerInst = fileread('libOnceVersionInstalled'); else libVerInst = 'unknown'; end if strcmp(libVerInst,fileread('libOnceVersionFromSvn')) disp('Most recent buildlibs_once was installed.') else if (strcmp(libVerInst,'unknown')) % If there seems to be no build yet, do it now without asking !chmod a+x buildlibs_once !./buildlibs_once elseif( strcmp(questdlg(sprintf(['The buildlibs_once script has been updated on svn! Would you like to run buildlibs_once now? \n\nPlease note: this takes 1 minute.\n']),... 'Run buildlibs_once first!','yes','no','no'),'yes')) disp('Building libraries...'),pause(1) !chmod a+x buildlibs_once !./buildlibs_once else disp('Libraries not up to date, continuing make_all_install...'),pause(1) cd(curdirrobocup) end end end cd(curdirrobocup) %%%% INSTALL LIBRARIES %%%% cd Libs !chmod a+x buildlibs !./buildlibs cd(curdirrobocup) cd Libs/GeneralFunctions make_genfunlib; disp('General functions library created'); cd(curdirrobocup) % general function make_general_robocup_functions() % Install tools disp('%%%%%%%%%%%%% Installing tools %%%%%%%%%%%%%%%%') cd Tools make_tools; cd(curdirrobocup) % Set the Matlab paths addpathrobocup; cd(curdirrobocup) cd Global_par selectfield 1 cd .. % Install Targets cd Targets make; cd(curdirrobocup) % Install Robocup Simulink Library cd Libs/Simulink make cd(curdirrobocup) % install simulator cd Simulator make_simulator cd(curdirrobocup) % Communication disp('%%%%%%%%%%%%% Installing communication software %%%%%%%%%%%%%%%%') make_communication % mex all source files disp('%%%%%%%%%%%%% Mexing strategy source files %%%%%%%%%%%%%%%%') make_strategy disp('%%%%%%%%%%%%% Mexing motion source files %%%%%%%%%%%%%%%%') make_motion disp('%%%%%%%%%%%%% Mexing vision source files %%%%%%%%%%%%%%%%') make_vision disp('%%%%%%%%%%%%% Mexing worldmodel source files %%%%%%%%%%%%%%%%') make_worldmodel % write svn version cd /home/robocup/svn/trunk/src/Turtle2 !sudo svn info >ttt !sudo grep Revision /home/robocup/svnver.txt !sudo rm -f ttt catch ME !/home/robocup/svn/trunk/dev/Jorrit/build_complete.sh "make failure 😭" 2>/dev/null rethrow(ME); end disp(' _____ _____ _____ __ __ __ __ ______ __ _____ _____ ____'); disp(' /_ _// ___// ___// / / / / / / // __ // //_ _// ___// __ \'); disp(' / / / /_ / / / /_/ / / / / // / / // / / / / /_ / / / /'); disp(' / / / __/ / / / __ / / / / // / / // / / / / __/ / / / /'); disp(' / / / /__ / /__ / / / / / /_/ // / / // / / / / /__ / /_/ /'); disp(' /_/ /____//____//_/ /_/ /_____//_/ /_//_/ /_/ /____//_____/'); disp(' '); disp(' _____ __ ______ ____ __ __ ___ __ __ _____ ______'); disp(' / ___// // __ // __ \ / / / // __ \ / / / // ___// __ /'); disp(' / /_ / // / / // / / // /_/ // / / // / / // /_ / / / /'); disp(' / __/ / // / / // / / // __ // / / // / / // __/ / / / /'); disp(' / /__ / // / / // /_/ // / / // /_/ // /_/ // /__ / / / /'); disp(' /____//_//_/ /_//_____//_/ /_/ \____/ \____//____//_/ /_/'); disp(' ') disp('Tech United Robocup Software is happy to be installed on your system...'); end