|
|
@ -101,11 +101,20 @@ TQString KMCupsManager::driverDbCreationProgram()
|
|
|
|
TQString KMCupsManager::driverDirectory()
|
|
|
|
TQString KMCupsManager::driverDirectory()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString d = cupsInstallDir();
|
|
|
|
TQString d = cupsInstallDir();
|
|
|
|
if (d.isEmpty())
|
|
|
|
if (d.isEmpty()) {
|
|
|
|
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
|
|
|
|
d = "/usr/local";
|
|
|
|
|
|
|
|
#else
|
|
|
|
d = "/usr";
|
|
|
|
d = "/usr";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
d.append("/share/cups/model");
|
|
|
|
d.append("/share/cups/model");
|
|
|
|
// raw foomatic support
|
|
|
|
// raw foomatic support
|
|
|
|
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
|
|
|
|
d.append(":/usr/local/share/foomatic/db/source");
|
|
|
|
|
|
|
|
#else
|
|
|
|
d.append(":/usr/share/foomatic/db/source");
|
|
|
|
d.append(":/usr/share/foomatic/db/source");
|
|
|
|
|
|
|
|
#endif
|
|
|
|
return d;
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -627,7 +636,11 @@ DrMain* KMCupsManager::loadMaticDriver(const TQString& drname)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList comps = TQStringList::split('/', drname, false);
|
|
|
|
TQStringList comps = TQStringList::split('/', drname, false);
|
|
|
|
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
|
|
|
|
TQString tmpFile = locateLocal("tmp", "foomatic_" + kapp->randomString(8));
|
|
|
|
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
|
|
|
|
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/local/bin:/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
|
|
|
|
|
|
|
|
#else
|
|
|
|
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
|
|
|
|
TQString PATH = getenv("PATH") + TQString::fromLatin1(":/usr/sbin:/usr/local/sbin:/opt/sbin:/opt/local/sbin");
|
|
|
|
|
|
|
|
#endif
|
|
|
|
TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH);
|
|
|
|
TQString exe = TDEStandardDirs::findExe("foomatic-datafile", PATH);
|
|
|
|
if (exe.isEmpty())
|
|
|
|
if (exe.isEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -937,10 +950,15 @@ void KMCupsManager::exportDriver()
|
|
|
|
!m_currentprinter->isClass(true) && !m_currentprinter->isSpecial())
|
|
|
|
!m_currentprinter->isClass(true) && !m_currentprinter->isSpecial())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQString path = cupsInstallDir();
|
|
|
|
TQString path = cupsInstallDir();
|
|
|
|
if (path.isEmpty())
|
|
|
|
if (path.isEmpty()) {
|
|
|
|
|
|
|
|
#ifdef __OpenBSD__
|
|
|
|
|
|
|
|
path = "/usr/local/share/cups";
|
|
|
|
|
|
|
|
#else
|
|
|
|
path = "/usr/share/cups";
|
|
|
|
path = "/usr/share/cups";
|
|
|
|
else
|
|
|
|
#endif
|
|
|
|
|
|
|
|
} else {
|
|
|
|
path += "/share/cups";
|
|
|
|
path += "/share/cups";
|
|
|
|
|
|
|
|
}
|
|
|
|
CupsAddSmb::exportDest(m_currentprinter->printerName(), path);
|
|
|
|
CupsAddSmb::exportDest(m_currentprinter->printerName(), path);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|