Build on Windows
From Wzdftpd
Contents |
$WZDFTPD represents the top-level directory of the wzdftpd source installation
Building wzdftpd from the svn repository
Extract from svn
Download and install tortoisesvn. Annoyingly, it will ask you to reboot.
In explorer, go to a directory and right click, then choose "SVN checkout"
The url of the repository is:
svn+ssh://svn@svn.cpe.fr/svn/wzdftpd/trunk
And click ok
The password is svn (it may ask you several times, that's normal).
Prerequisites
You will need flex, openssl, libiconv and zlib. If you don't know where to find it, or how to install, or just you are too lazy, I've created a zip file with all these libs:
http://www.wzdftpd.net/downloads/visual_libs.zip
Download and unzip it in directory wzdftpd/visual.
If you are going to use the Zeroconf capabilities, that are part of wzdftpd, you'll also need to download the following Howl zipped archive:
http://www.wzdftpd.net/downloads/howl.zip
- You will need to download or build OpenSSL:
A compiled version is available at http://www.slproweb.com/products/Win32OpenSSL.html
- The libiconv-2.dll can be found at http://gnuwin32.sourceforge.net/packages/libiconv.htm
- If you want TCL module, install ActiveState TCL 8.3 or above
- If you want Perl module, install ActiveState Perl 5.8 (or above)
- If you want MySQL backend support and you don't have MySQL installed on your machine, go to MySQL Website and download the minimum server for Windows. On MySQL Server setup program, choose the custom instalation and remove the server component and check the include and library checkbox to install the needed headers and libs.
- If you want the Zeroconf module, get the Howl sources (and compile them) or download Apple's Bonjour SDK.
- It seems that flex needs to be in $WZDFTPD\visual\flex\Release\flex.exe. Is that correct? -- DanielSHaischt 21:40, 4 February 2006 (CET)
- AND litle more, DO NOT use SPACE (' ') in directory name where project is stored. Otherwise you will see "cmd.exe error" during flex.exe run.
Which IDE has been confirmed to work
Basically you need an IDE that is able to open/import a Visual C++ 6.0 project. The following IDEs were successfully tested. Allthough you may experience issues that are specific for each IDE (see below).
- Visual C++ 2005 Express Edition (free)
- Visual C++ 6.0 (not free)
- Visual Studio 6.0 including Visual C++ 6.0 (not free)
- Visual .NET 2003 including C/C++ support (not free)
- Visual .NET 2005 including C/C++ support (not free)
- Code::Blocks (free)
- Dev-C++ (free)
- Visual SlickEdit (not free)
If you are using Visual C++ 2005 Express Edition, you are required to download the Microsoft Platform SDK (x86 version) as well.
Run visual c++ and open the project in directory
$WZDFTPD/visual wzdftpd.dsw
If you DON'T want TCL, Perl or MySQL, disable the module Right-click on project name and choose "Unload Project"
Set paths in Visual C++
Open the Menu "Tools -> Options" Choose the tab "Directories" On "Include Files" add the following:
Note: If you are using MS Visual C++ 2005 Express Edition, you will find those settings under "Tools -> Options... -> Projects and Solutions -> VC++ Directories". There you have a combo-box where you can choose to manipulate include directories etcetera.
$WZDFTPD\src $WZDFTPD\visual\openssl\inc32 c:\tcl\include (ot wherever it is) c:\perl\lib\CORE (ot wherever it is) C:\Program Files\MySQL\MySQL Server 4.1\include
On "Library Files" add the following:
Note: If you just did install MS Visual C++ Express Edition, you may be required to additionally download and install the MS Platform SDK because it seems Visual C++ Express Edition does not ship with some required libs/include files.
$WZDFTPD\visual\openssl\lib c:\tcl\lib c:\perl\lib\CORE c:\Program Files\MySQL\MySQL Server 4.1\lib\opt
On this example, MySQL? 4.1 server is installed on "c:\Program Files\MySQL\MySQL Server 4.1" , TCL is installed on "c:\tcl" and Perl is installed on "c:\perl".
You should put the correct paths to the include and lib folders.
If you DON'T use the Perl, TCL or MySQL module, don't put the corresponding paths on "Include Files" and "Library Files".
Notes for Visual Studio 2003 .NET and 2005 .NET
It seems that the VC++ 6.0 project can be imported. But after having converted the project into a propper VS .NET solution you may experience some issues. Below you'll find some possible issues and hopefully a corresponding solution.
- Issue: ..\flex\Release\flex.exe: can't open c:\projects\wzdftpd-trunk\libwzd-core"wzd_cookie_lex.l
- Solution: Open your project explorer, select the libwzd_core module, goto Source Files and expand that particular node. If you are there please select the file wzd_cookie_lex.l. Afterwards do a right-click and select properties. There you have to change the custum build step to ..\flex\Release\flex.exe -t $(InputDir)$(InputName).l > $(InputDir)$(InputName).c
build all
Menu "Build -> Batch Build" Make sure all "Release" entries are checked, and "Debug" if you want Click on Build
Have a break (it can be long, and YES it generates TONS of warnings)
When finished, check that the number of errors is 0 for all projects
It you have no errors at this step, all is ok and you can find executables and dlls in the visual/* subdirs
Starting wzdftpd
Start the wzdftpd service:
net start wzdftpd
Then follow the Quickstart guide.
Creating the Installer
To help distributing wzdftpd, We've created an installer which can package file directly from the visual build tree.
To create a windows installer, use the following:
NSIS Setup Instructions
The current Windows version of wzdftpd uses NSIS Installer. You can download NSIS from Source Forge at http://nsis.sourceforge.net/
To compile the Installer, install NSIS and right click the file wzdftpd.nsi. Then choose "Compile NSIS Script".
tip: If you want to edit NSIS scripts, you can use the HM NIS Editor that can be found at http://hmne.sourceforge.net/
Updating your svn copy
right-click on $WZDFTPD and choose "SVN Update"
In visual c++, open project file and run "Build -> Batch Build"
select "Clean"
Open "Build -> Batch Build" again and choose "Build" this time.
