Exemplo n.º 1
0
int
TkpInit(
    Tcl_Interp *interp)
{
    TkCreateXEventSource();
    GetLibraryPath(interp);
    return TCL_OK;
}
Exemplo n.º 2
0
bool IsSteamVRRunning()
{
	char dllPath[MAX_PATH];
	GetLibraryPath(dllPath, MAX_PATH, "openvr_api.dll");
	HMODULE openvr = LoadLibraryA(dllPath);
	if (!openvr)
		return false;

	vr::EVRInitError err = vr::VRInitError_Unknown;
	VR_InitInternal2Ptr init = (VR_InitInternal2Ptr)GetProcAddress(openvr, "VR_InitInternal2");
	VR_ShutdownInternalPtr shutdown = (VR_ShutdownInternalPtr)GetProcAddress(openvr, "VR_ShutdownInternal");
	if (init)
		init(&err, vr::VRApplication_Background, nullptr);

	if (shutdown && err == vr::VRInitError_None)
		shutdown();

	FreeLibrary(openvr);
	return err == vr::VRInitError_None;
}
Exemplo n.º 3
0
bool MP3Exporter::FindLibrary(wxWindow *parent)
{
   mLibPath = gPrefs->Read("/MP3/MP3LibPath", "");

   if (mLibPath=="" || !::wxFileExists(mLibPath)) {
   
      int action = wxMessageBox(GetLibraryMessage(),
                                _("Export MP3"),
                                wxYES_NO | wxICON_EXCLAMATION,
                                parent);

      if (action == wxYES) {
         wxString question;
         question.Printf(_("Where is %s?"), (const char *)GetLibraryName());
         mLibPath = wxFileSelector(question, 
                                   GetLibraryPath(),        // Path
                                   GetLibraryName(),        // Name
                                   "",      // Extension
                                   GetLibraryTypeString(),
                                   wxOPEN, parent);
         
         if (mLibPath == "") {
            mLibPath = "";
            gPrefs->Write("/MP3/MP3LibPath", mLibPath);
         
            return false;
         }
         
         wxString path, baseName, extension;
         ::wxSplitPath(mLibPath, &path, &baseName, &extension);
         
         if (extension != "")
            baseName += "." + extension;
         
         if (baseName.CmpNoCase(GetLibraryName())) {
         
            wxString question;
            question.Printf(_("Audacity was expecting a library named \"%s\".  "
                              "Are you sure you want to attempt to export MP3 "
                              "files using \"%s\"?"),
                            (const char *)GetLibraryName(),
                            (const char *)baseName);

            int action = wxMessageBox(question,
                                      _("Export MP3"),
                                      wxYES_NO | wxICON_EXCLAMATION,
                                      parent);
            
            if (action != wxYES) {
               mLibPath = "";
               gPrefs->Write("/MP3/MP3LibPath", mLibPath);
            
               return false;
            }
         }
      }
      else {
         mLibPath = "";
         gPrefs->Write("/MP3/MP3LibPath", mLibPath);
            
         return false;
      }
      
      gPrefs->Write("/MP3/MP3LibPath", mLibPath);
   }
   
   return true;
}
Exemplo n.º 4
0
 std::string GetAbsolutePath()
 {
   return GetLibraryPath() + "/" + Prefix() + m_Name + Suffix();
 }
Exemplo n.º 5
0
 std::string GetAbsolutePath(const std::string& name)
 {
   return GetLibraryPath() + "/" + Prefix() + name + Suffix();
 }
Exemplo n.º 6
0
std::string SharedLibraryHandle::GetAbsolutePath()
{
  return GetLibraryPath() + "/" + Prefix() + m_Name + Suffix();
}
Exemplo n.º 7
0
std::string SharedLibraryHandle::GetAbsolutePath(const std::string& name)
{
  return GetLibraryPath() + "/" + Prefix() + name + Suffix();
}
Exemplo n.º 8
0
static CSysString GetLibraryFolderPrefix()
{
  CSysString path = GetLibraryPath();
  int pos = path.ReverseFind(TEXT(CHAR_PATH_SEPARATOR));
  return path.Left(pos + 1);
}