//comm to navigator window defcomvar Px=;; /** getVoyagerVersionS [] S * retrive the Scol Voy@ger version * * return the Scol Voy@ger version in string **/ fun getVoyagerVersionS()= let strextr _getpack _checkpack "locked/etc/version.txt" -> lver in let sizelist lver -> size in let nil -> curver in let 0 -> i in ( while (i < size) && (curver == nil) do ( let nth_list lver i -> elem in if strcmpi "version" hd elem then nil else set curver = hd tl elem; set i = i + 1; ); curver; );; /** commandToAx [S S] I * send a command to navigator window * * return 0 **/ fun commandToAx(func, param)= _onX Px strcatn func::" "::param::nil []; 0;; fun getBoolString(b)= if b then "Yes" else "No";; fun ConfigTest(minNbProc, minRam, minVPprofile, minFPprofile)= //_showconsole; let _GETactiveXWindow _channel WN_CHILD|WN_NOBORDER "ConfigTest" -> axwin in let _CRwindow _channel axwin 0 0 10 10 WN_NOCAPTION|WN_NOBORDER "video test buffer" -> win in let SO3BufferCreate _channel win 0 0 10 10 -> buffer in let SO3GetGeneralInfo -> [vendeurCPU nameCPU nbProcesseurs RAM OS GraphicCard Driver versionDirectX] in let SO3GetRenderInfo -> [maxtex nonpow nonpowlimited automipmap cubemap geoprog vertprog fragprog comptex fixedfun] in ( if axwin == nil then nil else _setX _channel; _fooS strcat "Constructor : " vendeurCPU; _fooS strcat "Cpu : " nameCPU; _fooS strcat "Nb Cpu : " nbProcesseurs; _fooS strcat "RAM (32bits) : " RAM; _fooS strcat "OS : " OS; _fooS strcat "Graphic card : " GraphicCard; _fooS strcat "CG Driver : " Driver; _fooS strcat "DirectX version : " versionDirectX; _fooS strcat "Maximum textures : " getBoolString maxtex; _fooS strcat "Non power of two textures support : " getBoolString nonpow; _fooS strcat "Non power of two textures support limited : " getBoolString nonpowlimited; _fooS strcat "Auto mipmap support : " getBoolString automipmap; _fooS strcat "Cube map support : " getBoolString cubemap; _fooS strcat "Geometry programs support : " getBoolString geoprog; _fooS strcat "Vertex programs support : " getBoolString vertprog; _fooS strcat "Fragment programs support : " getBoolString fragprog; _fooS strcat "Textures compression support : " getBoolString comptex; _fooS strcat "Fixed functions support : " getBoolString fixedfun; _fooS strcatn "Vertex program profile support for "::minVPprofile::" : "::(getBoolString (SO3IsShaderProfileSupported minVPprofile))::nil; _fooS strcatn "Fragment program profile support for "::minFPprofile::" : "::(getBoolString (SO3IsShaderProfileSupported minFPprofile))::nil; let if ((atoi minNbProc) == nil) || ((atoi nbProcesseurs) >= (atoi minNbProc)) then 1 else 0 -> nbp in let if ((atoi minRam) == nil) || ((atoi RAM) >= (atoi minRam)) then 1 else 0 -> ramp in let if (minVPprofile == nil) || (SO3IsShaderProfileSupported minVPprofile) then 1 else 0 -> vpp in let if (minFPprofile == nil) || (SO3IsShaderProfileSupported minFPprofile) then 1 else 0 -> fpp in ( if (nbp && ramp && vpp && fpp) then ( _fooS "Configuration : valid"; if axwin == nil then nil else commandToAx "SystemCheck" "OK"; 1; ) else ( _fooS "Configuration : not valid"; if axwin == nil then nil else commandToAx "SystemCheck" "KO"; 0; ); _DSwindow win; ); );;