@ -216,6 +216,25 @@ static void WaitForDebuggerConnect( int argc, char *argv[], int time )
int main( int argc, char *argv[] )
{
char ld_path[4196];
char *path = "bin/";
char *ld_env;
if( (ld_env = getenv("LD_LIBRARY_PATH")) != NULL )
snprintf(ld_path, sizeof(ld_path), "%s:bin/", ld_env);
path = ld_path;
}
setenv("LD_LIBRARY_PATH", path, 1);
extern char** environ;
if( getenv("NO_EXECVE_AGAIN") == NULL )
setenv("NO_EXECVE_AGAIN", "1", 1);
execve(argv[0], argv, environ);
void *launcher = dlopen( "bin/liblauncher" DLL_EXT_STRING, RTLD_NOW );
if ( !launcher )
fprintf( stderr, "%s\nFailed to load the launcher\n", dlerror() );