From b0a99abc2813b1b27a98c0613cd9e627cb67158d Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 17 Oct 2018 16:03:19 -0700 Subject: [PATCH 01/12] Fixed bug where wrong ID was used for local maintenance --- rdservice/maint_routines.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rdservice/maint_routines.cpp b/rdservice/maint_routines.cpp index 75b1e30e..8f5c3cd3 100644 --- a/rdservice/maint_routines.cpp +++ b/rdservice/maint_routines.cpp @@ -93,7 +93,7 @@ void MainObject::RunSystemMaintRoutine() void MainObject::RunLocalMaintRoutine() { - RunEphemeralProcess(RDSERVICE_SYSTEMMAINT_ID, + RunEphemeralProcess(RDSERVICE_LOCALMAINT_ID, QString(RD_PREFIX)+"/bin/rdmaint",QStringList()); rda->log(RDConfig::LogInfo,"ran local maintenance routines"); From af08cc78536b9d86fbf411692ea6525bbdc8e155 Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 17 Oct 2018 16:07:58 -0700 Subject: [PATCH 02/12] Updated ChangeLog --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1697f9ed..c4319fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17811,3 +17811,7 @@ * Disabled the 'More than half the audio will be faded...' warning in the 'Edit Audio' dialog in rdlibrary(1) if the 'No Fade on Segue Out' checkbox is ticked. +2018-10-17 Patrick Linstruth + * Fixed bug in rdservice(8) where local maintence process was started + with RDSERVICE_SYSTEMMAINT_ID instead of RDSERVICE_LOCALMAINT_ID. + From e7c13dbf6360b90b4907cd6da0d8c200c47cd2b5 Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 17 Oct 2018 21:52:43 -0700 Subject: [PATCH 03/12] Added ability to run macros from cart list with "Run Macro" button --- rdlibrary/rdlibrary.cpp | 67 ++++++++++++++++++++++++++++++++++++++--- rdlibrary/rdlibrary.h | 3 ++ 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/rdlibrary/rdlibrary.cpp b/rdlibrary/rdlibrary.cpp index 21311d89..00c81f5d 100644 --- a/rdlibrary/rdlibrary.cpp +++ b/rdlibrary/rdlibrary.cpp @@ -427,6 +427,16 @@ MainWidget::MainWidget(QWidget *parent) lib_delete_button->setEnabled(false); connect(lib_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); + // + // Run Macro Button + // + lib_macro_button=new QPushButton(this); + lib_macro_button->setFont(button_font); + lib_macro_button->setText(tr("Run\n&Macro")); + lib_macro_button->setEnabled(false); + lib_macro_button->setVisible(false); + connect(lib_macro_button,SIGNAL(clicked()),this,SLOT(macroData())); + // // Disk Gauge // @@ -500,6 +510,11 @@ MainWidget::MainWidget(QWidget *parent) lib_resize=true; + // + // Create RDMacroEvent for running macros + // + lib_macro_events=new RDMacroEvent(rda->station()->address(),rda->ripc(),this); + LoadGeometry(); } @@ -727,6 +742,27 @@ void MainWidget::editData() } +void MainWidget::macroData() +{ + Q3ListViewItemIterator *it; + Q3ListViewItem *item; + + it=new Q3ListViewItemIterator(lib_cart_list); + while(it->current()) { + if (it->current()->isSelected()) { + item=it->current(); + RDCart *rdcart=new RDCart(item->text(Cart).toUInt()); + lib_macro_events->clear(); + lib_macro_events->load(rdcart->macros()); + lib_macro_events->exec(); + delete rdcart; + break; + } + ++(*it); + } + delete it; +} + void MainWidget::deleteData() { QString filename; @@ -900,17 +936,37 @@ void MainWidget::cartClickedData() } if(play_count==1) { - lib_player->setCart(item->text(Cart)); - lib_player->playButton()->setEnabled(true); - lib_player->stopButton()->setEnabled(true); - if(lib_player->isPlaying()) { - lib_player->play(); + RDCart *rdcart=new RDCart(item->text(Cart).toUInt()); + if(rdcart->type()==RDCart::Macro) { + lib_macro_button->setEnabled(true); + lib_macro_button->setVisible(true); + lib_player->playButton()->setEnabled(false); + lib_player->stopButton()->setEnabled(false); + lib_player->playButton()->setVisible(false); + lib_player->stopButton()->setVisible(false); } + else { + lib_player->setCart(item->text(Cart)); + lib_player->playButton()->setEnabled(true); + lib_player->stopButton()->setEnabled(true); + lib_player->playButton()->setVisible(true); + lib_player->stopButton()->setVisible(true); + lib_macro_button->setEnabled(false); + lib_macro_button->setVisible(false); + if(lib_player->isPlaying()) { + lib_player->play(); + } + } + delete rdcart; } else { lib_player->stop(); lib_player->playButton()->setEnabled(false); lib_player->stopButton()->setEnabled(false); + lib_player->playButton()->setVisible(true); + lib_player->stopButton()->setVisible(true); + lib_macro_button->setEnabled(false); + lib_macro_button->setVisible(false); } if(sel_count) { @@ -1068,6 +1124,7 @@ void MainWidget::resizeEvent(QResizeEvent *e) setGeometry(e->size().width()-200,e->size().height()-60,80,50); lib_close_button->setGeometry(e->size().width()-90,e->size().height()-60, 80,50); + lib_macro_button->setGeometry(290,e->size().height()-60,80,50); lib_player->playButton()->setGeometry(290,e->size().height()-60,80,50); lib_player->stopButton()->setGeometry(380,e->size().height()-60,80,50); } diff --git a/rdlibrary/rdlibrary.h b/rdlibrary/rdlibrary.h index c7b3d90b..e7699fe4 100644 --- a/rdlibrary/rdlibrary.h +++ b/rdlibrary/rdlibrary.h @@ -85,6 +85,7 @@ class MainWidget : public QWidget void addData(); void editData(); void deleteData(); + void macroData(); void ripData(); void reportsData(); void cartOnItemData(Q3ListViewItem *item); @@ -138,6 +139,8 @@ class MainWidget : public QWidget QPushButton *lib_rip_button; QPushButton *lib_reports_button; QPushButton *lib_close_button; + QPushButton *lib_macro_button; + RDMacroEvent *lib_macro_events; RDSimplePlayer *lib_player; int lib_output_card; int lib_output_port; From 885db45ad8278383b39aee65f7de6005a0e8721a Mon Sep 17 00:00:00 2001 From: Patrick Linstruth Date: Wed, 17 Oct 2018 21:54:46 -0700 Subject: [PATCH 04/12] Updated ChangeLog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 62e0db64..7172890e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17823,3 +17823,5 @@ * Added talk (intro) column to cart list view in rdlibrary(1) * Added ability to expand cart to view individual cuts in rdlibrary(1) * Added play/stop buttons to cart list in rdlibrary(1) +2018-10-17 Patrick Linstruth + * Added ability to run macros from cart list view in rdlibrary(1) From 23edcf4f746633733f026c4eb978151ce374d114 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 18 Oct 2018 10:21:48 -0400 Subject: [PATCH 05/12] Updated translations --- rdlibrary/rdlibrary_cs.ts | 5 +++++ rdlibrary/rdlibrary_de.ts | 5 +++++ rdlibrary/rdlibrary_es.ts | 5 +++++ rdlibrary/rdlibrary_fr.ts | 5 +++++ rdlibrary/rdlibrary_nb.ts | 5 +++++ rdlibrary/rdlibrary_nn.ts | 5 +++++ rdlibrary/rdlibrary_pt_BR.ts | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/rdlibrary/rdlibrary_cs.ts b/rdlibrary/rdlibrary_cs.ts index 4209bafc..1f084b7c 100644 --- a/rdlibrary/rdlibrary_cs.ts +++ b/rdlibrary/rdlibrary_cs.ts @@ -1482,6 +1482,11 @@ Přesto smazat? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_de.ts b/rdlibrary/rdlibrary_de.ts index dbf9cc7a..40cbff1e 100644 --- a/rdlibrary/rdlibrary_de.ts +++ b/rdlibrary/rdlibrary_de.ts @@ -1459,6 +1459,11 @@ verwendet. Trotzdem löschen? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_es.ts b/rdlibrary/rdlibrary_es.ts index b76e554a..08c96756 100644 --- a/rdlibrary/rdlibrary_es.ts +++ b/rdlibrary/rdlibrary_es.ts @@ -1468,6 +1468,11 @@ Do you still want to delete it? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_fr.ts b/rdlibrary/rdlibrary_fr.ts index 74fb459a..d151ba08 100644 --- a/rdlibrary/rdlibrary_fr.ts +++ b/rdlibrary/rdlibrary_fr.ts @@ -1176,6 +1176,11 @@ Do you still want to delete it? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_nb.ts b/rdlibrary/rdlibrary_nb.ts index 5c81788a..b5bb55c4 100644 --- a/rdlibrary/rdlibrary_nb.ts +++ b/rdlibrary/rdlibrary_nb.ts @@ -1455,6 +1455,11 @@ Vil du sletta ho likevel? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_nn.ts b/rdlibrary/rdlibrary_nn.ts index 5c81788a..b5bb55c4 100644 --- a/rdlibrary/rdlibrary_nn.ts +++ b/rdlibrary/rdlibrary_nn.ts @@ -1455,6 +1455,11 @@ Vil du sletta ho likevel? Talk + + Run +&Macro + + RecordCut diff --git a/rdlibrary/rdlibrary_pt_BR.ts b/rdlibrary/rdlibrary_pt_BR.ts index 4d92c33b..2021d197 100644 --- a/rdlibrary/rdlibrary_pt_BR.ts +++ b/rdlibrary/rdlibrary_pt_BR.ts @@ -1457,6 +1457,11 @@ Você ainda quer deletá-lo? Talk + + Run +&Macro + + RecordCut From 0ba8622147e4c2344a4d73bf764f01c8b7dcccad Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 18 Oct 2018 11:37:46 -0400 Subject: [PATCH 06/12] 2018-10-18 Fred Gleason * Tweaked the position of buttons on the bottom row of the main screen of rdlibrary(1). * Changed the minimum size of the main screen of rdlibrary to 850x600. --- ChangeLog | 5 +++++ rdlibrary/rdlibrary.cpp | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index edb2ca64..c9cfd7d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17828,3 +17828,8 @@ 2018-10-17 Patrick Linstruth * Fixed bug in rdservice(8) where local maintence process was started with RDSERVICE_SYSTEMMAINT_ID instead of RDSERVICE_LOCALMAINT_ID. +2018-10-18 Fred Gleason + * Tweaked the position of buttons on the bottom row of the main + screen of rdlibrary(1). + * Changed the minimum size of the main screen of rdlibrary to + 850x600. diff --git a/rdlibrary/rdlibrary.cpp b/rdlibrary/rdlibrary.cpp index 00c81f5d..830e2b80 100644 --- a/rdlibrary/rdlibrary.cpp +++ b/rdlibrary/rdlibrary.cpp @@ -521,7 +521,7 @@ MainWidget::MainWidget(QWidget *parent) QSize MainWidget::sizeHint() const { - return QSize(800,600); + return QSize(850,600); } @@ -1115,18 +1115,18 @@ void MainWidget::resizeEvent(QResizeEvent *e) lib_add_button->setGeometry(10,e->size().height()-60,80,50); lib_edit_button->setGeometry(100,e->size().height()-60,80,50); lib_delete_button->setGeometry(190,e->size().height()-60,80,50); - disk_gauge->setGeometry(475,e->size().height()-55, - e->size().width()-775, - disk_gauge->sizeHint().height()); - lib_rip_button-> - setGeometry(e->size().width()-290,e->size().height()-60,80,50); - lib_reports_button-> - setGeometry(e->size().width()-200,e->size().height()-60,80,50); - lib_close_button->setGeometry(e->size().width()-90,e->size().height()-60, - 80,50); lib_macro_button->setGeometry(290,e->size().height()-60,80,50); lib_player->playButton()->setGeometry(290,e->size().height()-60,80,50); lib_player->stopButton()->setGeometry(380,e->size().height()-60,80,50); + disk_gauge->setGeometry(475,e->size().height()-55, + e->size().width()-765, + disk_gauge->sizeHint().height()); + lib_rip_button-> + setGeometry(e->size().width()-280,e->size().height()-60,80,50); + lib_reports_button-> + setGeometry(e->size().width()-190,e->size().height()-60,80,50); + lib_close_button->setGeometry(e->size().width()-90,e->size().height()-60, + 80,50); } } From 6945d54cab57be3347c9a143e8b99fc503e7794d Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Thu, 18 Oct 2018 17:18:52 -0400 Subject: [PATCH 07/12] 2018-10-18 Fred Gleason * Fixed a regression in rdmaint(8) that broke cut rehashing. --- ChangeLog | 2 ++ utils/rdmaint/Makefile.am | 2 ++ utils/rdmaint/rdmaint.cpp | 28 +++++++++++++--------------- utils/rdmaint/rdmaint.h | 4 ++++ 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9cfd7d4..3978e4a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17833,3 +17833,5 @@ screen of rdlibrary(1). * Changed the minimum size of the main screen of rdlibrary to 850x600. +2018-10-18 Fred Gleason + * Fixed a regression in rdmaint(8) that broke cut rehashing. diff --git a/utils/rdmaint/Makefile.am b/utils/rdmaint/Makefile.am index 8c62a5f3..aedd0a7e 100644 --- a/utils/rdmaint/Makefile.am +++ b/utils/rdmaint/Makefile.am @@ -29,6 +29,8 @@ bin_PROGRAMS = rdmaint dist_rdmaint_SOURCES = rdmaint.cpp rdmaint.h +nodist_rdmaint_SOURCES = moc_rdmaint.cpp + rdmaint_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ -lQt3Support CLEANFILES = *~\ diff --git a/utils/rdmaint/rdmaint.cpp b/utils/rdmaint/rdmaint.cpp index 31987c44..c4d19e21 100644 --- a/utils/rdmaint/rdmaint.cpp +++ b/utils/rdmaint/rdmaint.cpp @@ -47,8 +47,6 @@ MainObject::MainObject(QObject *parent) :QObject(parent) { - QString sql; - RDSqlQuery *q; QString err_msg; // @@ -92,23 +90,22 @@ MainObject::MainObject(QObject *parent) } // - // Get User + // RIPC Connection // - sql="select LOGIN_NAME from USERS where ADMIN_CONFIG_PRIV=\"Y\""; - q=new RDSqlQuery(sql); - if(!q->first()) { - fprintf(stderr,"unable to find valid user\n"); - exit(256); - } - delete q; + connect(rda,SIGNAL(userChanged()),this,SLOT(userData())); + rda->ripc()-> + connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password()); +} + +void MainObject::userData() +{ if(maint_system) { RunSystemMaintenance(); } else { RunLocalMaintenance(); } - exit(0); } @@ -358,7 +355,6 @@ void MainObject::RehashCuts() sql="select CUT_NAME from CUTS where SHA1_HASH is null limit 100"; q=new RDSqlQuery(sql); while(q->next()) { - printf("CUT: %s\n",(const char *)q->value(0).toString()); if((err=RDRehash::rehash(rda->station(),rda->user(),rda->config(), RDCut::cartNumber(q->value(0).toString()), RDCut::cutNumber(q->value(0).toString())))!=RDRehash::ErrorOk) { @@ -369,9 +365,11 @@ void MainObject::RehashCuts() (const char *)RDRehash::errorText(err))); } - if(maint_verbose) { - fprintf(stderr,"rehashed cut \"%s\"\n", - (const char *)q->value(0).toString()); + else { + if(maint_verbose) { + fprintf(stderr,"rehashed cut \"%s\"\n", + (const char *)q->value(0).toString()); + } } sleep(1); } diff --git a/utils/rdmaint/rdmaint.h b/utils/rdmaint/rdmaint.h index 4ef8c7cf..25f38b04 100644 --- a/utils/rdmaint/rdmaint.h +++ b/utils/rdmaint/rdmaint.h @@ -27,9 +27,13 @@ class MainObject : public QObject { + Q_OBJECT; public: MainObject(QObject *parent=0); + private slots: + void userData(); + private: void RunSystemMaintenance(); void RunLocalMaintenance(); From bb5fcb6400c6ed2e308b121e8c228cfcc98bcf49 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 19 Oct 2018 12:12:10 -0400 Subject: [PATCH 08/12] 2018-10-19 Fred Gleason * Added code in the %post and %preun rules in 'rivendell.spec.in' to enable and disable the 'rivendell' service. --- ChangeLog | 3 +++ rivendell.spec.in | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3978e4a1..53e92aaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17835,3 +17835,6 @@ 850x600. 2018-10-18 Fred Gleason * Fixed a regression in rdmaint(8) that broke cut rehashing. +2018-10-19 Fred Gleason + * Added code in the %post and %preun rules in 'rivendell.spec.in' + to enable and disable the 'rivendell' service. diff --git a/rivendell.spec.in b/rivendell.spec.in index da3f65b1..4520b135 100644 --- a/rivendell.spec.in +++ b/rivendell.spec.in @@ -177,6 +177,7 @@ if test ! -e /etc/asound.conf ; then fi @LOCAL_PREFIX@/sbin/rddbmgr --modify /bin/systemctl restart rivendell +/bin/systemctl enable rivendell if test "@DISTRO@" = "suse" ; then /etc/init.d/apache2 restart insserv -d -f /etc/init.d/apache2 /etc/init.d/rivendell $MYSQL_INIT @@ -205,6 +206,7 @@ if test "$1" = "0" ; then fi if test "@DISTRO@" = "redhat" ; then /bin/systemctl disable rivendell + /bin/systemctl stop rivendell fi fi exit 0 From 83bd2dcd77725d4583bd813696028c7dc969e61a Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 19 Oct 2018 15:26:14 -0400 Subject: [PATCH 09/12] 2018-10-19 Fred Gleason * Modified rdservice(8) to log errors to syslog. * Added an rdservice(8) man page. * Modified 'systemd/rivendell.service.in' to enable automatic start retries. --- ChangeLog | 5 +++ docs/manpages/Makefile.am | 10 +++-- docs/manpages/rdservice.xml | 87 ++++++++++++++++++++++++++++++++++++ rdservice/rdservice.cpp | 21 ++++++--- rdservice/startup.cpp | 83 +--------------------------------- rivendell.spec.in | 1 + systemd/rivendell.service.in | 3 ++ 7 files changed, 120 insertions(+), 90 deletions(-) create mode 100644 docs/manpages/rdservice.xml diff --git a/ChangeLog b/ChangeLog index 53e92aaf..68409409 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17838,3 +17838,8 @@ 2018-10-19 Fred Gleason * Added code in the %post and %preun rules in 'rivendell.spec.in' to enable and disable the 'rivendell' service. +2018-10-19 Fred Gleason + * Modified rdservice(8) to log errors to syslog. + * Added an rdservice(8) man page. + * Modified 'systemd/rivendell.service.in' to enable automatic + start retries. diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am index f822221f..f4b74b7e 100644 --- a/docs/manpages/Makefile.am +++ b/docs/manpages/Makefile.am @@ -38,7 +38,8 @@ all-local: rdclilogedit.1\ rdimport.1\ rdmarkerset.8\ rdrender.1\ - rmlsend.1 + rmlsend.1\ + rdservice.8 man_MANS = rdclilogedit.1\ rdconvert.1\ @@ -47,7 +48,8 @@ man_MANS = rdclilogedit.1\ rdimport.1\ rdmarkerset.8\ rdrender.1\ - rmlsend.1 + rmlsend.1\ + rdservice.8 EXTRA_DIST = rdclilogedit.1\ rdclilogedit.xml\ @@ -64,7 +66,9 @@ EXTRA_DIST = rdclilogedit.1\ rdrender.1\ rdrender.xml\ rmlsend.1\ - rmlsend.xml + rmlsend.xm\ + rdservice.8\ + rdservice.xml CLEANFILES = *~ MAINTAINERCLEANFILES = *~\ diff --git a/docs/manpages/rdservice.xml b/docs/manpages/rdservice.xml new file mode 100644 index 00000000..a9ba9117 --- /dev/null +++ b/docs/manpages/rdservice.xml @@ -0,0 +1,87 @@ + + + + + rdservice + 8 + October 2018 + Linux Audio Manual + + + rdservice + Rivendell service manager + + + + + Fred + Gleason + fredg@paravelsystems.com + + Application Author + + + + + + + rdservice + + + + + Description + + rdservice8 manages the various + background service components of the Rivendell Radio Automation + System, including caed8, + rdcatchd8, + ripcd8, + rdvairplayd8, + rdimport1 (in dropbox mode) + as well as periodic system maintenance tasks using + rdmaint8. + It is normally invoked by the host's boot system + (such as Systemd) at system boot-time and runs continuously thereafter. + There should only be one instance of + rdservice8 running at any + given time; attempts to start an additional instance will terminate + with exit code 1. + + + + Exit Values + + + + + + + + 0Normal shutdown + 1Prior instance found + 2Unable to open database + 3Unable to start a service component + + + + + See Also + + + rddbmgr8 + + , + + rdimport1 + + + + + + + diff --git a/rdservice/rdservice.cpp b/rdservice/rdservice.cpp index 378d2ad6..86620bb0 100644 --- a/rdservice/rdservice.cpp +++ b/rdservice/rdservice.cpp @@ -56,11 +56,16 @@ MainObject::MainObject(QObject *parent) { QString err_msg; + // + // Open the syslog + // + openlog("rdservice",LOG_PERROR,LOG_DAEMON); + // // Check for prior instance // if(RDGetPids("rdservice").size()>1) { - fprintf(stderr,"rdservice: prior instance found\n"); + syslog(LOG_ERR,"prior instance found"); exit(1); } @@ -69,8 +74,9 @@ MainObject::MainObject(QObject *parent) // rda=new RDApplication("rdservice","rdservice","\n\n",this); if(!rda->open(&err_msg)) { - fprintf(stderr,"rdservice: %s\n",(const char *)err_msg.utf8()); - exit(1); + syslog(LOG_ERR,"unable to open database [%s]", + (const char *)err_msg.utf8()); + exit(2); } // @@ -85,8 +91,9 @@ MainObject::MainObject(QObject *parent) if(!Startup(&err_msg)) { Shutdown(); - fprintf(stderr,"rdservice: %s\n",(const char *)err_msg.toUtf8()); - exit(1); + syslog(LOG_ERR,"unable to start service component [%s]", + (const char *)err_msg.toUtf8()); + exit(3); } // @@ -105,7 +112,8 @@ MainObject::MainObject(QObject *parent) } if(!RDWritePid(RD_PID_DIR,"rdservice.pid",getuid())) { - fprintf(stderr,"rdservice: can't write pid file\n"); + syslog(LOG_WARNING,"unable to write pid file to \"%s/rdservice.pid\"", + RD_PID_DIR); } } @@ -124,6 +132,7 @@ void MainObject::exitData() if(global_exiting) { Shutdown(); RDDeletePid(RD_PID_DIR,"rdservice.pid"); + syslog(LOG_DEBUG,"shutting down normally"); exit(0); } diff --git a/rdservice/startup.cpp b/rdservice/startup.cpp index 00b6efe7..02178d74 100644 --- a/rdservice/startup.cpp +++ b/rdservice/startup.cpp @@ -232,85 +232,6 @@ bool MainObject::StartDropboxes(QString *err_msg) return false; } id++; - - - - /* - QString cmd=QString(). - sprintf("nice rdimport --persistent-dropbox-id=%d --drop-box --log-mode", - q->value(15).toInt()); - sql=QString("select SCHED_CODE from DROPBOX_SCHED_CODES where ")+ - QString().sprintf("DROPBOX_ID=%d",q->value(0).toInt()); - q1=new RDSqlQuery(sql); - while(q1->next()) { - cmd+=QString(" --add-scheduler-code=\"")+q1->value(0).toString()+"\""; - } - delete q1; - cmd+= - QString().sprintf(" --normalization-level=%d",q->value(3).toInt()/100); - cmd+= - QString().sprintf(" --autotrim-level=%d",q->value(4).toInt()/100); - if(q->value(5).toUInt()>0) { - cmd+=QString().sprintf(" --to-cart=%u",q->value(5).toUInt()); - } - if(q->value(6).toString()=="Y") { - cmd+=" --use-cartchunk-cutid"; - } - if(q->value(21).toInt()<1) { - cmd+= - QString().sprintf(" --segue-level=%d",q->value(21).toInt()); - cmd+= - QString().sprintf(" --segue-length=%u",q->value(22).toUInt()); - } - if(q->value(7).toString()=="Y") { - cmd+=" --title-from-cartchunk-cutid"; - } - if(q->value(8).toString()=="Y") { - cmd+=" --delete-cuts"; - } - if(q->value(20).toString()=="Y") { - cmd+=" --to-mono"; - } - if(!q->value(9).toString().isEmpty()) { - cmd+=QString().sprintf(" \"--metadata-pattern=%s\"", - (const char *)q->value(9).toString()); - } - if(q->value(10).toString()=="Y") { - cmd+=" --fix-broken-formats"; - } - if(q->value(12).toString()=="Y") { - cmd+=" --delete-source"; - } - if(q->value(16).toString()=="Y") { - cmd+=QString().sprintf(" --create-startdate-offset=%d", - q->value(17).toInt()); - cmd+=QString().sprintf(" --create-enddate-offset=%d", - q->value(18).toInt()); - } - if(!q->value(19).toString().isEmpty()) { - cmd+=" --set-user-defined="+RDEscapeString(q->value(19).toString()); - } - cmd+=QString().sprintf(" --startdate-offset=%d",q->value(13).toInt()); - cmd+=QString().sprintf(" --enddate-offset=%d",q->value(14).toInt()); - cmd+=QString().sprintf(" %s \"%s\"",(const char *)q->value(1).toString(), - (const char *)q->value(2).toString()); - if(!q->value(11).toString().isEmpty()) { - cmd+=QString().sprintf(" >> %s 2>> %s", - (const char *)q->value(11).toString(), - (const char *)q->value(11).toString()); - } - else { - cmd+=" > /dev/null 2> /dev/null"; - } - cmd+=" &"; - LogLine(RDConfig::LogInfo,QString(). - sprintf("launching dropbox configuration: \"%s\"", - (const char *)cmd)); - if(fork()==0) { - system(cmd); - exit(0); - } - */ } delete q; return true; @@ -324,8 +245,8 @@ void MainObject::KillProgram(const QString &program) while(pids.size()>0) { for(int i=0;i Date: Fri, 19 Oct 2018 15:39:57 -0400 Subject: [PATCH 10/12] 2018-10-19 Fred Gleason * Fixed a typo that broke generation of the rmlsend(1) man page. --- ChangeLog | 2 ++ docs/manpages/Makefile.am | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 68409409..a9a97e26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17843,3 +17843,5 @@ * Added an rdservice(8) man page. * Modified 'systemd/rivendell.service.in' to enable automatic start retries. +2018-10-19 Fred Gleason + * Fixed a typo that broke generation of the rmlsend(1) man page. diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am index f4b74b7e..b2246cb8 100644 --- a/docs/manpages/Makefile.am +++ b/docs/manpages/Makefile.am @@ -66,7 +66,7 @@ EXTRA_DIST = rdclilogedit.1\ rdrender.1\ rdrender.xml\ rmlsend.1\ - rmlsend.xm\ + rmlsend.xml\ rdservice.8\ rdservice.xml From 75bec4d3c48b417e1585b9c289105c686f917c1d Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 19 Oct 2018 17:03:58 -0400 Subject: [PATCH 11/12] 2018-10-19 Fred Gleason * Removed 'build_win32.bat'. * Removed all conditional compilation based on 'WIN32'. --- ChangeLog | 3 ++ Makefile.am | 1 - build_win32.bat | 37 ---------------------- helpers/Makefile.am | 4 +-- helpers/win32_frag1.txt | 1 - helpers/win32_frag2.txt | 1 - lib/rd.h | 1 - lib/rdcart.cpp | 20 ------------ lib/rdcart_dialog.cpp | 31 ------------------ lib/rdcart_dialog.h | 2 -- lib/rdcmd_switch.cpp | 11 ++----- lib/rdconf.cpp | 51 +----------------------------- lib/rdconf.h | 2 -- lib/rdconfig.cpp | 27 ---------------- lib/rdconfig.h | 12 ------- lib/rdcut.cpp | 21 +----------- lib/rddb.cpp | 4 --- lib/rdgroup.cpp | 9 +----- lib/rdgroup.h | 8 ++--- lib/rdlog.cpp | 3 +- lib/rdlog_line.cpp | 14 +------- lib/rdlogedit_conf.cpp | 2 -- lib/rdlogedit_conf.h | 6 +--- lib/rdlogfilter.cpp | 14 ++------ lib/rdloglock.cpp | 14 -------- lib/rdmacro.h | 5 --- lib/rdreport.cpp | 18 ----------- lib/rdsvc.cpp | 12 ------- lib/rdtempdirectory.cpp | 26 +-------------- lib/rdtextfile.cpp | 24 -------------- lib/rdttydevice.h | 12 ------- lib/rduser.cpp | 3 +- lib/rdwavefile.cpp | 2 +- lib/rdwavefile.h | 4 +-- lib/rdweb.cpp | 11 +------ lib/rdweb.h | 6 ---- rdcastmanager/rdcastmanager.cpp | 20 ++---------- rdlogedit/edit_log.cpp | 21 ++---------- rdlogedit/edit_log.h | 4 --- rdlogedit/rdlogedit.cpp | 44 +++----------------------- rdlogmanager/edit_event.cpp | 9 +----- rdlogmanager/pick_report_dates.cpp | 7 ---- rdlogmanager/rdlogmanager.cpp | 15 ++------- rdlogmanager/svc_rec_dialog.cpp | 7 ---- utils/rdsoftkeys/rdsoftkeys.cpp | 18 ++--------- utils/rmlsend/rmlsend.cpp | 50 ++++++++--------------------- 46 files changed, 49 insertions(+), 568 deletions(-) delete mode 100644 build_win32.bat delete mode 100644 helpers/win32_frag1.txt delete mode 100644 helpers/win32_frag2.txt diff --git a/ChangeLog b/ChangeLog index a9a97e26..0d4473ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17845,3 +17845,6 @@ start retries. 2018-10-19 Fred Gleason * Fixed a typo that broke generation of the rmlsend(1) man page. +2018-10-19 Fred Gleason + * Removed 'build_win32.bat'. + * Removed all conditional compilation based on 'WIN32'. diff --git a/Makefile.am b/Makefile.am index 3df7e6d5..c14c0808 100644 --- a/Makefile.am +++ b/Makefile.am @@ -106,7 +106,6 @@ doxygen: cd ripcd && doxygen doxygen.conf & EXTRA_DIST = autogen.sh\ - build_win32.bat\ CODINGSTYLE\ get_distro.pl\ get_target.sh\ diff --git a/build_win32.bat b/build_win32.bat deleted file mode 100644 index 8faa0899..00000000 --- a/build_win32.bat +++ /dev/null @@ -1,37 +0,0 @@ -@ECHO OFF - -REM build_win32.bat -REM -REM Build Rivendell for Win32. -REM -REM (C) Copyright 2007 Fred Gleason -REM -REM This program is free software; you can redistribute it and/or modify -REM it under the terms of the GNU General Public License as -REM published by the Free Software Foundation; either version 2 of -REM the License, or (at your option) any later version. -REM -REM This program is distributed in the hope that it will be useful, -REM but WITHOUT ANY WARRANTY; without even the implied warranty of -REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -REM GNU General Public License for more details. -REM -REM You should have received a copy of the GNU General Public -REM License along with this program; if not, write to the Free Software -REM Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -REM -REM Stupid DOS trick to get the package version -REM -copy helpers\win32_frag1.txt + package_version + helpers\win32_frag2.txt helpers\win32_version.bat -call helpers\win32_version.bat -del helpers\win32_version.bat - -REM -REM Build It -REM -qmake -o Makefile rivendell.pro -nmake - - -REM End of build_win32.bat diff --git a/helpers/Makefile.am b/helpers/Makefile.am index 326eeb19..848c2334 100644 --- a/helpers/Makefile.am +++ b/helpers/Makefile.am @@ -36,9 +36,7 @@ dist_jsmin_SOURCES = jsmin.c EXTRA_DIST = rdpack.sh\ rdtrans.sh\ rdtransgui.sh\ - setenvvar.sh\ - win32_frag1.txt\ - win32_frag2.txt + setenvvar.sh CLEANFILES = *~\ *.tar.gz\ diff --git a/helpers/win32_frag1.txt b/helpers/win32_frag1.txt deleted file mode 100644 index 319a0848..00000000 --- a/helpers/win32_frag1.txt +++ /dev/null @@ -1 +0,0 @@ -qmake -set VERSION " \ No newline at end of file diff --git a/helpers/win32_frag2.txt b/helpers/win32_frag2.txt deleted file mode 100644 index 9d68933c..00000000 --- a/helpers/win32_frag2.txt +++ /dev/null @@ -1 +0,0 @@ -" \ No newline at end of file diff --git a/lib/rd.h b/lib/rd.h index af753533..17129c91 100644 --- a/lib/rd.h +++ b/lib/rd.h @@ -430,7 +430,6 @@ * Default Text Editors */ #define RD_LINUX_EDITOR "xterm -e vi" -#define RD_WIN32_EDITOR "notepad" /* * System-wide Maintenance Interval (mS) diff --git a/lib/rdcart.cpp b/lib/rdcart.cpp index c7ceb10d..2e1b90aa 100644 --- a/lib/rdcart.cpp +++ b/lib/rdcart.cpp @@ -18,12 +18,10 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include #include -#endif // WIN32 #include @@ -91,11 +89,9 @@ bool RDCart::selectCut(QString *cut,const QTime &time) const if(!exists()) { ret=(*cut==""); *cut=""; -#ifndef WIN32 syslog(LOG_USER|LOG_WARNING, "RDCart::selectCut(): cart doesn't exist, CUT=%s", (const char *)cut); -#endif // WIN32 return ret; } @@ -147,9 +143,6 @@ bool RDCart::selectCut(QString *cut,const QTime &time) const break; } if(cutname.isEmpty()) { // No valid cuts, try the evergreen -#ifndef WIN32 - // syslog(LOG_USER|LOG_WARNING,"RDCart::selectCut(): no valid cuts, trying evergreen, SQL=%s",(const char *)sql); -#endif // WIN32 sql=QString("select ")+ "CUT_NAME,"+ "PLAY_ORDER,"+ @@ -171,9 +164,6 @@ bool RDCart::selectCut(QString *cut,const QTime &time) const delete q; } if(cutname.isEmpty()) { -#ifndef WIN32 - // syslog(LOG_USER|LOG_WARNING,"RDCart::selectCut(): no valid evergreen cuts, SQL=%s",(const char *)sql); -#endif // WIN32 } *cut=cutname; return true; @@ -817,7 +807,6 @@ void RDCart::setUseEventLength(bool state) const void RDCart::setPending(const QString &station_name) { -#ifndef WIN32 QString sql; RDSqlQuery *q; @@ -828,7 +817,6 @@ void RDCart::setPending(const QString &station_name) QString().sprintf("where NUMBER=%u",cart_number); q=new RDSqlQuery(sql); delete q; -#endif // WIN32 } @@ -978,9 +966,6 @@ bool RDCart::validateLengths(int len) const QString RDCart::xml(bool include_cuts,bool absolute, RDSettings *settings,int cutnum) const { -#ifdef WIN32 - return QString(); -#else QString sql=RDCart::xmlSql(include_cuts)+ QString().sprintf(" where (CART.NUMBER=%u)",cart_number); if(cutnum>=0) { @@ -991,7 +976,6 @@ QString RDCart::xml(bool include_cuts,bool absolute, delete q; return xml; -#endif // WIN32 } @@ -1640,7 +1624,6 @@ bool RDCart::removeCutAudio(RDStation *station,RDUser *user,unsigned cart_num, const QString &cutname,RDConfig *config) { bool ret=true; -#ifndef WIN32 CURL *curl=NULL; long response_code=0; struct curl_httppost *first=NULL; @@ -1702,14 +1685,12 @@ bool RDCart::removeCutAudio(RDStation *station,RDUser *user,unsigned cart_num, curl_easy_cleanup(curl); curl_formfree(first); } -#endif // WIN32 return ret; } void RDCart::removePending(RDStation *station,RDUser *user,RDConfig *config) { -#ifndef WIN32 QString sql; RDSqlQuery *q; @@ -1721,7 +1702,6 @@ void RDCart::removePending(RDStation *station,RDUser *user,RDConfig *config) } delete q; -#endif // WIN32 } diff --git a/lib/rdcart_dialog.cpp b/lib/rdcart_dialog.cpp index 3e3a2093..ee09a6eb 100644 --- a/lib/rdcart_dialog.cpp +++ b/lib/rdcart_dialog.cpp @@ -31,7 +31,6 @@ #include #include -#ifndef WIN32 #include #include #include @@ -42,7 +41,6 @@ #include #include #include -#endif // WIN32 #include // @@ -69,11 +67,7 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode, *cart_schedcode=tr("ALL"); } cart_temp_allowed=NULL; -#ifdef WIN32 - cart_filter_mode=RDStation::FilterSynchronous; -#else cart_filter_mode=rda->station()->filterMode(); -#endif // WIN32 if(filter==NULL) { cart_filter=new QString(); @@ -245,7 +239,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode, // // Audition Player // -#ifndef WIN32 if((rda->station()->cueCard()<0)||(rda->station()->cuePort()<0)) { cart_player=NULL; } @@ -257,7 +250,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode, cart_player->stopButton()->setDisabled(true); cart_player->stopButton()->setOnColor(Qt::red); } -#endif // WIN32 // // Send to Editor Button @@ -278,9 +270,6 @@ RDCartDialog::RDCartDialog(QString *filter,QString *group,QString *schedcode, if(rda->station()->editorPath().isEmpty()) { cart_file_button->hide(); } -#ifdef WIN32 - cart_file_button->hide(); -#endif // WIN32 // // OK Button @@ -303,11 +292,9 @@ RDCartDialog::~RDCartDialog() if(local_filter) { delete cart_filter; } -#ifndef WIN32 if(cart_player!=NULL) { delete cart_player; } -#endif // WIN32 delete cart_playout_map; delete cart_macro_map; } @@ -345,22 +332,18 @@ int RDCartDialog::exec(int *cartnum,RDCart::Type type,QString *svcname, else { cart_file_button->show(); } -#ifndef WIN32 if(cart_player!=NULL) { cart_player->playButton()->show(); cart_player->stopButton()->show(); } -#endif // WIN32 break; case RDCart::Macro: cart_editor_button->hide(); -#ifndef WIN32 if(cart_player!=NULL) { cart_player->playButton()->hide(); cart_player->stopButton()->hide(); } -#endif // WIN32 break; } if(*cart_cartnum==0) { @@ -469,13 +452,11 @@ void RDCartDialog::clickedData(Q3ListViewItem *item) } cart_ok_button->setEnabled(true); bool audio=((RDCart::Type)i->id())==RDCart::Audio; -#ifndef WIN32 if(cart_player!=NULL) { cart_player->playButton()->setEnabled(audio); cart_player->stopButton()->setEnabled(audio); cart_player->setCart(i->text(1).toUInt()); } -#endif // WIN32 cart_editor_button->setEnabled(audio); } @@ -488,7 +469,6 @@ void RDCartDialog::doubleClickedData(Q3ListViewItem *,const QPoint &,int) void RDCartDialog::editorData() { -#ifndef WIN32 RDListViewItem *item=(RDListViewItem *)cart_cart_list->currentItem(); if(item==NULL) { return; @@ -531,13 +511,11 @@ void RDCartDialog::editorData() system(cmd+" &"); exit(0); } -#endif } void RDCartDialog::loadFileData() { -#ifndef WIN32 QString filename; RDCart *cart=NULL; RDCut *cut=NULL; @@ -615,7 +593,6 @@ void RDCartDialog::loadFileData() delete cut; done(0); } -#endif // WIN32 } @@ -626,12 +603,10 @@ void RDCartDialog::okData() return; } -#ifndef WIN32 SaveState(); if(cart_player!=NULL) { cart_player->stop(); } -#endif // WIN32 if(!local_filter) { *cart_filter=cart_filter_edit->text(); } @@ -645,12 +620,10 @@ void RDCartDialog::okData() void RDCartDialog::cancelData() { -#ifndef WIN32 SaveState(); if(cart_player!=NULL) { cart_player->stop(); } -#endif // WIN32 done(-1); } @@ -682,22 +655,18 @@ void RDCartDialog::resizeEvent(QResizeEvent *e) cart_filter_edit->setGeometry(100,10,size().width()-200,20); break; } -#ifndef WIN32 if(cart_player!=NULL) { cart_player->playButton()->setGeometry(10,size().height()-60,80,50); cart_player->stopButton()->setGeometry(100,size().height()-60,80,50); } -#endif // WIN32 } void RDCartDialog::closeEvent(QCloseEvent *e) { -#ifndef WIN32 if(cart_player!=NULL) { cart_player->stop(); } -#endif // WIN32 cancelData(); } diff --git a/lib/rdcart_dialog.h b/lib/rdcart_dialog.h index 8a10e3b5..9ba734b3 100644 --- a/lib/rdcart_dialog.h +++ b/lib/rdcart_dialog.h @@ -115,9 +115,7 @@ class RDCartDialog : public QDialog QString cart_user_name; QString cart_user_password; RDBusyDialog *cart_busy_dialog; -#ifndef WIN32 RDSimplePlayer *cart_player; -#endif // WIN32 }; diff --git a/lib/rdcmd_switch.cpp b/lib/rdcmd_switch.cpp index 77ed3b24..438fc8d0 100644 --- a/lib/rdcmd_switch.cpp +++ b/lib/rdcmd_switch.cpp @@ -19,14 +19,13 @@ // #include -#ifndef WIN32 #include -#endif // WIN32 - #include -#include + #include +#include + RDCmdSwitch::RDCmdSwitch(int argc,char *argv[],const char *modname, const char *usage) { @@ -34,12 +33,10 @@ RDCmdSwitch::RDCmdSwitch(int argc,char *argv[],const char *modname, for(int i=1;i #include #include -#ifdef WIN32 -#define RDCONF_FILE_SEPARATOR '\\' -#else #define RDCONF_FILE_SEPARATOR '/' #include #include #include #include -#endif + #include #include #include @@ -57,21 +54,12 @@ int GetPrivateProfileBool(const char *sFilename,const char *cHeader, if(temp[0]==0) { return bDefault; } -#ifdef WIN32 - if((!stricmp(temp,"yes"))||(!stricmp(temp,"on"))) { - return true; - } - if((!stricmp(temp,"no"))||(!stricmp(temp,"off"))) { - return false; - } -#else if((!strcasecmp(temp,"yes"))||(!strcasecmp(temp,"on"))) { return true; } if((!strcasecmp(temp,"no"))||(!strcasecmp(temp,"off"))) { return false; } -#endif return bDefault; } @@ -150,13 +138,6 @@ int GetIni(const char *sFileName,const char *cHeader,const char *cLabel, int iFileStat; strcpy(sName,sFileName); -#ifdef WIN32 - for(int i=0;ih_addr_list[0][3]&0xff); return QHostAddress((Q_UINT32)host_address); } -#endif // WIN32 QString RDGetDisplay(bool strip_point) { -#ifdef WIN32 - return QString("win32"); -#else QString display; int l; @@ -516,7 +482,6 @@ QString RDGetDisplay(bool strip_point) } } return display; -#endif // WIN32 } @@ -775,7 +740,6 @@ int RDSetTimeLength(const QString &str) } -#ifndef WIN32 bool RDCopy(const QString &srcfile,const QString &destfile) { int src_fd; @@ -812,10 +776,8 @@ bool RDCopy(const QString &srcfile,const QString &destfile) close(dest_fd); return true; } -#endif // WIN32 -#ifndef WIN32 bool RDWritePid(const QString &dirname,const QString &filename,int owner, int group) { @@ -881,7 +843,6 @@ bool RDTimeSynced() } return false; } -#endif // WIN32 QString RDGetHomeDir(bool *found) @@ -942,7 +903,6 @@ QString RDTempDir() QString RDTempFile() { -#ifndef WIN32 int fd=-1; char dirname[PATH_MAX]; strncpy(dirname,"/tmp/rivendellXXXXXX",PATH_MAX); @@ -950,12 +910,10 @@ QString RDTempFile() close(fd); return QString(dirname); } -#endif // WIN32 return QString(); } -#ifndef WIN32 QString RDTimeZoneName(const QDateTime &datetime) { char name[20]; @@ -963,7 +921,6 @@ QString RDTimeZoneName(const QDateTime &datetime) strftime(name,20,"%Z",localtime(&time)); return QString(name); } -#endif // WIN32 QString RDDowCode(int dow) @@ -1028,9 +985,6 @@ QTime RDUtcToLocal(const QTime &gmttime) int RDTimeZoneOffset() { -#ifdef WIN32 - return 0; -#else time_t t=time(&t); struct tm *tm=localtime(&t); time_t local_time=3600*tm->tm_hour+60*tm->tm_min+tm->tm_sec; @@ -1038,7 +992,6 @@ int RDTimeZoneOffset() time_t gmt_time=3600*tm->tm_hour+60*tm->tm_min+tm->tm_sec; return gmt_time-local_time; -#endif // WIN32 } @@ -1075,7 +1028,6 @@ bool RDProcessActive(const QString &cmd) bool RDProcessActive(const QStringList &cmds) { -#ifndef WIN32 QStringList dirs; QDir *proc_dir=new QDir("/proc"); bool ok=false; @@ -1106,7 +1058,6 @@ bool RDProcessActive(const QStringList &cmds) } delete proc_dir; -#endif // WIN32 return false; } diff --git a/lib/rdconf.h b/lib/rdconf.h index 59f833c2..11caa795 100644 --- a/lib/rdconf.h +++ b/lib/rdconf.h @@ -84,13 +84,11 @@ bool RDIsSqlNull(const QString &table,const QString &name,unsigned test, QString RDGetTimeLength(int mseconds,bool leadzero=false,bool tenths=true); int RDSetTimeLength(const QString &string); bool RDCopy(const QString &srcfile,const QString &destfile); -#ifndef WIN32 bool RDWritePid(const QString &dirname,const QString &filename,int owner=-1, int group=-1); void RDDeletePid(const QString &dirname,const QString &filename); bool RDCheckPid(const QString &dirname,const QString &filename); pid_t RDGetPid(const QString &pidfile); -#endif // WIN32 QString RDGetHomeDir(bool *found=0); bool RDTimeSynced(); QString RDTruncateAfterWord(QString str,int word,bool add_dots=false); diff --git a/lib/rdconfig.cpp b/lib/rdconfig.cpp index d5657b83..b0d50ea4 100644 --- a/lib/rdconfig.cpp +++ b/lib/rdconfig.cpp @@ -18,7 +18,6 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include @@ -27,7 +26,6 @@ #include #include #include -#endif // WIN32 #include #include @@ -226,7 +224,6 @@ bool RDConfig::logXloadDebugData() const void RDConfig::log(const QString &module,LogPriority prio,const QString &msg) { -#ifndef WIN32 QDateTime dt; QString filename; FILE *f=NULL; @@ -263,7 +260,6 @@ void RDConfig::log(const QString &module,LogPriority prio,const QString &msg) case RDConfig::LogNone: break; } -#endif // WIN32 } @@ -419,7 +415,6 @@ unsigned RDConfig::channels() const } -#ifndef WIN32 uid_t RDConfig::uid() const { return conf_uid; @@ -430,7 +425,6 @@ gid_t RDConfig::gid() const { return conf_gid; } -#endif QString RDConfig::caeLogfile() const @@ -507,20 +501,14 @@ void RDConfig::load() QString client; QString facility; QString iface; -#ifndef WIN32 struct passwd *user; struct group *groups; -#endif RDProfile *profile=new RDProfile(); profile->setSource(conf_filename); -#ifdef WIN32 - strcpy(sname,"windows"); -#else gethostname(sname,255); QStringList list=QString(sname).split("."); // Strip domain name parts strncpy(sname,list[0],256); -#endif conf_station_name= profile->stringValue("Identity","StationName",sname); conf_password=profile->stringValue("Identity","Password",""); @@ -611,14 +599,12 @@ void RDConfig::load() conf_lock_rdairplay_memory= profile->boolValue("Hacks","LockRdairplayMemory",false); conf_channels=profile->intValue("Format","Channels",RD_DEFAULT_CHANNELS); -#ifndef WIN32 if((user=getpwnam(profile->stringValue("Identity","AudioOwner")))!=NULL) { conf_uid=user->pw_uid; } if((groups=getgrnam(profile->stringValue("Identity","AudioGroup")))!=NULL) { conf_gid=groups->gr_gid; } -#endif conf_cae_logfile=profile->stringValue("Caed","Logfile",""); conf_enable_mixer_logging=profile->boolValue("Caed","EnableMixerLogging"); conf_use_realtime=profile->boolValue("Tuning","UseRealtime",false); @@ -643,7 +629,6 @@ void RDConfig::load() // int sock=-1; -#ifndef WIN32 if((sock=socket(PF_INET,SOCK_DGRAM,IPPROTO_IP))<0) { return; } @@ -663,22 +648,12 @@ void RDConfig::load() ifr.ifr_ifindex=++index; } close(sock); -#endif // WIN32 } void RDConfig::clear() { -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - conf_filename=QString().sprintf("%s\\%s", - (const char *)settings. - readEntry("/Rivendell/InstallDir"), - (const char *)RD_WIN_CONF_FILE); -#else conf_filename=RD_CONF_FILE; -#endif conf_module_name=""; conf_mysql_hostname=""; conf_mysql_username=""; @@ -724,10 +699,8 @@ void RDConfig::clear() conf_disable_maint_checks=false; conf_lock_rdairplay_memory=false; conf_channels=RD_DEFAULT_CHANNELS; -#ifndef WIN32 conf_uid=65535; conf_gid=65535; -#endif conf_cae_logfile=""; conf_enable_mixer_logging=false; conf_use_realtime=false; diff --git a/lib/rdconfig.h b/lib/rdconfig.h index 41900d11..17b2e1b8 100644 --- a/lib/rdconfig.h +++ b/lib/rdconfig.h @@ -21,10 +21,8 @@ #ifndef RDCONFIG_H #define RDCONFIG_H -#ifndef WIN32 #include #include -#endif // WIN32 #include @@ -37,16 +35,10 @@ class RDConfig { public: enum LogFacility {LogNone=0,LogSyslog=1,LogFile=2}; -#ifdef WIN32 - enum LogPriority {LogEmerg=0,LogAlert=1,LogCrit=2, - LogErr=3,LogWarning=4,LogNotice=5, - LogInfo=6,LogDebug=7}; -#else enum LogPriority {LogEmerg=LOG_EMERG,LogAlert=LOG_ALERT,LogCrit=LOG_CRIT, LogErr=LOG_ERR,LogWarning=LOG_WARNING,LogNotice=LOG_NOTICE, LogInfo=LOG_INFO,LogDebug=LOG_DEBUG}; -#endif // WIN32 RDConfig(); RDConfig(const QString &filename); QString filename() const; @@ -102,10 +94,8 @@ class RDConfig QString caeLogfile() const; bool enableMixerLogging() const; unsigned channels() const; -#ifndef WIN32 uid_t uid() const; gid_t gid() const; -#endif bool useRealtime(); int realtimePriority(); int transcodingDelay() const; @@ -168,10 +158,8 @@ class RDConfig bool conf_lock_rdairplay_memory; std::vector conf_jack_ports[2]; unsigned conf_channels; -#ifndef WIN32 uid_t conf_uid; gid_t conf_gid; -#endif QString conf_cae_logfile; bool conf_enable_mixer_logging; bool conf_use_realtime; diff --git a/lib/rdcut.cpp b/lib/rdcut.cpp index a3e7f1e2..266955d4 100644 --- a/lib/rdcut.cpp +++ b/lib/rdcut.cpp @@ -18,9 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include -#endif // WIN32 #include #include #include @@ -31,9 +29,7 @@ #include #include -#ifndef WIN32 #include -#endif #include #include @@ -863,9 +859,6 @@ void RDCut::logPlayout() const bool RDCut::copyTo(RDStation *station,RDUser *user, const QString &cutname,RDConfig *config) const { -#ifdef WIN32 - return false; -#else QString sql; RDSqlQuery *q; RDSqlQuery *q1; @@ -953,7 +946,6 @@ bool RDCut::copyTo(RDStation *station,RDUser *user, delete conv; return ret; -#endif } @@ -1182,9 +1174,6 @@ bool RDCut::checkInRecording(const QString &station_name, RDSettings *settings, unsigned msecs) const { -#ifdef WIN32 - return false; -#else QString sql; RDSqlQuery *q; int format; @@ -1260,13 +1249,11 @@ bool RDCut::checkInRecording(const QString &station_name, q=new RDSqlQuery(sql); delete q; return true; -#endif // WIN32 } void RDCut::autoTrim(RDCut::AudioEnd end,int level) { -#ifndef WIN32 int point; int start_point=0; int end_point=-1; @@ -1318,14 +1305,12 @@ void RDCut::autoTrim(RDCut::AudioEnd end,int level) } setLength(end_point-start_point); delete wave; -#endif // WIN32 } void RDCut::autoSegue(int level,int length,RDStation *station,RDUser *user, RDConfig *config) { -#ifndef WIN32 int point; // int start_point; @@ -1369,13 +1354,11 @@ void RDCut::autoSegue(int level,int length,RDStation *station,RDUser *user, } } delete wave; -#endif // WIN32 } void RDCut::reset() const { -#ifndef WIN32 QString sql; RDSqlQuery *q; int format; @@ -1446,7 +1429,6 @@ void RDCut::reset() const delete q; wave->closeWave(); delete wave; -#endif // WIN32 } @@ -1719,7 +1701,6 @@ void RDCut::GetDefaultDateTimes(QString *start_dt,QString *end_dt, bool RDCut::FileCopy(const QString &srcfile,const QString &destfile) const { -#ifndef WIN32 int src_fd; int dest_fd; struct stat src_stat; @@ -1763,7 +1744,7 @@ bool RDCut::FileCopy(const QString &srcfile,const QString &destfile) const free(buf); close(src_fd); close(dest_fd); -#endif + return true; } diff --git a/lib/rddb.cpp b/lib/rddb.cpp index cb1d653d..1fad0e5b 100644 --- a/lib/rddb.cpp +++ b/lib/rddb.cpp @@ -57,9 +57,7 @@ RDSqlQuery::RDSqlQuery (const QString &query,bool reconnect): } fprintf(stderr,"%s\n",(const char *)err); -#ifndef WIN32 syslog(LOG_ERR,(const char *)err); -#endif } if(isActive()) { @@ -83,9 +81,7 @@ RDSqlQuery::RDSqlQuery (const QString &query,bool reconnect): +"["+lastError().text()+"]: "+query; fprintf(stderr,"%s\n",(const char *)err); -#ifndef WIN32 syslog(LOG_ERR,(const char *)err); -#endif // WIN32 } } diff --git a/lib/rdgroup.cpp b/lib/rdgroup.cpp index 55692108..1b76c277 100644 --- a/lib/rdgroup.cpp +++ b/lib/rdgroup.cpp @@ -19,13 +19,9 @@ // #include -#ifndef WIN32 #include -#endif // WIN32 #include -//Added by qt3to4: -#include #include #include @@ -271,7 +267,6 @@ int RDGroup::freeCartQuantity() const return free; } -#ifndef WIN32 bool RDGroup::reserveCarts(std::vector *cart_nums, const QString &station_name,RDCart::Type type, unsigned quan) const @@ -306,7 +301,7 @@ bool RDGroup::reserveCarts(std::vector *cart_nums, return false; } -#endif // WIN32 + bool RDGroup::cartNumberValid(unsigned cartnum) const { @@ -441,7 +436,6 @@ unsigned RDGroup::GetNextFreeCart(unsigned startcart) const } -#ifndef WIN32 bool RDGroup::ReserveCart(const QString &station_name,RDCart::Type type, unsigned cart_num) const { @@ -467,7 +461,6 @@ bool RDGroup::ReserveCart(const QString &station_name,RDCart::Type type, } return ret; } -#endif // WIN32 void RDGroup::SetRow(const QString ¶m,int value) const diff --git a/lib/rdgroup.h b/lib/rdgroup.h index f79700f8..fd305328 100644 --- a/lib/rdgroup.h +++ b/lib/rdgroup.h @@ -2,7 +2,7 @@ // // Abstract a Rivendell Service // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // 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 @@ -60,20 +60,16 @@ class RDGroup void setColor(const QColor &color); unsigned nextFreeCart(unsigned startcart=0) const; int freeCartQuantity() const; -#ifndef WIN32 bool reserveCarts(std::vector *cart_nums, const QString &station_name,RDCart::Type type, unsigned quan) const; -#endif // WIN32 bool cartNumberValid(unsigned cartnum) const; QString xml() const; private: unsigned GetNextFreeCart(unsigned startcart) const; -#ifndef WIN32 bool ReserveCart(const QString &station_name,RDCart::Type type, unsigned cart_num) const; -#endif // WIN32 void SetRow(const QString ¶m,int value) const; void SetRow(const QString ¶m,unsigned value) const; void SetRow(const QString ¶m,const QString &value) const; @@ -82,4 +78,4 @@ class RDGroup }; -#endif +#endif // RDGROUP_H diff --git a/lib/rdlog.cpp b/lib/rdlog.cpp index 78aba030..554fe329 100644 --- a/lib/rdlog.cpp +++ b/lib/rdlog.cpp @@ -446,7 +446,7 @@ QString RDLog::xml() const QString sql; RDSqlQuery *q; QString ret; -#ifndef WIN32 + sql=QString("select ")+ "NAME,"+ // 00 "SERVICE,"+ // 01 @@ -491,7 +491,6 @@ QString RDLog::xml() const ret+=" \n"; } delete q; -#endif // WIN32 return ret; } diff --git a/lib/rdlog_line.cpp b/lib/rdlog_line.cpp index a8a173ef..49b9b5a4 100644 --- a/lib/rdlog_line.cpp +++ b/lib/rdlog_line.cpp @@ -18,9 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include -#endif // WIN32 #include @@ -1592,18 +1590,13 @@ RDLogLine::State RDLogLine::setEvent(int mach,RDLogLine::TransType next_type, cart=new RDCart(log_cart_number); if(!cart->exists()) { delete cart; -#ifndef WIN32 syslog(LOG_USER|LOG_WARNING,"RDLogLine::setEvent(): no such cart, CART=%06u",log_cart_number); -#endif // WIN32 log_state=RDLogLine::NoCart; return RDLogLine::NoCart; } cart->selectCut(&log_cut_name); if(log_cut_name.isEmpty()) { delete cart; -#ifndef WIN32 - // syslog(LOG_USER|LOG_WARNING,"RDLogLine::setEvent(): RDCut::selectCut() failed, CART=%06u",log_cart_number); -#endif // WIN32 log_state=RDLogLine::NoCut; return RDLogLine::NoCut; } @@ -1628,18 +1621,14 @@ RDLogLine::State RDLogLine::setEvent(int mach,RDLogLine::TransType next_type, if(!q->first()) { delete q; delete cart; -#ifndef WIN32 syslog(LOG_USER|LOG_WARNING,"RDLogLine::setEvent(): no cut record found, SQL=%s",(const char *)sql); -#endif // WIN32 log_state=RDLogLine::NoCut; return RDLogLine::NoCut; } if(q->value(0).toInt()==0) { delete q; delete cart; -#ifndef WIN32 syslog(LOG_USER|LOG_WARNING,"RDLogLine::setEvent(): zero length cut audio, SQL=%s",(const char *)sql); -#endif // WIN32 log_state=RDLogLine::NoCut; return RDLogLine::NoCut; } @@ -1953,7 +1942,6 @@ void RDLogLine::refreshPointers() QString RDLogLine::xml(int line) const { QString ret; -#ifndef WIN32 ret+=" \n"; ret+=" "+RDXmlField("line",line); ret+=" "+RDXmlField("id",id()); @@ -2059,7 +2047,7 @@ QString RDLogLine::xml(int line) const ret+=" "+RDXmlField("extAnncType",extAnncType()); ret+=" \n"; -#endif // WIN32 + return ret; } diff --git a/lib/rdlogedit_conf.cpp b/lib/rdlogedit_conf.cpp index 24bd78ac..da090d6e 100644 --- a/lib/rdlogedit_conf.cpp +++ b/lib/rdlogedit_conf.cpp @@ -274,7 +274,6 @@ void RDLogeditConf::setDefaultTransType(RDLogLine::TransType type) } -#ifndef WIN32 void RDLogeditConf::getSettings(RDSettings *s) const { QString sql; @@ -313,7 +312,6 @@ void RDLogeditConf::getSettings(RDSettings *s) const } delete q; } -#endif // WIN32 void RDLogeditConf::SetRow(const QString ¶m,int value) const diff --git a/lib/rdlogedit_conf.h b/lib/rdlogedit_conf.h index 0866f982..814f8a10 100644 --- a/lib/rdlogedit_conf.h +++ b/lib/rdlogedit_conf.h @@ -23,9 +23,7 @@ #include -#ifndef WIN32 #include -#endif // WIN32 #include class RDLogeditConf @@ -69,9 +67,7 @@ class RDLogeditConf void setRipperLevel(int level); RDLogLine::TransType defaultTransType() const; void setDefaultTransType(RDLogLine::TransType type); -#ifndef WIN32 void getSettings(RDSettings *s) const; -#endif // WIN32 private: void SetRow(const QString ¶m,int value) const; @@ -81,4 +77,4 @@ class RDLogeditConf }; -#endif +#endif // RDLOGEDIT_CONF_H diff --git a/lib/rdlogfilter.cpp b/lib/rdlogfilter.cpp index 5d92aba5..6e52efee 100644 --- a/lib/rdlogfilter.cpp +++ b/lib/rdlogfilter.cpp @@ -23,9 +23,9 @@ #include "rd.h" #include "rdescape_string.h" #include "rdlogfilter.h" -//Added by qt3to4: + #include -#include +#include "qlabel.h" RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent) : QWidget(parent) @@ -46,15 +46,6 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent) filter_service_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); filter_service_box=new QComboBox(this); filter_service_label->setBuddy(filter_service_box); -#ifdef WIN32 - filter_service_box->insertItem(tr("ALL")); - sql=QString("select NAME from SERVICES order by NAME"); - q=new RDSqlQuery(sql); - while(q->next()) { - filter_service_box->insertItem(q->value(0).toString()); - } - delete q; -#else switch(mode) { case RDLogFilter::NoFilter: filter_service_box->insertItem(tr("ALL")); @@ -81,7 +72,6 @@ RDLogFilter::RDLogFilter(RDLogFilter::FilterMode mode,QWidget *parent) delete q; break; } -#endif // WIN32 connect(filter_service_box,SIGNAL(activated(int)), this,SLOT(serviceChangedData(int))); diff --git a/lib/rdloglock.cpp b/lib/rdloglock.cpp index 6172f6a8..e9f55fa3 100644 --- a/lib/rdloglock.cpp +++ b/lib/rdloglock.cpp @@ -18,9 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include -#endif // WIN32 #include @@ -61,21 +59,11 @@ bool RDLogLock::tryLock(QString *username,QString *stationname, QHostAddress *addr) { bool ret=false; -#ifdef WIN32 - QString guid=RDLogLock::makeGuid("windows"); -#else QString guid=RDLogLock::makeGuid(lock_station->name()); -#endif // WIN32 -#ifdef WIN32 - *username="windows"; - *stationname="windows"; -#else *username=lock_user->name(); *stationname=lock_station->name(); addr->setAddress(lock_station->address().toString()); -#endif // WIN32 - if(RDLogLock::tryLock(username,stationname,addr,lock_log_name,guid)) { lock_timer->start(RD_LOG_LOCK_TIMEOUT/2); lock_guid=guid; @@ -156,12 +144,10 @@ void RDLogLock::updateLock(const QString &log_name,const QString &guid) "LOCK_DATETIME=now() where "+ "LOCK_GUID=\""+RDEscapeString(guid)+"\""; q=new RDSqlQuery(sql); -#ifndef WIN32 if(q->numRowsAffected()==0) { syslog(LOG_WARNING,"lock on log \"%s\" has evaporated!", (const char *)log_name); } -#endif // WIN32 delete q; } diff --git a/lib/rdmacro.h b/lib/rdmacro.h index 7d5e22b2..768f9a9f 100644 --- a/lib/rdmacro.h +++ b/lib/rdmacro.h @@ -30,11 +30,6 @@ #include -#ifdef WIN32 -#include -#endif // WIN32 - - class RDMacro { public: diff --git a/lib/rdreport.cpp b/lib/rdreport.cpp index b1a0a72b..0c481f19 100644 --- a/lib/rdreport.cpp +++ b/lib/rdreport.cpp @@ -310,13 +310,8 @@ RDReport::ErrorCode RDReport::errorCode() const bool RDReport::outputExists(const QDate &startdate) { QString out_path; -#ifdef WIN32 - out_path=RDDateDecode(exportPath(RDReport::Windows),startdate,report_station, - report_config,serviceName()); -#else out_path=RDDateDecode(exportPath(RDReport::Linux),startdate,report_station, report_config,serviceName()); -#endif return QFile::exists(out_path); } @@ -586,14 +581,8 @@ bool RDReport::generateReport(const QDate &startdate,const QDate &enddate, delete q; bool ret=false; -#ifdef WIN32 - QString filename=RDDateDecode(exportPath(RDReport::Windows),startdate, - report_station,report_config,serviceName()); -#else QString filename=RDDateDecode(exportPath(RDReport::Linux),startdate, report_station,report_config,serviceName()); -#endif - switch(filter()) { case RDReport::CbsiDeltaFlex: ret=ExportDeltaflex(filename,startdate,enddate,mixname); @@ -665,17 +654,10 @@ bool RDReport::generateReport(const QDate &startdate,const QDate &enddate, return false; break; } -#ifdef WIN32 - *out_path=RDDateDecode(exportPath(RDReport::Windows),startdate,report_station, - report_config,serviceName()); - QString post_cmd=RDDateDecode(postExportCommand(RDReport::Windows),startdate, - report_station,report_config,serviceName()); -#else *out_path=RDDateDecode(exportPath(RDReport::Linux),startdate,report_station, report_config,serviceName()); QString post_cmd=RDDateDecode(postExportCommand(RDReport::Linux),startdate, report_station,report_config,serviceName()); -#endif system(post_cmd); sql=QString("delete from ELR_LINES where ")+ "SERVICE_NAME=\""+RDEscapeString(mixname)+"\""; diff --git a/lib/rdsvc.cpp b/lib/rdsvc.cpp index 9a8cacbf..86964822 100644 --- a/lib/rdsvc.cpp +++ b/lib/rdsvc.cpp @@ -338,9 +338,6 @@ QString RDSvc::importFilename(ImportSource src,const QDate &date) const break; } QString os_flag; -#ifdef WIN32 - os_flag="_WIN"; -#endif QString sql=QString("select ")+ src_str+os_flag+"_PATH from SERVICES where "+ "NAME=\""+RDEscapeString(svc_name)+"\""; @@ -392,13 +389,6 @@ bool RDSvc::import(ImportSource src,const QDate &date,const QString &break_str, break; } - // - // Set OS Type - // -#ifdef WIN32 - os_flag="_WIN"; -#endif - // // Load Parser Parameters // @@ -1035,7 +1025,6 @@ QString RDSvc::xml() const QString sql; RDSqlQuery *q; QString ret; -#ifndef WIN32 sql="select DESCRIPTION from SERVICES where NAME=\""+ RDEscapeString(svc_name)+"\""; @@ -1047,7 +1036,6 @@ QString RDSvc::xml() const ret+=" \n"; } delete q; -#endif // WIN32 return ret; } diff --git a/lib/rdtempdirectory.cpp b/lib/rdtempdirectory.cpp index 2ef77f30..33d03356 100644 --- a/lib/rdtempdirectory.cpp +++ b/lib/rdtempdirectory.cpp @@ -2,7 +2,7 @@ // // Securely create and then remove a temporary directory // -// (C) Copyright 2017 Fred Gleason +// (C) Copyright 2017-2018 Fred Gleason // // 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 @@ -20,9 +20,7 @@ #include #include -#ifndef WIN32 #include -#endif // WIN32 #include #include @@ -61,17 +59,6 @@ QString RDTempDirectory::path() const bool RDTempDirectory::create(QString *err_msg) { -#ifdef WIN32 - QDateTime now=QDateTime::currentDateTime(); - QString tempdir=RDTempDirectory::basePath()+"/"+temp_base_name+ - QString().sprintf("%u",now.toTime_t()); - temp_dir=new QDir(tempdir); - if(!temp_dir->mkdir(tempdir)) { - *err_msg="unable to create temp directory"; - delete temp_dir; - return false; - } -#else char tempdir[PATH_MAX]; strncpy(tempdir,RDTempDirectory::basePath(),PATH_MAX); @@ -83,7 +70,6 @@ bool RDTempDirectory::create(QString *err_msg) return false; } temp_dir=new QDir(tempdir); -#endif // WIN32 return true; } @@ -95,18 +81,8 @@ QString RDTempDirectory::basePath() if (!conf_temp_directory.isEmpty()) { return conf_temp_directory; } -#ifdef WIN32 - if(getenv("TEMP")!=NULL) { - return QString(getenv("TEMP")); - } - if(getenv("TMP")!=NULL) { - return QString(getenv("TMP")); - } - return QString("C:\\"); -#else if(getenv("TMPDIR")!=NULL) { return QString(getenv("TMPDIR")); } return QString("/tmp"); -#endif // WIN32 } diff --git a/lib/rdtextfile.cpp b/lib/rdtextfile.cpp index 58ee2c2c..93d9b4a7 100644 --- a/lib/rdtextfile.cpp +++ b/lib/rdtextfile.cpp @@ -18,9 +18,7 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include -#endif // WIN32 #include #include @@ -40,32 +38,11 @@ bool RDTextFile(const QString &data) QString editor; if(getenv("VISUAL")==NULL) { -#ifdef WIN32 - editor=RD_WIN32_EDITOR; -#else editor=RD_LINUX_EDITOR; -#endif // WIN32 } else { editor=getenv("VISUAL"); } -#ifdef WIN32 - QString tempfile=RDTempDirectory::basePath()+"\\rd-"+ - QTime::currentTime().toString("hhmmsszzz"); - FILE *f=fopen(tempfile,"w"); - if(f==NULL) { - QMessageBox::warning(NULL,"File Error","Unable to create temporary file"); - return false; - } - fprintf(f,"%s",(const char *)data.utf8()); - fclose(f); - QStringList args; - args+=editor; - args+=tempfile; - Q3Process *proc=new Q3Process(args); - proc->launch(""); - delete proc; -#else strcpy(tmpfile,RDTempDirectory::basePath()+"/rdreportXXXXXX"); int fd=mkstemp(tmpfile); if(fd<0) { @@ -79,6 +56,5 @@ bool RDTextFile(const QString &data) unlink(tmpfile); exit(0); } -#endif // WIN32 return true; } diff --git a/lib/rdttydevice.h b/lib/rdttydevice.h index e93e800c..1722a9a8 100644 --- a/lib/rdttydevice.h +++ b/lib/rdttydevice.h @@ -22,12 +22,8 @@ #ifndef RDTTYDEVICE_H #define RDTTYDEVICE_H -#ifdef WIN32 -#include -#else #include #include -#endif // WIN32 #include @@ -35,8 +31,6 @@ #include #include -#define WIN32_BUFFER_SIZE 130 - class RDTTYDevice : public QIODevice { Q_OBJECT; @@ -94,15 +88,9 @@ class RDTTYDevice : public QIODevice bool tty_open; int tty_flags; QIODevice::OpenMode tty_mode; -#ifdef WIN32 - HANDLE tty_fd; - int tty_speed; - int tty_length; -#else int tty_fd; speed_t tty_speed; tcflag_t tty_length; -#endif // WIN32 QSocketNotifier *tty_notifier; std::queue tty_write_queue; QTimer *tty_write_timer; diff --git a/lib/rduser.cpp b/lib/rduser.cpp index 70bff21d..b448823c 100644 --- a/lib/rduser.cpp +++ b/lib/rduser.cpp @@ -80,7 +80,6 @@ bool RDUser::authenticated(bool webuser) const } delete q; } -#ifndef WIN32 else { bool ret=false; RDPam *pam=new RDPam(pamService()); @@ -88,7 +87,7 @@ bool RDUser::authenticated(bool webuser) const delete pam; return ret; } -#endif // WIN32 + return false; } diff --git a/lib/rdwavefile.cpp b/lib/rdwavefile.cpp index 9590fdfb..4326af1c 100644 --- a/lib/rdwavefile.cpp +++ b/lib/rdwavefile.cpp @@ -2,7 +2,7 @@ // // A class for handling audio files. // -// (C) Copyright 2002-2015 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License diff --git a/lib/rdwavefile.h b/lib/rdwavefile.h index 2a494869..3d9c59fa 100644 --- a/lib/rdwavefile.h +++ b/lib/rdwavefile.h @@ -2,7 +2,7 @@ // // A class for handling Microsoft WAV files. // -// (C) Copyright 2002-2004,2016 Fred Gleason +// (C) Copyright 2002-2018 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -25,9 +25,7 @@ #include #include #include -#ifndef WIN32 #include -#endif // WIN32 #include #include #include diff --git a/lib/rdweb.cpp b/lib/rdweb.cpp index 5b0c9635..d12aab01 100644 --- a/lib/rdweb.cpp +++ b/lib/rdweb.cpp @@ -3,7 +3,7 @@ // Functions for interfacing with web components using the // Common Gateway Interface (CGI) Standard // -// (C) Copyright 1996-2007,2017 Fred Gleason +// (C) Copyright 1996-2018 Fred Gleason // // 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,9 +22,7 @@ #include #include #include -#ifndef WIN32 #include -#endif //WIN32 #include #include #include @@ -37,13 +35,10 @@ #include "rdescape_string.h" #include "rdtempdirectory.h" #include "rduser.h" -#ifndef WIN32 #include "rdwebresult.h" -#endif // WIN32 #include "rdweb.h" -#ifndef WIN32 /* RDReadPost(char *cBuffer,int dSize) */ /* This function reads POST data (such as that submitted by an HTML form) into @@ -559,7 +554,6 @@ void RDCgiError(const char *str,int resp_code) } -#ifndef WIN32 extern void RDXMLResult(const char *str,int resp_code, RDAudioConvert::ErrorCode err) { @@ -573,7 +567,6 @@ extern void RDXMLResult(const char *str,int resp_code, exit(0); } -#endif // WIN32 /* @@ -876,8 +869,6 @@ bool RDParsePost(std::map *vars) return true; } -#endif // WIN32 - QString RDXmlField(const QString &tag,const QString &value,const QString &attrs) { diff --git a/lib/rdweb.h b/lib/rdweb.h index 37d621fb..64eedc82 100644 --- a/lib/rdweb.h +++ b/lib/rdweb.h @@ -29,9 +29,7 @@ #include #include -#ifndef WIN32 #include -#endif // WIN32 // // Data Structure Sizes @@ -42,7 +40,6 @@ // // Function Prototypes // -#ifndef WIN32 extern int RDReadPost(char *,int); extern int RDPutPostString(char *,char *,char *,int); extern int RDFindPostString(const char *,const char *,char *,int); @@ -56,10 +53,8 @@ extern int RDDecodeString(char *); extern int RDPutPlaintext(char *,int); extern int RDPurgePlaintext(char *,int); extern void RDCgiError(const char *str,int resp_code=200); -#ifndef WIN32 extern void RDXMLResult(const char *str,int resp_code, RDAudioConvert::ErrorCode err=RDAudioConvert::ErrorOk); -#endif // WIN32 extern int RDBufferDiff(char *,int,int,int); extern void RDPruneAmp(char *); extern int RDEscapeQuotes(const char *src,char *dest,int maxlen); @@ -70,7 +65,6 @@ extern QString RDAuthenticateSession(long int session_id, const QHostAddress &addr); extern void RDLogoutSession(long int session_id,const QHostAddress &addr); extern bool RDParsePost(std::map *vars); -#endif // WIN32 extern QString RDXmlField(const QString &tag,const QString &value, const QString &attrs=""); extern QString RDXmlField(const QString &tag,const char *value, diff --git a/rdcastmanager/rdcastmanager.cpp b/rdcastmanager/rdcastmanager.cpp index d0131846..b060dfc3 100644 --- a/rdcastmanager/rdcastmanager.cpp +++ b/rdcastmanager/rdcastmanager.cpp @@ -18,12 +18,11 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include #include -#endif + #include #include #include @@ -105,17 +104,8 @@ MainWidget::MainWidget(QWidget *parent) // // RIPC Connection // -#ifndef WIN32 connect(rda,SIGNAL(userChanged()),this,SLOT(userChangedData())); rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password()); -#endif // WIN32 - - // - // User - // -#ifdef WIN32 - rda->user()->setName(RD_USER_LOGIN_NAME); -#endif // WIN32 // // Create Fonts @@ -333,15 +323,9 @@ int main(int argc,char *argv[]) // QString tr_path; QString qt_path; -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - tr_path=settings.readEntry("/Rivendell/InstallDir")+"\""; - qt_path=tr_path; -#else tr_path=QString(PREFIX)+QString("/share/rivendell/"); qt_path=QString("/usr/share/qt4/translation/"); -#endif // WIN32 + QTranslator qt(0); qt.load(qt_path+QString("qt_")+QTextCodec::locale(),"."); a.installTranslator(&qt); diff --git a/rdlogedit/edit_log.cpp b/rdlogedit/edit_log.cpp index 2dbac7f5..6d2c32b6 100644 --- a/rdlogedit/edit_log.cpp +++ b/rdlogedit/edit_log.cpp @@ -133,9 +133,8 @@ EditLog::EditLog(QString logname,QString *filter,QString *group, // // Dialogs // -#ifndef WIN32 - edit_render_dialog=new RenderDialog(rda->station(),rda->system(),rda->config(),this); -#endif // WIN32 + edit_render_dialog= + new RenderDialog(rda->station(),rda->system(),rda->config(),this); // // Text Validator @@ -477,12 +476,10 @@ EditLog::EditLog(QString logname,QString *filter,QString *group, // // Render Button // -#ifndef WIN32 edit_renderas_button=new QPushButton(this); edit_renderas_button->setFont(button_font); edit_renderas_button->setText(tr("Render")); connect(edit_renderas_button,SIGNAL(clicked()),this,SLOT(renderasData())); -#endif // WIN32 // // Reports Button @@ -495,14 +492,10 @@ EditLog::EditLog(QString logname,QString *filter,QString *group, // // Cart Player // -#ifdef WIN32 - edit_player=NULL; -#else edit_player= new RDSimplePlayer(rda->cae(),rda->ripc(),edit_output_card,edit_output_port, edit_start_macro,edit_end_macro,this); edit_player->stopButton()->setOnColor(Qt::red); -#endif // WIN32 // // Ok Button @@ -855,7 +848,6 @@ void EditLog::insertMarkerButtonData() void EditLog::clickedData(Q3ListViewItem *item) { -#ifndef WIN32 RDListViewItem *rditem=SingleSelection(); if(rditem==NULL) { edit_player->setCart(0); @@ -864,7 +856,6 @@ void EditLog::clickedData(Q3ListViewItem *item) else { edit_player->setCart(rditem->text(3).toUInt()); } -#endif // WIN32 } @@ -1178,7 +1169,6 @@ void EditLog::saveasData() void EditLog::renderasData() { -#ifndef WIN32 int first_line=-1; int last_line=-1; @@ -1200,7 +1190,6 @@ void EditLog::renderasData() else { edit_render_dialog->exec(rda->user(),edit_log_event,first_line,last_line+1); } -#endif // WIN32 } @@ -1236,9 +1225,7 @@ void EditLog::okData() SaveLog(); DeleteTracks(); } -#ifndef WIN32 edit_player->stop(); -#endif // WIN32 for(unsigned i=0;isize();i++) { edit_clipboard->at(i).clearExternalData(); } @@ -1269,9 +1256,7 @@ void EditLog::cancelData() break; } } -#ifndef WIN32 edit_player->stop(); -#endif // WIN32 for(unsigned i=0;isize();i++) { edit_clipboard->at(i).clearExternalData(); } @@ -1338,11 +1323,9 @@ void EditLog::resizeEvent(QResizeEvent *e) edit_save_button->setGeometry(10,size().height()-60,80,50); edit_saveas_button->setGeometry(100,size().height()-60,80,50); edit_reports_button->setGeometry(300,size().height()-60,80,50); -#ifndef WIN32 edit_renderas_button->setGeometry(190,size().height()-60,80,50); edit_player->playButton()->setGeometry(410,size().height()-60,80,50); edit_player->stopButton()->setGeometry(500,size().height()-60,80,50); -#endif // WIN32 edit_ok_button-> setGeometry(size().width()-180,size().height()-60,80,50); edit_cancel_button->setGeometry(size().width()-90,size().height()-60,80,50); diff --git a/rdlogedit/edit_log.h b/rdlogedit/edit_log.h index a7afcede..81207cdd 100644 --- a/rdlogedit/edit_log.h +++ b/rdlogedit/edit_log.h @@ -45,9 +45,7 @@ #include "drop_listview.h" #include "list_reports.h" -#ifndef WIN32 #include "render_dialog.h" -#endif // WIN32 // // Widget Settings @@ -197,10 +195,8 @@ class EditLog : public QDialog Q3DateEdit *edit_purgedate_edit; QPushButton *edit_purgedate_button; RDLogLock *edit_log_lock; -#ifndef WIN32 QPushButton *edit_renderas_button; RenderDialog *edit_render_dialog; -#endif // WIN32 }; diff --git a/rdlogedit/rdlogedit.cpp b/rdlogedit/rdlogedit.cpp index 27761755..2e866d15 100644 --- a/rdlogedit/rdlogedit.cpp +++ b/rdlogedit/rdlogedit.cpp @@ -18,12 +18,11 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include #include -#endif // WIN32 + #include #include #include @@ -56,9 +55,7 @@ #include "edit_log.h" #include "globals.h" #include "rdlogedit.h" -#ifndef WIN32 #include "voice_tracker.h" -#endif // WIN32 // // Icons @@ -116,24 +113,19 @@ MainWidget::MainWidget(QWidget *parent) // // CAE Connection // -#ifndef WIN32 connect(rda->cae(),SIGNAL(isConnected(bool)), this,SLOT(caeConnectedData(bool))); rda->cae()->connectHost(); -#endif // WIN32 // // RIPC Connection // -#ifndef WIN32 connect(rda->ripc(),SIGNAL(connected(bool)),this,SLOT(connectedData(bool))); connect(rda->ripc(),SIGNAL(notificationReceived(RDNotification *)), this,SLOT(notificationReceivedData(RDNotification *))); connect(rda,SIGNAL(userChanged()),this,SLOT(userData())); - rda->ripc()->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password()); -#else - rdripc=NULL; -#endif // WIN32 + rda->ripc() + ->connectHost("localhost",RIPCD_TCP_PORT,rda->config()->password()); // // Create Fonts @@ -155,17 +147,10 @@ MainWidget::MainWidget(QWidget *parent) log_greenball_map=new QPixmap(greenball_xpm); log_redball_map=new QPixmap(redball_xpm); - // - // User - // -#ifndef WIN32 // // Load Audio Assignments // RDSetMixerPorts(rda->config()->stationName(),rda->cae()); -#else - rda->user()->setName(RD_USER_LOGIN_NAME); -#endif // WIN32 // // Log Filter @@ -247,9 +232,6 @@ MainWidget::MainWidget(QWidget *parent) log_track_button->setFont(button_font); log_track_button->setText(tr("Voice\n&Tracker")); connect(log_track_button,SIGNAL(clicked()),this,SLOT(trackData())); -#ifdef WIN32 - log_track_button->hide(); -#endif // // Log Report Button @@ -267,9 +249,6 @@ MainWidget::MainWidget(QWidget *parent) log_close_button->setText(tr("&Close")); connect(log_close_button,SIGNAL(clicked()),this,SLOT(quitMainWidget())); -#ifdef WIN32 - RefreshList(); -#endif // WIN32 setWindowTitle(QString("RDLogEdit")+"v"+VERSION+" - "+tr("Host")+": "+ rda->config()->stationName()+", "+ tr("User")+": ["+tr("Unknown")+"]"); @@ -347,11 +326,7 @@ void MainWidget::addData() return; } delete log; -#ifdef WIN32 - QString username(RD_USER_LOGIN_NAME); -#else QString username(rda->ripc()->user()); -#endif // WIN32 QString err_msg; if(!RDLog::create(logname,svcname,QDate(),username,&err_msg, rda->config())) { @@ -503,7 +478,6 @@ void MainWidget::deleteData() void MainWidget::trackData() { -#ifndef WIN32 std::vector items; if(SelectedLogs(&items)!=1) { return; @@ -514,7 +488,6 @@ void MainWidget::trackData() delete dialog; RefreshItem(items.at(0)); UnlockList(); -#endif // WIN32 } @@ -911,17 +884,10 @@ int main(int argc,char *argv[]) // QString tr_path; QString qt_path; -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - tr_path=QString().sprintf("%s\\", - (const char *)settings. - readEntry("/Rivendell/InstallDir")); - qt_path=tr_path; -#else + tr_path=QString(PREFIX)+QString("/share/rivendell/"); qt_path=QString("/usr/share/qt4/translation/"); -#endif // WIN32 + QTranslator qt(0); qt.load(qt_path+QString("qt_")+QTextCodec::locale(),"."); a.installTranslator(&qt); diff --git a/rdlogmanager/edit_event.cpp b/rdlogmanager/edit_event.cpp index d5e60040..126e322e 100644 --- a/rdlogmanager/edit_event.cpp +++ b/rdlogmanager/edit_event.cpp @@ -170,7 +170,6 @@ EditEvent::EditEvent(QString eventname,bool new_event, QString sql; RDSqlQuery *q; event_player = NULL; -#ifndef WIN32 sql=QString("select ")+ "OUTPUT_CARD,"+ // 00 "OUTPUT_PORT,"+ // 01 @@ -189,7 +188,6 @@ EditEvent::EditEvent(QString eventname,bool new_event, event_player->stopButton()->setOnColor(Qt::red); } delete q; -#endif // WIN32 // // Remarks @@ -841,14 +839,12 @@ void EditEvent::filterClickedData(int id) void EditEvent::cartClickedData(Q3ListViewItem *item) { -#ifndef WIN32 if (!event_player) return; if(item==NULL) { event_player->setCart(0); return; } event_player->setCart(item->text(1).toUInt()); -#endif // WIN32 } @@ -1224,22 +1220,19 @@ void EditEvent::colorData() void EditEvent::okData() { Save(); -#ifndef WIN32 if (event_player){ event_player->stop(); } -#endif // WIN32 + done(0); } void EditEvent::cancelData() { -#ifndef WIN32 if (event_player){ event_player->stop(); } -#endif // WIN32 if(event_saved) { done(-1); } diff --git a/rdlogmanager/pick_report_dates.cpp b/rdlogmanager/pick_report_dates.cpp index a2d076f5..e87d9a60 100644 --- a/rdlogmanager/pick_report_dates.cpp +++ b/rdlogmanager/pick_report_dates.cpp @@ -199,17 +199,10 @@ void PickReportDates::generateData() delete report; return; } -#ifdef WIN32 - QString filename= - RDDateDecode(report->exportPath(RDReport::Windows), - edit_startdate_edit->date(),rda->station(),rda->config(), - edit_svcname); -#else QString filename= RDDateDecode(report->exportPath(RDReport::Linux), edit_startdate_edit->date(),rda->station(),rda->config(), edit_svcname); -#endif QFile file(filename); if(file.exists()) { if(QMessageBox::question(this,"File Exists", diff --git a/rdlogmanager/rdlogmanager.cpp b/rdlogmanager/rdlogmanager.cpp index 8aa93363..e06ab082 100644 --- a/rdlogmanager/rdlogmanager.cpp +++ b/rdlogmanager/rdlogmanager.cpp @@ -18,13 +18,12 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include #include #include -#endif // WIN32 + #include #include #include @@ -96,9 +95,7 @@ MainWidget::MainWidget(QWidget *parent) // // CAE Connection // -#ifndef WIN32 rda->cae()->connectHost(); -#endif // WIN32 // // RIPC Connection @@ -285,17 +282,9 @@ int gui_main(int argc,char *argv[]) // QString tr_path; QString qt_path; -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - tr_path=QString().sprintf("%s\\", - (const char *)settings. - readEntry("/Rivendell/InstallDir")); - qt_path=tr_path; -#else tr_path=QString(PREFIX)+QString("/share/rivendell/"); qt_path=QString("/usr/share/qt4/translation/"); -#endif // WIN32 + QTranslator qt(0); qt.load(qt_path+QString("qt_")+QTextCodec::locale(),"."); a.installTranslator(&qt); diff --git a/rdlogmanager/svc_rec_dialog.cpp b/rdlogmanager/svc_rec_dialog.cpp index a11c4928..661e7b57 100644 --- a/rdlogmanager/svc_rec_dialog.cpp +++ b/rdlogmanager/svc_rec_dialog.cpp @@ -72,10 +72,8 @@ SvcRecDialog::SvcRecDialog(const QString &svcname,QWidget *parent) date_delete_button->setFont(font); date_delete_button->setText(tr("&Purge\nData")); connect(date_delete_button,SIGNAL(clicked()),this,SLOT(deleteData())); -#ifndef WIN32 date_delete_button->setEnabled(rda->user()->deleteRec()&& date_picker->dayActive(date_picker->date().day())); -#endif // WIN32 // // Close Button @@ -109,13 +107,8 @@ QSizePolicy SvcRecDialog::sizePolicy() const void SvcRecDialog::dateSelectedData(const QDate &,bool active) { -#ifdef WIN32 - date_delete_button-> - setEnabled(date_picker->dayActive(date_picker->date().day())); -#else date_delete_button->setEnabled(rda->user()->deleteRec()&& date_picker->dayActive(date_picker->date().day())); -#endif // WIN32 } diff --git a/utils/rdsoftkeys/rdsoftkeys.cpp b/utils/rdsoftkeys/rdsoftkeys.cpp index 8a6e03c6..c3b59a8a 100644 --- a/utils/rdsoftkeys/rdsoftkeys.cpp +++ b/utils/rdsoftkeys/rdsoftkeys.cpp @@ -19,12 +19,10 @@ // #include -#ifndef WIN32 #include #include #include #include -#endif #include #include @@ -34,7 +32,6 @@ #include #include #include -//Added by qt3to4: #include #include @@ -197,7 +194,6 @@ QSizePolicy MainWidget::sizePolicy() const void MainWidget::buttonData(int id) { QHostAddress addr; -#ifndef WIN32 struct hostent *hostent=gethostbyname(key_addrs[id]); if(hostent==NULL) { QMessageBox::warning(this,tr("RDSoftKeys"),hstrerror(h_errno)); @@ -211,9 +207,6 @@ void MainWidget::buttonData(int id) else { addr.setAddress(key_addrs[id]); } -#else - addr.setAddress(key_addrs[id]); -#endif // WIN32 key_socket->writeBlock(key_macros[id],key_macros[id].length(), addr,(Q_UINT16)RD_RML_NOECHO_PORT); } @@ -289,17 +282,10 @@ int main(int argc,char *argv[]) // QString tr_path; QString qt_path; -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - tr_path=QString().sprintf("%s\\", - (const char *)settings. - readEntry("/Rivendell/InstallDir")); - qt_path=tr_path; -#else + tr_path=QString(PREFIX)+QString("/share/srlabs/"); qt_path=QString("/usr/share/qt4/translation/"); -#endif // WIN32 + QTranslator qt(0); qt.load(qt_path+QString("qt_")+QTextCodec::locale(),"."); a.installTranslator(&qt); diff --git a/utils/rmlsend/rmlsend.cpp b/utils/rmlsend/rmlsend.cpp index 9a224e47..e0bb9143 100644 --- a/utils/rmlsend/rmlsend.cpp +++ b/utils/rmlsend/rmlsend.cpp @@ -18,11 +18,18 @@ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // -#ifndef WIN32 #include #include #include -#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,24 +50,11 @@ #include #include #include -//Added by qt3to4: #include #include -#ifndef WIN32 -#include -#include -#include -#endif // WIN32 -#include -#include -#include -#include -#include -#include - -#include +#include "rmlsend.h" // // Icons @@ -245,7 +239,6 @@ void MainWidget::sendCommand() break; } response->setText(""); -#ifndef WIN32 struct hostent *hostent=gethostbyname(host->text()); if(hostent==NULL) { QMessageBox::warning(this,tr("RMLSend"),hstrerror(h_errno)); @@ -259,9 +252,6 @@ void MainWidget::sendCommand() else { host_addr.setAddress(host->text()); } -#else - host_addr.setAddress(host->text()); -#endif // WIN32 dcl_command=command->text(); if(!udp_command->writeBlock(dcl_command.utf8(),dcl_command.utf8().length(), host_addr,(Q_UINT16)port)) { @@ -329,7 +319,6 @@ void MainWidget::destChangedData(int id) } } -#ifndef WIN32 MainObject::MainObject(QObject *parent,const char *name) { input_fd=-1; @@ -479,7 +468,7 @@ void MainObject::ProcessCommands() } } } -#endif // WIN32 + int main(int argc,char *argv[]) { @@ -496,16 +485,10 @@ int main(int argc,char *argv[]) cli_mode=true; } } -#ifdef WIN32 - cli_mode=false; -#endif // WIN32 - if(cli_mode) { -#ifndef WIN32 QApplication a(argc,argv,false); new MainObject(); return a.exec(); -#endif // WIN32 } else { QApplication::setStyle(new QWindowsStyle); @@ -516,17 +499,10 @@ int main(int argc,char *argv[]) // QString tr_path; QString qt_path; -#ifdef WIN32 - QSettings settings; - settings.insertSearchPath(QSettings::Windows,"/SalemRadioLabs"); - tr_path=QString().sprintf("%s\\", - (const char *)settings. - readEntry("/Rivendell/InstallDir")); - qt_path=tr_path; -#else + tr_path=QString(PREFIX)+QString("/share/rivendell/"); qt_path=QString("/usr/share/qt4/translation/"); -#endif // WIN32 + QTranslator qt(0); qt.load(qt_path+QString("qt_")+QTextCodec::locale(),"."); a.installTranslator(&qt); From 3768a5fb145b75616c1041c98c2b1cd47ef307c6 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Fri, 19 Oct 2018 19:36:43 -0400 Subject: [PATCH 12/12] 2018-10-19 Fred Gleason * Removed check for Win32 installer from 'configure.ac'. * Removed win32 clauses from '.pro' files. --- ChangeLog | 3 + configure.ac | 15 -- lib/Makefile.am | 5 +- lib/lib.pro | 233 +++++++++----------- lib/rdttydevice_win32.cpp | 366 -------------------------------- lib/rdwin32.cpp | 27 --- lib/rdwin32.h | 27 --- rdcastmanager/rdcastmanager.pro | 28 +-- rdhpi/rdhpi.pro | 46 ++-- rdlogedit/rdlogedit.pro | 40 +--- rdlogmanager/rdlogmanager.pro | 28 +-- ripcd/Makefile.am | 2 - ripcd/ripcd.pro | 53 ----- rivendell.spec.in | 5 - utils/rdcollect/Makefile.am | 2 - utils/rdcollect/rdcollect.pro | 42 ---- utils/rdsoftkeys/Makefile.am | 2 - utils/rdsoftkeys/rdsoftkeys.pro | 42 ---- utils/rmlsend/rmlsend.pro | 29 +-- 19 files changed, 160 insertions(+), 835 deletions(-) delete mode 100644 lib/rdttydevice_win32.cpp delete mode 100644 lib/rdwin32.cpp delete mode 100644 lib/rdwin32.h delete mode 100644 ripcd/ripcd.pro delete mode 100644 utils/rdcollect/rdcollect.pro delete mode 100644 utils/rdsoftkeys/rdsoftkeys.pro diff --git a/ChangeLog b/ChangeLog index 0d4473ba..9616c4d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17848,3 +17848,6 @@ 2018-10-19 Fred Gleason * Removed 'build_win32.bat'. * Removed all conditional compilation based on 'WIN32'. +2018-10-19 Fred Gleason + * Removed check for Win32 installer from 'configure.ac'. + * Removed win32 clauses from '.pro' files. diff --git a/configure.ac b/configure.ac index 77838ec6..896b3298 100644 --- a/configure.ac +++ b/configure.ac @@ -414,16 +414,6 @@ fi # # Configure RPM Build # -AC_MSG_CHECKING([for $WIN32_SETUPS/rivendell-$VERSION-$RPM_RELEASE.exe]) -if test -f $WIN32_SETUPS/rivendell-$VERSION-$RPM_RELEASE.exe ; then - AC_MSG_RESULT([yes]) - AC_SUBST(WIN32_SOURCE,"$WIN32_SETUPS/rivendell-$VERSION-$RPM_RELEASE.exe") - AC_SUBST(WIN32_PATH,"/var/win32/rivendell-$VERSION-$RPM_RELEASE.exe") -else - AC_MSG_RESULT([no]) - AC_SUBST(WIN32_SOURCE,"") - AC_SUBST(WIN32_PATH,"") -fi AC_CHECK_PROG(RPMBUILD_FOUND,rpmbuild,[yes],[]) if test -z $RPMBUILD_FOUND ; then AC_SUBST(RPMBUILD,rpm) @@ -621,11 +611,6 @@ AC_MSG_NOTICE("| M4A Decoding Support ... Yes |") fi AC_MSG_NOTICE("|-----------------------------------------------------|") AC_MSG_NOTICE() -if test $WIN32_SOURCE ; then -AC_MSG_NOTICE([Including RPM win32 setup from:]) -AC_MSG_NOTICE([ $WIN32_SOURCE]) -AC_MSG_NOTICE() -fi AC_MSG_NOTICE() AC_MSG_NOTICE(Now enter 'make' to build the software.) AC_MSG_NOTICE() diff --git a/lib/Makefile.am b/lib/Makefile.am index 3b516e6f..8c33f5bf 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -351,10 +351,7 @@ EXTRA_DIST = gpl2.html\ librd_nb.ts\ librd_nn.ts\ librd_pt_BR.ts\ - rdpaths.h.in\ - rdttydevice_win32.cpp\ - rdwin32.cpp\ - rdwin32.h + rdpaths.h.in CLEANFILES = *~\ moc_*\ diff --git a/lib/lib.pro b/lib/lib.pro index 1e0f1954..b10be77c 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -2,7 +2,7 @@ # # The lib/ QMake project file for Rivendell. # -# (C) Copyright 2003-2016 Fred Gleason +# (C) Copyright 2003-2018 Fred Gleason # # 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 @@ -17,16 +17,12 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = lib - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# SOURCES += export_bmiemr.cpp SOURCES += export_cutlog.cpp @@ -40,47 +36,76 @@ SOURCES += export_spincount.cpp SOURCES += export_soundex.cpp SOURCES += export_technical.cpp SOURCES += export_textlog.cpp +SOURCES += html_gpl2.cpp SOURCES += rdadd_log.cpp +SOURCES += rdadd_cart.cpp +SOURCES += rdairplay_conf.cpp SOURCES += rdapplication.cpp +SOURCES += rdaudio_exists.cpp +SOURCES += rdaudio_port.cpp SOURCES += rdaudiosettings.cpp SOURCES += rdaudiosettings_dialog.cpp SOURCES += rdbusybar.cpp SOURCES += rdbusydialog.cpp +SOURCES += rdbutton_dialog.cpp +SOURCES += rdbutton_panel.cpp +SOURCES += rdcae.cpp +SOURCES += rdcardselector.cpp SOURCES += rdcart.cpp SOURCES += rdcart_dialog.cpp SOURCES += rdcart_search_text.cpp SOURCES += rdcartdrag.cpp +SOURCES += rdcatch_connect.cpp +SOURCES += rdcddblookup.cpp +SOURCES += rdcdplayer.cpp +SOURCES += rdcddbrecord.cpp +SOURCES += rdcheck_version.cpp SOURCES += rdclock.cpp +SOURCES += rdcmd_cache.cpp SOURCES += rdcmd_switch.cpp SOURCES += rdcombobox.cpp SOURCES += rdconf.cpp SOURCES += rdconfig.cpp +SOURCES += rdcueedit.cpp +SOURCES += rdcueeditdialog.cpp SOURCES += rdcut.cpp +SOURCES += rdcut_path.cpp +SOURCES += rdcut_dialog.cpp SOURCES += rddatedialog.cpp SOURCES += rddatedecode.cpp SOURCES += rddatepicker.cpp SOURCES += rddb.cpp SOURCES += rddbheartbeat.cpp SOURCES += rddebug.cpp +SOURCES += rddeck.cpp SOURCES += rddropbox.cpp +SOURCES += rdedit_audio.cpp +SOURCES += rdedit_panel_name.cpp SOURCES += rdemptycart.cpp SOURCES += rdescape_string.cpp SOURCES += rdevent.cpp SOURCES += rdevent_line.cpp SOURCES += rdeventimportlist.cpp SOURCES += rdexception_dialog.cpp +SOURCES += rdexport_settings_dialog.cpp SOURCES += rdget_ath.cpp SOURCES += rdgetpasswd.cpp +SOURCES += rdgpioselector.cpp +SOURCES += rdgrid.cpp SOURCES += rdgroup.cpp SOURCES += rdgroup_list.cpp +SOURCES += rdhash.cpp SOURCES += rdidvalidator.cpp +SOURCES += rdimport_audio.cpp SOURCES += rdintegeredit.cpp SOURCES += rdintegerdialog.cpp +SOURCES += rdkernelgpio.cpp SOURCES += rdlabel.cpp SOURCES += rdlibrary_conf.cpp SOURCES += rdlicense.cpp SOURCES += rdlineedit.cpp SOURCES += rdlist_logs.cpp +SOURCES += rdlist_groups.cpp SOURCES += rdlistselector.cpp SOURCES += rdlistview.cpp SOURCES += rdlistviewitem.cpp @@ -90,23 +115,38 @@ SOURCES += rdlog_line.cpp SOURCES += rdlogedit_conf.cpp SOURCES += rdlogfilter.cpp SOURCES += rdloglock.cpp +SOURCES += rdlogplay.cpp SOURCES += rdmacro.cpp SOURCES += rdmacro_event.cpp +SOURCES += rdmarker_button.cpp +SOURCES += rdmarker_edit.cpp +SOURCES += rdmatrix.cpp +SOURCES += rdmonitor_config.cpp SOURCES += rdnotification.cpp SOURCES += rdoneshot.cpp +SOURCES += rdpanel_button.cpp +SOURCES += rdpasswd.cpp +SOURCES += rdplay_deck.cpp SOURCES += rdplaymeter.cpp SOURCES += rdprofile.cpp SOURCES += rdprofileline.cpp SOURCES += rdprofilesection.cpp SOURCES += rdpushbutton.cpp +SOURCES += rdrecording.cpp +SOURCES += rdrehash.cpp +SOURCES += rdrenderer.cpp SOURCES += rdreport.cpp SOURCES += rdripc.cpp +SOURCES += rdrlmhost.cpp SOURCES += rdschedcode.cpp SOURCES += rdsegmeter.cpp SOURCES += rdsettings.cpp +SOURCES += rdsimpleplayer.cpp SOURCES += rdslider.cpp SOURCES += rdsocket.cpp +SOURCES += rdsound_panel.cpp SOURCES += rdstation.cpp +SOURCES += rdstatus.cpp SOURCES += rdstereometer.cpp SOURCES += rdsvc.cpp SOURCES += rdsystem.cpp @@ -116,87 +156,53 @@ SOURCES += rdtextvalidator.cpp SOURCES += rdtimeedit.cpp SOURCES += rdtimeengine.cpp SOURCES += rdtransportbutton.cpp +SOURCES += rdtty.cpp +SOURCES += rdttydevice.cpp +SOURCES += rdttyout.cpp SOURCES += rduser.cpp +SOURCES += rdversion.cpp SOURCES += rdwavedata.cpp +SOURCES += rdwavefile.cpp SOURCES += rdweb.cpp SOURCES += schedcartlist.cpp SOURCES += schedruleslist.cpp -win32 { - SOURCES += html_gpl2_win32.cpp - SOURCES += rdttydevice_win32.cpp - SOURCES += rdwin32.cpp -} -x11 { - SOURCES += html_gpl2.cpp - SOURCES += rdadd_cart.cpp - SOURCES += rdairplay_conf.cpp - SOURCES += rdaudio_exists.cpp - SOURCES += rdaudio_port.cpp - SOURCES += rdbutton_dialog.cpp - SOURCES += rdbutton_panel.cpp - SOURCES += rdcae.cpp - SOURCES += rdcardselector.cpp - SOURCES += rdcatch_connect.cpp - SOURCES += rdcddblookup.cpp - SOURCES += rdcdplayer.cpp - SOURCES += rdcddbrecord.cpp - SOURCES += rdcheck_version.cpp - SOURCES += rdcmd_cache.cpp - SOURCES += rdcueedit.cpp - SOURCES += rdcueeditdialog.cpp - SOURCES += rdcut_dialog.cpp - SOURCES += rdcut_path.cpp - SOURCES += rddeck.cpp - SOURCES += rdedit_audio.cpp - SOURCES += rdedit_panel_name.cpp - SOURCES += rdexport_settings_dialog.cpp - SOURCES += rdgpioselector.cpp - SOURCES += rdgrid.cpp - SOURCES += rdhash.cpp - SOURCES += rdimport_audio.cpp - SOURCES += rdkernelgpio.cpp - SOURCES += rdlist_groups.cpp - SOURCES += rdlogplay.cpp - SOURCES += rdmarker_button.cpp - SOURCES += rdmarker_edit.cpp - SOURCES += rdmatrix.cpp - SOURCES += rdmonitor_config.cpp - SOURCES += rdpanel_button.cpp - SOURCES += rdpasswd.cpp - SOURCES += rdplay_deck.cpp - SOURCES += rdrecording.cpp - SOURCES += rdrehash.cpp - SOURCES += rdrenderer.cpp - SOURCES += rdrlmhost.cpp - SOURCES += rdsimpleplayer.cpp - SOURCES += rdsound_panel.cpp - SOURCES += rdstatus.cpp - SOURCES += rdtimeedit.cpp - SOURCES += rdtty.cpp - SOURCES += rdttydevice.cpp - SOURCES += rdttyout.cpp - SOURCES += rdversion.cpp - SOURCES += rdwavefile.cpp -} HEADERS += schedcartlist.h HEADERS += schedruleslist.h +HEADERS += rd.h +HEADERS += rdadd_cart.h HEADERS += rdadd_log.h +HEADERS += rdairplay_conf.h HEADERS += rdapplication.h +HEADERS += rdaudio_exists.h +HEADERS += rdaudio_port.h HEADERS += rdaudiosettings.h HEADERS += rdaudiosettings_dialog.h HEADERS += rdbusybar.h HEADERS += rdbusydialog.h +HEADERS += rdbutton_dialog.h +HEADERS += rdbutton_panel.h HEADERS += rdcae.h +HEADERS += rdcardselector.h HEADERS += rdcart.h HEADERS += rdcart_dialog.h HEADERS += rdcart_search_text.h HEADERS += rdcartdrag.h +HEADERS += rdcatch_connect.h +HEADERS += rdcddblookup.h +HEADERS += rdcdplayer.h +HEADERS += rdcddbrecord.h +HEADERS += rdcheck_version.h HEADERS += rdclock.h +HEADERS += rdcmd_cache.h HEADERS += rdcmd_switch.h HEADERS += rdcombobox.h HEADERS += rdconf.h HEADERS += rdconfig.h +HEADERS += rdcueedit.h +HEADERS += rdcueeditdialog.h +HEADERS += rdcut_dialog.h +HEADERS += rdcut_path.h HEADERS += rdcut.h HEADERS += rddatedecode.h HEADERS += rddatedialog.h @@ -204,25 +210,35 @@ HEADERS += rddatepicker.h HEADERS += rddb.h HEADERS += rddbheartbeat.h HEADERS += rddebug.h +HEADERS += rddeck.h HEADERS += rddropbox.h +HEADERS += rdedit_audio.h +HEADERS += rdedit_panel_name.h HEADERS += rdemptycart.h HEADERS += rdescape_string.h HEADERS += rdevent.h HEADERS += rdevent_line.h HEADERS += rdeventimportlist.h HEADERS += rdexception_dialog.h +HEADERS += rdexport_settings_dialog.h HEADERS += rdget_ath.h HEADERS += rdgetpasswd.h +HEADERS += rdgpioselector.h +HEADERS += rdgrid.h +HEADERS += rdgpio.h HEADERS += rdgroup_list.h HEADERS += rdgroup.h -HEADERS += rd.h +HEADERS += rdhash.h HEADERS += rdidvalidator.h +HEADERS += rdimport_audio.h HEADERS += rdintegeredit.h HEADERS += rdintegerdialog.h +HEADERS += rdkernelgpio.h HEADERS += rdlabel.h HEADERS += rdlibrary_conf.h HEADERS += rdlicense.h HEADERS += rdlineedit.h +HEADERS += rdlist_groups.h HEADERS += rdlist_logs.h HEADERS += rdlistselector.h HEADERS += rdlistview.h @@ -233,23 +249,39 @@ HEADERS += rdlog_line.h HEADERS += rdlogedit_conf.h HEADERS += rdlogfilter.h HEADERS += rdloglock.h +HEADERS += rdlogplay.h HEADERS += rdmacro.h HEADERS += rdmacro_event.h +HEADERS += rdmarker_button.h +HEADERS += rdmarker_edit.h +HEADERS += rdmatrix.h +HEADERS += rdmonitor_config.h HEADERS += rdnotification.h HEADERS += rdoneshot.h +HEADERS += rdpanel_button.h +HEADERS += rdpaths.h +HEADERS += rdpasswd.h +HEADERS += rdplay_deck.h HEADERS += rdplaymeter.h HEADERS += rdprofile.h HEADERS += rdprofileline.h HEADERS += rdprofilesection.h HEADERS += rdpushbutton.h +HEADERS += rdrecording.h +HEADERS += rdrehash.h +HEADERS += rdrenderer.h HEADERS += rdreport.h HEADERS += rdripc.h +HEADERS += rdrlmhost.h HEADERS += rdschedcode.h HEADERS += rdsegmeter.h HEADERS += rdsettings.h +HEADERS += rdsimpleplayer.h HEADERS += rdslider.h HEADERS += rdsocket.h +HEADERS += rdsound_panel.h HEADERS += rdstation.h +HEADERS += rdstatus.h HEADERS += rdstereometer.h HEADERS += rdsvc.h HEADERS += rdsystem.h @@ -257,72 +289,17 @@ HEADERS += rdtempdirectory.h HEADERS += rdtextfile.h HEADERS += rdtextvalidator.h HEADERS += rdtimeedit.h +HEADERS += rdtimeedit.h HEADERS += rdtimeengine.h HEADERS += rdtransportbutton.h +HEADERS += rdtty.h HEADERS += rdttydevice.h +HEADERS += rdttyout.h HEADERS += rduser.h +HEADERS += rdversion.h HEADERS += rdwavedata.h HEADERS += rdweb.h -win32 { - HEADERS += rdwin32.h -} -x11 { - HEADERS += rdadd_cart.h - HEADERS += rdairplay_conf.h - HEADERS += rdaudio_exists.h - HEADERS += rdaudio_port.h - HEADERS += rdbutton_dialog.h - HEADERS += rdbutton_panel.h - HEADERS += rdcae.h - HEADERS += rdcardselector.h - HEADERS += rdcatch_connect.h - HEADERS += rdcddblookup.h - HEADERS += rdcdplayer.h - HEADERS += rdcddbrecord.h - HEADERS += rdcheck_version.h - HEADERS += rdcmd_cache.h - HEADERS += rdcueedit.h - HEADERS += rdcueeditdialog.h - HEADERS += rdcut_dialog.h - HEADERS += rdcut_path.h - HEADERS += rddeck.h - HEADERS += rdedit_audio.h - HEADERS += rdedit_panel_name.h - HEADERS += rdexport_settings_dialog.h - HEADERS += rdgpioselector.h - HEADERS += rdgrid.h - HEADERS += rdgpio.h - HEADERS += rdhash.h - HEADERS += rdimport_audio.h - HEADERS += rdkernelgpio.h - HEADERS += rdlist_groups.h - HEADERS += rdlogplay.h - HEADERS += rdmarker_button.h - HEADERS += rdmarker_edit.h - HEADERS += rdmatrix.h - HEADERS += rdmonitor_config.h - HEADERS += rdpanel_button.h - HEADERS += rdpaths.h - HEADERS += rdpasswd.h - HEADERS += rdplay_deck.h - HEADERS += rdrecording.h - HEADERS += rdrehash.h - HEADERS += rdrenderer.h - HEADERS += rdrlmhost.h - HEADERS += rdsimpleplayer.h - HEADERS += rdsound_panel.h - HEADERS += rdstatus.h - HEADERS += rdtimeedit.h - HEADERS += rdtty.h - HEADERS += rdttyout.h - HEADERS += rdversion.h -} - -INCLUDEPATH += ..\..\libradio\radio - -CONFIG += qt staticlib - TRANSLATIONS += librd_cs.ts TRANSLATIONS += librd_de.ts TRANSLATIONS += librd_es.ts diff --git a/lib/rdttydevice_win32.cpp b/lib/rdttydevice_win32.cpp deleted file mode 100644 index 540507cf..00000000 --- a/lib/rdttydevice_win32.cpp +++ /dev/null @@ -1,366 +0,0 @@ -// rdttydevice_win32.cpp -// -// The Win32 version of a Qt driver for serial ports. -// -// (C) Copyright 2002,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU Library General Public License -// version 2 as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// -// - -#include -#include -#include -#include -#include -#include - -#include - - - -RDTTYDevice::RDTTYDevice() : QIODevice() -{ - Init(); -} - -RDTTYDevice::~RDTTYDevice() -{ - if(tty_open) { - close(); - } -} - -bool RDTTYDevice::open(int mode) -{ - DWORD flags=0; - WCHAR name[255]; - DCB dcb; - COMMTIMEOUTS timeouts; - - tty_mode=mode; - if((mode&QIODevice::ReadWrite)==QIODevice::ReadWrite) { - flags|=GENERIC_WRITE|GENERIC_READ; - } - else { - if(((mode&QIODevice::WriteOnly)!=0)) { - flags|=GENERIC_WRITE; - } - if(((mode&QIODevice::ReadOnly)!=0)) { - flags|=GENERIC_READ; - } - } - wcscpy(name,(TCHAR*)qt_winTchar(tty_name,true)); - tty_fd=CreateFile(name,flags,0,NULL,OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL,NULL); - if(tty_fd==INVALID_HANDLE_VALUE) { - tty_status=IO_OpenError; - return false; - } - tty_open=true; - tty_status=IO_Ok; - - SetupComm(tty_fd,WIN32_BUFFER_SIZE,WIN32_BUFFER_SIZE); - switch(tty_parity) { - case RDTTYDevice::None: - BuildCommDCB((TCHAR*)qt_winTchar(QString(). - sprintf("%d,N,%d,1", - tty_speed,tty_length), - true),&dcb); - break; - - case RDTTYDevice::Even: - BuildCommDCB((TCHAR*)qt_winTchar(QString(). - sprintf("%d,E,%d,1", - tty_speed,tty_length), - true),&dcb); - break; - - case RDTTYDevice::Odd: - BuildCommDCB((TCHAR*)qt_winTchar(QString(). - sprintf("%d,O,%d,1", - tty_speed,tty_length), - true),&dcb); - break; - } - SetCommState(tty_fd,&dcb); - timeouts.ReadIntervalTimeout=MAXDWORD; - timeouts.ReadTotalTimeoutMultiplier=0; - timeouts.ReadTotalTimeoutConstant=0; - timeouts.WriteTotalTimeoutMultiplier=0; - timeouts.WriteTotalTimeoutConstant=0; - SetCommTimeouts(tty_fd,&timeouts); - - return true; -} - - -void RDTTYDevice::close() -{ - if(tty_open) { - CloseHandle(tty_fd); - } - tty_open=false; -} - - -void RDTTYDevice::flush() -{ -} - - -Q_LONG RDTTYDevice::readBlock(char *data,Q_ULONG maxlen) -{ - Q_ULONG n; - - if(!ReadFile(tty_fd,data,maxlen,&n,NULL)) { - if(GetLastError()!=ERROR_TIMEOUT) { - tty_status=IO_ReadError; - return -1; - } - } - tty_status=IO_Ok; - return n; -} - - -Q_LONG RDTTYDevice::writeBlock(const char *data,Q_ULONG len) -{ - Q_ULONG n; - - if(!WriteFile(tty_fd,data,len,&n,NULL)) { - tty_status=IO_WriteError; - return n; - } - tty_status=IO_Ok; - return n; -} - - -int RDTTYDevice::getch() -{ - char c; - int n; - - if((n=readBlock(&c,1))<0) { - tty_status=IO_ReadError; - return -1; - } - return (int)c; -} - - -int RDTTYDevice::putch(int ch) -{ - char c; - int n; - - c=(char)ch; - if((n=writeBlock(&c,1))<0) { - tty_status=IO_WriteError; - return -1; - } - return ch; -} - - -int RDTTYDevice::ungetch(int ch) -{ - tty_status=IO_WriteError; - return -1; -} - - -qlonglong RDTTYDevice::size() const -{ - return 0; -} - - -int RDTTYDevice::flags() const -{ - return tty_mode|state(); -} - - -int RDTTYDevice::mode() const -{ - return tty_mode; -} - - -int RDTTYDevice::state() const -{ - if(tty_open) { - return IO_Open; - } - return 0; -} - - -bool RDTTYDevice::isDirectAccess() const -{ - return false; -} - - -bool RDTTYDevice::isSequentialAccess() const -{ - return true; -} - - -bool RDTTYDevice::isCombinedAccess() const -{ - return false; -} - - -bool RDTTYDevice::isBuffered() const -{ - return false; -} - - -bool RDTTYDevice::isRaw() const -{ - return true; -} - - -bool RDTTYDevice::isSynchronous() const -{ - return true; -} - - -bool RDTTYDevice::isAsynchronous() const -{ - return false; -} - - -bool RDTTYDevice::isTranslated() const -{ - return false; -} - - -bool RDTTYDevice::isReadable() const -{ - if(((tty_mode&QIODevice::ReadOnly)!=0)||((tty_mode&QIODevice::ReadWrite)!=0)) { - return true; - } - return false; -} - - -bool RDTTYDevice::isWritable() const -{ - if(((tty_mode&QIODevice::WriteOnly)!=0)||((tty_mode&QIODevice::ReadWrite)!=0)) { - return true; - } - return false; -} - - -bool RDTTYDevice::isReadWrite() const -{ - if((tty_mode&QIODevice::ReadWrite)!=0) { - return true; - } - return false; - -} - - -bool RDTTYDevice::isInactive() const -{ - if(!tty_open) { - return true; - } - return false; -} - - -bool RDTTYDevice::isOpen() const -{ - if(tty_open) { - return true; - } - return false; -} - - -int RDTTYDevice::status() const -{ - return tty_status; -} - - -void RDTTYDevice::resetStatus() -{ - tty_status=IO_Ok; -} - - -void RDTTYDevice::setName(QString name) -{ - tty_name=name; -} - - -int RDTTYDevice::speed() const -{ - return tty_speed; -} - - -void RDTTYDevice::setSpeed(int speed) -{ - tty_speed=speed; -} - - -int RDTTYDevice::wordLength() const -{ - return tty_length; -} - - -void RDTTYDevice::setWordLength(int length) -{ - tty_length=length; -} - - -RDTTYDevice::Parity RDTTYDevice::parity() const -{ - return tty_parity; -} - - -void RDTTYDevice::setParity(Parity parity) -{ - tty_parity=parity; -} - - -void RDTTYDevice::Init() -{ - tty_speed=9600; - tty_length=8; - tty_parity=RDTTYDevice::None; - tty_open=false; -} diff --git a/lib/rdwin32.cpp b/lib/rdwin32.cpp deleted file mode 100644 index 1df755d6..00000000 --- a/lib/rdwin32.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// rdwin32.cpp -// -// Missing POSIX functions for Win32 -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// 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 -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -int isblank(int c) -{ - if(c==' ') { - return 0; - } - return 1; -} diff --git a/lib/rdwin32.h b/lib/rdwin32.h deleted file mode 100644 index 48f8a98d..00000000 --- a/lib/rdwin32.h +++ /dev/null @@ -1,27 +0,0 @@ -// rdwin32.h -// -// Missing POSIX functions for Win32 -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// 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 -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef RDWIN32_H -#define RDWIN32_H - -int isblank(int c); - - -#endif // RDWIN32_H diff --git a/rdcastmanager/rdcastmanager.pro b/rdcastmanager/rdcastmanager.pro index a3a4099b..a3eb3c6f 100644 --- a/rdcastmanager/rdcastmanager.pro +++ b/rdcastmanager/rdcastmanager.pro @@ -2,7 +2,7 @@ # # The rdcastmanager/ QMake project file for Rivendell # -# (C) Copyright 2003-2004,2016 Fred Gleason +# (C) Copyright 2003-2018 Fred Gleason # # 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 @@ -17,18 +17,12 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = app - -TARGET = rdlogmanager - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# SOURCES += rdcastmanager.cpp SOURCES += edit_cast.cpp @@ -40,14 +34,6 @@ HEADERS += edit_cast.h HEADERS += list_casts.h HEADERS += pick_report_dates.h -RES_FILE += ..\icons\rivendell.res - -INCLUDEPATH += ..\lib - -LIBS = -lqui -L..\lib -llib - -CONFIG += qt - TRANSLATIONS += rdcastmanager_cs.ts TRANSLATIONS += rdcastmanager_de.ts TRANSLATIONS += rdcastmanager_es.ts diff --git a/rdhpi/rdhpi.pro b/rdhpi/rdhpi.pro index e6deb810..afa84115 100644 --- a/rdhpi/rdhpi.pro +++ b/rdhpi/rdhpi.pro @@ -17,36 +17,26 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = lib +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +SOURCES += rdhpicardselector.cpp +SOURCES += rdhpiinformation.cpp +SOURCES += rdhpiplaystream.cpp +SOURCES += rdhpirecordstream.cpp +SOURCES += rdhpisoundcard.cpp +SOURCES += rdhpisoundselector.cpp -x11 { - SOURCES += rdhpicardselector.cpp - SOURCES += rdhpiinformation.cpp - SOURCES += rdhpiplaystream.cpp - SOURCES += rdhpirecordstream.cpp - SOURCES += rdhpisoundcard.cpp - SOURCES += rdhpisoundselector.cpp -} - -x11 { - HEADERS += rdhpicardselector.h - HEADERS += rdhpiinformation.h - HEADERS += rdhpiplaystream.h - HEADERS += rdhpirecordstream.h - HEADERS += rdhpisoundcard.h - HEADERS += rdhpisoundselector.h -} - -CONFIG += qt staticlib +HEADERS += rdhpicardselector.h +HEADERS += rdhpiinformation.h +HEADERS += rdhpiplaystream.h +HEADERS += rdhpirecordstream.h +HEADERS += rdhpisoundcard.h +HEADERS += rdhpisoundselector.h TRANSLATIONS += rdhpi_cs.ts TRANSLATIONS += rdhpi_de.ts diff --git a/rdlogedit/rdlogedit.pro b/rdlogedit/rdlogedit.pro index 5c9685a0..e41dea29 100644 --- a/rdlogedit/rdlogedit.pro +++ b/rdlogedit/rdlogedit.pro @@ -2,7 +2,7 @@ # # The rdlogedit/ QMake project file for Rivendell # -# (C) Copyright 2003-2004,2016 Fred Gleason +# (C) Copyright 2003-2018 Fred Gleason # # 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 @@ -17,18 +17,12 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = app - -TARGET = rdlogedit - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# SOURCES += add_meta.cpp SOURCES += drop_listview.cpp @@ -40,10 +34,8 @@ SOURCES += edit_track.cpp SOURCES += list_listviewitem.cpp SOURCES += list_reports.cpp SOURCES += rdlogedit.cpp -x11 { - SOURCES += render_dialog.cpp - SOURCES += voice_tracker.cpp -} +SOURCES += render_dialog.cpp +SOURCES += voice_tracker.cpp HEADERS += add_meta.h HEADERS += drop_listview.h @@ -56,18 +48,8 @@ HEADERS += globals.h HEADERS += list_listviewitem.h HEADERS += list_reports.h HEADERS += rdlogedit.h -x11 { - HEADERS += render_dialog.h - HEADERS += voice_tracker.h -} - -RES_FILE += ..\icons\rivendell.res - -INCLUDEPATH += ..\lib - -LIBS = -lqui -L..\lib -llib - -CONFIG += qt +HEADERS += render_dialog.h +HEADERS += voice_tracker.h TRANSLATIONS += rdlogedit_cs.ts TRANSLATIONS += rdlogedit_de.ts diff --git a/rdlogmanager/rdlogmanager.pro b/rdlogmanager/rdlogmanager.pro index 5b570d28..6751001e 100644 --- a/rdlogmanager/rdlogmanager.pro +++ b/rdlogmanager/rdlogmanager.pro @@ -2,7 +2,7 @@ # # The rdlogmanager/ QMake project file for Rivendell # -# (C) Copyright 2003-2004,2016 Fred Gleason +# (C) Copyright 2003-2018 Fred Gleason # # 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 @@ -17,18 +17,12 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = app - -TARGET = rdlogmanager - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# SOURCES += add_clock.cpp SOURCES += add_event.cpp @@ -82,14 +76,6 @@ HEADERS += rename_item.h HEADERS += svc_rec.h HEADERS += svc_rec_dialog.h -RES_FILE += ..\icons\rivendell.res - -INCLUDEPATH += ..\lib - -LIBS = -lqui -L..\lib -llib - -CONFIG += qt - TRANSLATIONS += rdlogmanager_cs.ts TRANSLATIONS += rdlogmanager_de.ts TRANSLATIONS += rdlogmanager_es.ts diff --git a/ripcd/Makefile.am b/ripcd/Makefile.am index 551e3b8b..02b7ceb7 100644 --- a/ripcd/Makefile.am +++ b/ripcd/Makefile.am @@ -128,8 +128,6 @@ nodist_ripcd_SOURCES = moc_am16.cpp\ ripcd_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ @LIBHPI@ -lQt3Support -EXTRA_DIST = ripcd.pro - CLEANFILES = *~\ *.idb\ *ilk\ diff --git a/ripcd/ripcd.pro b/ripcd/ripcd.pro deleted file mode 100644 index 78ca35ce..00000000 --- a/ripcd/ripcd.pro +++ /dev/null @@ -1,53 +0,0 @@ -# ripcd.pro -# -# The ripcd/ QMake project file for Rivendell -# -# (C) Copyright 2003-2005,2016 Fred Gleason -# -# 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 -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -TEMPLATE = app - -TARGET = ripcd - -win32 { - DEFINES += WIN32 -} - -SOURCES += rdlogedit.cpp -SOURCES += edit_log.cpp -SOURCES += edit_logline.cpp -SOURCES += edit_marker.cpp -SOURCES += edit_chain.cpp -SOURCES += add_meta.cpp -SOURCES += list_logs.cpp - -HEADERS += rdlogedit.h -HEADERS += edit_log.h -HEADERS += edit_logline.h -HEADERS += edit_marker.h -HEADERS += edit_chain.h -HEADERS += add_meta.h -HEADERS += list_logs.h -HEADERS += globals.h - -RES_FILE += ..\icons\rivendell.res - -INCLUDEPATH += ..\..\libradio\radio ..\lib - -LIBS = -lqui -L..\..\libradio\radio -lradio -L..\lib -llib - -CONFIG += qt - -TRANSLATIONS += rdlogedit_es.ts diff --git a/rivendell.spec.in b/rivendell.spec.in index 6a09e0cb..3bac82f2 100644 --- a/rivendell.spec.in +++ b/rivendell.spec.in @@ -108,10 +108,6 @@ rm -f $RPM_BUILD_ROOT/@LOCAL_PREFIX@/@RD_LIB_PATH@/libqmysqlutf* mkdir $RPM_BUILD_ROOT/.qt touch $RPM_BUILD_ROOT/.qt/qt rm -rf $RPM_BUILD_ROOT/@libexecdir@/logos -if test "@WIN32_SOURCE@" ; then - mkdir -p $RPM_BUILD_ROOT/var/win32 - cp @WIN32_SOURCE@ $RPM_BUILD_ROOT/var/win32/ -fi mkdir -p $RPM_BUILD_ROOT/@DOC_PATH@/logos cp icons/webget_logo.png $RPM_BUILD_ROOT/@DOC_PATH@/logos/ cp AUTHORS $RPM_BUILD_ROOT/@DOC_PATH@/ @@ -365,7 +361,6 @@ rm -rf $RPM_BUILD_ROOT %attr(6755,root,root) @libexecdir@/rdxport.cgi %attr(6755,root,root) @libexecdir@/webget.cgi @sysconfdir@/rd-bin.conf -@WIN32_PATH@ /etc/security/console.apps/rdalsaconfig-root /etc/pam.d/rdalsaconfig-root /etc/security/console.apps/rddbconfig-root diff --git a/utils/rdcollect/Makefile.am b/utils/rdcollect/Makefile.am index 8c00ceb8..b9d0fa1c 100644 --- a/utils/rdcollect/Makefile.am +++ b/utils/rdcollect/Makefile.am @@ -31,8 +31,6 @@ dist_rdcollect_SOURCES = rdcollect.cpp rdcollect.h rdcollect_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ -lQt3Support -EXTRA_DIST = rdcollect.pro - CLEANFILES = *~\ *.exe\ *.idb\ diff --git a/utils/rdcollect/rdcollect.pro b/utils/rdcollect/rdcollect.pro deleted file mode 100644 index 37bb4c68..00000000 --- a/utils/rdcollect/rdcollect.pro +++ /dev/null @@ -1,42 +0,0 @@ -# rdcollect.pro -# -# The utils/rdcollect QMake project file for Rivendell -# -# (C) Copyright 2003-2007,2016 Fred Gleason -# -# 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 -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -TEMPLATE = app - -TARGET = rdcollect - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} - -SOURCES += rdcollect.cpp -HEADERS += rdcollect.h - -RES_FILE += ..\..\icons\rivendell.res - -INCLUDEPATH += ..\..\..\libradio\radio ..\..\lib - -LIBS = -lqui -L..\..\..\libradio\radio -lradio -L..\..\lib -llib - -CONFIG += qt diff --git a/utils/rdsoftkeys/Makefile.am b/utils/rdsoftkeys/Makefile.am index 287f0993..754c3fa0 100644 --- a/utils/rdsoftkeys/Makefile.am +++ b/utils/rdsoftkeys/Makefile.am @@ -33,8 +33,6 @@ nodist_rdsoftkeys_SOURCES = moc_rdsoftkeys.cpp rdsoftkeys_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ @QT4_LIBS@ -lQt3Support -EXTRA_DIST = rdsoftkeys.pro - CLEANFILES = *~\ *.exe\ *.idb\ diff --git a/utils/rdsoftkeys/rdsoftkeys.pro b/utils/rdsoftkeys/rdsoftkeys.pro deleted file mode 100644 index 76855cf1..00000000 --- a/utils/rdsoftkeys/rdsoftkeys.pro +++ /dev/null @@ -1,42 +0,0 @@ -# rdsoftkeys.pro -# -# The utils/rdsoftkeys QMake project file for Rivendell -# -# (C) Copyright 2003-2006,2016 Fred Gleason -# -# 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 -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -TEMPLATE = app - -TARGET = rdsoftkeys - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} - -SOURCES += rdsoftkeys.cpp -HEADERS += rdsoftkeys.h - -RES_FILE += ..\..\icons\rivendell.res - -INCLUDEPATH += ..\..\..\libradio\radio ..\..\lib - -LIBS = -lqui -L..\..\..\libradio\radio -lradio -L..\..\lib -llib - -CONFIG += qt diff --git a/utils/rmlsend/rmlsend.pro b/utils/rmlsend/rmlsend.pro index b85e5298..3b2b2ce5 100644 --- a/utils/rmlsend/rmlsend.pro +++ b/utils/rmlsend/rmlsend.pro @@ -2,7 +2,7 @@ # # The utils/ QMake project file for Rivendell # -# (C) Copyright 2003-2007,2016 Fred Gleason +# (C) Copyright 2003-2018 Fred Gleason # # 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 @@ -17,30 +17,17 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -TEMPLATE = app - -TARGET = rmlsend - -win32 { - DEFINES += WIN32 - DEFINES += VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE=\"rivendell\" - DEFINES += PACKAGE_VERSION=\"$$[VERSION]\" - DEFINES += PACKAGE_NAME=\"rivendell\" - DEFINES += PACKAGE_BUGREPORT=\"fredg@paravelsystems.com\" -} +# +# Maintainer's Note +# +# We don't use Qt's 'Qmake' build system, so the entries in here are +# purely for the sake of i18n support. +# SOURCES += rmlsend.cpp + HEADERS += rmlsend.h -RES_FILE += ..\..\icons\rivendell.res - -INCLUDEPATH += ..\..\..\libradio\radio ..\..\lib - -LIBS = -lqui -L..\..\..\libradio\radio -lradio -L..\..\lib -llib - -CONFIG += qt - TRANSLATIONS += rmlsend_cs.ts TRANSLATIONS += rmlsend_de.ts TRANSLATIONS += rmlsend_es.ts