2015年9月5日

ubuntu1504安裝scratch2 offline

ubuntu 15.04安裝scratch2 offline 和s2a
記錄一下

sudo -s
cd
##安裝adob air
###安裝Scratch2 offline
wget https://scratch.mit.edu/scratchr2/static/sa/Scratch-439.3.air
Adobe\ AIR\ Application\ Installer  ~/Scratch-439.3.air

rm ~/Scratch-439.3.air
##安裝範例檔
wget https://scratch.mit.edu/scratchr2/static/sa/Scratch2StarterProjects.zip

unzip -d /opt/Scratch\ 2/share/Scratch\ Projects Scratch2StarterProjects.zip
rm -rf ~/文件/Scratch\ Projects/
ln -s  /opt/Scratch\ 2/share/Scratch\ Projects ~/文件/Scratch\ Projects
###改語系為只有英文和中文
cat /opt/Scratch\ 2/share/locale/lang_list.txt |grep zh-tw  >/opt/Scratch\ 2/share/locale/lang_list.txt-cc
mv /opt/Scratch\ 2/share/locale/lang_list.txt-cc /opt/Scratch\ 2/share/locale/lang_list.txt

##安裝s2a
##安裝python-pip 
apt-get install python-pip
##顯示 pre-installed Python 套件:
pip freeze
 ##如果沒有出現任何像pyserial==2.5 or pyserial==2.7 在清單中請建立使用 pip, 並安裝 PySerial:
 pip install PySerial
##安裝 PyMata 為了串行通訊在Python 用 Firmata 在 Arduino (PySerial 需要事先安裝 ):
pip install PyMata   
##下載s2a到家目錄
wget https://github.com/MrYsLab/s2a_fm/archive/master.zip


unzip master.zip
cp -a s2a_fm-master /usr/share/
chmod -R 777 s2a_fm-master/
下載連線程式
cd /home/teacher 
wget ftp://163.20.108.1/open/s2a_content.sh
wget ftp://163.20.108.1/open/s2a_content.png
chmod +x s2a_content.sh
cp -a s2a_content.sh /usr/share/s2a_fm-master

mv  s2a_content.sh ~/s2a_fm-master
cp   s2a_content.png /usr/share/s2a_fm-master
cp ~/s2a_fm-master/ScratchFiles/ScratchProjects/s2a_fm_base_zh_tw.sb2  ~/s2a_fm-master/
cp  /usr/share/s2a_fm-master/ScratchFiles/ScratchProjects/s2a_fm_base_zh_tw.sb2 /usr/share/s2a_fm-master
 
cd ~/Desktop

wget ftp://163.20.108.1/open/s2a_Scratch%202.desktop
chmod 777  s2a_Scratch\ 2.desktop
wget ftp://163.20.108.1/open/s2a.desktop
chmod 777 s2a.desktop
改ttyUSB0的群組
vim /etc/group
找到 dialout
在:後加入使用者,我這裡習慣用teacher和student就會成為下列
dialout:x:20:teacher,student 
 


沒有留言: