* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef ENABLE_DECODE
#include <libsigrokdecode/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#endif
#include <stdint.h>
#include <libsigrok/libsigrok.h>
#include "config.h"
+#ifdef _WIN32
+// The static qsvg lib is required for SVG graphics/icons (on Windows).
+#include <QtPlugin>
+Q_IMPORT_PLUGIN(qsvg)
+#endif
+
void usage()
{
fprintf(stdout,
{
const int loglevel = atoi(optarg);
sr_log_loglevel_set(loglevel);
+
+#ifdef ENABLE_DECODE
srd_log_loglevel_set(loglevel);
+#endif
break;
}
do {
+#ifdef ENABLE_DECODE
// Initialise libsigrokdecode
if (srd_init(NULL) != SRD_OK) {
qDebug() << "ERROR: libsigrokdecode init failed.";
// Load the protocol decoders
srd_decoder_load_all();
+#endif
try {
// Create the device manager, initialise the drivers
qDebug() << e.what();
}
+#ifdef ENABLE_DECODE
// Destroy libsigrokdecode
srd_exit();
+#endif
} while (0);