Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (67 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines

Report message:*
 

run external programm the same when main one running from shell and icon

Subject: run external programm the same when main one running from shell and icon
by kas1e on 2019/2/26 12:04:52

Have that piece of code:

int launch_command(const char *command) {
#ifdef USE_WIN
       
ShellExecute(NULL,"open",command,NULL,NULL,SW_SHOWNORMAL);
       return (
0);
#elif defined(__amigaos4__)
       
BPTR in IDOS->DupFileHandle(IDOS->Input()); 
       
BPTR out IDOS->DupFileHandle(IDOS->Output()); 

       return 
IDOS->SystemTags(command,
                 
SYS_Asynch,TRUE
                 
SYS_Input,in
                 
SYS_Output,out
                 
TAG_DONE);
#else
    
return system(command);
#endif
}


So, when i want to run external command (such as odyssey for example), then, when i run main binary from the shell all works fine and odyssey runs fine. But when i run main binary from the icon (workbench type), then it says "odyssey: Unknown command"

Should i adapt code somehow so it will works and when i run it from icon workbench type too ?

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project