| 524 | } |
| 525 | |
| 526 | QString GetDecodeScriptDir() |
| 527 | { |
| 528 | QString path = GetAppDataDir() + "/decoders"; |
| 529 | |
| 530 | QDir dir1; |
| 531 | // ./decoders |
| 532 | if (dir1.exists(path)) |
| 533 | { |
| 534 | return path; QColor GetStyleColor(); |
| 535 | } |
| 536 | |
| 537 | QDir dir(QCoreApplication::applicationDirPath()); |
| 538 | // ../share/libsigrokdecode4DSL/decoders |
| 539 | if (dir.cd("..") && dir.cd("share") && dir.cd("libsigrokdecode4DSL") && dir.cd("decoders")) |
| 540 | { |
| 541 | return dir.absolutePath(); |
| 542 | } |
| 543 | return ""; |
| 544 | } |
| 545 | |
| 546 | QString GetProfileDir() |
| 547 | { |