add system variables to win32
add mac support