pcb-rnd knowledge pool

 

How to cross-compile recent versions of pcb-rnd to windows on *nix

win32-cross by Tibor 'Igor2' Palinkas on 2019-10-25

Tags: howto, cross-compile, win32, windows, exe

node source

 

 

Abstract: This howto is about compiling the latest svn version of pcb-rnd, starting from version 3.0.0.

  The below manual process is the temporary solution for cross-compiling svn HEAD pcb-rnd to windows. (There are other nodes about cross-compiling 2.1.4 and the later 2.x.x series )

step 1: hidlib w32 deps

Download the binary development pack of hidlib.w32 (alternatively: cross-compile it)

Install the hidlib.w32 pack; this document assumes it is installed under ~/w32-rnd, but it can be placed anywhere

step 2: cross-compile librnd

  1. make an svn checkout of librnd from svn://repo.hu/librnd/trunk librnd/trunk
  2. copy configure.w in trunk/scconfig/configure.w and make it executable (chmod 775 configure.w)
  3. copy crossw32.conf in trunk/scconfig/crossw32.conf
  4. edit crossw32.conf: replace the path after the equation sign in the first line to the path where hidlib.w32 got copied to; the path entered here should have /usr/local/lib under it.
  5. edit configure.w: replace the path after the equation sign in the first of INSTPATH to a path where librnd win32 binaries will be installed (something under your home is fine)
  6. cd trunk/scconfig; ./configure.w
  7. make
  8. make install

This will install a couple of files under the INSTPATH you specified.

step 3: cross-compile pcb-rnd

Note: configure.w and crossw32.conf differ between librnd and pcb-rnd.

  1. make an svn checkout of pcb-rnd from svn://repo.hu/pcb-rnd/trunk pcb-rnd/trunk
  2. copy configure.w in trunk/scconfig/configure.w and make it executable (chmod 775 configure.w)
  3. edit configure.w: modify LIBRND_PREFIX to have the same value as INSTPATH had in step 2.
  4. copy crossw32.conf in trunk/scconfig/crossw32.conf
  5. edit crossw32.conf: replace the path after the equation sign in the first line to the path where hidlib.w32 got copied to; the path entered here should have /usr/local/lib under it.
  6. cd trunk/scconfig; ./configure.w
  7. make

This should produce trunk/src/pcb-rnd.exe (and some utils).

The whole, zippable pack is produced by pcb-rnd.w32.pack.sh : it should be copied to trunk/ and ran from there. It contains configuration at the top of the script (paths should be changed).