User Tools

Site Tools


linux:installscratch

Differences

This shows you the differences between two versions of the page.


Previous revision
linux:installscratch [2022/12/02 22:02] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Installing Scratch on SuSE 13 ======
 +
 +These instructions are about installing the Scratch programming language in OpenSuSe 13.1 (bottle). 
 +
 +===== First step: install squeak =====
 +
 +The first thing we need is squeak, the smalltalk virtual machine. I've tried to install it by downloading it from its website, but it doesn't have all the necessary modules, specially the sound modules. Try [[http://download.opensuse.org/repositories/Education/openSUSE_13.1/x86_64/squeak-vm-4.10.2-3.9.x86_64.rpm|this link]] or try to search "squeak" in the [[http://software.opensuse.org/131/es|Opensuse repository]].
 +
 +===== Second step: install scratch =====
 +
 +I've tried to install the rpm package that comes in the scratch website, but it failed in my case. The thing is that I've probably tried this with the wrong version of the squeak virtual machine (see up), but at the end I not sure. 
 +
 +Instead of this, I've downloaded the deb package [[http://info.scratch.mit.edu/Scratch_on_Linux|from the MIT site]] and afterwards I dissasembled it:
 +
 +<code bash>
 + ar -xvf ../scratch_1.4.0.6~dfsg1-2~ubuntu12.04.1_all.deb 
 +</code>
 +
 +you will get three files:
 +
 +  * debian-binary
 +  * control.tar.gz
 +  * data.tar.gz
 +
 +Uncompress the later two:
 +
 +<code bash>
 +tar -xzf control.tar.gz
 +tar -xzf data.tar.gz
 +</code>
 +
 +The first one contains scripts of unstalling and postinstall, among other things. The ''data.tar.gz'' contains the scratch program. 
 +
 +**As root user,** I did the following:
 +
 +<code bash>
 +# cp  bin/scratch /usr/local/bin/
 +# cp share/* /usr/local/share -R
 +</code>
 +
 +After that, you are almost ready to run scratch in SuSE 13. 
 +
 +===== Third step: fix start script =====
 +
 +The last step is to fix the start script, ''/usr/local/bin/scratch'', I made the following changes (better to save a copy of the original):
 +
 +<code bash>
 +#!/bin/sh
 +# File:            scratch
 +# Description:     Script to start the Squeak VM binary with the scratch image
 +# Original Author: Bert Freudenberg
 +# Adapted by:      Miriam Ruiz, Raul Luna
 +
 +VM_VERSION=4.10.2-2614
 +SQ_DIR=/usr/lib/squeak/$VM_VERSION
 +VM="$SQ_DIR/squeakvm"
 +VMOPTIONS="-encoding UTF-8 -vm-display-x11 -xshm -plugins /usr/lib/squeak/$VM_V
 +IMAGE="/usr/local/share/scratch/Scratch.image"
 +IMOPTIONS=""
 +DOCUMENT=""
 +WRAPPER=""
 +
 +</code>
 +
 +And this is it. If you want, you can do more fixings like creating a fancy starting icon, etc. But the hard stuff is already done.
 +
 +===== Final step: put it in your local language =====
 +
 +I've discovered that scratch didn't appear in the local language, but in english. Debugging the launching of the application, I've discovered that it keeps searching in the directory ''/usr/share/scratch'' despite it is installed in ''/usr/local/share/scratch''. A symbolic link resolved the issue:
 +
 +<code bash>
 +oktopus:/usr/share # ln -s /usr/local/share/scratch/ scratch
 +</code>
 +
 +
 +===== Further reading =====
 +
 +Reading here and there, I've discovered that worth have a look to these projects related with scratch:
 +
 +  * http://byob.berkeley.edu/ (build your own blocks)
 +  * http://pantherprogramming.weebly.com/download-panther.html (Panther programming)
 +