how to build ============== you want to build: objfre_wnet_x86_vh (buildfre_wnet_x86_vh.log) log should look like: BUILD: Computing Include file dependencies: BUILD: Examining d:\march-hare\cvsflt\cvsflt directory for files to compile. Elapsed time [0:00:19.656] ************* Linking d:\march-hare\cvsflt\cvsflt ************* 'nmake.exe /nologo BUILDMSG=Stop. -i LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR= 386=1' Elapsed time [0:00:20.359] ************* Elapsed time [0:00:20.359] ************* Build PROCESS x32: ==================== (Specifies the Windows Server 2003 build environment.) C:\WinDDK\5112\bin\setenv.bat C:\WinDDK\5112 fre wnet cd /d d:\march-hare\cvsflt\cvsflt nmake -f makefile (Specifies the Windows XP build environment.) C:\WinDDK\5112\bin\setenv.bat C:\WinDDK\5112 fre wxp cd /d d:\march-hare\cvsflt\cvsflt nmake -f makefile Build PROCESS x64: ===================== windows xp ----------- Cannot build AMD64 bit binaries for Windows XP. windows 2003 ------------- WARNING: x64 Native compiling isn't supported (on windows xp x64) - it'll be using cross compilers. C:\WinDDK\5112\bin\setenv.bat C:\WinDDK\5112 fre amd64 wnet cd /d d:\march-hare\cvsflt\cvsflt nmake -f makefile ALT Build PROCESS: ==================== Simpler -------- with a 3 month expiry: nmake -f makefile.mak with no expiry: nmake -f makefile.mak EXPIRY_MAX=0 NOTES about using the cvsflt.sys driver ========================================== Q. Can you use a 2009 (CVSNT 2.8.01) server? A. Yes - but the 'setci' in Suite 2009 is broken, so make sure you use 'setci' from the CVSFLT installation directory, not the one in the CVS Suite directory. Suite 2010 has the added advantage that it'll automatically register all your repositories and TEMP directory as 'case insensitive' when the high performance server service is started (so you don't have to manually register them each time the server reboots). instructions: Install cvsflt-trial-4652.msi (msiexec /i cvsflt-trial-4652.msi /Log cvsflt-trial-4652.txt) Reboot Use start->cvs suite->cvsnt server control panel, use advanced tag, enable 'case sensitive server' use server tag, set TEMP directory to an 8.3 directory, e.g.: c:\cvstemp Restart server high performance server service To check the driver is running: C:\Documents and Settings\scott>sc query cvsflt SERVICE_NAME: cvsflt TYPE : 2 FILE_SYSTEM_DRIVER STATE : 4 RUNNING (STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 Check the filter library can register directories setci -a "c:\DOCUME~1\ALLUSE~1\APPLIC~1\MARCHH~1\myrepo" setci -a "c:\cvstemp" setci -l or Note: if you set the 'long' filename then it also works with notepad.. setci -a "%ALLUSERSPROFILE%\Application Data\March Hare\myrepo" setci -a "c:\cvstemp" setci -l When you use the 'cvsci -l' you should see both the 'short' (8.3) and the long directory registered automatically regardless of which you specify on the command line Note: setci registers the directory in the filter - so this is not persistent across reboots. i.e.: each time you reboot you need to re-run setci. Note: the cvsmanager (2.8.02.4652) will automatically 'register' the repositories and the TEMP directory when it starts. This is a bit of a problem because you can end up with duplicates in the list (not that there's much harm in that). I should really improve the driver so that it detects duplicates and ignores them... Now try adding some files from linux, e.g.: cvs -d :ext:server:/myrepo co mymodule cd mymodule cvs add hello.txt Hello.txt hELLo.txt cvs ci -m "lots of case testing" Note: it's important to set up a TEMP directory just for the use of CVSNT server, because the TEMP directory needs to be case insensitive too. e.g.: import won't work otherwise, and probably not update. NOTES about Debugging ======================= If you really want to debug the driver then this information may help The first time that a path is added to the posix list (e.g: using setci) then the driver will display a message in the event log (system). This is also the point at which the trial license expiry is first checked. If the date is past the expiry date then the driver won't work and a single message is put in the event log (system). There is no fancy clock rewind tests. The driver can 'display' some debugging messages: 0x0001 //display names of device objects we attach to 0x0002 //get and display names during create 0x0004 //get name (don't display) during create 0x0008 //do create completion routine, don't get names 0x0010 //do attach to FSRecognizer device objects 0x0020 //trace ioctl actions 0x0040 //trace event actions 0x0080 //trace all posix filenames 0x0100 // - not currently in use - 0x0200 //trace similar posix filenames (similar lengths) 0x0400 //trace similar posix filenames (tailing characters match) -- known to cause bluescreen 0x0800 //trace essential info add/remove/getver/getposix/getkernel 0x1000 //trace exactly matched posix filenames Example: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CvsFlt] "DebugFlags"=dword:00001c40 Note: every time you install CVSFLT (either using the installer or the INF file) the debug flags are reset to zero! So that would enable the tracing of posix filenames (similar trailing, exact) plus essential info and events. To 'see' the trace you need: * a kernel debugger, there are two you can try: - the microsoft one that comes with the DDK for Windows 7 - Syser * to start Windows XP in Kernel debug mode The easiest kernel debugger to use is Syser 0) To start Windows XP with kernel debugging, alter the boot.ini file: [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Debug" /noexecute=optin /fastdetect /debug 1) You can get the DDK from here: http://www.microsoft.com/en-us/download/details.aspx?id=11800 i) set the registry ii) reboot iii) start C:\WinDDK\7600.16385.1\Debuggers\windbg.exe iv) new kernel project, local, ok v) use setci to set the path (no messages are displayed until at least one path is in the list) vi) in the winddbg command line enter: !dbgprint The problem with windbg is that it buffers the debug messages, and the buffer size is fixed: The DbgPrint buffer itself can hold up to 4 KB of data on a free build of Windows, and up to 32 KB of data on a checked build of Windows. On Windows Server 2003 and later versions of Windows, you can use the KDbgCtrl tool to alter the size of the DbgPrint buffer. This tool is part of Debugging Tools for Windows. i.e.: You can set the debug buffer size higher (on Windows Server 2003, but not in Windows XP): C:\WinDDK\7600.16385.1\Debuggers\kdbgctrl.exe -sdb 256000 2) You can get a trial version of Syser from here: http://www.sysersoft.com/products.html To see the debug messages simply: i) set the registry ii) reboot iii) start 'Syser Loader' (Start->Programs->Syser->Syser Loader) iv) use setci to set the path (no messages are displayed until at least one path is in the list) v) use the 'view' menu to pause/clear the messages NOTES about Build Environment: ================================= Note: the last time Tony built this he used this DDK: D:\winddk\3790 Note: the last time Arthur built this he used this DDK: C:\WinDDK\5112 (Microsoft Windows Driver Kit 5112 6.0.5112.0) Usage: "setenv [fre|chk] [64|AMD64] [hal] [WLH|WXP|WNET|W2K] [bscmake]" By default, setenv.bat will set the environment variable NO_BROWSER_FILE. Using the "bscmake" option will cause setenv.bat to not define this variable. Example: setenv d:\ddk chk set checked environment Example: setenv d:\ddk set free environment for Windows Longhorn (default) Example: setenv d:\ddk fre WLH Same Example: setenv d:\ddk fre 64 sets IA64 bit free environment Example: setenv d:\ddk fre AMD64 sets AMD64 bit free environment Example: setenv d:\ddk fre WXP sets free build environment for Windows XP Example: setenv d:\ddk hal sets free hal environment Example: setenv d:\ddk fre hal Same Using the SetEnv.bat Command Line from: http://msdn.microsoft.com/en-us/subscriptions/ff554139(v=vs.85).aspx When you open one of the build environments, a batch file that is named SetEnv.bat runs in this window. This sets the environment variables to their default values for this environment. In most cases, it is not necessary for you to directly start the SetEnv.bat file. However, you may find this useful when writing scripts that will execute several sequential builds. The command-line syntax is as follows: setenv Directory [fre|chk] [64|x64] [hal] [WIN7|WLH|WXP|WNET] [no_prefast] [bscmake] [separate_object_root][oacr|no_oacr] setenv Directory -? All parameters except for no_prefast, bscmake, separate_object_root, oacr, no_oacr and Directory are case-sensitive. Parameters Directory Specifies the Windows Driver Kit (WDK) installation directory. fre Specifies the free build environment. This can be abbreviated as f. chk Specifies the checked build environment. This can be abbreviated as c. 64 Specifies the Itanium-based build environment. x64 Specifies the x64 build environment. hal Specifies the HAL build environment. WIN7 Specifies the Windows 7 build environment. If no operating system is specified, this is the default value. WLH Specifies the Windows Vista build environment. WXP Specifies the Windows XP build environment. WNET Specifies the Windows Server 2003 build environment. no_prefast Prevents PREfast from being run during the build process. For more information, see PREFAST_ROOT. Note This parameter is obsolete in the WDK for Win7 and later versions of Windows operating system. bscmake Enables the Build utility to run the BSCMake program. To run BSCMake, use the bscmake flag (or manually delete the NO_BROWSER_FILE environment variable) and include the BSCMake directory in your default path. For more information, see NO_BROWSER_FILE. separate_object_root Enables BinPlace and also various build macros to be applied during the build process. The following build macros are affected by this parameter: _NTTREE OBJECT_ROOT OBJ_PATH PASS0_BINPLACE PASS1_BINPLACE PASS2_BINPLACE TARGET_DESTINATION Note This parameter is supported in the WDK for Windows 7 and later versions of Windows operating system. oacr Enables Windows Auto Code Review (OACR). If neither oacr nor no_oacr is specified, the SetEnv.bat file enables OACR by default. no_oacr Disables OACR. -? Displays a short help text. You have to supply Directory for this to work, but you can use any string as a placeholder for Directory. Example If you open a new Command Prompt window and run setenv D:\ddk chk 64 WXP it will set up a 64-bit Windows XP checked build environment, as long as D:\ddk is indeed your WDK installation directory. Writing Scripts If you write a script that will automatically start the build utility, you should not run SetEnv.bat twice in the same Command Prompt window. Although SetEnv.bat will set all the environment variables needed for any given build environment, it may not delete the environment variables set by a previous use of this command. Therefore, if you plan to run sequential builds of different types from a batch file, you should use a format along these lines: cmd setenv b:\ddk chk 64 WXP exit cmd setenv b:\ddk fre 64 WNET exit