Scope
Build Scope

You need

Optional

Getting ready

Install WTL

Just copy everything into e.g. C:\Program Files\Windows Template Library.

Prepare Visual Studio

Install Visual Studio 2012, then install Update 2. Install Git Tools. Git should be automatically installed, too.
In Visual Studio you have to add WTL to the general include directories: While any solution is open go to View->Property Manager, in Debug|Win32 and Release|Win32 -> Microsoft.Cpp.Win32.user -> VC++ Directories -> Include directories add C:\Program Files\Windows Template Library\include.
Clone sourceforge repository https://git.code.sf.net/p/rkscope/code to a local directory.

Install Boost

Copy everything into e.g. c:\Temp\boost. Open a command prompt, go to that directory and execute 'bootstrap'. Then b2 --toolset=msvc --build-type=complete stage. Detailed information in the boost documenation. After compile is finished (can take very long...) copy everything into e.g. "C:\\Program Files\\Boost\\boost_1_53_0".
Again, in Visual Studio add this path to the general include directories: While any solution is open go to View->Property Manager, in Debug|Win32 and Release|Win32 -> Microsoft.Cpp.Win32.user -> VC++ Directories -> Include directories add "C:\\Program Files\\Boost\\boost_1_53_0"

For a 64 bit build of boost invoke b2 --toolset=msvc address-model=64 --build-type=complete stage.

Install National Instruments stuff

Just install, now further configuration needed.

Install Galil/Feinmess stuff

Extract the 32bit libraries for Visual Studio 2012 into 'scope/devices/xyz/galil'. For 64bit extract those libraries into 'scope/devices/xyz/galil/x64'. Later copy Galil2.dll (from debug&release subdirectories) into the respective Debug&Release directories where your Scope.exe is built in. In that way you can run scope.exe from Visual Studio, otherwise it complains that it cannot find the Galil dlls. Be careful not to confuse debug and release dlls as this can lead to very confusing errors!

Install Standa stuff

Install MicroSMC (32bit for 32bit builds of Scope).

Configure Doxygen

Add Doxgen under Tools-External Tools... (Name: "Doxygen", Command: "C:\Program Files\doxygen\bin\doxygen.exe", Arguments: "$(SolutionDir)\documentation\default.doxygen", Initial directory: "$(SolutionDir)", check "Use output window"). Now, with a click on "Doxygen" you can build the html documentation.

Build Scope

  • Download Scope and copy everything into e.g. C:\Scope
  • Open the scope.sln file. Check at Project->Properties->C++->General that the 'Additional include directories' match the ones on your system. Also Check Linker->General->Additional library directories and Linker->Input->Additional Dependencies. Do this for Debug and Release configuration. You may have to adapt the path to the git.exe in lastgitcommit.bat.

Now you have to create some local files that are not part of the Scope Git repository:

  • Copy ScopeDefinesExamples.h in the scope folder to ScopeDefines.h. You need this later in (Configure Scope).
  • Create a text file "version.txt" in the scope folder (this keeps track of the Git commits) and write something into.
  • Create a text file "version.h" in the scope folder and write something into it. Both files will be filled by lastgitcommit.bat when you first compile Scope.

Copy exiftool

Scope calls the exiftool.exe to fix TIF tags of saved files. Obviously it cannot be included in the sources. Copy exiftool.exe (rename if necessary) to scope/tools/ (create this folder if necessary).

Copy Galil libraries

For linking to the Galil libraries, copy them to devices/xyz/galil/debug/Galil2.lib and Galil2.pdb and devices/xyz/galil/release/Galil2.lib To run Scope from Visual Studio, Galil2.dll has to be in the same directory as scope.exe. Thus copy release/debug versions to scope/Release and scope/Debug.