2011-03-08 15:07:49 +01:00
|
|
|
import os, sys
|
|
|
|
from wb import system, config, home_fn, cd_home, cd_service_win32, run_in_vs_shell
|
|
|
|
|
|
|
|
def main():
|
2011-02-11 15:20:43 +01:00
|
|
|
"""Build openvpn.exe and openvpnserv.exe"""
|
2011-03-08 15:07:49 +01:00
|
|
|
cd_home()
|
|
|
|
run_in_vs_shell("nmake /f %s" % (home_fn('msvc.mak'),))
|
2011-02-11 15:20:43 +01:00
|
|
|
cd_service_win32()
|
2011-03-08 15:07:49 +01:00
|
|
|
run_in_vs_shell("nmake /f %s" % ('msvc.mak'))
|
|
|
|
|
|
|
|
def clean():
|
2011-02-11 15:20:43 +01:00
|
|
|
"""Clean up after openvpn.exe and openvpnserv.exe build"""
|
2011-03-08 15:07:49 +01:00
|
|
|
cd_home()
|
|
|
|
run_in_vs_shell("nmake /f %s clean" % (home_fn('msvc.mak'),))
|
2011-02-11 15:20:43 +01:00
|
|
|
os.chdir("service-win32")
|
2011-03-08 15:07:49 +01:00
|
|
|
run_in_vs_shell("nmake /f %s clean" % ('msvc.mak'))
|
|
|
|
|
|
|
|
# if we are run directly, and not loaded as a module
|
|
|
|
if __name__ == "__main__":
|
2011-04-14 16:18:47 +02:00
|
|
|
if len(sys.argv) == 2 and sys.argv[1] == 'clean':
|
|
|
|
clean()
|
|
|
|
else:
|
|
|
|
main()
|