Skip to content

Instantly share code, notes, and snippets.

@schrockwell
Created December 7, 2012 16:59
Show Gist options
  • Save schrockwell/4234638 to your computer and use it in GitHub Desktop.
Save schrockwell/4234638 to your computer and use it in GitHub Desktop.
Compiling Codec 2 and FreeDV on Windows
# Compiling Codec 2 and FreeDV on Windows
# Rockwell Schrock, WW1X
# December 7, 2012
#
# Based off the README.Win32 file in the FreeDV SVN repository.
# Tested on Windows 7 32-bit.
#
# More info: http://freedv.org/
#
# Install MinGW with options: C Compiler, C++ Compiler, MSYS
#
# http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
#
# Append MinGW to the end of the system PATH variable (Control Panel -> System -> Advanced -> Environment Variables)
#
# C:/MinGW/msys/1.0/local/lib
#
# Open up A MinGW Shell
#
# Install wget and svn
mingw-get install msys-wget
mingw-get install msys-unzip
cd
wget http://sourceforge.net/projects/win32svn/files/1.7.6/apache22/svn-win32-1.7.6.zip/download
unzip svn-win32-1.7.6.zip
cd svn-win32-1.7.6
mv bin/* /usr/local/bin/
# Install WxWidgets. This step takes a long time, so you can open up
# another shell window and start installing the other components
# except for FDMDV2, which depends on WxWidgets.
cd
wget http://sourceforge.net/projects/wxwindows/files/2.9.4/wxWidgets-2.9.4.tar.bz2/download
tar xfvj wxWidgets-2.9.4
cd wxWidgets-2.9.4
mkdir build-debug; cd build-debug
./configure --with-msw
make && make install
# Install PortAudio
cd
wget http://www.portaudio.com/archives/pa_stable_v19_20111121.tgz
tar xfvz pa_stable_v19_20111121.tgz
cd pa_stable_v19_20111121
./configure --enable-cxx
make && make install
# Install libsndfile
cd
wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25.tar.gz
tar xfvz libsndfile-1.0.25.tar.gz
cd libsndfile-1.0.25
./configure && make && make install
# Install libsamplerate
cd
wget http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz
tar xfvz libsamplerate-0.1.8.tar.gz
cd libsamplerate-0.1.8
./configure && make && make install
# Install libctb
cd
wget https://iftools.com/download/ctb/0.16/libctb-0.16.tar.gz
tar xfvz libctb-0.16.tar.gz
cd libctb-0.16/build
mingw32-make -f makefile.gcc DEBUG=0 GPIB=0
cp lib/ctb-0.16.dll lib/libctb-0.16.a /usr/local/lib/
cp -R include/ctb-0.16/ /usr/local/include
# Install sox
cd
wget http://sourceforge.net/projects/sox/files/sox/14.4.0/sox-14.4.0.tar.gz/download
tar xvzf sox-14.4.0.tar.gz
./configure --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --disable-dl-sndfile --with-waveaudio=no
make && make install
# Install Codec 2
cd
wget https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev
cd codec2-dev
./configure && make
cp win32/codec2.* /usr/local/lib
# Install FDMDV2 (FreeDV)
cd
svn co https://freetel.svn.sourceforge.net/svnroot/freetel/fdmdv2
cd fdmdv2/src
make -f Makefile.Win32
# Cross your fingers and run FreeDV
freedv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment