Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xschem on windows using the Cygwin - Cygwin/X Posix layer #324

Open
StefanSchippers opened this issue Feb 20, 2025 · 1 comment
Open

Xschem on windows using the Cygwin - Cygwin/X Posix layer #324

StefanSchippers opened this issue Feb 20, 2025 · 1 comment

Comments

@StefanSchippers
Copy link
Owner

StefanSchippers commented Feb 20, 2025

It is possible to run Xschem (as well as many other unix console / graphical applications) on Windows by installing the Cygwin library.

Cygwin is a DLL that provides a translation layer for almost all Unix system calls. Many Unix tools are ported to cygwin and available ready to install (like gcc, a ton of libraries, toolkits, flex, bison, awk, sed, a bash shell and many more).
Cygwin/X provides a X server built on top of cygwin that provides all the X11 functionality.
As a result many native Unix / Linux (console and graphical) applications can be built to run on Windows almost unchanged.
There are of course limitations for some apps that use Unix functions that are difficult to port on a different OS, but Xschem is not in this list.

@fschrive
Copy link

Here is a step-by-step guide to installing Cygwin and Xschem:

1) Go to https://cygwin.com/ and install Cygwin (click on setup-x86_64.exe)

  • Open setup-x86_64.exe > Next > Install from Internet > Next > Root Directory = C:\cygwin64, Install For = All Users (RECOMMENDED) > Next > Local Package Directory = C:\Users\your_name\Downloads > Next > Use System Proxy Settings > Next > Choose a Download site > Next
  • Select Packages > View = Full > Search = wget > Select Package = wget (latest version from the drop-down menu) > Next > Next (wait for the Cygwin setup to complete)

2) Run Cygwin (double-click on the Cygwin icon on Desktop) and install the necessary packages:

  • Install apt-cyg (type or copy/paste the following commands)
    wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
    install apt-cyg /bin
  • Install git, make, cmake, extra-cmake-modules, gcc-core and gcc-g++ (type or copy/paste the following commands)
    apt-cyg install git make cmake extra-cmake-modules gcc-core gcc-g++
    apt-cyg install libcurl4 libbrotlidec1 libbrotlicommon1 libgsasl18 libidn12 libntlm0 libnghttp2_14 libssh2_1 libguile3.0_1 libffi8 libgc1 libmpc3 libisl23 cygwin-devel binutils w32api-runtime m4
  • Download the Xschem sources from github.com (type or copy/paste the following commands)
    git clone https://github.com/StefanSchippers/xschem.git xschem-src
  • Install libX11_6, libXrender1, libxcb1, tcl, tcl-tk, flex and bison (type or copy/paste the following commands)
    apt-cyg install libX11_6 libXrender1 libxcb1 tcl tcl-tk flex bison
    apt-cyg install libXau6 libXdmcp6 libXft2 libXss1 libfontconfig1 libexpat1 libfreetype6 libXext6 libpng16 libX11-devel libX11-xcb1 libX11-xcb-devel libXrender-devel libXpm4 libXpm-devel xorgproto tcl-devel tcl-tk-devel
  • Check that all the required libraries are installed (type or copy/paste the following commands). If everything goes well, the message “Configuration complete, ready to compile” should appear
    cd xschem-src
    ./configure
  • Compile Xschem (type or copy/paste the following commands)
    make
  • Install Xschem (type or copy/paste the following commands)
    make install

3) Install any X server for Windows (example below for VcXsrv)

  • Download and install VcXsrv at https://sourceforge.net/projects/vcxsrv/
  • Run VcXsrv (double-click on the XLaunch icon on Desktop) > Multiple windows > Next > Start no client > Next > Clipboard = yes, Native opengl = yes > Next > Finish

4) Go back to Cygwin and run Xschem (type or copy/paste the following commands)
cd /usr/local/bin/
export DISPLAY=:0
./xschem

Hope this helps.
Fred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants