forum-msg-id-128553-edit

Original date:2015-08-22 05:33:01 Edited by: andi49 Subject: Re: eugtk history

euphoric said...
petelomax said...
euphoric said...

This fix works for me, EXCEPT, I'm getting a console window popping up with this message:

FIXME Windows GtkEngine.e line 146...151 

What is that? grin

GtkEngine.e said...
constant os_info = os:uname() 
    localhost = "127.0.0.1", 
 
ifdef UNIX then 
 export constant  
    os_architecture = os_info[5], -- e.g: x86_64 
    os_shell = getenv("SHELL"), -- e.g: /bin/bash 
    host_addr = inet_address() 
end ifdef 
 
ifdef WINDOWS then -- FIXME 
    display("FIXME Windows GtkEngine.e line 146..151")    -- *** here be that message! *** 
export constant 
    os_architecture = "unknown", 
    os_shell = "cmd.com", 
    host_addr = localhost 
 end ifdef 
  
object os_term = getenv("TERM") 
    if atom(os_term) then os_term = "none" end if 
 
ifdef WINDOWS then os_term = "CMD.COM" end ifdef 

Clearly a few of those values are untested on windows.

I have Euphoria code that identifies the Windows OS for another program I use. Do I need to plug it in here to fix this? Seems like that's what this needs, eh?

Thanks for the heads up, Pete!

Actually, Euphoria needs to know what OS it's running on. Doesn't it know that already?!?!

Hi

Something like this, it's only for 32bit and not really tested.

include std/net/dns.e 
include std/console.e 
include std/dll.e 
include std/machine.e 
 
 
-- PROCESSOR_ARCHITECTURE_AMD64=9 
-- PROCESSOR_ARCHITECTURE_ARM=5 
-- PROCESSOR_ARCHITECTURE_IA64=6 
-- PROCESSOR_ARCHITECTURE_INTEL=0 
-- PROCESSOR_ARCHITECTURE_UNKNOWN=0xffff 
 
sequence addr 
 
constant kernel=open_dll("kernel32.dll") 
constant GetSystemInfo=define_c_proc(kernel,"GetSystemInfo",{C_POINTER}) 
 
function GetArch() 
sequence arch="Unknown" 
atom SYSTEM_INFO=allocate(36)  
    c_proc(GetSystemInfo,{SYSTEM_INFO}) 
    if equal(peek2u(SYSTEM_INFO),0) then 
        arch="x86" 
    elsif equal(peek2u(SYSTEM_INFO),9) then 
        arch="AMD64" 
    end if 
    free(SYSTEM_INFO) 
    return arch 
end function 
 
function GetShell() 
    return getenv("COMSPEC") 
end function 
 
function GetLocalIp() 
    addr=host_by_addr("127.0.0.1")   
    addr=host_by_name(addr[1])       
    return(addr[3][1]) 
end function 
 
puts(1,GetArch()&"\n") 
puts(1,GetShell()&"\n") 
puts(1,GetLocalIp()&"\n") 
any_key() 

Andreas

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu