Friday, October 29, 2010

Windows x64 Cross Compiling with Microsoft Visual Studio 2010 Express

Here's what works for me:
  1. Download, install and register Microsoft Visual Studio 2010 Express - it's free of charge
  2. Download and install the Windows SDK - be sure to install the x64 toolchain (and/or the Itanium toolchain)
  3. Create a shortcut on the desktop for each hardware platform you want to compile for:
    C:\WINDOWS\system32\cmd.exe /E:ON /V:ON /T:0E /C ""C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 & "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress" /useenv"
    (replace /x86 with /x64 and /ia64 for x64 and Itanium, respectively).
    The "Start in" folder should be set to
    "C:\Program Files\Microsoft SDKs\Windows\v7.1\"
  4. Launch VCExpress via one of these shortcuts, and open a project that you want to cross compile. If it already contains the needed platform, then just switch to it and build. Otherwise, you should first use the configuration manager to add a new solution platform to the project - it's pretty straight forward

Friday, October 15, 2010

Cygwin/X Keyboard Layout Switching

The current Cygwin X server supports keyboard layouts! what a nice surprise! and it can all be configured at the command line!

Here's how I launch X on my wife's new laptop, with two keyboard layouts (us/il) and SHIFT-CAPS used to switch between layouts:
C:\cygwin\bin\run.exe /usr/bin/bash.exe -l -c '/usr/bin/startxwin -- -xkblayout us,il -xkbmodel pc105 -xkbvariant ,lyx -xkboptions grp:shift_caps_toggle'
Ain't it cool?

(you've probably guessed by now: I suffer from an extreme case of sleep deprivation)