# pcb-rnd on windows

We have a pack in beta testing. It should work on any windows version from 7 up. (It does _not_ work on XP.)

IMPORTANT: if you use the windows version of pcb-rnd, please send me an email to: pcb-rnd-win (at) igor2.repo.hu

I will use this for sampling user demand. If there are no emails, that means there are no windows users which means it is not worth investing time in compiling windows releases.

## 1. download the binary pack and install

Download a -win32.zip from the binary releases page

Unpack the zip anywhere, and run pcb-rnd from bin:

- start a shell (cmd.exe), cd to where you unpacked it, cd bin, pcb-rnd
- optional: create a shortcut icon (see below)

IMPORTANT: Please make sure there's no space in the full path where you unpack.

## 2. limitations

pcb-rnd is a package designed for UNIX. The windows port does not change the UNIX aspect of pcb-rnd, thus a few things are different from a normal windows application:

- pcb-rnd works from config files, not from the registry
- pcb-rnd will figure the users home directory and will look for .pcb-rnd/ in there for the user configs
- if anything breaks, try to run pcb-rnd from the command line: run a cmd.exe and cd to the bin dir within the installation root and run pcb-rnd from there watching what it prints to the console.

The usual pcb-rnd policies apply:

- pcb-rnd speaks English - there's no internalization, no unicode or utf
- some keyboard shortcuts may not work if your keyboard layout is not set to English
- pcb-rnd uses the keyboard and the command line heavily

There are a few limitations specific to the current windows pack:

- there can not be space in the path where the pack is unzipped
- UNC paths (\\server\something) may fail randomly
- it does not support opengl, it is always doing software rendering
- some of the export formats (e.g. png) are not yet supported on windows
- there is no fp_wget support because there's no wget in the pack (may work with busybox wget, busybox shipped in the pack, testing required)
- gsch2pcb-rnd is not supported
- import schematics with gnetlist has not been tested yet (importing tEDAx netlist should work)
- the windows port may have some overhead; if you find pcb-rnd slow, please try it on Linux.

These limitations are specific some special cases and oddities in windows:

- Maximized a window seems to be a special case: pcb-rnd will not get the window change size event and will not be able to save window geometry. Effect: if you configure your window geometry to be saved and loaded on start, then maximize your top window, quit, restart, pcb-rnd will not start with maximized window, as it never got the geometry for that from windows. Workaround: resize the window manually to big.

## 3. Optinal: how to create a desktop icon

The above installation process doesn't create a desktop icon so you'll need to start pcb-rnd from a cmd every time. In case you'd prefer a desktop icon, here's a process submitted by Michael France on Windows 10:

1. On Windows desktop, click right
2. Click "NEW"
3. Click "Shortcut"
4. Fill in the "type the location" with the following: (this is correct on my system but depends on the location of your installation) C:\Windows\System32\cmd.exe /k cd.. &cd.. &cd pcb-rnd-3.0.4-win32 & cd bin & pcb-rnd.exe

Note: you need to change the name of the directory written with italic to whatever path you have unpacked pcb-rnd into.

Explanation of each command:

C:\Windows\System32\cmd.exe /k starts the shell (cmd.exe); the /k keeps this window open (for information /c will close it but that's not recommended since some vital error messages may be printed there).

Initially the directory "System32" is opened in that cmd; the command cd.. changes the directory up a level to the Windows directory. So now we are in C:\Windows. The & is put between two commands as a separator. cd.. again changes the directory up a level; we are now in C:

At this point you must find where you installed the directory for pcb-rnd on your system while the cmd.exeis running you can use /dir to list all the directories available (/dire / p if the list is long).

Use the command cd your directory name where pcb-rnd is installed

(you may need to use cd several times to get to your installation directory: don't forget the & to separate each command!)

Then again cd bin to get into the bin directory (pcb-rnd requires to be run from there for finding the dlls).

Then pcb-rnd.exe will execute the program

## 4. Cross compilation from Linux to win32

(developers may need this, if you are an user, it is safe to skip.)

There is an svn repo that hosts all the sources for the dependencies. From this, the binary DLLs can be compiled (this step may need some manual intervention, autotools is not very nice for cross compilation). The result is the "ultimate hidlib dependency pack" (uhdp), 90+ megabytes of dlls with gtk, glib, gettext and whatnot.

The uhdp has two versions: the smaller one, with the dlls only, is part of the pack downloaded by end users for installation. The bigger one, called the developer pack, also contains the installed headers, .a and .la files and can be used as "sysroot" for cross-compiling pcb-rnd (or other software) against.

The uhdp can be donwloaded from http://repo.hu/projects/hidlib.w32

The normal process is:

- download and unpack the binary developer vesion of uhdp (so you don't need to spend long hours compiling all the deps)
- follow these steps for cross-compiling pcb-rnd