forked from lepton-eda/lepton-eda
-
Notifications
You must be signed in to change notification settings - Fork 0
Cygwin
drforbin edited this page Mar 20, 2020
·
1 revision
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