-:set_cygwin\r
-if not defined CYGWIN_HOME (\r
- if exist c:\cygwin (set CYGWIN_HOME=c:\cygwin) else (\r
- echo.\r
- echo !!! Not set CYGWIN_HOME, gcc build may not be used !!!\r
- echo.\r
+:ParseArgs\r
+if /I "%1"=="-h" goto Usage\r
+if /I "%1"=="-help" goto Usage\r
+if /I "%1"=="--help" goto Usage\r
+if /I "%1"=="/h" goto Usage\r
+if /I "%1"=="/?" goto Usage\r
+if /I "%1"=="/help" goto Usage\r
+\r
+if /I not "%1"=="--nt32" goto no_nt32\r
+\r
+@REM Flag, --nt32 is set\r
+@REM The Nt32 Emluation Platform requires Microsoft Libraries\r
+@REM and headers to interface with Windows.\r
+\r
+if not defined VCINSTALLDIR (\r
+ if defined VS140COMNTOOLS (\r
+ call "%VS140COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ if defined VS120COMNTOOLS (\r
+ call "%VS120COMNTOOLS%\vsvars32.bat"\r
+ ) else ( \r
+ if defined VS110COMNTOOLS (\r
+ call "%VS110COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ if defined VS100COMNTOOLS (\r
+ call "%VS100COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ if defined VS90COMNTOOLS (\r
+ call "%VS90COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ if defined VS80COMNTOOLS (\r
+ call "%VS80COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ if defined VS71COMNTOOLS (\r
+ call "%VS71COMNTOOLS%\vsvars32.bat"\r
+ ) else (\r
+ echo.\r
+ echo !!! WARNING !!! Cannot find Visual Studio !!!\r
+ echo.\r
+ )\r
+ )\r
+ )\r
+ )\r
+ )\r
+ )\r