Cygwin
Lepton EDA releases 1.9.13,
1.9.14 and
1.9.16
can easily be built and installed under Cygwin
.
Please note that lepton-attrib
, the batch attribute editor,
now depends on the gtkextra
library.
Though there is no
readily available package in Cygwin
distribution, you can
download the source code from http://gtkextra.sourceforge.net
(version 3.0.0 or higher, current version is 3.3.4).
Build and install it the usual way:
./configure --prefix=/usr/local && make && make install
.
Alternatively, you can disable building of lepton-attrib
:
pass the --disable-attrib
command line option to the
lepton-eda
configure
script.
After downloading and extracting the lepton-eda
source archive
and installing dependencies (see below), run the following commands:
./configure --prefix=/usr/local
make LDFLAGS="-no-undefined -lgio-2.0 -lgobject-2.0"
make LDFLAGS="-no-undefined" install
After that, the Lepton EDA suite should be installed in
/usr/local/
and ready to use.
Please note that other releases might not compile and/or
work under Cygwin
(except 1.9.10, you can find the
instructions below). It is highly recommended to use the
releases mentioned above.
Build instructions for Lepton EDA release 1.9.10.
After installing dependencies, execute the following commands in the Lepton source directory. Run them in sequence, ignoring errors:
./autogen.sh
./configure --disable-nls
make LDFLAGS="-no-undefined -lgio-2.0 -lgobject-2.0"
make LDFLAGS="-no-undefined" install
make LDFLAGS="-no-undefined -llepton -lleptonrenderer -lgio-2.0 -lgobject-2.0"
make LDFLAGS="-no-undefined" install
The original article,
contributed by @mario-giovinazzo.
- Download "setup-x86_64.exe" from cygwin and install cygwin base packages.
- Run "setup-x86_64.exe" again and add the following packages:
Package Category
-------------------------
gcc-g++ devel
make devel
pkg-config devel
Guile interpreters (libguile2, devel)
GTK+ lib (gtk, devel, runtime)
FLEX devel
GAWK interpreters
Python2.7 interpreter (interpreter, devel)
Git devel
Autoconf devel
Automake devel
Libtool devel (generic)
Gettext text
Gettext-devel devel
Gmp lib (gmp, libgmp-devel)
Image-magick graphics
xorg-server X11
xinit X11
- Start cygwin
mkdir lepton-eda
cd lepton-eda
make in a file with the following script, let say "build.sh", and run it. It takes a while
#START
#----------------------------------
# Set up Your destination directory
# (it can be outside cygwin)
#----------------------------------
DSTDIR=$HOME/geda
#----------------------------------
#* Cleanup any existing SOURCE directory
#* Create a new one
#* Clone GIT
#----------------------------------
if [ -d source ]; then
echo "Removing old source directory"
rm -Rf source
echo "done"
fi
#-----------
mkdir source
cd source
git clone https://github.com/lepton-eda/lepton-eda.git
cd lepton-eda
./autogen.sh
cd ..
cd ..
echo "autogen done"
#----------------------------------
# Cleanup any existing BUILD directory
# Create a new one
#----------------------------------
echo "Building Lepton Eda and installing in $DSTDIR"
echo "Create a build directory"
if [ -d build ]; then
echo "Removing old build directory"
rm -Rf build
echo "done"
fi
#-----------
mkdir build
cd build
#----------------------------------
# Build and install LEPTON-EDA
#----------------------------------
mkdir lepton-eda
(
cd lepton-eda
#-----------------
# SET ENV..
#-----------------
PATH=$DSTDIR/bin:$PATH
LD_LIBRARY_PATH=$DSTDIR/lib:$LD_LIBRARY_PATH
PKG_CONFIG_PATH=/usr/lib/pkgconfig:$DSTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
#-----------------
# CONFIGURE
#-----------------
echo "Configuring lepton-eda (for details see build/lepton-eda-configure.log)"
../../source/lepton-eda/configure \
--prefix=$DSTDIR \
--build=x86_64-pc-cygwin \
--host=x86_64-pc-cygwin \
--target=x86_64-pc-cygwin \
--disable-update-xdg-database \
--enable-relocatable \
--disable-nls \
> ../lepton-eda-configure.log 2>&1
#-----------------
# MAKE step 1 -> This will exit with error on undefined reference to liblepton but create
# $DSTDIR/bin/cyglepton-1.dll $DSTDIR/lib/liblepton.dll.a & liblepton.la
#-----------------
echo "STEP 1/2 Building lepton-eda (for details see build/lepton-eda-make-s1.log)"
make LDFLAGS="-no-undefined -lgio-2.0 -lgobject-2.0" > ../lepton-eda-make-s1.log 2>&1
echo "Installing lepton-eda (for details see build/lepton-eda-install-s1.log)"
make LDFLAGS="-no-undefined" install > ../lepton-eda-install-s1.log 2>&1
echo "done"
#-----------------
# MAKE step 2 -> let add -llepton -lleptonrenderer and
# run make again to full build lepton-eda package
#-----------------
echo "STEP 2/2 Building lepton-eda (for details see build/lepton-eda-make-s2.log)"
make LDFLAGS="-no-undefined -llepton -lleptonrenderer -lgio-2.0 -lgobject-2.0" > ../lepton-eda-make-s2.log 2>&1
echo "Installing lepton-eda (for details see build/lepton-eda-install-s2.log)"
make LDFLAGS="-no-undefined" install > ../lepton-eda-install-s2.log 2>&1
echo "done"
#-----------------
)
# Make /.local/share dir just because it requires privileges
mkdir $HOME/.local
mkdir $HOME/.local/share
#END
- Add the following environmental variables to windows. You need to adjust path according to your $DSTDIR (lepton-eda installation directory) (mine is /cygdrive/c/cygwin64/home/mario/geda)
GEDABIN =/cygdrive/c/cygwin64/home/mario/geda/bin
GEDADATA =/cygdrive/c/cygwin64/home/mario/geda/share/geda
GEDADATARC =/cygdrive/c/cygwin64/home/mario/geda/share/geda
LIBLEPTON =/cygdrive/c/cygwin64/home/mario/geda/lib/liblepton
GUILE_LOAD_PATH =/cygdrive/c/cygwin64/usr/share/guile/2.0
DISPLAY =:0
(you need a restart to make them active)
- END
Before run lepton-schematic you need to start an X-server like cygwin "XWin Server", there is an icon in start menu (I added it in start-up). Now you can run "lepton-schematic" directly from windows.
Lepton-netlist is a guile script so you must run it through a bash shell
as example (in my case):
bash /cygdrive/c/cygwin64/home/mario/geda/bin/lepton-netlist -g tango -o board.net board.sch