hluk/CopyQ — pull request #15 by sschuberth (2013-03-06 13:54:50+00:00)
Title: Add proper support for running CopyQ via command line and GUI on Windows 

Here's my proposal for fixing the issue I had filed at [the Google Code issue tracker](https://code.google.com/p/copyq/issues/detail?id=2). I'm not sure how you feel about adding the `extern/copyq.com` binary to the repository. On the one hand I try to not commit binaries myself, on the other hand it's a very tiny (and generic) executable in this case so that I decided to not add [its source code](http://dualsubsystem.googlecode.com/files/DualMode%201.0.zip) in favor of not adding more complexity when building CopyQ on Windows.

Originally, I was having a different solution in mind that makes the main executable just attach to an existing console if there is one, but this has the drawback of [the child process not really controlling the console](http://stackoverflow.com/questions/493536/can-one-executable-be-both-a-console-and-gui-app/494000#494000). Maybe that solution would still be sufficient for the current use case, but I wanted to have something more future-proof. So I sticked to the method also Microsoft is using for Visual Studio's `devenv.exe` / `devenv.com` executables.

Note that accepting the pull requests in its current form means that you would have to also include `copyq.com` in the binary distribution archive for Windows. Eventually I'll come with another pull requests which adds an installer for Windows to simplify this :-)