Xfce Forum

Sub domains
 

You are not logged in.

#1 2015-06-26 22:05:33

Pheeble
Member
Registered: 2015-06-22
Posts: 27

How to for newbie devs: Build a debug version of Thunar in Linux Mint

As a complete newbie to git and to XFCE development, I had to work out how to build a debug version of Thunar. I couldn't find any step-by-step guide explaining how to achieve this, so I put together my own set of instructions for future reference. I decided to post it here in case anyone else is interested in XFCE development in Linux Mint.

    #############################################################################
    #                                                                           #
    #     Building a debug version of XFCE Thunar from the Git repository       #
    #                                                                           #
    #                  in Linux Mint 17.1 XFCE x64                              #
    #                                                                           #
    #                  Tested on 2015-06-26 using                               #
    #                  default Mint installation +                              #
    #                   sudo apt-get update +                                   #
    #                  sudo apt-get dist-upgrade                                #
    #                                                                           #
    #                                                                           #
    #############################################################################


    ####### Update XFCE via PPA ###############

     # Note: Compilation error occurs unless XFCE is updated

    sudo add-apt-repository ppa:xubuntu-dev/xfce-4.12
    sudo apt-get update
    sudo apt-get dist-upgrade


    ####### Set up Git ###########

    # Sign up for a free account at GitHub: https://github.com

    # install git
    sudo apt-get install git

    # Set your user name in git
    git config --global user.name 'Whoever'

    # Set your email address from your GitHub account
    git config --global user.email 'whoever@nowhere.com'

    # Set the editor to use, eg. Geany
    git config --global core.editor "geany -imnst"

    # Set the diff tool to use, eg. meld
    git config --global merge.tool meld

    # Enable coloured output in git
    git config --global color.ui 'auto'

    # Create a general git directory to contain repositories
    mkdir $HOME/git_repos

    # Go to the git directory
    cd $HOME/git_repos

    # Grab the thunar git repository
    git clone http://git.xfce.org/xfce/thunar

    # Go to the local copy of the Thunar repository
    cd thunar

    # Make up a new git branch name for development purposes
    export BRANCH="Whoever_"$(date +"%Y%m%d_%H%M%S")

    # Create a new Thunar git branch using the branch name
    git branch $BRANCH

    # Set the new git branch as the active one
    git checkout $BRANCH

    # Check that the active git branch is the correct one
    git status


    ######## Install Thunar build dependencies ###############

    sudo apt-get install build-essential xfce4-dev-tools automake libtool autoconf intltool libglib2.0-dev libgtk2.0-dev libexo-1-dev libxfce4ui-1-dev xsltproc docbook.xsl


    ######## Set the build environment variables #########

    # Set the installation directory for Thunar, eg. "$HOME/thunar-test"
    export PREFIX="$HOME/thunar-test"

    # Set the path to the pkgconfig .pc files
    export PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH"

    # Unset CFLAGS for a debug build
    export CFLAGS=""

    mkdir $PREFIX


    ######### Generate a make script ##########################

    # Still in the cloned Thunar repository directory, generate a configured 'make' script with debugging enabled
    ./autogen.sh --prefix=${PREFIX} --enable-debug=full

        # Note: autogen.sh produced this warning:
        #
        #   Please add the files codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4
        #   from the /usr/share/aclocal directory to your autoconf macro directory or directly to your aclocal.m4 file.
        #   You will also need config.guess and config.sub, which you can get from ftp://ftp.gnu.org/pub/gnu/config/.
        #
        # A post at http://askubuntu.com/questions/58337/failed-to-generate-a-configuration-file-for-xfce4-xkb-plugin-from-source
        # states: 'You can safely ignore the "Please add..." message. It is benign.'


    ######## Edit Thunar source files and build Thunar - repeat as required #############

        # Edit the source files as required ...

    # Build the files
    make

        # Note: Possible 'make' errors:
        #
        # "/bin/bash: xsltproc: command not found"
        # This error is caused by an undocumented dependency on package 'xsltproc'.
        #   Solution: install the package 'xsltproc': 'sudo apt-get install xsltproc'
        #
        # xsltproc -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl Thunar.xml
        # I/O error : Attempt to load network entity http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
        # warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
        # cannot parse http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
        # This error is caused by xsltproc being run without network access and then failing to download 'docbook.xsl'. (Duh!)
        #   Solution: install the package 'docbook.xsl' so it is available locally: 'sudo apt-get install docbook.xsl'


    # Check that make worked
    make check

    # Install the newly built Thunar
    make install

    # Go to the directory of the newly installed executable
    cd $PREFIX/bin

    # Stop any running Thunar process
    thunar -q

    # Run the newly built executable
    ./thunar

Offline

#2 2015-06-26 22:27:03

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: How to for newbie devs: Build a debug version of Thunar in Linux Mint

Pheeble wrote:

I couldn't find any step-by-step guide explaining how to achieve this, so I put together my own set of instructions for future reference. I decided to post it here in case anyone else is interested in XFCE development in Linux Mint.

Might be helpful to others in the future if you also posted this in the Xfce DE sub-forum at Mint's community web forum. I have, at times, gotten the impression that not everyone there realizes that there is an Xfce forum (this one).

Regards,


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#3 2015-06-26 22:40:17

Pheeble
Member
Registered: 2015-06-22
Posts: 27

Re: How to for newbie devs: Build a debug version of Thunar in Linux Mint

MountainDewManiac wrote:

Might be helpful to others in the future if you also posted this in the Xfce DE sub-forum at Mint's community web forum.

smile Done: http://forums.linuxmint.com/viewtopic.php?f=57&t=198801

Offline

#4 2015-06-26 22:42:26

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: How to for newbie devs: Build a debug version of Thunar in Linux Mint

You da man! (Err... Unless You da woman, lol.)

Thanks to you - and everyone else - for doing stuff like this which probably ultimately helps us "dumb users" who basically just live in the GUI and never compile/modify/patch anything.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 548.07 KiB (Peak: 548.91 KiB) ]