import os, sys\r
-from wb import system, config, home_fn, cd_home\r
+from wb import system, config, home_fn, cd_home, cd_service_win32
\r
os.environ['PATH'] += ";%s\\VC" % (os.path.normpath(config['MSVC']),)\r
\r
def build_vc(cmd):\r
+ """Make sure environment variables are setup before build"""
system('cmd /c "vcvarsall.bat x86 && %s"' % (cmd,))\r
\r
def main():\r
+ """Build openvpn.exe and openvpnserv.exe"""
cd_home()\r
build_vc("nmake /f %s" % (home_fn('msvc.mak'),))\r
+ cd_service_win32()
+ build_vc("nmake /f %s" % ('msvc.mak'))
\r
def clean():\r
+ """Clean up after openvpn.exe and openvpnserv.exe build"""
cd_home()\r
build_vc("nmake /f %s clean" % (home_fn('msvc.mak'),))\r
+ os.chdir("service-win32")
+ build_vc("nmake /f %s clean" % ('msvc.mak'))
\r
# if we are run directly, and not loaded as a module\r
if __name__ == "__main__":\r