Skip to content

Migrating

perberos edited this page Dec 22, 2011 · 15 revisions

Lo principal es llevar el Estandar. Sobretodo lo de utilizar .cache y .config en vez de .mate2

  • OMG, Why I must change all?
  • Because we don't want conflicts with nautilus of gnome3...

Nautilus

Nautilus - Migrating themes

Migrating themes is easy. Just rename all widgets NautilusWidgetExample to CajaWidgetExample. This is just an example.

Tip: With Geany you can press CTRL+H and replace all texts from current document opened.

Nautilus - Migrating extensions

Migrating extensions maybe can not be so easy. If you are lucky, you just can rename some texts to get a quick versions working.

This is a list of text to replace: gconf -> mateconf gnome -> mate orbit -> corba nautilus -> caja

Please, check the headers (if the code is in C) for the correct name of files and functions.

Compiz

It look like work fine with Emerald. But there is missing a MATE plugin for global hotkeys, etc.

openbox

Seems work perfectly.

Otras aplicaciones de GNOME, Nautilus, GNOME Panel, etc.

Actualmente solo queda tomar la versión compatible con GNOME2, y adaptarla a MATE. Renombrando, y verificando que las dependencias sean correctas.

Esto es realmente feo, se está tomando una versión antigua.

Se ha pensado diferentes formas de afrontar esta terrible dependencia de GNOME. Pero la unica que es viable, es la de soportar nosotros mismos esos programas.

Quick Port

Replaced words

Esta es una lista de palabras que he usado para evitar conflictos con GNOME3. Y entre otras cosas, prevenir temas de "deprecation".

#!/bin/bash
# Copyright © 2011 Perberos
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
pkgdir=src # the folder where is the code, be carefull

replaces=(

    'ior-decode-2' 'matecorba-ior-decode-2'
    'linc-cleanup-sockets' 'matecorba-linc-cleanup-sockets' 
    'typelib-dump' 'matecorba-typelib-dump'
    'libname-server-2' 'libname-matecorba-server-2'

    'panel-applet' 'mate-panel-applet'
    'panelapplet' 'matepanelapplet'
    'panel_applet' 'mate_panel_applet'
    'PANEL_APPLET' 'MATE_PANEL_APPLET'
    'PanelApplet' 'MatePanelApplet'

    'mate-mate-panel-applet' 'mate-panel-applet'
    'matematepanelapplet' 'matepanelapplet'
    'mate_mate_panel_applet' 'mate_panel_applet'
    'MATE_MATE_PANEL_APPLET' 'MATE_PANEL_APPLET'
    'MateMatePanelApplet' 'MatePanelApplet'

    'gnome' 'mate'
    'GNOME' 'MATE'
    'Gnome' 'Mate'

    'Metacity' 'Marco'
    'metacity' 'marco'
    'METACITY' 'MARCO'

    'Nautilus' 'Caja'
    'nautilus' 'caja'
    'NAUTILUS' 'CAJA'

    'Zenity' 'MateDialog'
    'zenity' 'matedialog'
    'ZENITY' 'MATEDIALOG'

    'MATE|Utilities' 'GNOME|Utilities'
    'MATE|Desktop' 'GNOME|Desktop'
    'MATE|Applets' 'GNOME|Applets'
    'MATE|Applications' 'GNOME|Applications'
    'MATE|Multimedia' 'GNOME|Multimedia'

    'libnotify' 'libmatenotify'
    'LIBNOTIFY' 'LIBMATENOTIFY'
    'Libnotify' 'Libmatenotify'

    'bonobo' 'matecomponent'
    'Bonobo' 'MateComponent'
    'BONOBO' 'MATECOMPONENT'
    'bonoboui' 'matecomponentui'
    'BONOBOUI' 'MATECOMPONENTUI'

    'gconf' 'mateconf'
    'GConf' 'MateConf'
    'GCONF' 'MATECONF'

    'pkmateconfig' 'pkgconfig'
    'PKMATECONFIG' 'PKGCONFIG'

    'gweather' 'mateweather'
    'GWeather' 'MateWeather'
    'GWEATHER' 'MATEWEATHER'

    'ORBit' 'MateCORBA'
    'orbit' 'matecorba'
    'ORBIT' 'MATECORBA'

    'panel-applet' 'mate-panel-applet'
    'panelapplet' 'matepanelapplet'
    'panel_applet' 'mate_panel_applet'
    'PANEL_APPLET' 'MATE_PANEL_APPLET'
    'PanelApplet' 'MatePanelApplet'

    # mistakes
    'mate-mate-panel-applet' 'mate-panel-applet'
    'matematepanelapplet' 'matepanelapplet'
    'mate_mate_panel_applet' 'mate_panel_applet'
    'MATE_MATE_PANEL_APPLET' 'MATE_PANEL_APPLET'
    'MateMatePanelApplet' 'MatePanelApplet'

    'soup-mate' 'soup-gnome'
    'SOUP_TYPE_MATE_FEATURES_2_26' 'SOUP_TYPE_GNOME_FEATURES_2_26'
    'mateconfaudiosink' 'gconfaudiosink'
    'mateconfvideosink' 'gconfvideosink'

    'TAMATECONFIG' 'TAGCONFIG'

    # GNOME Keyboard
    'gkbd' 'matekbd'
    'Gkbd' 'Matekbd'
    'GKBD' 'MATEKBD'


    # GMenu
    'GMenu' 'MateMenu'
    'gmenu' 'matemenu'
    'GMENU' 'MATEMENU'

    # polkit
    'polkitgtk' 'polkitgtkmate'
    'polkit-gtk' 'polkit-gtk-mate'
    'PolkitGtk' 'PolkitGtkMate'
    'POLKITGTK' 'POLKITGTKMATE'
    'POLKIT_GTK' 'POLKIT_GTK_MATE'
    'polkit_gtk' 'polkit_gtk_mate'

    'polkit_gtk_mate_mate' 'polkit_gtk_mate'
    'polkitgtkmatemate' 'polkitgtkmate'
    'PolkitGtkMateMate' 'PolkitGtkMate'
    'POLKITGTKMATEMATE' 'POLKITGTKMATE'
    'POLKIT_GTK_MATE_MATE' 'POLKIT_GTK_MATE'
    'polkit-gtk-mate-mate' 'polkit-gtk-mate'

    # GDM
    'gdm' 'mdm'
    'Gdm' 'Mdm'
    'GDM' 'MDM'


    # Glib Deprecated
    'G_CONST_RETURN' 'const'

    # Eye of GNOME
    'eog' 'eom' # only on the exe generated name

    # gedit
    'gedit' 'pluma'
    'GEDIT' 'PLUMA'
    'Gedit' 'Pluma'


    # evince
    'EVINCE' 'ATRIL'
    'evince' 'atril'
    'Evince' 'Atril'
)

#
# rename files and folders
#
dirs=$(find "$pkgdir/" -type d | sed "s|^${pkgdir}/||")
# for revert the order of folders, so the rename is safe
revertdirs=

for dirsname in ${dirs}; do
    revertdirs="$dirsname $revertdirs"
done

# directory mv
for dirsname in ${revertdirs}; do
    oldname=`basename $dirsname`
    newname=$oldname

    for index in $(seq 0 2 $((${#replaces[@]} - 1))); do
        newname=${newname/${replaces[$index]}/${replaces[$index + 1]}}
    done

    if [ $oldname != $newname ]; then
        echo "renaming folder $oldname to $newname"

        path=`dirname "$pkgdir/$dirsname"`

        retval=`mv "$path/$oldname" "$path/$newname"`
    fi
done

#
# rename files
#
files=$(find "$pkgdir/" -type f | sed "s|^${pkgdir}/||")
# files mv
for filename in ${files}; do
    oldname=`basename $filename`
    newname=$oldname

    for index in $(seq 0 2 $((${#replaces[@]} - 1))); do
        newname=${newname/${replaces[$index]}/${replaces[$index + 1]}}
    done

    if [ $oldname != $newname ]; then
        echo "renaming file $oldname to $newname"

        path=`dirname "$pkgdir/$filename"`

        retval=`mv "$path/$oldname" "$path/$newname"`
    fi
done

#
# rename file contents
#
files=$(find "$pkgdir/" -type f | sed "s|^${pkgdir}/||")

for filename in ${files}; do
    datacontent=`cat "$pkgdir/$filename"`
    datacontentold=$datacontent
    for index in $(seq 0 2 $((${#replaces[@]} - 1))); do
        #sed -i "s/${replaces[$index]}/${replaces[$index + 1]}/g" "$pkgdir/$filename"
        datacontent=${datacontent/${replaces[$index]}/${replaces[$index + 1]}}
    done

    if [ "$datacontentold" != "$datacontent" ]; then
        echo "saving $filename"
        echo "$datacontent" > "$pkgdir/$filename"
    fi
done

Lo que no se ha cambiado

libsoup-gnome

totem

gnote

Something went wrong with that request. Please try again.