Hi,
Is possible detect in some way if mIRC is running under Wine?
This is what I need.
if (!$wine) {
;; Some commands for windows only, like $com
}
Thanks
I'm not familiar with running mIRC under Wine, but what do $os return?
$os most likely returns some version of Windows as it's emulating Windows.
I'm not sure what a good way of doing that would be, though you could "hack" it by seeing if certain COMs work or other things that aren't emulated completely. Of course, if those are ever emulated all the way, it will stop working. Maybe checking what processes are running (if Wine even allows that) would work and if the Wine program is running, then you know it's using Wine.
alias IsWine {
.comopen winetest WbemScripting.SWbemLocator
if ($com(winetest)) { .comclose winetest }
return $comerr
}
alias test {
if ($IsWine) { echo -st Running under Wine @ $OS }
else { echo -st Running under Windows $OS }
}
I'm not sure if it will be acurate all times, but atm is working for me...