git-svn-id: https://svn.code.sf.net/p/freetel/code@1125 01035d8c-6547-0410-b346-abe4f...
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 10 Dec 2012 01:55:45 +0000 (01:55 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 10 Dec 2012 01:55:45 +0000 (01:55 +0000)
15 files changed:
fdmdv2/README.linux
fdmdv2/build/fdmdv2.mk
fdmdv2/build/fdmdv2.project
fdmdv2/build/fdmdv2.txt
fdmdv2/build/fdmdv2.workspace
fdmdv2/build/fdmdv2_wsp.mk
fdmdv2/src/Makefile.linux
fdmdv2/src/Makefile.linux.dmw
fdmdv2/src/Makefile.win32.dmw
fdmdv2/src/dlg_about.cpp [new file with mode: 0644]
fdmdv2/src/dlg_about.h [new file with mode: 0644]
fdmdv2/src/fdmdv2_main.cpp
fdmdv2/src/fdmdv2_main.h
fdmdv2/src/topFrame.h
fdmdv2/version.h [new file with mode: 0644]

index 58c3996715f5c6241b6193e9d64610b3797c150e..4ffbc0193480beb36e5ccc303bfa1ca2c134f125 100644 (file)
@@ -17,7 +17,7 @@ BUILDING FreeDV for Linux
      libsamplerate, libsamplerate-dev
      libsndfile1, libsndfile1-dev
 
-2. Some people have also reported needing libasound (and -lasound in
+2. Some people have also reported needing libasound and libasound_dev (and -lasound in
    the linker line of Makefile.linux)
 
 3. Then build the other libraries below from source. At present the
index e6ce01255036256e042590c29f7beeba8ce62b6e..4f4371c09b8675f63b1cc6f4e20ba7080716eea0 100644 (file)
@@ -2,18 +2,18 @@
 ## Auto Generated makefile by CodeLite IDE\r
 ## any manual changes will be erased      \r
 ##\r
-## Debug\r
+## Release\r
 ProjectName            :=fdmdv2\r
-ConfigurationName      :=Debug\r
+ConfigurationName      :=Release\r
 WorkspacePath          := "D:\Projects\Radio\fdmdv2\build"\r
 ProjectPath            := "D:\Projects\Radio\fdmdv2\build"\r
-IntermediateDirectory  :=./Debug\r
+IntermediateDirectory  :=./Release\r
 OutDir                 := $(IntermediateDirectory)\r
 CurrentFileName        :=\r
 CurrentFilePath        :=\r
 CurrentFileFullPath    :=\r
 User                   :=wittend\r
-Date                   :=12/5/2012\r
+Date                   :=12/9/2012\r
 CodeLitePath           :="D:\bin\CodeLite"\r
 LinkerName             :=g++\r
 SharedObjectLinkerName :=g++ -shared -fPIC\r
@@ -28,7 +28,7 @@ LibraryPathSwitch      :=-L
 PreprocessorSwitch     :=-D\r
 SourceSwitch           :=-c \r
 OutputFile             :=$(IntermediateDirectory)/freeDV\r
-Preprocessors          :=$(PreprocessorSwitch)__WX__ \r
+Preprocessors          :=$(PreprocessorSwitch)__WX__ $(PreprocessorSwitch)DMW=1 \r
 ObjectSwitch           :=-o \r
 ArchiveOutputSwitch    := \r
 PreprocessOnlySwitch   :=-E \r
@@ -37,12 +37,12 @@ PCHCompileFlags        :=
 MakeDirCommand         :=makedir\r
 RcCmpOptions           := $(shell wx-config --rcflags)\r
 RcCompilerName         :=windres\r
-LinkOptions            :=  -mwindows $(shell wx-config --debug=yes --libs --unicode=yes)\r
-IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.6.1/msys/1.0/local/include $(IncludeSwitch)../../codec2-dev/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/include \r
+LinkOptions            :=  -mwindows -s $(shell wx-config --debug=no --libs --unicode=yes)\r
+IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.6.1/msys/1.0/local/include $(IncludeSwitch)../../codec2-dev/src $(IncludeSwitch)../../../Audio/portaudio/include $(IncludeSwitch)../../../Audio/libsndfile/include $(IncludeSwitch)../../../Audio/libsamplerate-0.1.8/src \r
 IncludePCH             := \r
 RcIncludePath          := \r
 Libs                   := $(LibrarySwitch)sndfile-1 $(LibrarySwitch)codec2 $(LibrarySwitch)portaudio $(LibrarySwitch)portaudiocpp $(LibrarySwitch)samplerate.dll $(LibrarySwitch)ctb-0.16 $(LibrarySwitch)sox \r
-ArLibs                 :=  "libsndfile-1.dll" "codec2" "libportaudio.a" "libportaudiocpp.a" "libsamplerate.dll.a" "ctb-0.16.dll" "libsox" \r
+ArLibs                 :=  "libsndfile-1.dll" "codec2" "libportaudio.a" "libportaudiocpp.a" "libsamplerate.dll.a" "ctb-0.16.dll" "libsox.a\r
 LibPath                := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/Radio/codec2-dev/src/.libs $(LibraryPathSwitch)d:/bin/MinGW-4.6.1/msys/1.0/local/lib $(LibraryPathSwitch)d:/Projects/Audio/libsndfile/lib \r
 \r
 ##\r
@@ -52,8 +52,8 @@ LibPath                := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/
 AR       := ar rcus\r
 CXX      := g++\r
 CC       := gcc\r
-CXXFLAGS :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1119\"  $(Preprocessors)\r
-CFLAGS   :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1119\"  $(Preprocessors)\r
+CXXFLAGS :=  -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no)  -DSVN_REVISION=\"1124\"  $(Preprocessors)\r
+CFLAGS   :=  -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no)  -DSVN_REVISION=\"1124\"  $(Preprocessors)\r
 \r
 \r
 ##\r
@@ -65,7 +65,7 @@ PATH:=$(WXWIN)\lib\gcc_dll;$(PATH)
 WXCFG:=gcc_dll\mswu\r
 UNIT_TEST_PP_SRC_DIR:=D:\bin\UnitTest++-1.3\r
 Objects=$(IntermediateDirectory)/src_dlg_comports$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_main$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot$(ObjectSuffix) $(IntermediateDirectory)/src_topFrame$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_pa_wrapper$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_scalar$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_audiooptions$(ObjectSuffix) \\r
-       $(IntermediateDirectory)/src_dlg_filter$(ObjectSuffix) $(IntermediateDirectory)/src_varicode$(ObjectSuffix) $(IntermediateDirectory)/src_sox_biquad$(ObjectSuffix) \r
+       $(IntermediateDirectory)/src_dlg_filter$(ObjectSuffix) $(IntermediateDirectory)/src_varicode$(ObjectSuffix) $(IntermediateDirectory)/src_sox_biquad$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_about$(ObjectSuffix) \r
 \r
 ##\r
 ## Main Build Targets \r
@@ -80,7 +80,7 @@ $(OutputFile): $(IntermediateDirectory)/.d $(Objects)
        $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)\r
 \r
 $(IntermediateDirectory)/.d:\r
-       @$(MakeDirCommand) "./Debug"\r
+       @$(MakeDirCommand) "./Release"\r
 \r
 PreBuild:\r
 \r
@@ -192,6 +192,14 @@ $(IntermediateDirectory)/src_sox_biquad$(DependSuffix): ../src/sox_biquad.c
 $(IntermediateDirectory)/src_sox_biquad$(PreprocessSuffix): ../src/sox_biquad.c\r
        @$(CC) $(CFLAGS) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_sox_biquad$(PreprocessSuffix) "D:/Projects/Radio/fdmdv2/src/sox_biquad.c"\r
 \r
+$(IntermediateDirectory)/src_dlg_about$(ObjectSuffix): ../src/dlg_about.cpp $(IntermediateDirectory)/src_dlg_about$(DependSuffix)\r
+       $(CXX) $(IncludePCH) $(SourceSwitch) "D:/Projects/Radio/fdmdv2/src/dlg_about.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_dlg_about$(ObjectSuffix) $(IncludePath)\r
+$(IntermediateDirectory)/src_dlg_about$(DependSuffix): ../src/dlg_about.cpp\r
+       @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/src_dlg_about$(ObjectSuffix) -MF$(IntermediateDirectory)/src_dlg_about$(DependSuffix) -MM "D:/Projects/Radio/fdmdv2/src/dlg_about.cpp"\r
+\r
+$(IntermediateDirectory)/src_dlg_about$(PreprocessSuffix): ../src/dlg_about.cpp\r
+       @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_dlg_about$(PreprocessSuffix) "D:/Projects/Radio/fdmdv2/src/dlg_about.cpp"\r
+\r
 \r
 -include $(IntermediateDirectory)/*$(DependSuffix)\r
 ##\r
@@ -237,8 +245,11 @@ clean:
        $(RM) $(IntermediateDirectory)/src_sox_biquad$(ObjectSuffix)\r
        $(RM) $(IntermediateDirectory)/src_sox_biquad$(DependSuffix)\r
        $(RM) $(IntermediateDirectory)/src_sox_biquad$(PreprocessSuffix)\r
+       $(RM) $(IntermediateDirectory)/src_dlg_about$(ObjectSuffix)\r
+       $(RM) $(IntermediateDirectory)/src_dlg_about$(DependSuffix)\r
+       $(RM) $(IntermediateDirectory)/src_dlg_about$(PreprocessSuffix)\r
        $(RM) $(OutputFile)\r
        $(RM) $(OutputFile).exe\r
-       $(RM) "D:\Projects\Radio\fdmdv2\build\.build-debug\fdmdv2"\r
+       $(RM) "D:\Projects\Radio\fdmdv2\build\.build-release\fdmdv2"\r
 \r
 \r
index bb22eca6828e5312fb3146a1d3ac99fde9864768..7be8d84961b66f4ebfff69169659734cd5eaa912 100644 (file)
@@ -21,6 +21,7 @@
     <File Name="../src/dlg_filter.cpp"/>
     <File Name="../src/varicode.c"/>
     <File Name="../src/sox_biquad.c"/>
+    <File Name="../src/dlg_about.cpp"/>
   </VirtualDirectory>
   <VirtualDirectory Name="include">
     <File Name="../src/dlg_comports.h"/>
@@ -49,6 +50,8 @@
     <File Name="../src/sox_biquad.h"/>
     <File Name="../../../../bin/MinGW-4.6.1/msys/1.0/local/include/sox.h"/>
     <File Name="../../../../bin/MinGW-4.6.1/msys/1.0/local/include/ctb-0.16/ctb.h"/>
+    <File Name="../src/dlg_about.h"/>
+    <File Name="../version.h"/>
   </VirtualDirectory>
   <VirtualDirectory Name="resources">
     <File Name="../src/FDMDV2.fbp"/>
         <Library Value="libportaudiocpp.a"/>
         <Library Value="libsamplerate.dll.a"/>
         <Library Value="ctb-0.16.dll"/>
-        <Library Value="libsox.la"/>
+        <Library Value="libsox.a"/>
       </Linker>
       <ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
       <General OutputFile="$(IntermediateDirectory)/freeDV" IntermediateDirectory="./Release" Command="./freeDV.exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="no"/>
         <PostConnectCommands/>
         <StartupCommands/>
       </Debugger>
-      <PreBuild>
-        <Command Enabled="yes">D:\bin\TortiseSVN\bin\svnversion -c D:\Projects\Radio\fdmdv2</Command>
-      </PreBuild>
+      <PreBuild/>
       <PostBuild/>
       <CustomBuild Enabled="no">
         <RebuildCommand/>
index 1a68a0e7e3727e47cf211d53774487b300cce8c8..9090a9816f00e2c58c2301f68fc244663d6ff084 100644 (file)
@@ -1 +1 @@
-./Debug/src_dlg_comports.o ./Debug/src_fdmdv2_main.o ./Debug/src_fdmdv2_plot.o ./Debug/src_topFrame.o ./Debug/src_fdmdv2_plot_scatter.o ./Debug/src_fdmdv2_plot_spectrum.o ./Debug/src_fdmdv2_pa_wrapper.o ./Debug/src_fdmdv2_plot_scalar.o ./Debug/src_fdmdv2_plot_waterfall_linux.o ./Debug/src_dlg_audiooptions.o  ./Debug/src_dlg_filter.o ./Debug/src_varicode.o ./Debug/src_sox_biquad.o  \r
+./Release/src_dlg_comports.o ./Release/src_fdmdv2_main.o ./Release/src_fdmdv2_plot.o ./Release/src_topFrame.o ./Release/src_fdmdv2_plot_scatter.o ./Release/src_fdmdv2_plot_spectrum.o ./Release/src_fdmdv2_pa_wrapper.o ./Release/src_fdmdv2_plot_scalar.o ./Release/src_fdmdv2_plot_waterfall_linux.o ./Release/src_dlg_audiooptions.o  ./Release/src_dlg_filter.o ./Release/src_varicode.o ./Release/src_sox_biquad.o ./Release/src_dlg_about.o  \r
index 3d94d01429ef2e42f29f9b12f7ac661d1833c828..9052795a26abb19232370cdc0774184f843cffca 100644 (file)
@@ -10,7 +10,7 @@
   <Project Name="libCTB" Path="libCTB/libCTB.project" Active="No"/>
   <Project Name="enumSerial" Path="../tests/serial_enum/enumSerial.project" Active="No"/>
   <BuildMatrix>
-    <WorkspaceConfiguration Name="Debug" Selected="yes">
+    <WorkspaceConfiguration Name="Debug" Selected="no">
       <Project Name="fdmdv2" ConfigName="Debug"/>
       <Project Name="rawbits" ConfigName="Debug"/>
       <Project Name="pa_enum" ConfigName="Debug"/>
index df903b4176cb93faa093a14cdb37df874d7b8ae6..e920a49f92d611834cd057fddc19ad80c7942a1c 100644 (file)
@@ -1,8 +1,8 @@
 .PHONY: clean All
 
 All:
-       @echo "----------Building project:[ fdmdv2 - Debug ]----------"
+       @echo "----------Building project:[ fdmdv2 - Release ]----------"
        @"$(MAKE)" -f "fdmdv2.mk"
 clean:
-       @echo "----------Cleaning project:[ fdmdv2 - Debug ]----------"
+       @echo "----------Cleaning project:[ fdmdv2 - Release ]----------"
        @"$(MAKE)" -f "fdmdv2.mk" clean
index 9ccc8666f9824c640aba92683333fab1d4b119bf..b937adb0e59d4297f42efbdf58e70cc8cd1712e6 100644 (file)
@@ -17,12 +17,13 @@ WX_CONFIG=$(WX_GTK_PATH)/wx-config
 WX_CPPFLAGS = $(shell $(WX_CONFIG) --cxxflags)
 WX_LIBS = $(shell $(WX_CONFIG) --libs core, base, aui, adv, net)
 SVN_REVISION=$(shell svnversion)
-FREEDV_VERSION=$(shell cat ../version.txt)
+FREEDV_VERSION=$(shell cat ../version.txt)
 CODEC2_INC=-I$(CODEC2_PATH)/src
 CODEC2_LIB=$(CODEC2_PATH)/src/.libs/libcodec2.a
 SOX_LIB=$(SOX_LIB_PATH)/libsox.a
 
-CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I. -g -Wall -O3 -DSVN_REVISION=\"$(SVN_REVISION)\" -DFREEDV_VERSION="\"$(FREEDV_VERSION)"\"
+#CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I. -g -Wall -O3 -DSVN_REVISION=\"$(SVN_REVISION)\" -DFREEDV_VERSION="\"$(FREEDV_VERSION)"\"
+CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I. -g -Wall -O3 -DSVN_REVISION=\"$(SVN_REVISION)\"
 LIBS = $(WX_LIBS) $(CODEC2_LIB) -lm -lportaudiocpp -lpthread -lsndfile -lsamplerate -Wl,-Bstatic -lctb-0.16 -Wl,-Bdynamic $(SOX_LIB) 
 
 OBJS = topFrame.o \
@@ -40,7 +41,7 @@ varicode.o \
 sox_biquad.o
 
 
-HDRS = dlg_audiooptions.h dlg_comports.h dlg_filter.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h varicode.h
+HDRS = ../version.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_filter.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h varicode.h
 
 all: freedv
 
index 332d021b406c7b4325da3fe55dc6a70e9a416eae..d12ae25b24331c8816ca8746ed8eda261019f533 100644 (file)
@@ -1,22 +1,27 @@
 # src/Makefile.linux
-# David Rowe 10 Oct 2012
+# David Witten 06 Dec 2012
 #
-# Makefile for Linux to help David R get up to speed
 #
-# $ make -f Makefile.linux
+# $ make -f Makefile.linux.dmw
+
+
+# EDIT THESE FOR YOUR SYSTEM ----------------------------
 
 WX_GTK_PATH=/home/wittend/Projects/wxWidgets-2.9.4/build_gtk
 CODEC2_PATH=/home/wittend/Projects/codec2-dev
+# SOX_LIB_PATH=$(HOME)/sox-14.4.0/src/.libs - not required because I installed soxlib from the repo.
+
+# END EDITS ---------------------------------------------
 
 WX_CONFIG=$(WX_GTK_PATH)/wx-config
 WX_CPPFLAGS = $(shell $(WX_CONFIG) --cxxflags)
 WX_LIBS = $(shell $(WX_CONFIG) --libs core, base, aui)
 SVN_REVISION=$(shell svnversion)
+FREEDV_VERSION=$(shell cat ../version.txt)
 CODEC2_INC=-I$(CODEC2_PATH)/src
 CODEC2_LIB=$(CODEC2_PATH)/src/.libs/libcodec2.a
 
-#CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I../extern/include -g -Wall
-CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I. -g -Wall -O3 -DSVN_REV=\"$(SVN_REVISION)\"
+CPP_FLAGS = $(WX_CPPFLAGS) $(CODEC2_INC) -I. -g -Wall -O3 -DSVN_REV=\"$(SVN_REVISION)\" -DFREEDV_VERSION="\"$(FREEDV_VERSION)"\"
 LIBS = $(WX_LIBS) $(CODEC2_LIB) -lm -lportaudiocpp -lpthread -lsndfile -lsamplerate
 
 OBJS = topFrame.o \
@@ -27,17 +32,19 @@ fdmdv2_plot_scatter.o \
 fdmdv2_plot_spectrum.o \
 fdmdv2_plot_waterfall_linux.o \
 fdmdv2_pa_wrapper.o \
-dlg_about.o \
 dlg_audiooptions.o \
 dlg_comports.o \
-dlg_options.o
+dlg_filter.o \
+varicode.o \
+sox_biquad.o
+
 
 all: fdmdv2
 
 fdmdv2: $(OBJS) fdmdv2_main.h
        g++ -o fdmdv2 $(OBJS) $(CPP_FLAGS) $(LIBS)
 
-fdmdv2_main.h: fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_options.h
+fdmdv2_main.h: ../version.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h dlg_about.h dlg_audiooptions.h dlg_comports.h dlg_options.h
 
 %.o: %.cpp
        g++ $(CPP_FLAGS) -c $< -o $@
index 86c7fde3833881798df08f95a0b9f4bb76a9cc16..8b968caf33faf46b37feff2553d6d2932d704976 100644 (file)
@@ -1,13 +1,23 @@
 # src/Makefile.win32
 # David Witten Nov 31 2012
 #
-# Makefile for Win32 on msys/Mingw to help David
 #
 # $ make -f Makefile.Win32.dmw
 
+# EDIT THESE FOR YOUR SYSTEM ----------------------------
+
 CODEC2_PATH=D:/Projects/Radio/codec2-dev
 INCLUDE_PATH=d:/bin/MinGW-4.6.1/msys/1.0/local/lib
 
+# not required because I installed soxlib in my:
+#    D:\bin\MinGW-4.6.1\msys\1.0\local\lib folder
+# which is the equivalent from the Msys command line to 
+# /usr/local/lib under Linux/Unix/BSD type OS's and therefore
+# in the default linker path
+# SOX_LIB_PATH=$(HOME)/sox-14.4.0/src/.libs 
+
+# END EDITS ---------------------------------------------
+
 WX_CONFIG=wx-config
 WX_CPPFLAGS = $(shell $(WX_CONFIG) --cxxflags) -D__WXDEBUG__
 WX_LIBS = $(shell $(WX_CONFIG) --libs core, base, aui, adv, net)
@@ -15,7 +25,7 @@ SVN_REVISION=$(shell svnversion -c /fdmdv2)
 CODEC2_INC=$(CODEC2_PATH)/src 
 CODEC2_LIB=$(CODEC2_PATH)/src/.libs/libcodec2.a
 
-CPP_FLAGS = -I$(INCLUDE_PATH) $(WX_CPPFLAGS) -I$(CODEC2_INC) -I../extern/include -g -Wall -DSVN_REV=\"$(SVN_REVISION)\"
+CPP_FLAGS = -I$(INCLUDE_PATH) $(WX_CPPFLAGS) -I$(CODEC2_INC) -I../extern/include -g -Wall -DSVN_REV=\"$(SVN_REVISION)\" -DFREEDV_VERSION="\"$(FREEDV_VERSION)"\"
 LIBS = $(WX_LIBS) $(CODEC2_LIB) -lm -lportaudiocpp -lportaudio -lpthread -lsndfile -lsamplerate
 
 OBJS = topFrame.o \
@@ -26,12 +36,14 @@ fdmdv2_plot_scatter.o \
 fdmdv2_plot_spectrum.o \
 fdmdv2_plot_waterfall_linux.o \
 fdmdv2_pa_wrapper.o \
-dlg_about.o \
 dlg_audiooptions.o \
 dlg_comports.o \
-dlg_options.o
+dlg_filter.o \
+varicode.o \
+sox_biquad.o
+
 
-HDRS = fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h dlg_audiooptions.h
+HDRS = ../version.h fdmdv2_main.h fdmdv2_defines.h fdmdv2_plot.h fdmdv2_plot_scalar.h fdmdv2_plot_waterfall_linux.h fdmdv2_plot_scatter.h fdmdv2_plot_spectrum.h fdmdv2_pa_wrapper.h topFrame.h dlg_audiooptions.h
 
 all: freedv
 
@@ -42,5 +54,5 @@ freedv: $(OBJS)
        g++ $(CPP_FLAGS) -c $< -o $@
 
 clean:
-       rm -f *.o fdmdv2
+       rm -f *.o FreeDV.exe
 
diff --git a/fdmdv2/src/dlg_about.cpp b/fdmdv2/src/dlg_about.cpp
new file mode 100644 (file)
index 0000000..0d1acc0
--- /dev/null
@@ -0,0 +1,225 @@
+//==========================================================================
+// Name:            dlg_about.cpp
+// Purpose:         Creates simple about dialog.
+// Date:            Dec 06 2012
+// Authors:         David Rowe, David Witten
+// 
+// License:
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License version 2.1,
+//  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, see <http://www.gnu.org/licenses/>.
+//
+//==========================================================================
+#include <wx/ffile.h>
+#include <wx/dcmemory.h>
+#include "dlg_about.h"\r
+//#include "contributers.h"\r
+
+AboutDlg::AboutDlg( wxWindow* parent, 
+                    wxWindowID id, 
+                    const wxString& title, 
+                    const wxPoint& pos, 
+                    const wxSize& size, 
+                    long style) : wxDialog(parent, id, title, pos, size, style)
+{
+      this->SetSizeHints(wxDefaultSize, wxDefaultSize);
+    
+    wxBoxSizer* mainSizer;
+    mainSizer = new wxBoxSizer(wxVERTICAL);
+    
+    m_notebook1 = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
+    m_panel1 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
+    wxBoxSizer* bSizer3;
+    bSizer3 = new wxBoxSizer(wxVERTICAL);
+    
+//    m_bitmap = new wxStaticBitmap(m_panel1, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
+//    bSizer3->Add(m_bitmap, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5);
+    
+    m_panel1->SetSizer(bSizer3);
+    m_panel1->Layout();
+    bSizer3->Fit(m_panel1);
+    m_notebook1->AddPage(m_panel1, _("About"), true);
+    m_panel4 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
+    wxBoxSizer* bSizer4;
+    bSizer4 = new wxBoxSizer(wxVERTICAL);
+    
+    m_htmlWin3 = new wxHtmlWindow(m_panel4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
+    bSizer4->Add(m_htmlWin3, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5);
+    
+    m_panel4->SetSizer(bSizer4);
+    m_panel4->Layout();
+    bSizer4->Fit(m_panel4);
+    m_notebook1->AddPage(m_panel4, _("Credits"), false);
+    m_panel3 = new wxPanel(m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
+    wxBoxSizer* bSizer5;
+    bSizer5 = new wxBoxSizer(wxVERTICAL);
+    
+    m_textCtrlLicense = new wxTextCtrl(m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2);
+    bSizer5->Add(m_textCtrlLicense, 1, wxEXPAND, 5);
+    
+    m_panel3->SetSizer(bSizer5);
+    m_panel3->Layout();
+    bSizer5->Fit(m_panel3);
+    m_notebook1->AddPage(m_panel3, _("License"), false);
+    
+    mainSizer->Add(m_notebook1, 1, wxEXPAND | wxALL, 5);
+    
+    wxStaticBoxSizer* sbSizer1;
+    sbSizer1 = new wxStaticBoxSizer(new wxStaticBox(this, wxID_ANY, wxEmptyString), wxVERTICAL);
+    
+    wxFlexGridSizer* fgSizer1;
+    fgSizer1 = new wxFlexGridSizer(0, 2, 0, 0);
+    fgSizer1->SetFlexibleDirection(wxBOTH);
+    fgSizer1->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
+    
+    m_staticTextHomePage = new wxStaticText(this, wxID_ANY, _("Home Page:"), wxDefaultPosition, wxDefaultSize, 0);
+    m_staticTextHomePage->Wrap(-1);
+    m_staticTextHomePage->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString));
+    
+    fgSizer1->Add(m_staticTextHomePage, 1, wxALL|wxEXPAND, 5);
+    
+    m_hyperlink1 = new wxHyperlinkCtrl(this, wxID_ANY, _("http://freedv.org"), wxT("http://freedv.org"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+    fgSizer1->Add(m_hyperlink1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
+    
+    m_staticText2 = new wxStaticText(this, wxID_ANY, _("freedv Forum:"), wxDefaultPosition, wxDefaultSize, 0);
+    m_staticText2->Wrap(-1);
+    m_staticText2->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString));
+    
+    fgSizer1->Add(m_staticText2, 0, wxALL, 5);
+    
+    m_hyperlink2 = new wxHyperlinkCtrl(this, wxID_ANY, _("Google Group"), wxT("https://groups.google.com/forum/?fromgroups=#!forum/digitalvoice"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+    fgSizer1->Add(m_hyperlink2, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
+    
+    m_staticText3 = new wxStaticText(this, wxID_ANY, _("Version:"), wxDefaultPosition, wxDefaultSize, 0);
+    m_staticText3->Wrap(-1);
+    m_staticText3->SetFont(wxFont(wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString));
+    
+    fgSizer1->Add(m_staticText3, 0, wxALL, 5);
+    
+    m_staticTextInformation = new wxStaticText(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+    m_staticTextInformation->Wrap(-1);
+    fgSizer1->Add(m_staticTextInformation, 0, wxALL, 5);
+    
+//    m_bitmapPayPal = new wxStaticBitmap(this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0);
+//    fgSizer1->Add(m_bitmapPayPal, 0, wxALL, 5);
+    
+    m_hyperlink3 = new wxHyperlinkCtrl(this, wxID_ANY, _("Donate via PayPal"), wxT("https://sourceforge.net/donate/index.php?group_id=202033"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
+    fgSizer1->Add(m_hyperlink3, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
+    
+    sbSizer1->Add(fgSizer1, 1, wxEXPAND, 5);
+    
+    mainSizer->Add(sbSizer1, 0, wxEXPAND|wxALL, 5);
+    
+    wxBoxSizer* buttonSizer;
+    buttonSizer = new wxBoxSizer(wxHORIZONTAL);
+    
+    m_buttonOk = new wxButton(this, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0);
+    m_buttonOk->SetDefault(); 
+    buttonSizer->Add(m_buttonOk, 0, wxALL, 5);
+    
+    mainSizer->Add(buttonSizer, 0, wxALIGN_CENTER_HORIZONTAL, 5);
+    
+    this->SetSizer(mainSizer);
+    this->Layout();
+    mainSizer->Fit(this);
+    this->Centre(wxBOTH);
+    wxString svnLatestRev("Can't determine latest SVN revision.");
+
+    // Try to determine current SVN revision from the Internet
+    wxURL url(wxT("http://freetel.svn.sourceforge.net/svnroot/freetel/fdmdv2/"));
+    
+    if(url.GetError() == wxURL_NOERR)
+    {
+        wxString htmldata;
+        wxInputStream *in = url.GetInputStream();
+        if(in && in->IsOk())
+        {
+            //printf("In OK\n");
+            wxStringOutputStream html_stream(&htmldata);
+            in->Read(html_stream);
+            //wxLogDebug(htmldata);
+            wxString s("<h2>freetel - Revision ");
+            int startIndex = htmldata.find(s) + s.Length();
+            int endIndex = htmldata.find(wxT(": /fdmdv2</h2>"));
+            svnLatestRev = wxT("Latest svn revision: ") + htmldata.SubString(startIndex, endIndex-1);
+            //printf("startIndex: %d endIndex: %d\n", startIndex, endIndex);
+       }
+       delete in;
+    }
+
+    wxString msg;
+    msg.Printf( wxT("FreeDV %s\n\n")
+                wxT("Open Source Narrow Band Digital Voice over Radio\n\n")
+                wxT("For Help and Support visit: http://freedv.org\n\n")
+                wxT("GNU Public License V2.1\n\n")
+                wxT("Copyright (c) David Witten KD0EAG and David Rowe VK5DGR\n\n")
+                wxT("svn revision: %s\n") + svnLatestRev, FREEDV_VERSION, SVN_REVISION);
+
+//    wxMessageBox(msg, wxT("About"), wxOK | wxICON_INFORMATION, this);
+}
+
+AboutDlg::~AboutDlg()
+{
+}
+/*\r
+AboutDlg::AboutDlg(wxWindow* parent, const wxString &mainTitle) : AboutDlgBase(parent)\r
+{
+    wxFileName splashscreen(ManagerST::Get()->GetStarupDirectory() +
+                            wxFileName::GetPathSeparator() + 
+                            wxT("images") + 
+                            wxFileName::GetPathSeparator() + 
+                            wxT("splashscreen.png"));
+\r
+    m_bmp.LoadFile(splashscreen.GetFullPath(), wxBITMAP_TYPE_PNG);\r
+    m_bitmap->SetBitmap(m_bmp);\r
+    GetSizer()->Fit(this);
+    
+    BitmapLoader bmpLoader;
+    m_bitmapPayPal->SetBitmap(bmpLoader.LoadBitmap(wxT("about/32/paypal")));
+    \r
+    // set the page content\r
+    m_htmlWin3->SetPage(wxString::FromUTF8(about_hex));\r
+    m_buttonOk->SetFocus();
+    
+    wxFileName license(ManagerST::Get()->GetInstallDir() + wxFileName::GetPathSeparator() + wxT("LICENSE"));
+    wxString licenseFullname = license.GetFullPath();
+    if(license.FileExists()) 
+    {
+        wxFFile fp(licenseFullname);
+        if(fp.IsOpened()) 
+        {
+            wxString content;
+            fp.ReadAll(&content, wxConvUTF8);
+            fp.Close();
+            
+            m_textCtrlLicense->SetEditable(true);
+            wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
+            font.SetFamily(wxFONTFAMILY_TELETYPE);
+            m_textCtrlLicense->SetFont(font);
+            
+            m_textCtrlLicense->ChangeValue(content);
+            m_textCtrlLicense->SetEditable(false);
+        }
+    }
+    CentreOnScreen();\r
+}\r
+\r
+AboutDlg::~AboutDlg()
+{
+}
+*/
+\r
+void AboutDlg::ExchangeData(int inout)\r
+{\r
+//    return m_staticTextInformation->GetLabelText();\r
+}
diff --git a/fdmdv2/src/dlg_about.h b/fdmdv2/src/dlg_about.h
new file mode 100644 (file)
index 0000000..ffdc12c
--- /dev/null
@@ -0,0 +1,72 @@
+//==========================================================================\r
+// Name:            dlg_about.h\r
+// Purpose:         Provides an 'about' dialog.\r
+// Created:         Dec 06, 2012\r
+// Authors:         David Rowe, David Witten\r
+// \r
+// License:\r
+//\r
+//  This program is free software; you can redistribute it and/or modify\r
+//  it under the terms of the GNU General Public License version 2.1,\r
+//  as published by the Free Software Foundation.  This program is\r
+//  distributed in the hope that it will be useful, but WITHOUT ANY\r
+//  WARRANTY; without even the implied warranty of MERCHANTABILITY or\r
+//  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public\r
+//  License for more details.\r
+//\r
+//  You should have received a copy of the GNU General Public License\r
+//  along with this program; if not, see <http://www.gnu.org/licenses/>.\r
+//\r
+//==========================================================================\r
+#ifndef __AboutDlg__\r
+#define __AboutDlg__\r
+\r
+#include "fdmdv2_main.h"\r
+#include "wx/bitmap.h"\r
+#include <wx/xrc/xmlres.h>\r
+#include <wx/settings.h>\r
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/html/htmlwin.h>
+#include <wx/textctrl.h>
+#include <wx/notebook.h>
+#include <wx/stattext.h>
+#include <wx/hyperlink.h>
+#include <wx/statbox.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/bitmap.h>
+
+/** Implementing AboutDlg */\r
+class AboutDlg : public wxDialog\r
+{\r
+   protected:
+        wxNotebook* m_notebook1;
+        wxPanel* m_panel1;
+        wxStaticBitmap* m_bitmap;
+        wxPanel* m_panel4;
+        wxHtmlWindow* m_htmlWin3;
+        wxPanel* m_panel3;
+        wxTextCtrl* m_textCtrlLicense;
+        wxStaticText* m_staticTextHomePage;
+        wxHyperlinkCtrl* m_hyperlink1;
+        wxStaticText* m_staticText2;
+        wxHyperlinkCtrl* m_hyperlink2;
+        wxStaticText* m_staticText3;
+        wxStaticText* m_staticTextInformation;
+        wxStaticBitmap* m_bitmapPayPal;
+        wxHyperlinkCtrl* m_hyperlink3;
+        wxButton* m_buttonOk;
+        wxBitmap m_bmp;
+    
+    public:\r
+        /** Constructor */\r
+        AboutDlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About freeDV"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE ); 
+        virtual ~AboutDlg();\r
+        void ExchangeData(int inout);\r
+};\r
+\r
+#endif // __AboutDlg__\r
index 1cfff3fed1473f5bc6f6be5d786d60065e8a479d..23c25662a5efa7ef90bdabb9bb8fbe76e188b7c6 100644 (file)
@@ -894,10 +894,16 @@ void MainFrame::OnTogBtnTXClick(wxCommandEvent& event)
     else 
     {
         // rx-> tx transition, swap to Mic In page to monitor speech
-
         wxGetApp().m_rxNbookCtrl = m_auiNbookCtrl->GetSelection();
-        m_auiNbookCtrl->ChangeSelection(4); // is there a way to avoid hard coding this?
-        
+//        m_auiNbookCtrl->ChangeSelection(4); // is there a way to avoid hard coding this?
+//
+// David: I think int GetPageIndex (wxWindow *page_wnd) const
+// might help. Something like:
+//  size_t idx = GetPageIndex(wxWindow *page_wnd);
+//  m_auiNbookCtrl->ChangeSelection(m_auiNbookCtrl->GetPageIndex((wxWindow *)m_panelSpeechIn));
+// -- dmw
+//
+        m_auiNbookCtrl->ChangeSelection(m_auiNbookCtrl->GetPageIndex((wxWindow *)m_panelSpeechIn));
     }
     g_tx = m_btnTogPTT->GetValue();
     // Tortured and tortuous logic, it seems to me...
@@ -1483,6 +1489,17 @@ void MainFrame::OnHelpCheckUpdatesUI(wxUpdateUIEvent& event)
 //-------------------------------------------------------------------------
 void MainFrame::OnHelpAbout(wxCommandEvent& event)
 {
+    wxUnusedVar(event);
+#ifdef _USE_ABOUT_DIALOG
+    int rv = 0;
+    AboutDlg *dlg = new AboutDlg(NULL);
+    rv = dlg->ShowModal();
+    if(rv == wxID_OK)
+    {
+        dlg->ExchangeData(EXCHANGE_DATA_OUT);
+    }
+    delete dlg;
+#else
     wxString svnLatestRev("Can't determine latest SVN revision.");
 
     // Try to determine current SVN revision from the Internet
@@ -1519,9 +1536,10 @@ void MainFrame::OnHelpAbout(wxCommandEvent& event)
 
     wxMessageBox(msg, wxT("About"), wxOK | wxICON_INFORMATION, this);
 
-
+#endif // _USE_ABOUT_DIALOG
 }
 
+//bool wxLaunchDefaultBrowser(http:("http://freedv.org/");
 
 //-------------------------------------------------------------------------
 // OnTogBtnOnOff()
index 8de702ae82af3a2d6416abb69158d943386e2578..3ed7acf93eb836e35de8b4d8797198b656649841 100644 (file)
 #ifndef __FDMDV2_MAIN__
 #define __FDMDV2_MAIN__
 
+#include "../version.h"
 #include <wx/wx.h>
 
 #include <wx/tglbtn.h>
 #include <wx/app.h>
-#include <wx/aboutdlg.h>
+//#include <wx/aboutdlg.h>
 #include "wx/rawbmp.h"
 #include "wx/file.h"
 #include "wx/filename.h"
@@ -68,6 +69,7 @@
 #include "portaudio.h"
 #include "dlg_audiooptions.h"
 #include "dlg_filter.h"
+#include "dlg_about.h"
 #include "varicode.h"
 #include "sox_biquad.h"
 
@@ -76,6 +78,7 @@
 #define _DUMMY_DATA             1
 //#define _AUDIO_PASSTHROUGH    1
 #define _REFRESH_TIMER_PERIOD   (DT*1000)
+//#define _USE_ABOUT_DIALOG       1
 
 enum {
         ID_START = wxID_HIGHEST,
index 2df715f6e33f992f055b24434bd67eec83637a7f..5fe0c2426bb745e4d38067ec5d858fa70443219c 100644 (file)
@@ -26,6 +26,7 @@
 //    #define SVN_REV SVN_REVISION
 //#endif
 
+#include "../version.h"
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
 #include <wx/intl.h>
@@ -158,7 +159,7 @@ class TopFrame : public wxFrame
 
         wxAuiNotebook* m_auiNbookCtrl;
 
-        TopFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeDV " FREEDV_VERSION), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 761,500 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
+        TopFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("FreeDV ") + _(FREEDV_VERSION), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 761,500 ), long style = wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER|wxTAB_TRAVERSAL );
 
         ~TopFrame();
 
diff --git a/fdmdv2/version.h b/fdmdv2/version.h
new file mode 100644 (file)
index 0000000..dc3f822
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef FREEDV_VER_DOT_H
+#define FREEDV_VER_DOT_H 1
+
+#define FREEDV_VERSION "0.9 Beta"
+
+#endif //FREEDV_VER_DOT_H
\ No newline at end of file