]> sigrok.org Git - libsigrokdecode.git/commitdiff
Automate protocol decoder installation.
authorBert Vermeulen <redacted>
Wed, 27 Nov 2013 15:47:04 +0000 (16:47 +0100)
committerBert Vermeulen <redacted>
Wed, 27 Nov 2013 15:47:04 +0000 (16:47 +0100)
This automatically figures out the files to install for each protocol
decoder, without involving autotools.

All python files (filenames ending in .py) are always installed. If a
protocol decoder requires installation of a non-python file, a small
file called 'config' can be created in that protocol decoder's
directory, with the following content:

# comments are ok
extra-install vendorlist.txt commands.txt

38 files changed:
Makefile.am
decoders/Makefile.am [deleted file]
decoders/avr_isp/Makefile.am [deleted file]
decoders/can/Makefile.am [deleted file]
decoders/dcf77/Makefile.am [deleted file]
decoders/ds1307/Makefile.am [deleted file]
decoders/edid/Makefile.am [deleted file]
decoders/guess_bitrate/Makefile.am [deleted file]
decoders/i2c/Makefile.am [deleted file]
decoders/i2cdemux/Makefile.am [deleted file]
decoders/i2cfilter/Makefile.am [deleted file]
decoders/i2s/Makefile.am [deleted file]
decoders/i2s_dump/Makefile.am [deleted file]
decoders/jtag/Makefile.am [deleted file]
decoders/jtag_stm32/Makefile.am [deleted file]
decoders/lm75/Makefile.am [deleted file]
decoders/lpc/Makefile.am [deleted file]
decoders/maxim_ds28ea00/Makefile.am [deleted file]
decoders/midi/Makefile.am [deleted file]
decoders/mlx90614/Makefile.am [deleted file]
decoders/mx25lxx05d/Makefile.am [deleted file]
decoders/mxc6225xu/Makefile.am [deleted file]
decoders/nunchuk/Makefile.am [deleted file]
decoders/onewire_link/Makefile.am [deleted file]
decoders/onewire_network/Makefile.am [deleted file]
decoders/pan1321/Makefile.am [deleted file]
decoders/parallel/Makefile.am [deleted file]
decoders/rtc8564/Makefile.am [deleted file]
decoders/sdcard_spi/Makefile.am [deleted file]
decoders/spi/Makefile.am [deleted file]
decoders/tlc5620/Makefile.am [deleted file]
decoders/transitioncounter/Makefile.am [deleted file]
decoders/uart/Makefile.am [deleted file]
decoders/uart_dump/Makefile.am [deleted file]
decoders/usb_packet/Makefile.am [deleted file]
decoders/usb_signalling/Makefile.am [deleted file]
decoders/xfp/Makefile.am [deleted file]
tools/install-decoders [new file with mode: 0755]

index 6a5d6cf1cb781ddb086544f5ed472540d5066487..c265331169b2512880e0bc15db5a4a01500d48fd 100644 (file)
@@ -20,7 +20,7 @@
 
 ACLOCAL_AMFLAGS = -I autostuff
 
 
 ACLOCAL_AMFLAGS = -I autostuff
 
-SUBDIRS = contrib decoders tests
+SUBDIRS = contrib tests
 
 lib_LTLIBRARIES = libsigrokdecode.la
 
 
 lib_LTLIBRARIES = libsigrokdecode.la
 
@@ -59,3 +59,9 @@ ChangeLog:
 
 dist-hook: ChangeLog
 
 
 dist-hook: ChangeLog
 
+install-decoders:
+       $(MKDIR_P) $(DECODERS_DIR)
+       tools/install-decoders -o $(DECODERS_DIR)
+
+install-data-hook: install-decoders
+
diff --git a/decoders/Makefile.am b/decoders/Makefile.am
deleted file mode 100644 (file)
index bf433a0..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-# Please keep this list in alphabetical order.
-SUBDIRS = \
-       avr_isp \
-       can \
-       dcf77 \
-       ds1307 \
-       edid \
-       guess_bitrate \
-       i2c \
-       i2cdemux \
-       i2cfilter \
-       i2s \
-       i2s_dump \
-       jtag \
-       jtag_stm32 \
-       lm75 \
-       lpc \
-       maxim_ds28ea00 \
-       midi \
-       mlx90614 \
-       mx25lxx05d \
-       mxc6225xu \
-       nunchuk \
-       onewire_link \
-       onewire_network \
-       pan1321 \
-       parallel \
-       rtc8564 \
-       sdcard_spi \
-       spi \
-       tlc5620 \
-       transitioncounter \
-       uart \
-       uart_dump \
-       usb_packet \
-       usb_signalling \
-       xfp
-
diff --git a/decoders/avr_isp/Makefile.am b/decoders/avr_isp/Makefile.am
deleted file mode 100644 (file)
index a6bd858..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/avr_isp
-
-dist_pkgdata_DATA = __init__.py pd.py parts.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/can/Makefile.am b/decoders/can/Makefile.am
deleted file mode 100644 (file)
index fd077d5..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/can
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/dcf77/Makefile.am b/decoders/dcf77/Makefile.am
deleted file mode 100644 (file)
index a506be7..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/dcf77
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/ds1307/Makefile.am b/decoders/ds1307/Makefile.am
deleted file mode 100644 (file)
index 16d2ab8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/ds1307
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/edid/Makefile.am b/decoders/edid/Makefile.am
deleted file mode 100644 (file)
index c9261f4..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/edid
-
-dist_pkgdata_DATA = __init__.py pd.py pnpids.txt
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/guess_bitrate/Makefile.am b/decoders/guess_bitrate/Makefile.am
deleted file mode 100644 (file)
index 7c162f6..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/guess_bitrate
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/i2c/Makefile.am b/decoders/i2c/Makefile.am
deleted file mode 100644 (file)
index 7185628..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/i2c
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/i2cdemux/Makefile.am b/decoders/i2cdemux/Makefile.am
deleted file mode 100644 (file)
index 10ea7e1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/i2cdemux
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/i2cfilter/Makefile.am b/decoders/i2cfilter/Makefile.am
deleted file mode 100644 (file)
index b5f67e7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or
-## (at your option) any later version.
-##
-## 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, see <http://www.gnu.org/licenses/>.
-##
-
-pkgdatadir = $(DECODERS_DIR)/i2cfilter
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/i2s/Makefile.am b/decoders/i2s/Makefile.am
deleted file mode 100644 (file)
index c109a21..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/i2s
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/i2s_dump/Makefile.am b/decoders/i2s_dump/Makefile.am
deleted file mode 100644 (file)
index fda1fff..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/i2s_dump
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/jtag/Makefile.am b/decoders/jtag/Makefile.am
deleted file mode 100644 (file)
index 8faa165..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/jtag
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/jtag_stm32/Makefile.am b/decoders/jtag_stm32/Makefile.am
deleted file mode 100644 (file)
index 7d450a2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/jtag_stm32
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/lm75/Makefile.am b/decoders/lm75/Makefile.am
deleted file mode 100644 (file)
index 60acc6f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/lm75
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/lpc/Makefile.am b/decoders/lpc/Makefile.am
deleted file mode 100644 (file)
index d7572f2..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/lpc
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/maxim_ds28ea00/Makefile.am b/decoders/maxim_ds28ea00/Makefile.am
deleted file mode 100644 (file)
index a66d647..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/maxim_ds28ea00
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/midi/Makefile.am b/decoders/midi/Makefile.am
deleted file mode 100644 (file)
index f45d086..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/midi
-
-dist_pkgdata_DATA = __init__.py pd.py lists.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/mlx90614/Makefile.am b/decoders/mlx90614/Makefile.am
deleted file mode 100644 (file)
index babae0c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/mlx90614
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/mx25lxx05d/Makefile.am b/decoders/mx25lxx05d/Makefile.am
deleted file mode 100644 (file)
index 6f9cf1b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/mx25lxx05d
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/mxc6225xu/Makefile.am b/decoders/mxc6225xu/Makefile.am
deleted file mode 100644 (file)
index 4908c6b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/mxc6225xu
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/nunchuk/Makefile.am b/decoders/nunchuk/Makefile.am
deleted file mode 100644 (file)
index 561281e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/nunchuk
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/onewire_link/Makefile.am b/decoders/onewire_link/Makefile.am
deleted file mode 100644 (file)
index f1be7b8..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/onewire_link
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/onewire_network/Makefile.am b/decoders/onewire_network/Makefile.am
deleted file mode 100644 (file)
index 81c2fd1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/onewire_network
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/pan1321/Makefile.am b/decoders/pan1321/Makefile.am
deleted file mode 100644 (file)
index e501936..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/pan1321
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/parallel/Makefile.am b/decoders/parallel/Makefile.am
deleted file mode 100644 (file)
index 2371d10..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/parallel
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/rtc8564/Makefile.am b/decoders/rtc8564/Makefile.am
deleted file mode 100644 (file)
index 3c08bef..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/rtc8564
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/sdcard_spi/Makefile.am b/decoders/sdcard_spi/Makefile.am
deleted file mode 100644 (file)
index 3cf829b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/sdcard_spi
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/spi/Makefile.am b/decoders/spi/Makefile.am
deleted file mode 100644 (file)
index e63c32b..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/spi
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/tlc5620/Makefile.am b/decoders/tlc5620/Makefile.am
deleted file mode 100644 (file)
index 1eb5520..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/tlc5620
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/transitioncounter/Makefile.am b/decoders/transitioncounter/Makefile.am
deleted file mode 100644 (file)
index 39b4b3c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/transitioncounter
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/uart/Makefile.am b/decoders/uart/Makefile.am
deleted file mode 100644 (file)
index 89d90ec..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/uart
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/uart_dump/Makefile.am b/decoders/uart_dump/Makefile.am
deleted file mode 100644 (file)
index 1b7d780..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/uart_dump
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/usb_packet/Makefile.am b/decoders/usb_packet/Makefile.am
deleted file mode 100644 (file)
index f095957..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/usb_packet
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/usb_signalling/Makefile.am b/decoders/usb_signalling/Makefile.am
deleted file mode 100644 (file)
index 39c56ad..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/usb_signalling
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/decoders/xfp/Makefile.am b/decoders/xfp/Makefile.am
deleted file mode 100644 (file)
index 68d982c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## This file is part of the libsigrokdecode project.
-##
-## Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-##
-
-pkgdatadir = $(DECODERS_DIR)/xfp
-
-dist_pkgdata_DATA = __init__.py pd.py
-
-CLEANFILES = *.pyc
-
diff --git a/tools/install-decoders b/tools/install-decoders
new file mode 100755 (executable)
index 0000000..8134539
--- /dev/null
@@ -0,0 +1,109 @@
+#!/usr/bin/env python3
+#
+# This file is part of the libsigrokdecode project.
+#
+# Copyright (C) 2012 Bert Vermeulen <bert@biot.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+#
+
+import os
+import sys
+from shutil import copy
+from getopt import getopt
+
+
+def install(srcdir, dstdir):
+    worklist = []
+    for pd in os.listdir(srcdir):
+        pd_dir = srcdir + '/' + pd
+        if not os.path.isdir(pd_dir):
+            continue
+        install_list = []
+        for f in os.listdir(pd_dir):
+            pd_file = pd_dir + '/' + f
+            if not os.path.isfile(pd_file):
+                continue
+            if f == 'config':
+                install_list.extend(config_get_extra_install(pd_file))
+            elif f[-3:] == '.py':
+                install_list.append(f)
+        worklist.append((pd, pd_dir, install_list))
+
+    print("Installing %d protocol decoders:" % len(worklist))
+    col = 0
+    for pd, pd_dir, install_list in worklist:
+        msg = pd + ' '
+        if (col + len(msg) > 80):
+            print()
+            col = 0
+        print(msg, end='')
+        col += len(msg)
+        pd_dst = dstdir + '/' + pd
+        try:
+            os.mkdir(pd_dst)
+        except FileExistsError:
+            pass
+        for f in install_list:
+            copy(pd_dir + '/' + f, pd_dst)
+    print()
+
+
+def config_get_extra_install(config_file):
+    install_list = []
+    for line in open(config_file).read().split('\n'):
+        line = line.strip()
+        if len(line) == 0 or line[0] == '#':
+            continue
+        words = line.split()
+        if words[0] != 'extra-install':
+            continue
+        install_list.extend(words[1:])
+
+    return install_list
+
+
+def usage(msg=None):
+    if msg:
+        print(msg)
+        ret = 1
+    else:
+        ret = 0
+    print("""Usage:
+    install-decoders [-i <decoder source>] -o <install path>""")
+    sys.exit(ret)
+
+
+#
+# main
+#
+
+src = 'decoders'
+dst = None
+try:
+    opts, args = getopt(sys.argv[1:], 'i:o:')
+    for opt, arg in opts:
+        if opt == '-i':
+            src = arg
+        elif opt == '-o':
+            dst = arg
+except Exception as e:
+    usage(str(e))
+
+if len(args) != 0 or dst is None:
+    usage()
+
+install(src, dst)
+
+