gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog doc/C/usermanual/usage/gnashrc.... [relea


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog doc/C/usermanual/usage/gnashrc.... [release_0_8_1]
Date: Sun, 19 Aug 2007 20:22:04 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Branch:         release_0_8_1
Changes by:     Sandro Santilli <strk>  07/08/19 20:22:04

Modified files:
        .              : ChangeLog 
        doc/C/usermanual/usage: gnashrc.xml 
        libbase        : rc.cpp rc.h 
        server/vm      : VM.cpp 
        testsuite/libbase: TCXXRc.cpp gnashrc.in 

Log message:
                * doc/C/usermanual/usage/gnashrc.xml: document
                  flashVersionString variable.
        
        Patch #6155 by Benjamin Wolsey <address@hidden>:
        
                * libbase/rc.{cpp,h}: Avoid string copies in inspectors;
                  add getFlashVersionString (support for
                  "set flashVersionString Bla bla bla" in gnashrc).
                * server/vm/VM.cpp (getPlayerVersion): Query RcInit for version
                  string
                * testsuite/libbase/: TCXXRc.cpp, gnashrc.in:
                  Add test for

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.3971.2.38&r2=1.3971.2.39
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/usermanual/usage/gnashrc.xml?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.5&r2=1.5.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.27&r2=1.27.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.h?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.21&r2=1.21.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/VM.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.12.2.2&r2=1.12.2.3
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/TCXXRc.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.14&r2=1.14.2.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/gnashrc.in?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.5&r2=1.5.6.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3971.2.38
retrieving revision 1.3971.2.39
diff -u -b -r1.3971.2.38 -r1.3971.2.39
--- ChangeLog   18 Aug 2007 22:08:12 -0000      1.3971.2.38
+++ ChangeLog   19 Aug 2007 20:22:02 -0000      1.3971.2.39
@@ -1,3 +1,18 @@
+2007-08-19 Sandro Santilli <address@hidden>
+
+       * doc/C/usermanual/usage/gnashrc.xml: document
+         flashVersionString variable.
+
+2007-08-19 Benjamin Wolsey <address@hidden>
+
+       * libbase/rc.{cpp,h}: Avoid string copies in inspectors;
+         add getFlashVersionString (support for
+         "set flashVersionString Bla bla bla" in gnashrc).
+       * server/vm/VM.cpp (getPlayerVersion): Query RcInit for version
+         string
+       * testsuite/libbase/: TCXXRc.cpp, gnashrc.in:
+         Add test for 
+
 2007-08-18 Sandro Santilli <address@hidden>
 
        * server/swf/tag_loaders.cpp (define_bits_lossless_2_loader):

Index: doc/C/usermanual/usage/gnashrc.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/usermanual/usage/gnashrc.xml,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -b -r1.5 -r1.5.2.1
--- doc/C/usermanual/usage/gnashrc.xml  1 Aug 2007 05:00:45 -0000       1.5
+++ doc/C/usermanual/usage/gnashrc.xml  19 Aug 2007 20:22:03 -0000      1.5.2.1
@@ -134,6 +134,22 @@
       </varlistentry>
 
       <varlistentry id="standalonesound">
+<row>
+<entry>flashVersionString</entry>
+<entry>string</entry>
+<entry>Set the string returned by $version and System.capabilities.version.
+       Useful to get around some flash version detection movies.
+       Note that the version advertised by the plugin is NOT affected by this 
setting,
+       instead you need to set the GNASH_FLASH_VERSION environment variable for
+       the latter (which doesn't affect $version and 
System.capabilities.version).</entry>
+</row>
+<row>
+<entry>StartStopped</entry>
+<entry>on/off</entry>
+<entry>Set to <emphasis>on</emphasis> to have the GUI start in "stop" mode. 
This is useful in particular
+           for the plugin, so you have to explicitly start any movie on a 
webpage. This option is <emphasis>off</emphasis> by default.
+         </entry>
+</row>
        <term>sound</term>
        <listitem>
          <para>

Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -u -b -r1.27 -r1.27.2.1
--- libbase/rc.cpp      12 Jul 2007 23:03:49 -0000      1.27
+++ libbase/rc.cpp      19 Aug 2007 20:22:03 -0000      1.27.2.1
@@ -53,6 +53,10 @@
                            _debug(false),
                            _debugger(false),
                            _verbosity(-1),
+                           _flashVersionString("GSH "\
+                               DEFAULT_FLASH_MAJOR_VERSION","\
+                               DEFAULT_FLASH_MINOR_VERSION","\
+                               DEFAULT_FLASH_REV_NUMBER ",0"),
                            _actiondump(false),
                            _parserdump(false),
                           _verboseASCodingErrors(false),
@@ -60,6 +64,7 @@
                            _splash_screen(true),
                            _localdomain_only(false),
                            _localhost_only(false),
+                           _log("gnash-dbg.log"),
                            _sound(true),
                            _plugin_sound(true),
                           _extensionsEnabled(false),
@@ -128,8 +133,8 @@
 }
 
 int
-RcInitFile::extractNumber(int *num, const char *pattern, std::string &variable,
-                           std::string &value)
+RcInitFile::extractNumber(int *num, const char *pattern, string &variable,
+                           string &value)
 {      
 //    GNASH_REPORT_FUNCTION;
 //        log_msg ("%s: %s", variable.c_str(), value.c_str());
@@ -176,7 +181,11 @@
                 continue;
             }
             
-            in >> variable >> value;
+            in >> variable;
+            getline(in, value);
+            string::size_type position = value.find_first_not_of(' ');
+            if(position != string::npos) value.erase(0, position);
+
             //      log_msg ("%s %s %s", action, variable, value);
             
             if (action == "set") {
@@ -197,6 +206,14 @@
                 extractNumber(&_delay, "delay", variable, value);
                 extractNumber(&_verbosity, "verbosity", variable, value);
                 
+                if (variable == "flashVersionString") {
+                    _flashVersionString = value;
+                }
+
+                if (variable == "debuglog") {
+                    _log = value;
+                }
+
                 if (variable == "documentroot") {
                     _wwwroot = value;
                 }
@@ -335,6 +352,9 @@
     if (_log.size()) {
         cerr << "\tDebug Log name is: " << _log << endl;
     }
+    if (_flashVersionString.size()) {
+        cerr << "\tFlash Version String is: " << _flashVersionString << endl;
+    }
     
 //     std::vector<std::string> _whitelist;
 //     std::vector<std::string> _blacklist;

Index: libbase/rc.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.h,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -b -r1.21 -r1.21.2.1
--- libbase/rc.h        12 Jul 2007 23:03:49 -0000      1.21
+++ libbase/rc.h        19 Aug 2007 20:22:03 -0000      1.21.2.1
@@ -76,7 +76,7 @@
     int verbosityLevel() const { return _verbosity; }
     void verbosityLevel(int value) { _verbosity = value; }
     
-    std::string getDebugLog() const { return _log; }
+    const std::string& getDebugLog() const { return _log; }
     std::string getDocumentRoot() { return _wwwroot; }
     
     bool useDebugger() const { return _debugger; }
@@ -105,6 +105,8 @@
     const std::vector<std::string>& getWhiteList() const { return _whitelist; }
     const std::vector<std::string>& getBlackList() const { return _blacklist; }
 
+    const std::string& getFlashVersionString() const { return 
_flashVersionString; }
+
     int getRetries() const { return _retries; }
     void setRetries(int x) { _retries = x; }
 
@@ -122,6 +124,7 @@
     bool _debug;                // enable debugging of this class
     bool _debugger;             // enable the Flash movie debugger
     int  _verbosity;
+    std::string  _flashVersionString;   //String to pass as $version in 
Actionscript
     bool _actiondump;           // enable dumping actionscript classes
     bool _parserdump;           // enable dumping parser data
 

Index: server/vm/VM.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/VM.cpp,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -b -r1.12.2.2 -r1.12.2.3
--- server/vm/VM.cpp    18 Aug 2007 12:37:18 -0000      1.12.2.2
+++ server/vm/VM.cpp    19 Aug 2007 20:22:03 -0000      1.12.2.3
@@ -16,7 +16,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: VM.cpp,v 1.12.2.2 2007/08/18 12:37:18 strk Exp $ */
+/* $Id: VM.cpp,v 1.12.2.3 2007/08/19 20:22:03 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -28,9 +28,13 @@
 #include "movie_root.h"
 #include "Global.h"
 #include "tu_timer.h" // for tu_timer::get_ticks()
+#include "rc.h" //for overriding default version string with rcfile
 
 #include <memory>
 
+namespace {
+gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
+}
 
 namespace gnash {
 
@@ -104,18 +108,8 @@
 const std::string&
 VM::getPlayerVersion() const
 {
-       // Expected Form: UNIX|WIN|WINCE|MAC (major version),(minor 
version),(revision),0
-       //    Used in _ActionScript_ version detection, not Javascript
-       //    ActionScript detection often looks for the commas, so
-       //    the last ,0 is necessary, even if it doesn't appear
-       //    to mean anything.
-       //    
-       // TODO: query RcInit file for an override
-       //
-#define FLASH_VERSION "GSH "DEFAULT_FLASH_MAJOR_VERSION","\
-        DEFAULT_FLASH_MINOR_VERSION","DEFAULT_FLASH_REV_NUMBER",0"
-
-       static const std::string version(FLASH_VERSION);
+       //From rcfile
+       static const std::string version(rcfile.getFlashVersionString());
        return version;
 }
 

Index: testsuite/libbase/TCXXRc.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/TCXXRc.cpp,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -b -r1.14 -r1.14.2.1
--- testsuite/libbase/TCXXRc.cpp        12 Jul 2007 23:03:49 -0000      1.14
+++ testsuite/libbase/TCXXRc.cpp        19 Aug 2007 20:22:04 -0000      1.14.2.1
@@ -158,6 +158,12 @@
         runtest.fail ("enableExtensions");
     }
 
+    if (rc.getFlashVersionString() == "GSH 9,0,99,0") {
+        runtest.pass ("getFlashVersionString");
+    } else {
+        runtest.fail ("getFlashVersionString");
+    }
+
     if (rc.startStopped() == 1) {
         runtest.pass ("startStopped");
     } else {
@@ -175,7 +181,7 @@
         }
         runtest.pass ("rc.getWhiteList() has elements");
     } else {
-        runtest.fail ("rc.getWhiteList() doesn't has elements");        
+        runtest.fail ("rc.getWhiteList() doesn't have elements");        
     }
         
     std::vector<std::string> blacklist = rc.getBlackList();
@@ -188,7 +194,7 @@
         }
         runtest.pass ("rc.getBlackList() has elements");
     } else {
-        runtest.fail ("rc.getBlackList() doesn't has elements");        
+        runtest.fail ("rc.getBlackList() doesn't have elements");        
     }
 }
 

Index: testsuite/libbase/gnashrc.in
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/gnashrc.in,v
retrieving revision 1.5
retrieving revision 1.5.6.1
diff -u -b -r1.5 -r1.5.6.1
--- testsuite/libbase/gnashrc.in        1 Jun 2007 15:01:55 -0000       1.5
+++ testsuite/libbase/gnashrc.in        19 Aug 2007 20:22:04 -0000      1.5.6.1
@@ -28,6 +28,9 @@
 # The full path to the debug log
 set debuglog ~/gnash-dbg.log
 
+# Version string to pass to ActionScript
+set flashVersionString GSH 9,0,99,0
+
 # Enable the debugger
 set debugger off
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]