
if MSDOS then
     getf("scicos-hdl/xcopy.sci");
     myPath= pwd()+"\";
else
     myPath=  xgetfile('install.sce','')
     myPath= dirname( myPath)+"/";
     getf( myPath+"scicos-hdl/xcopy.sci");
end  

if isdir(myPath +"scicos-hdl") == %f then
    message("Please Directly  Run  install.sce file");
    return;
end

write(%io(2),'  install scicos-hdl 0.5');
     
ItNameS = myPath + "scicos-hdl";
ItNameN = dirname( "SCI/macros/scicos-hdl/");    
NXUDDD=  xcopy(ItNameS , ItNameN, 0);
  


//ADD scilab.star
file1 = 'SCI\scilab.star';
fd1=mopen(file1,'ab');
mputstr("        ;   exec("+ascii(34)+"SCI/macros/scicos-hdl/ScicosHDL_start.sce"+ascii(34)+ ") ;    clear startup ierr;    ",fd1); 
mclose(fd1);
 
exec("SCI/macros/scicos-hdl/genlib_4.sci");
write(%io(2),'100%'+ ' [OK] ');

write(%io(2),'scicos-hdl 0.5 install [OK]');

write(%io(2),'Please restart Scilab !');



