Update Ring2EXE - SystemSilent()
*/
-cNoOutputNoError = " >nul 2>nul"
+cNoOutputNoErrorWindows = " >nul 2>nul"
+cNoOutputNoErrorLinux = " &> /dev/null"
func Main
aPara = sysargv
@@ -95,7 +96,6 @@ func BuildApp cFileName,aOptions
# Clear Temp Files
if not find(aOptions,"-keep")
cleartempfiles()
- remove("out.txt")
ok
msg("End of building process...")
@@ -157,8 +157,8 @@ func GenerateBatchDynamic cFileName
cFile = substr(cFileName," ","_")
# Generate Windows Batch (Visual C/C++)
- cCode = "call "+exefolder()+"../src/locatevc.bat" + cNoOutputNoError + nl +
- 'cl #{f1}.c ..\lib\ring.lib -I"..\include" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:#{f1}.exe ' + cNoOutputNoError
+ cCode = "call "+exefolder()+"../src/locatevc.bat" + cNoOutputNoErrorWindows + nl +
+ 'cl #{f1}.c ..\lib\ring.lib -I"..\include" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:#{f1}.exe ' + cNoOutputNoErrorWindows
cCode = substr(cCode,"#{f1}",cFile)
cWindowsBatch = cFile+"_buildvc.bat"
write(cWindowsBatch,cCode)
@@ -201,8 +201,8 @@ func GenerateBatchStatic cFileName
../src/ring_ext.c ../src/ring_vmdll.c ../src/ring_objfile.c"
# Generate Windows Batch (Visual C/C++)
- cCode = "call "+exefolder()+"../src/locatevc.bat" + cNoOutputNoError + nl +
- 'cl #{f1}.c #{f2} -I"..\include" -I"../src/" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:#{f1}.exe' + cNoOutputNoError
+ cCode = "call "+exefolder()+"../src/locatevc.bat" + cNoOutputNoErrorWindows + nl +
+ 'cl #{f1}.c #{f2} -I"..\include" -I"../src/" /link /SUBSYSTEM:CONSOLE,"5.01" /OUT:#{f1}.exe' + cNoOutputNoErrorWindows
cCode = substr(cCode,"#{f1}",cFile)
cCode = substr(cCode,"#{f2}","..\lib\ringstatic.lib")
cWindowsBatch = cFile+"_buildvc.bat"
@@ -236,13 +236,17 @@ func GenerateBatchStatic cFileName
func ClearTempFiles
msg("Clear Temp. Files...")
if isWindows()
- system("cleartemp.bat" + cNoOutputNoError )
+ systemSilent("cleartemp.bat")
else
systemSilent("./cleartemp.sh")
ok
func SystemSilent cCmd
- system(cCmd + " > out.txt")
+ if isWindows()
+ system(cCmd + cNoOutputNoErrorWindows)
+ else
+ system(cCmd + cNoOutputNoErrorLinux)
+ ok
func msg cMsg
see "Ring2EXE: " + cMsg + nl
