mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-12 09:33:37 +02:00
2021-02-24 Fred Gleason <fredg@paravelsystems.com>
* Updated build system to use Qt5 instead of Qt4. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
##
|
||||
## Use automake to process this into a Makefile.in
|
||||
|
||||
AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib @QT4_CFLAGS@ @MUSICBRAINZ_CFLAGS@
|
||||
AM_CPPFLAGS = -Wall -I$(top_srcdir)/lib -Wno-strict-aliasing -std=c++11 -fPIC @QT5_CFLAGS@ @MUSICBRAINZ_CFLAGS@
|
||||
LIBS = -L$(top_srcdir)/lib
|
||||
MOC = @QT_MOC@
|
||||
|
||||
@@ -37,27 +37,27 @@ bin_PROGRAMS = nexgen_filter\
|
||||
|
||||
dist_nexgen_filter_SOURCES = nexgen_filter.cpp nexgen_filter.h
|
||||
nodist_nexgen_filter_SOURCES = moc_nexgen_filter.cpp
|
||||
nexgen_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
nexgen_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
dist_panel_copy_SOURCES = panel_copy.cpp panel_copy.h
|
||||
nodist_panel_copy_SOURCES = moc_panel_copy.cpp
|
||||
panel_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
panel_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
dist_rdcatch_copy_SOURCES = rdcatch_copy.cpp rdcatch_copy.h
|
||||
nodist_rdcatch_copy_SOURCES = moc_rdcatch_copy.cpp
|
||||
rdcatch_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
rdcatch_copy_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
dist_rivendell_filter_SOURCES = rivendell_filter.cpp rivendell_filter.h
|
||||
nodist_rivendell_filter_SOURCES = moc_rivendell_filter.cpp
|
||||
rivendell_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
rivendell_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
dist_sas_filter_SOURCES = sas_filter.cpp sas_filter.h
|
||||
nodist_sas_filter_SOURCES = moc_sas_filter.cpp
|
||||
sas_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
sas_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
dist_wings_filter_SOURCES = wings_filter.cpp wings_filter.h
|
||||
nodist_wings_filter_SOURCES = moc_wings_filter.cpp
|
||||
wings_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
wings_filter_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT5_LIBS@ @MUSICBRAINZ_LIBS@
|
||||
|
||||
EXTRA_DIST = export_slax
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <QApplication>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
@@ -48,8 +48,7 @@ MainObject::MainObject(QObject *parent)
|
||||
// Read Command Options
|
||||
//
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"panel_copy",
|
||||
PANEL_COPY_USAGE);
|
||||
new RDCmdSwitch("panel_copy",PANEL_COPY_USAGE);
|
||||
delete cmd;
|
||||
|
||||
rd_config=new RDConfig(RD_CONF_FILE);
|
||||
@@ -59,22 +58,22 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Read Switches
|
||||
//
|
||||
for(int i=1;i<qApp->argc();i+=2) {
|
||||
for(int i=1;i<qApp->arguments().size();i+=2) {
|
||||
found=false;
|
||||
if(QString(qApp->argv()[i])=="-h") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-h") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"panel_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
src_hostname=qApp->argv()[i+1];
|
||||
src_hostname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(QString(qApp->argv()[i])=="-H") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-H") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"panel_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
dest_hostname=qApp->argv()[i+1];
|
||||
dest_hostname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!found) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// An RDCatch event copier.
|
||||
//
|
||||
// (C) Copyright 2002-2005,2016-2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include <dbversion.h>
|
||||
#include <rd.h>
|
||||
@@ -48,8 +48,7 @@ MainObject::MainObject(QObject *parent)
|
||||
// Read Command Options
|
||||
//
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdcatch_copy",
|
||||
RDCATCH_COPY_USAGE);
|
||||
new RDCmdSwitch("rdcatch_copy",RDCATCH_COPY_USAGE);
|
||||
delete cmd;
|
||||
|
||||
rd_config=new RDConfig(RD_CONF_FILE);
|
||||
@@ -59,38 +58,38 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Read Switches
|
||||
//
|
||||
for(int i=1;i<qApp->argc();i+=2) {
|
||||
for(int i=1;i<qApp->arguments().size();i+=2) {
|
||||
found=false;
|
||||
if(QString(qApp->argv()[i])=="-h") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-h") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"rdcatch_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
src_hostname=qApp->argv()[i+1];
|
||||
src_hostname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(QString(qApp->argv()[i])=="-s") { // Source Rivendell Host
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-s") { // Source Rivendell Host
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"rdcatch_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
src_station=qApp->argv()[i+1];
|
||||
src_station=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(QString(qApp->argv()[i])=="-H") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-H") { // Source mySQL Hostname
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"rdcatch_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
dest_hostname=qApp->argv()[i+1];
|
||||
dest_hostname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(QString(qApp->argv()[i])=="-S") { // Source Rivendell Host
|
||||
if((i+1)==qApp->argc()) {
|
||||
if(QString(qApp->arguments().at(i))=="-S") { // Source Rivendell Host
|
||||
if((i+1)==qApp->arguments().size()) {
|
||||
fprintf(stderr,"rdcatch_copy: invalid argument\n");
|
||||
exit(256);
|
||||
}
|
||||
dest_station=qApp->argv()[i+1];
|
||||
dest_station=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!found) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// A Library import filter for an external Rivendell system
|
||||
//
|
||||
// (C) Copyright 2002-2005,2008 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -24,10 +24,8 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qdir.h>
|
||||
//Added by qt3to4:
|
||||
#include <QSqlQuery>
|
||||
#include <QApplication>
|
||||
#include <QDir>
|
||||
|
||||
#include <rddb.h>
|
||||
#include <rd.h>
|
||||
@@ -75,8 +73,7 @@ MainObject::MainObject(QObject *parent)
|
||||
// Read Command Options
|
||||
//
|
||||
RDCmdSwitch *cmd=
|
||||
new RDCmdSwitch(qApp->argc(),qApp->argv(),"rivendell_filter",
|
||||
RIVENDELL_FILTER_USAGE);
|
||||
new RDCmdSwitch("rivendell_filter",RIVENDELL_FILTER_USAGE);
|
||||
delete cmd;
|
||||
|
||||
rdconfig=new RDConfig(RD_CONF_FILE);
|
||||
@@ -100,38 +97,38 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Read Arguments
|
||||
//
|
||||
for(int i=1;i<(qApp->argc()-1);i+=2) {
|
||||
for(int i=1;i<(qApp->arguments().size()-1);i+=2) {
|
||||
found=false;
|
||||
if(!strcmp("-h",qApp->argv()[i])) {
|
||||
ext_hostname=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-h") {
|
||||
ext_hostname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-u",qApp->argv()[i])) {
|
||||
ext_username=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-u") {
|
||||
ext_username=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-p",qApp->argv()[i])) {
|
||||
ext_password=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-p") {
|
||||
ext_password=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-A",qApp->argv()[i])) {
|
||||
ext_audiodir=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-A") {
|
||||
ext_audiodir=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-g",qApp->argv()[i])) {
|
||||
default_group=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-g") {
|
||||
default_group=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-s",qApp->argv()[i])) {
|
||||
start_cartnum=QString(qApp->argv()[i+1]).toUInt(&ok);
|
||||
if(qApp->arguments().at(i)=="-s") {
|
||||
start_cartnum=QString(qApp->arguments().at(i+1)).toUInt(&ok);
|
||||
if(!ok) {
|
||||
fprintf(stderr,"\nrivendell_filter: invalid group number\n");
|
||||
exit(256);
|
||||
}
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-e",qApp->argv()[i])) {
|
||||
end_cartnum=QString(qApp->argv()[i+1]).toUInt(&ok);
|
||||
if(qApp->arguments().at(i)=="-e") {
|
||||
end_cartnum=QString(qApp->arguments().at(i+1)).toUInt(&ok);
|
||||
if(!ok) {
|
||||
fprintf(stderr,"\nrivendell_filter: invalid group number\n");
|
||||
exit(256);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// An RDCatch event import filter for the SAS64000
|
||||
//
|
||||
// (C) Copyright 2002-2004,2018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2 as
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <QApplication>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
@@ -64,12 +64,14 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Read Switches
|
||||
//
|
||||
if((qApp->argc()==2)&&(!strcmp(qApp->argv()[1],"-d"))) { // Delete List
|
||||
if((qApp->arguments().size()==2)&& // Delete List
|
||||
(qApp->arguments().at(1)=="-d")) {
|
||||
DeleteList();
|
||||
filter_connect->reset();
|
||||
exit(0);
|
||||
}
|
||||
if((qApp->argc()==3)&&(!strcmp(qApp->argv()[1],"-i"))) { // Insert List
|
||||
if((qApp->arguments().size()==3)&& // Insert List
|
||||
(qApp->arguments().at(1)=="-i")) {
|
||||
InsertList();
|
||||
filter_connect->reset();
|
||||
exit(0);
|
||||
@@ -84,12 +86,13 @@ void MainObject::InsertList()
|
||||
char line[256];
|
||||
int count=0;
|
||||
|
||||
FILE *fh=fopen(qApp->argv()[2],"r");
|
||||
FILE *fh=fopen(qApp->arguments().at(2).toUtf8(),"r");
|
||||
if(fh==NULL) {
|
||||
perror("sas_filter");
|
||||
exit(1);
|
||||
}
|
||||
printf("Importing events from %s...",qApp->argv()[2]);
|
||||
printf("Importing events from %s...",
|
||||
qApp->arguments().at(2).toUtf8().constData());
|
||||
fflush(0);
|
||||
while(fgets(line,256,fh)!=NULL) {
|
||||
if(strlen(line)==79) {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <QApplication>
|
||||
|
||||
#include <rd.h>
|
||||
#include <rdapplication.h>
|
||||
@@ -64,22 +64,22 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Read Arguments
|
||||
//
|
||||
for(int i=1;i<(qApp->argc()-1);i+=2) {
|
||||
for(int i=1;i<(qApp->arguments().size()-1);i+=2) {
|
||||
found=false;
|
||||
if(!strcmp("-d",qApp->argv()[i])) {
|
||||
dbname=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-d") {
|
||||
dbname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-A",qApp->argv()[i])) {
|
||||
audiodir=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-A") {
|
||||
audiodir=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-g",qApp->argv()[i])) {
|
||||
groupname=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-g") {
|
||||
groupname=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!strcmp("-e",qApp->argv()[i])) {
|
||||
audio_extension=qApp->argv()[i+1];
|
||||
if(qApp->arguments().at(i)=="-e") {
|
||||
audio_extension=qApp->arguments().at(i+1);
|
||||
found=true;
|
||||
}
|
||||
if(!found) {
|
||||
|
||||
Reference in New Issue
Block a user