Hybrid windows compile

Version: $Id: hybrid_windows_compile.html,v 1.1 2000/12/29 17:18:57 frank Exp $

1. Doing cvs checkout
2. Converting project files
3. Compile a new blender
4. Visual C++
5. Development cycle

1. Doing cvs checkout

If you're in Eindhoven make sure you have a checkout on the server. If you're in Amsterdam make sure you have a checkout on fw-adm.
  > mkdir ~/develop
  > cd ~/develop
  > cvs co source
  > cvs co lib/windows

2. Converting project files

Visual C++ only reads dos formatted project files. Here's how to convert them:
  > cd ~/develop/source
  > foreach i (`find . -name '*\.ds?'`)
  >   echo $i
  >   to_dos $i $i
  > end
Sometimes you want to get updated project files from cvs:
  > cd ~/develop/source
  > foreach i (`find . -name '*\.ds?'`)
  >   echo $i
  >   rm $i
  >   cvs update $i
  >   to_dos $i $i
  > end

3. Compile a new blender

Compiling has to be done on a windows machine. If you're in Amsterdam log into nana04 , from Eindhoven log into win2k with telnet. Then do a:
  > cd ~/develop/source
  > make debug
If you only want to recompile part of blender you can speed things up by doing:
  > cd ~/develop/source
  > (cd blender/src ; make debug) && make debuglink
If you want to speed thing up further, make sure that NAN_OBJDIR points to a local disk:
  > setenv NAN_OBJDIR //nana04/cygwin/home/frank/obj
    - or -
  > setenv NAN_OBJDIR //win2k/unix/home/frank/obj

4. Visual C++

Go with Internet Explorer to your home-directory on \\server\homes\ or \\fw-adm\homes\ . Go to develop\source\creator\BlenderCreator\ and open BlenderCreator.dsw . Visual should now read all project files.

Because we don't want Visual to compile blender for us, we have to change some settings:

  Press Alt-F7
  Press the Debug tab
  make sure that 'Executable for debug session' points to the blenderdynamic.exe you created from within cygwin
    (typically: $NAN_OBJDIR/windows/debug/blenderdynamic.exe)
When you start a debug session with F5, Visual asks you if you want to rebuild certain files. Select no and start debugging.

5. Development cycle

Now you can edit your files from within Visual C++. Recompiling the executable should be done on either win2k or nana04. cvs commands can be executed on server or fw-adm.

WARNING: Visual C++ writes dos-formatted text files. Convert them before you do a cvs commit by doing a:

  > to_unix myfile.c myfile.c
Sometimes you lose debugging information because you removed a directory from cvs and did a cvs update. What helps is:
  > ssh server (fw-adm)
  > cd develop/source
  > rm `find . -name 'vc60.*'`)
  > logout

  > telnet win2k (nana04)
  > rm -rf $NAN_OBJDIR/windows
  > cd develop/source
  > make debug