]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
add changes for sounds download to allow independent version specific selection
authorJeff Lenk <jeff@jefflenk.com>
Thu, 3 Dec 2009 19:43:38 +0000 (19:43 +0000)
committerJeff Lenk <jeff@jefflenk.com>
Thu, 3 Dec 2009 19:43:38 +0000 (19:43 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15777 d0543943-73ff-0310-b7d9-9358b9ac24b2

Makefile.am
build/sounds_version.txt
libs/win32/Dowload 32khz Sounds.2008.vcproj
libs/win32/Download 16khz Sounds.2008.vcproj
libs/win32/Download 8khz Sounds.2008.vcproj
libs/win32/util.vbs

index 8a1366fdd154edac2e0cc2d025b2195f9a67cd77..366f039a8161f7990e47484c59e08f255178502a 100644 (file)
@@ -16,10 +16,11 @@ DEFAULT_SOUNDS=en-us-callie-8000
        @target=`echo $@ | sed -e 's|^.*-||'`; \
         target_prefix=`echo $@ | sed -e 's|-.*$$||'`; \
         sound_perfix=`echo $@ | sed -e 's|-.*||'`; \
-        sounds_version=`cat $(switch_srcdir)/build/sounds_version.txt`;\
         moh_version=`cat $(switch_srcdir)/build/moh_version.txt`;\
         full_sound_dir=`echo $@ | sed -e 's|^sounds||' | sed -e 's|^-||' | sed -e 's|-install$$||'`; \
         test ! -z $$full_sound_dir || full_sound_dir=`echo $(DEFAULT_SOUNDS)`; \
+        base_sound_dir=`echo $$full_sound_dir | sed -e 's|-[^-]*000$$||' ` ;\
+        sounds_version=`grep $$base_sound_dir $(switch_srcdir)/build/sounds_version.txt | cut -d ' '  -f2`;\
         soundfile=`echo freeswitch-sounds-$$full_sound_dir-$$moh_version.tar.gz`; \
         echo $$full_sound_dir | grep  music  >/dev/null || soundfile=`echo freeswitch-sounds-$$full_sound_dir-$$sounds_version.tar.gz`; \
          if test "$$target" = "install"; then $(MAKE) $(AM_MAKEFLAGS) core_install; else $(MAKE) $(AM_MAKEFLAGS) core ; fi; \
index bb83058ed548aaf2dfaaee63a55c900f1e4a8a9f..d26e74ef02723260b8a005eeadf0d51770940aae 100644 (file)
@@ -1 +1,3 @@
-1.0.12
+en-us-callie 1.0.12
+ru-RU-elena 1.0.12
+
index fbad2a30958d0cd73fd04873ea8debf4b82b8333..5fcc1f5feccd673e4296e2447dd1179c70ef843b 100644 (file)
@@ -75,7 +75,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 32khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\32000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-32000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\32000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 32000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\32000"\r
                                />\r
                        </FileConfiguration>\r
@@ -85,7 +85,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 32khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\32000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-32000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\32000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 32000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\32000"\r
                                />\r
                        </FileConfiguration>\r
index 789bb7494757c40dd24f0fcf74c9ea6d73dcab9a..e0588b46067cb8365f0797f582ec437f124c55e0 100644 (file)
@@ -75,7 +75,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 16khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\16000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-16000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\16000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 16000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\16000"\r
                                />\r
                        </FileConfiguration>\r
@@ -85,7 +85,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 16khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\16000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-16000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\16000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 16000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\16000"\r
                                />\r
                        </FileConfiguration>\r
index a03410cbf674793a61b99402a619a660e719d720..8111460d8e2b1dba08e26e6001b4bde087a3e005 100644 (file)
@@ -75,7 +75,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 8khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 8000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\8000"\r
                                />\r
                        </FileConfiguration>\r
@@ -85,7 +85,7 @@
                                <Tool\r
                                        Name="VCCustomBuildTool"\r
                                        Description="Downloading 8khzsound."\r
-                                       CommandLine="set /P SOUND_VERSION=&lt;$(ProjectDir)..\..\build\sounds_version.txt&#x0D;&#x0A;if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzip http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-%SOUND_VERSION%.tar.gz &quot;$(ProjectDir)..\sounds&quot;&#x0D;&#x0A;"\r
+                                       CommandLine="if not exist &quot;$(ProjectDir)..\sounds\en\us\callie\voicemail\8000&quot; cscript /nologo &quot;$(ProjectDir)util.vbs&quot; GetUnzipSounds en-us-callie 8000 &quot;$(ProjectDir)..\sounds&quot; &quot;$(ProjectDir)..\..\build\sounds_version.txt&quot;"\r
                                        Outputs="$(ProjectDir)..\sounds\en\us\callie\voicemail\8000"\r
                                />\r
                        </FileConfiguration>\r
index 10a9541af4a8eaacf50439c39f0a8931b06d9365..c332dfb80a8bf1c5c384509713e5051f76e6ff8c 100644 (file)
@@ -45,6 +45,8 @@ If objArgs.Count >=3 Then
                        Wget objArgs(1), Showpath(objArgs(2))\r
                Case "GetUnzip"         \r
                        WgetUnCompress objArgs(1), Showpath(objArgs(2))\r
+               Case "GetUnzipSounds"\r
+                       WgetSounds objArgs(1), objArgs(2), Showpath(objArgs(3)), objArgs(4)\r
                Case "Version"                                  \r
                        'CreateVersion(tmpFolder, VersionDir, includebase, includedest)\r
                        CreateVersion Showpath(objArgs(1)), Showpath(objArgs(2)), objArgs(3), objArgs(4)\r
@@ -56,6 +58,23 @@ End If
 ' Utility Subroutines\r
 ' *******************\r
 \r
+Sub WgetSounds(PrimaryName, Freq, DestFolder, VersionFile)\r
+    BaseURL = "http://files.freeswitch.org/freeswitch-sounds"\r
+    Set objFSO = CreateObject("Scripting.FileSystemObject")\r
+    Set objTextFile = objFSO.OpenTextFile(VersionFile,1)\r
+    Do Until objTextFile.AtEndOfStream\r
+        strLine = objTextFile.Readline\r
+        versionPos = InstrRev(strLine, " ", -1, 1)\r
+        name = Left(strLine, versionPos-1)\r
+        if name = PrimaryName Then\r
+            version = Right(strLine, Len(strLine) - versionPos)\r
+            Wscript.Echo "Sound name: " & name & " Version " & version\r
+            URL = BaseURL & "-" & name & "-" & Freq &"-" & version & ".tar.gz"\r
+            Wscript.Echo "URL: " & URL\r
+            WgetUnCompress URL, Showpath(DestFolder)\r
+        End If\r
+    Loop\r
+End Sub\r
 \r
 Sub WgetUnCompress(URL, DestFolder)\r
        If Right(DestFolder, 1) <> "\" Then DestFolder = DestFolder & "\" End If\r