Another thing that might help is the attached script.  I use it to make test 
builds of KiCad, and it doesn't require any special privileges.  Just do a git 
clone, then make a build subdirectory, and run the script like so:

git clone https://gitlab.com/kicad/code/kicad.git
cd kicad
mkdir build-master
cd build-master
build_kicad

The script will then tell you how to set up your LD_LIBRARY_PATH variable to 
run the build.  Note that on Fedora we use /lib64, but other distros may do 
that differently, so you may have to tweak the script a little.

        Steve

--
You received this message because you are subscribed to the Google Groups "KiCad 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to devlist+unsubscr...@kicad.org.
To view this discussion on the web visit 
https://groups.google.com/a/kicad.org/d/msgid/devlist/58827915-a17c-ac82-9f78-3c889aeee8ab%40gmail.com.
#!/bin/bash

set -x
set -e

dirname=`pwd`
installdir=${dirname}/installed

flags5="
        -DUSE_WX_GRAPHICS_CONTEXT=OFF
        -DUSE_WX_OVERLAY=OFF
        -DKICAD_SCRIPTING=ON
        -DKICAD_SCRIPTING_MODULES=ON
        -DKICAD_SCRIPTING_PYTHON3=ON
        -DKICAD_SCRIPTING_WXPYTHON=ON
        -DKICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
        -DKICAD_SCRIPTING_ACTION_MENU=ON
        -DKICAD_USE_OCC=ON
        -DKICAD_INSTALL_DEMOS=ON
        -DKICAD_BUILD_QA_TESTS=OFF
        -DBUILD_GITHUB_PLUGIN=ON
        -DKICAD_SPICE=ON
        -DCMAKE_BUILD_TYPE=Debug
        -DCMAKE_INSTALL_PREFIX=${installdir}
"

flags6="
        -DKICAD_SCRIPTING_WXPYTHON=ON
        -DKICAD_USE_OCC=ON
        -DKICAD_INSTALL_DEMOS=ON
        -DKICAD_BUILD_QA_TESTS=OFF
        -DKICAD_SPICE=ON
        -DKICAD_BUILD_I18N=ON
        -DKICAD_I18N_UNIX_STRICT_PATH=ON
        -DKICAD_PCM=ON
        -DKICAD_USE_EGL=OFF
        -DCMAKE_BUILD_TYPE=Debug
        -DCMAKE_INSTALL_PREFIX=${installdir}
"

flagsmaster="
        -DKICAD_SCRIPTING_WXPYTHON=ON
        -DKICAD_USE_OCC=ON
        -DKICAD_INSTALL_DEMOS=ON
        -DKICAD_BUILD_QA_TESTS=OFF
        -DKICAD_SPICE=ON
        -DKICAD_BUILD_I18N=ON
        -DKICAD_I18N_UNIX_STRICT_PATH=ON
        -DKICAD_USE_EGL=OFF
        -DCMAKE_BUILD_TYPE=Debug
        -DCMAKE_INSTALL_PREFIX=${installdir}
"

# We must be in a build directory because we only do "out of tree" builds.
if ! grep -q "/build-[^/]*$" <<< "${dirname}"
then
        echo 'Must be in a build-* directory' 1>&2
        exit 1
fi

# The canonical place to get the KiCad version is the file
# "cmake/KiCadVersion.cmake".  We cannot use the branch name
# because it might be a topic branch, and we cannot use the name of
# the build directory because it might not match the checked-out code.
#
# This approach is of course subject to change.
vfile="../cmake/KiCadVersion.cmake"
if [ ! -r "${vfile}" ]
then
        # Older versions of KiCad have the version file in a different
        # directory, so let's try that.
        vfile="../CMakeModules/KiCadVersion.cmake"
        if [ ! -r "${vfile}" ]
        then
                echo "cannot read ${vfile}" 1>&2
                exit 1
        fi
fi

version=`grep "^set( KICAD.*VERSION " "${vfile}" |
        sed -e 's/^set( KICAD.*VERSION \([^ ][^ ]*\) )$/\1/'`

flags=
case "${version}" in
        *\"5.*)
                echo "Using 5.x flags" 1>&2
                flags=$flags5
                ;;

        *\"6.0*)
                echo "Using 6.0 flags" 1>&2
                flags=$flags6
                ;;

        *\"6.99*)
                echo "Using 6.99 flags" 1>&2
                flags=$flagsmaster
                ;;

        *\"7.0*)
                echo "Using 7.0 flags" 1>&2
                flags=$flagsmaster
                ;;

        *)
                echo "Unknown version ${version}" 1>&2
                exit 1
                ;;
esac

cores=`nproc`

(

cmake $flags ..
make -j${cores} -l${cores}
make install

) 2>&1 | tee build.log

echo "Perform these commands to run this build of kicad:" 1>&2
echo "" 1>&2
echo "export LD_LIBRARY_PATH=${installdir}/lib64" 1>&2
echo "${installdir}/bin/kicad" 1>&2

exit 0

Reply via email to