Lines Matching refs:basedir
314 /* check if basedir is a valid build dir by checking for wineserver and ntdll */
316 static inline int is_valid_build_dir( char *basedir, int baselen )
320 strcpy( basedir + baselen, "/server/wineserver" );
321 if (stat( basedir, &st ) == -1) return 0; /* no wineserver found */
323 strcpy( basedir + baselen, "/dlls/ntdll/ntdll.dll.so" );
324 if (stat( basedir, &st ) == -1) return 0; /* no ntdll found */
326 basedir[baselen] = 0;
331 static char *running_from_build_dir( const char *basedir )
336 /* remove last component from basedir */
337 p = basedir + strlen(basedir) - 1;
338 while (p > basedir && *p == '/') p--;
339 while (p > basedir && *p != '/') p--;
340 if (p == basedir) return NULL;
341 path = xmalloc( p - basedir + sizeof("/dlls/ntdll/ntdll.dll.so") );
342 memcpy( path, basedir, p - basedir );
344 if (!is_valid_build_dir( path, p - basedir ))
347 while (p > basedir && *p == '/') p--;
348 while (p > basedir && *p != '/') p--;
349 if (p == basedir || !is_valid_build_dir( path, p - basedir ))