These are the installation instructions to set up a development environment that works for developing modules for SNAP and LSL under Windows. Note: if you have any questions about any of the following steps, the first place to look is the official documentation for these packages since don't have an internal user hotline providing support for 3rd party apps (just busy researchers). 1. Install Python-2.7/Windows7/Panda3d-1.8.0.exe: * Remember the installation path for later 2. Install Python-2.7/Windows7/Python(x,y)-2.7.2.3.exe: * select all options (except Plugins, which cannot be selected) * under Directories, select "Custom Paths" * when you are proposed to use the path C:\Python276, change it to Your-path-to-Panda3d-1.8.0\python (Browse for it to make sure that you got it right) (note: when uninstalling Python-2.7, first uninstall Python(x,y) and then Panda3d) 3. Install Visual Studio 2008 Professional (from /home/software/Visual Studio/Professional 2008 if you are at SCCN): * At the end, don't check for product updates (it would by default turn on background updates globally for all your Microsoft products). 4. Install boost_1_47_setup.exe: * when prompted, check Visual Studio 2008 and Visual Studio 2010 on the left panel and check all library variants on the right panel (Multithreaded-Debug, etc.) * afterwards, add the system environment variable BOOST_ROOT and set it to the root directory where you installed boost_1_47 (and double-check) 5. Install QtSdk-offline-win-x86-v1_2_1.exe with *all* features: * afterwards, add the system environment variable QTSDK and set it to the root directory where you installed QtSDK (and double-check) 6. Install PySide: * type in the console: easy_install pyside 7. Install tortoisehg-2.3.2-hg-2.1.2-x86.msi on Win32 or tortoisehg-2.3.2-hg-2.1.2-x64.msi on Win64: * on some versions of Windows this will require you to temporarily shut down your explorer * make a file named .hgrc in your home directory (C:\Users\yourname); if the explorer does not let you do that, create it using a text editor, like Notepad++ * put the following content into the file: [ui] username = Yourfirstname Yourlastname -------- getting started with LSL, SNAP or other development ------- 8. Check out LSL via Mercurial * cd into your development/projects directory * Type: hg clone https://code.google.com/p/labstreaminglayer/ (this will create a sub-directory named labstreaminglayer) * if you are new to mercurial, read the quick tutorial at hginit.com 9. Check out SNAP from GitHub (https://github.com/sccn/snap) If you are not actively contributing to SNAP, you may get the zip file, otherwise you will want to use the "Clone in Windows" button or the git clone command. (there are Installation Instructions in the root folder of SNAP, but mostly redundant with other steps in this file) 9. To edit an existing C/C++ project: * open the .sln file with Visual Studio 10. To edit an existing Python project: * start Eclipse * in the workspace pane (left), right-click, select Import...|Existing Projects into Workspace, and select the directory that contains the .pydevproject file as the root directory. * in some cases you might have to auto-detect the Python interpreter (if so, the instructions show up as the first line of the workspace pane) --- general guidelines for developing new LSL GUI applications --- When making apps that use LSL, you are free to use whatever GUI framework you like, but please bundle the necessary .dll's with your application so that users don't need to run extra installers to run your programs. 1) The fast way to create new LSL apps with GUIs: * take any of the programs in labstreaminglayer/Apps/ whose settings GUI comes reasonably close to the one that you intend to build * make a copy * rename all occurrences of the application name to whatever you want to use (in the C++ files and in the .ui file, if you feel like it also in the visual studio solution & project) * replace the device-specific C++ code by your own * edit the .ui file using the Qt Designer (double-click should open that) to change GUI layout and rename the widgets * build for win32-release (note: if you're doing a debug build you need to temporarily copy some debug .dll's into your app directory, e.g., from Qt and for liblsl) 2) The long way to create new LSL apps with GUIs (from scratch): The current set of Apps was created with a mix of Qt tools (Qt Creator / Qt Designer) and Visual Studio. The Qt Creator is obviously a quickly slapped-together application to lower the entry barrier for Qt newbies (which is mainly due to the need to auto-generate some boilerplate code for both the .ui files and the corresponding UI headers). Visual Studio experts who treat Qt as a mere library will most likely develop their projects entirely in VS, and manually set up the custom build steps for the UI files (which shouldn't be too hard). However, being a relative Qt newbie myself, the basic process that I used was: * Start with the Qt Creator and build the forms and GUI classes; Tutorials are at: http://doc.qt.nokia.com/4.7-snapshot/designer-quick-start.html http://doc.qt.nokia.com/4.7-snapshot/designer-manual.html http://doc.qt.nokia.com/qtcreator-2.4/index.html * When the GUI classes are done and compile successfully, generate a visual studio project (or solution), using the following command line (requires that your Qt SDK binaries are in the path) cd /your/project qmake -tp vc This tool is smart enough to set up so-called "Custom Build Steps" in visual studio for the .ui file and the UI class header which automatically re-run the Qt tools when you have edited one of them. The only reason to do this is that the debugger of your Qt Creator will probably not work out of the box for you, and I have not yet figured out how to make it work. * Do the debugging, testing and further development in Visual Studio. You can also open the .ui files directly in the Qt designer and add widgets, etc. -- visual studio will rebuild them when necessary. * To package your project for release, add the necessary Qt DLL's that you use to the project. It is also smart to change the output directory for release builds to $(SolutionDir), so that the executable isn't buried in some sub-directory. To make it easier for other programmers to work with your code, consider replacing all occurrences of /your/path/to/QtSDK with $(QTSDK) in your project settings. This applies to both the project properties (include directories, library directories, additional library dependencies) and the Custom Build Steps associated with the .ui and UI .h files. 3) Note that it is also posssible to develop Qt-based UIs in Python (very conveniently). Since Python has reflection, there is no need for the somewhat annoying tools that are needed in the C++/Qt toolchain, and everything is automatic. For compatibility with the other LSL Python apps consider using PySide as the GUI library. Run the Qt Designer to make a .ui file, and then run either the pyside-uic or pyuic4 command-line tool to auto-generate a .py module that you can inherit from to get access to the window contents. There is a lot of official documentation on the internet on how to use these things. Since Python is not the fastest language, I would probably not use Python to make a module that needs to process megabyte-per-second data streams, unless the amount of UI or signal processing complexity justifies it.