PDA

View Full Version : سوال: روش کامپایل openvpn در ویندوز



raravaice
دوشنبه 05 بهمن 1388, 18:02 عصر
با عرض سلام و خسته نباشید

چگونه و با استفاده از چه کامپایلری میتوان openvpn را برای ویندوز کامپایل کرد.

ممنون

حامد مصافی
دوشنبه 05 بهمن 1388, 18:31 عصر
شما كه اين كاره ايد;)
با MC++ يا mingw نشده؟

Nima_NF
دوشنبه 05 بهمن 1388, 20:07 عصر
برای ویندوز با MinGW به شکل زیر:





Notes -- Building from source

This section is for developers only.

You will need the following:

1. MinGW/MSYS environment
http://www.mingw.org/
2. OpenSSL library
http://www.openssl.org/
3. LZO library
http://www.oberhumer.com/opensource/lzo/
4. Windows DDK (available only from Microsoft)
http://www.microsoft.com/whdc/devtools/WDK/default.mspx
5. Nullsoft Install System (optional)
http://nsis.sourceforge.net/Main_Page

It should be noted that Visual C++‎ is NOT required. The open-source MinGW compiler is used to build the userspace component of OpenVPN, and the DDK is used to build the driver component.

First build the usermode component of OpenVPN from the top-level directory of the OpenVPN source distribution:

Edit makefile.32 with the location of your OpenSSL and LZO distributions. Note that it is only necessary to build these distributions, not to install them.

Note that the makefile accepts a "dynamic" or "static" target, depending on the way you want to link with the OpenSSL library.

By default the makefile will attempt to dynamically link with OpenSSL.

Type:

make -f makefile.w32

This will build the user mode component of OpenVPN.

Now build the TAP-Win32 kernel driver:

Go to Start -> All Programs -> Development Kits -> Windows DDK -> Build Environments -> Win Free Build Environment

Use the Checked Build Environment if you want a debugging version.

A command prompt window will open. Go to the tap-win32 directory of the OpenVPN distribution.

Type:

build -cef

This will build the kernel driver in the i386 directory.

At this point you will have built:

* .\openvpn.exe -- openvpn daemon
* .\tap-win32\i386\tap0801.sys -- TAP-Win32 kernel driver

Copy openvpn.exe to a directory in your path. If you build dynamically with OpenSSL, copy the OpenSSL DLLs to a directory in your path.

If you want to build a self-installing EXE, consult the NSIS install script (openvpn.nsi) in the install-win32 directory. You will need to edit openvpn.nsi to reflect the setup of your development environment.

See instructions below for installing the kernel driver.

raravaice
سه شنبه 06 بهمن 1388, 09:38 صبح
شما که این کاره اید;)
با MC++‎ یا mingw نشده؟

نه داداش نشده، از روش زیر هم رفتم :
http://ehsanakhgari.org/blog/2008-05-04/compiling-openvpn-windows

اینم ازم ایراد زیاد میگیره، Step by Step میخوام نیما جان از این روشهای کلی زیاد انجام دادم ولی هر کدومشون یه جاش میلنگه.

ممنون

حامد مصافی
چهارشنبه 07 بهمن 1388, 13:28 عصر
خب بگو كجاي كار مشكل داشت ببينيم چيه جريان