Tools

From Wiki.ooo4kids.org
(Difference between revisions)
Jump to: navigation, search
(Created page with '{{PageTitle|Tools}} {{Languages|Tools}} {{TOOLS|extract_maker.sh|script to autoextract and install the additional files for building OOo4Kids|Eric Bachard}} {{TOOLS|package_m...')
 
m (Scripts)
(33 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
{{Languages|Tools}}
 
{{Languages|Tools}}
  
 +
__TOC__
 +
 +
==Scripts==
 +
 +
 +
{{TOOLS|InstallOOo4Kids.sh|Install OOo4Kids on .rpm based Linux distributions|Andre Salaun}}
  
 
{{TOOLS|extract_maker.sh|script to autoextract and install the additional files for building OOo4Kids|Eric Bachard}}
 
{{TOOLS|extract_maker.sh|script to autoextract and install the additional files for building OOo4Kids|Eric Bachard}}
  
{{TOOLS|package_maker.sh|script to autocompress of last building OOo4Kids and generate the md5sum|Ben Bois}}
+
{{TOOLS|package_maker.sh|script to autocompress the last building OOo4Kids and generate the md5sum|Ben Bois}}
 +
 
 +
{{TOOLS|MD5_debrpm_maker.sh|script to generate the md5sum for the DEB & RPM packages and renaming sub-folders to match with the FTP tree structure.
 +
need to be improve: for now, you have to copy all sub-folders named {lang}_download/ and the file inside to a temp folder DEB or/and RPM, ex.:
 +
<pre>DEB/
 +
    de_download/
 +
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_de_deb.tar.gz
 +
 
 +
    en-US_download/
 +
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_deb.tar.gz
 +
 
 +
RPM/
 +
    de_download/
 +
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_de.tar.gz
 +
 
 +
    en-US_download/
 +
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install.tar.gz</pre>|Ben Bois}}
 +
 
 +
{{TOOLS|arm_debian_start.sh|script to easily run (with SSH -port 2222- connection enabled) and kill qemu arm-debian VM:
 +
<pre>#!/bin/bash
 +
 
 +
if [ "$1" = "kill" ]; then
 +
        echo "killing qemu session..."
 +
        sleep 10
 +
        ps auxww | awk '/qemu-system-arm/ {print$2}' | xargs kill -9
 +
        exit 0
 +
else
 +
        cd /path/to/Qemu/versatile/
 +
        echo "starting arm-debian..."
 +
        qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -m 256 -hda hda.img -append 'root=/dev/sda1' -nographic -redir tcp:2222::22 &
 +
        echo "waiting startup..."
 +
        sleep 60
 +
        echo "starting ssh connexion..."
 +
        ssh -p 2222 leon@localhost
 +
fi</pre>|Ben Bois}}
 +
 
 +
{{TOOLS|rename_folder_file_rpm|code to easily rename folders/files for RPM upload:
 +
<pre>for file in $(find *_download -type f); do echo $file | sed 's/\(.*\).tar.gz$/mv \1.tar.gz \1_rpm.tar.gz/' |sh ; done</pre>|Coolgeek}}
 +
 
 +
==Commands==
 +
{{COMMAND|Diff of the summit from v.90 to v.113|Eric Bachard|Just an example to explain how to extract incremential diffs between two subversion revisions. Values can of course be adapted (here between rev90 and rev113). '''IMPORTANT: the command must be entered from the $SRC_ROOT directory'''|<nowiki>for (( i=90 ; i < 113 ; i++ )) ; do svn diff -r$i:r$(( i+1 )) > r$(( i+1 ))".diff" ; done</nowiki>|files r90.diff, r91.diff ... and so on until r113.diff will be created. Current révision is : 634 (OOo4Kids 0.9.5)}}
 +
 
 +
==Extract all the files from a .deb archive ==
 +
 
 +
<font color=blue>'''English version'''</font>
 +
 
 +
Say, you downloaded the whole archive containing a given version of OOo4Kids, itself containing the 35 or 36 .deb archives, and you want to extract everything, to obtain a '''standalone OOo4Kids'''.
 +
 
 +
IMPORTANT : you must have dpkg-deb installed (apt-cache search dpkg-
 +
deb will help)
 +
 
 +
1) First, create a TEMP directory  : mkdir TEMP
 +
 
 +
2) Inside, put all the .deb, including the OOo4Kids-debian-menus_0.9.5-07_all.deb archive, who is in desktop-intégration.
 +
 
 +
3) Then go into TEMP (cd TEMP), and create a second directory (inside TEMP), named temp2 (mkdir temp2) for example.
 +
 
 +
4) Then type :
 +
 
 +
<font color=blue>'''for i in `ls *.deb` ; do dpkg-deb --extract $i temp2 ; done'''</font>
 +
 
 +
At the end, in temp2, you'll find 3 directories :
 +
 
 +
/etc containing everything about configuration (Debian spécific)
 +
 
 +
'''/opt who contains the ready to be launched OOo4Kids''' (just try, to be sure, typing : temp2/opt/ooo4kids0.9.5/program/soffice )
 +
 
 +
/usr who contains the menu entries stuff.
 +
 
 +
Hope this will help you :)
 +
 
 +
[[User:Eric Bachard|Eric Bachard]] 10:20, 26 May 2010 (UTC)
 +
 
 +
 
 +
<font color=blue>'''Version Française'''</font>
 +
 
 +
Disons que vous avez téléchargé l'archive complète, elle-même contenant les 35 ou 36 archives .deb, pour une version données d'OOo4Kids, et que vous souhaitez extraire un Ooo4Kids '''tout en un'''.
 +
 
 +
 
 +
IMPORTANT : il faut avoir dpkg-deb installé (apt-cache search dpkg-
 +
deb aidera)
 +
 
 +
1) D'abord créer un répertoire TEMP
 +
 
 +
2) dedans, placer tous les .deb, y compris l'archive OOo4Kids-debian-menus_0.9.5-07_all.deb qui se trouve dans le répertoire
 +
desktop-intégration.
 +
 
 +
3) Ensuite aller dans TEMP (cd TEMP), et créer un nouveau répertoire (dans TEMP), appelé temp2 (mkdir temp2) par exemple.
 +
 
 +
4) Enfin, taper :
 +
 
 +
<font color=blue>'''for i in `ls *.deb` ; do dpkg-deb --extract $i temp2 ; done'''</font>
 +
 
 +
Et dans temp2, on trouvera 3 répertoires :
 +
 
 +
/etc qui contient ce qui concerne la configuration (Debian spécifique)
 +
 
 +
'''/opt qui contient OOo4Kids prêt à fonctionner (essayer de le lancer pour être sûr, en tapant : temp2/opt/ooo4kids0.9.5/program/soffice )'''
 +
 
 +
/usr qui contient les entrées de menus
 +
 
 +
[[User:Eric Bachard|Eric Bachard]] 10:20, 26 May 2010 (UTC)
 +
 
 +
==Creating a Bundle on Sugar==
 +
Once you have a proper Sugar-compatible tree, create the setup.py in your activity root folder (OOo4Kids.activity):
 +
 
 +
#!/usr/bin/env python
 +
from sugar.activity import bundlebuilder
 +
bundlebuilder.start()
 +
 
 +
Then, create the manifest (a file that lists all the files needed for the Activity) by inputting:
 +
 
 +
find . -type f | sed 's,^./,,g' > MANIFEST
 +
 
 +
 
 +
There you have all that is necessary in order to create your XO bundle. Just use the following command:
 +
 
 +
./setup.py dist_xo
 +
 
 +
You might have to use this command if you are urged to do so:
 +
 
 +
./setup.py fix_manifest
 +
 
 +
And then, the bundle is ready, you can now install it by simply typing:
  
 +
sugar-install-bundle yourbundle.xo
  
 +
==Compiling on Linux Gentoo==
 +
Read the article by Benjamin Vialle, 3rd year student in Computer Science Option at the Ecole Centrale de Nantes proposes on his blog [http://bvialle.eu/2011/01/11/compilation-dooo4kids-sur-gentoo/ a post about compiling on Gentoo].
  
 
[[Category:Documentation]] [[Category:Development]]
 
[[Category:Documentation]] [[Category:Development]]

Revision as of 10:32, 13 March 2011


Tools

Contents


Scripts

DRF Tools.png 

InstallOOo4Kids.sh

  • Description: Install OOo4Kids on .rpm based Linux distributions
  • Author: Andre Salaun
  • Download: InstallOOo4Kids.sh
DRF Tools.png 

extract_maker.sh

  • Description: script to autoextract and install the additional files for building OOo4Kids
  • Author: Eric Bachard
  • Download: extract_maker.sh
DRF Tools.png 

package_maker.sh

  • Description: script to autocompress the last building OOo4Kids and generate the md5sum
  • Author: Ben Bois
  • Download: package_maker.sh
DRF Tools.png 

MD5_debrpm_maker.sh

  • Description: script to generate the md5sum for the DEB & RPM packages and renaming sub-folders to match with the FTP tree structure.

need to be improve: for now, you have to copy all sub-folders named {lang}_download/ and the file inside to a temp folder DEB or/and RPM, ex.:

DEB/
     de_download/
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_de_deb.tar.gz

     en-US_download/
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_deb.tar.gz

RPM/
     de_download/
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install_de.tar.gz

     en-US_download/
                    OOo4Kids_0.9.5_100528_LinuxX86-64_install.tar.gz
DRF Tools.png 

arm_debian_start.sh

  • Description: script to easily run (with SSH -port 2222- connection enabled) and kill qemu arm-debian VM:
#!/bin/bash

if [ "$1" = "kill" ]; then
        echo "killing qemu session..."
        sleep 10
        ps auxww | awk '/qemu-system-arm/ {print$2}' | xargs kill -9
        exit 0
else
        cd /path/to/Qemu/versatile/
        echo "starting arm-debian..."
        qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.32-5-versatile -initrd initrd.img-2.6.32-5-versatile -m 256 -hda hda.img -append 'root=/dev/sda1' -nographic -redir tcp:2222::22 &
        echo "waiting startup..."
        sleep 60
        echo "starting ssh connexion..."
        ssh -p 2222 leon@localhost
fi
DRF Tools.png 

rename_folder_file_rpm

  • Description: code to easily rename folders/files for RPM upload:
for file in $(find *_download -type f); do echo $file | sed 's/\(.*\).tar.gz$/mv \1.tar.gz \1_rpm.tar.gz/' |sh ; done

Commands

X-script.png 

Diff of the summit from v.90 to v.113

  • Author: Eric Bachard
  • Description:

Just an example to explain how to extract incremential diffs between two subversion revisions. Values can of course be adapted (here between rev90 and rev113). IMPORTANT: the command must be entered from the $SRC_ROOT directory

  • Command:
for (( i=90 ; i < 113 ; i++ )) ; do svn diff -r$i:r$(( i+1 )) > r$(( i+1 ))".diff" ; done
  • Result:
files r90.diff, r91.diff ... and so on until r113.diff will be created. Current révision is : 634 (OOo4Kids 0.9.5)

Extract all the files from a .deb archive

English version

Say, you downloaded the whole archive containing a given version of OOo4Kids, itself containing the 35 or 36 .deb archives, and you want to extract everything, to obtain a standalone OOo4Kids.

IMPORTANT : you must have dpkg-deb installed (apt-cache search dpkg- deb will help)

1) First, create a TEMP directory  : mkdir TEMP

2) Inside, put all the .deb, including the OOo4Kids-debian-menus_0.9.5-07_all.deb archive, who is in desktop-intégration.

3) Then go into TEMP (cd TEMP), and create a second directory (inside TEMP), named temp2 (mkdir temp2) for example.

4) Then type :

for i in `ls *.deb` ; do dpkg-deb --extract $i temp2 ; done

At the end, in temp2, you'll find 3 directories :

/etc containing everything about configuration (Debian spécific)

/opt who contains the ready to be launched OOo4Kids (just try, to be sure, typing : temp2/opt/ooo4kids0.9.5/program/soffice )

/usr who contains the menu entries stuff.

Hope this will help you :)

Eric Bachard 10:20, 26 May 2010 (UTC)


Version Française

Disons que vous avez téléchargé l'archive complète, elle-même contenant les 35 ou 36 archives .deb, pour une version données d'OOo4Kids, et que vous souhaitez extraire un Ooo4Kids tout en un.


IMPORTANT : il faut avoir dpkg-deb installé (apt-cache search dpkg- deb aidera)

1) D'abord créer un répertoire TEMP

2) dedans, placer tous les .deb, y compris l'archive OOo4Kids-debian-menus_0.9.5-07_all.deb qui se trouve dans le répertoire desktop-intégration.

3) Ensuite aller dans TEMP (cd TEMP), et créer un nouveau répertoire (dans TEMP), appelé temp2 (mkdir temp2) par exemple.

4) Enfin, taper :

for i in `ls *.deb` ; do dpkg-deb --extract $i temp2 ; done

Et dans temp2, on trouvera 3 répertoires :

/etc qui contient ce qui concerne la configuration (Debian spécifique)

/opt qui contient OOo4Kids prêt à fonctionner (essayer de le lancer pour être sûr, en tapant : temp2/opt/ooo4kids0.9.5/program/soffice )

/usr qui contient les entrées de menus

Eric Bachard 10:20, 26 May 2010 (UTC)

Creating a Bundle on Sugar

Once you have a proper Sugar-compatible tree, create the setup.py in your activity root folder (OOo4Kids.activity):

#!/usr/bin/env python
from sugar.activity import bundlebuilder
bundlebuilder.start()

Then, create the manifest (a file that lists all the files needed for the Activity) by inputting:

find . -type f | sed 's,^./,,g' > MANIFEST


There you have all that is necessary in order to create your XO bundle. Just use the following command:

./setup.py dist_xo

You might have to use this command if you are urged to do so:

./setup.py fix_manifest

And then, the bundle is ready, you can now install it by simply typing:

sugar-install-bundle yourbundle.xo

Compiling on Linux Gentoo

Read the article by Benjamin Vialle, 3rd year student in Computer Science Option at the Ecole Centrale de Nantes proposes on his blog a post about compiling on Gentoo.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox