[or-cvs] r14960: Pidgin integration complete but disabled by default; merge b (in torbrowser/trunk: . build-scripts build-scripts/config src/current-patches)
sjm217 at seul.org
sjm217 at seul.org
Wed Jun 4 19:04:05 UTC 2008
Author: sjm217
Date: 2008-06-04 15:04:05 -0400 (Wed, 04 Jun 2008)
New Revision: 14960
Added:
torbrowser/trunk/build-scripts/config/PidginPortable.ini
torbrowser/trunk/build-scripts/config/prefs.xml
torbrowser/trunk/build-scripts/config/vidalia.conf.ff
torbrowser/trunk/build-scripts/config/vidalia.conf.ff+pidgin
torbrowser/trunk/src/current-patches/vidalia-startim.patch
Removed:
torbrowser/trunk/build-scripts/config/vidalia.conf
Modified:
torbrowser/trunk/
torbrowser/trunk/build-scripts/Makefile
Log:
Pidgin integration complete but disabled by default; merge back into trunk
Property changes on: torbrowser/trunk
___________________________________________________________________
svk:merge ticket from /torbrowser/branches/pidgin [r14959] on 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Modified: torbrowser/trunk/build-scripts/Makefile
===================================================================
--- torbrowser/trunk/build-scripts/Makefile 2008-06-04 19:02:45 UTC (rev 14959)
+++ torbrowser/trunk/build-scripts/Makefile 2008-06-04 19:04:05 UTC (rev 14960)
@@ -20,7 +20,11 @@
TOR=/c/build/tor-0.2.0.26-rc
POLIPO=/c/build/polipo-1.0.4
FIREFOX_SRC=/c/build/FirefoxPortable
+PIDGIN_SRC=/c/build/PidginPortable
+## Do we install Pidgin?
+USE_PIDGIN=0
+
## Location of utility applications
SEVENZIP="/c/Program Files/7-Zip/7z.exe"
WGET:=/c/Python25/python.exe $(shell pwd)/pyget.py
@@ -88,10 +92,10 @@
## Generate a non-localized bundle and put in $(DEST)
##
-## Install binaries, documentation, FirefoxPortable and launcher into $(DEST)
+## Install binaries, documentation, FirefoxPortable, PidginPortable, and launcher into $(DEST)
generic-bundle.stamp:
make generic-bundle
-generic-bundle: directory-structure install-binaries install-docs install-firefoxportable configure-apps launcher
+generic-bundle: directory-structure install-binaries install-docs install-firefoxportable install-pidginportable configure-apps launcher
touch generic-bundle.stamp
APPDIR=$(DEST)/App
@@ -135,6 +139,12 @@
install-firefoxportable:
cp -R $(FIREFOX_SRC) $(DEST)/FirefoxPortable
+## Copy over PidginPortable
+install-pidginportable:
+ifeq ($(USE_PIDGIN),1)
+ cp -R $(PIDGIN_SRC) $(DEST)/PidginPortable
+endif
+
## Configure Firefox, FirefoxPortable, Vidalia, Polipo and Tor
configure-apps:
## Configure Firefox preferences
@@ -143,8 +153,18 @@
cp $(CONFIG_SRC)/bookmarks.html $(DEST)/FirefoxPortable/App/DefaultData/profile/
## Configure FirefoxPortable
cp $(CONFIG_SRC)/FirefoxPortable.ini $(DEST)/FirefoxPortable
+ ## Configure PidginPortable
+ifeq ($(USE_PIDGIN),1)
+ cp $(CONFIG_SRC)/PidginPortable.ini $(DEST)/PidginPortable
+ mkdir -p $(DEST)/PidginPortable/Data/settings/.purple
+ cp $(CONFIG_SRC)/prefs.xml $(DEST)/PidginPortable/Data/settings/.purple
+endif
## Configure Vidalia
- cp $(CONFIG_SRC)/vidalia.conf $(DEST)/Data/Vidalia
+ifeq ($(USE_PIDGIN),1)
+ cp $(CONFIG_SRC)/vidalia.conf.ff+pidgin $(DEST)/Data/Vidalia/vidalia.conf
+else
+ cp $(CONFIG_SRC)/vidalia.conf.ff $(DEST)/Data/Vidalia/vidalia.conf
+endif
## Configure Polipo
cp $(CONFIG_SRC)/polipo.conf $(DEST)/Data/Polipo
## Configure Tor
Added: torbrowser/trunk/build-scripts/config/PidginPortable.ini
===================================================================
--- torbrowser/trunk/build-scripts/config/PidginPortable.ini (rev 0)
+++ torbrowser/trunk/build-scripts/config/PidginPortable.ini 2008-06-04 19:04:05 UTC (rev 14960)
@@ -0,0 +1,7 @@
+[PidginPortable]
+AdditionalParameters=
+WaitForPidgin=true
+DisableSplashScreen=true
+
+# This is an example INI and will not work from it's present location.
+# For full details on placement and the above options, see the included readme.txt
\ No newline at end of file
Added: torbrowser/trunk/build-scripts/config/prefs.xml
===================================================================
--- torbrowser/trunk/build-scripts/config/prefs.xml (rev 0)
+++ torbrowser/trunk/build-scripts/config/prefs.xml 2008-06-04 19:04:05 UTC (rev 14960)
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<pref version='1' name='/'>
+ <pref name='purple'>
+ <pref name='proxy'>
+ <pref name='type' type='string' value='socks5'/>
+ <pref name='host' type='string' value='127.0.0.1'/>
+ <pref name='port' type='int' value='9050'/>
+ <pref name='username' type='string' value=''/>
+ <pref name='password' type='string' value=''/>
+ </pref>
+ </pref>
+ <pref name='pidgin'>
+ <pref name='plugins'>
+ <pref name='loaded' type='pathlist'>
+ <item value='PidginPortable\App\Pidgin\plugins\ssl-nss.dll'/>
+ <item value='PidginPortable\App\Pidgin\plugins\pidgin-otr.dll'/>
+ <item value='PidginPortable\App\Pidgin\plugins\ssl.dll'/>
+ </pref>
+ </pref>
+ </pref>
+</pref>
Deleted: torbrowser/trunk/build-scripts/config/vidalia.conf
===================================================================
--- torbrowser/trunk/build-scripts/config/vidalia.conf 2008-06-04 19:02:45 UTC (rev 14959)
+++ torbrowser/trunk/build-scripts/config/vidalia.conf 2008-06-04 19:04:05 UTC (rev 14960)
@@ -1,11 +0,0 @@
-[General]
-BrowserExecutable=FirefoxPortable\\FirefoxPortable.exe
-LanguageCode=en
-ProxyExecutable=App\\polipo.exe
-ProxyExecutableArguments=-c, Data\\Polipo\\polipo.conf
-RunProxyAtStart=true
-
-[Tor]
-ControlPort=9051
-TorExecutable=.\\App\\tor.exe
-Torrc=.\\Data\\Tor\\torrc
Copied: torbrowser/trunk/build-scripts/config/vidalia.conf.ff (from rev 14865, torbrowser/trunk/build-scripts/config/vidalia.conf)
===================================================================
--- torbrowser/trunk/build-scripts/config/vidalia.conf.ff (rev 0)
+++ torbrowser/trunk/build-scripts/config/vidalia.conf.ff 2008-06-04 19:04:05 UTC (rev 14960)
@@ -0,0 +1,11 @@
+[General]
+BrowserExecutable=FirefoxPortable\\FirefoxPortable.exe
+LanguageCode=en
+ProxyExecutable=App\\polipo.exe
+ProxyExecutableArguments=-c, Data\\Polipo\\polipo.conf
+RunProxyAtStart=true
+
+[Tor]
+ControlPort=9051
+TorExecutable=.\\App\\tor.exe
+Torrc=.\\Data\\Tor\\torrc
Copied: torbrowser/trunk/build-scripts/config/vidalia.conf.ff+pidgin (from rev 14865, torbrowser/trunk/build-scripts/config/vidalia.conf)
===================================================================
--- torbrowser/trunk/build-scripts/config/vidalia.conf.ff+pidgin (rev 0)
+++ torbrowser/trunk/build-scripts/config/vidalia.conf.ff+pidgin 2008-06-04 19:04:05 UTC (rev 14960)
@@ -0,0 +1,12 @@
+[General]
+BrowserExecutable=FirefoxPortable\\FirefoxPortable.exe
+IMExecutable=PidginPortable\\PidginPortable.exe
+LanguageCode=en
+ProxyExecutable=App\\polipo.exe
+ProxyExecutableArguments=-c, Data\\Polipo\\polipo.conf
+RunProxyAtStart=true
+
+[Tor]
+ControlPort=9051
+TorExecutable=.\\App\\tor.exe
+Torrc=.\\Data\\Tor\\torrc
Added: torbrowser/trunk/src/current-patches/vidalia-startim.patch
===================================================================
--- torbrowser/trunk/src/current-patches/vidalia-startim.patch (rev 0)
+++ torbrowser/trunk/src/current-patches/vidalia-startim.patch 2008-06-04 19:04:05 UTC (rev 14960)
@@ -0,0 +1,257 @@
+Index: src/vidalia/config/vidaliasettings.cpp
+===================================================================
+--- src/vidalia/config/vidaliasettings.cpp (revision 2665)
++++ src/vidalia/config/vidaliasettings.cpp (working copy)
+@@ -32,6 +32,7 @@
+ #define SETTING_DATA_DIRECTORY "DataDirectory"
+ #define SETTING_SHOW_MAINWINDOW_AT_START "ShowMainWindowAtStart"
+ #define SETTING_BROWSER_EXECUTABLE "BrowserExecutable"
++#define SETTING_IM_EXECUTABLE "IMExecutable"
+ #define SETTING_RUN_PROXY_AT_START "RunProxyAtStart"
+ #define SETTING_PROXY_EXECUTABLE "ProxyExecutable"
+ #define SETTING_PROXY_EXECUTABLE_ARGUMENTS "ProxyExecutableArguments"
+@@ -66,6 +67,7 @@
+ setDefault(SETTING_RUN_TOR_AT_START, true);
+ setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
+ setDefault(SETTING_BROWSER_EXECUTABLE, "");
++ setDefault(SETTING_IM_EXECUTABLE, "");
+ setDefault(SETTING_RUN_PROXY_AT_START, false);
+ setDefault(SETTING_PROXY_EXECUTABLE, "");
+ setDefault(SETTING_PROXY_EXECUTABLE_ARGUMENTS, QStringList());
+@@ -181,6 +183,22 @@
+ setValue(SETTING_BROWSER_EXECUTABLE, browserExecutable);
+ }
+
++/** Returns a fully-qualified path to the IM client, including the
++ * executable name. */
++QString
++VidaliaSettings::getIMExecutable() const
++{
++ return QDir::convertSeparators(value(SETTING_IM_EXECUTABLE).toString());
++}
++
++/** Sets the location and name of the IM client executable to the given string.
++ * If set to the empty string, the client will not be started. */
++void
++VidaliaSettings::setIMExecutable(const QString &IMExecutable)
++{
++ setValue(SETTING_IM_EXECUTABLE, IMExecutable);
++}
++
+ /** Returns true if Vidalia should start a proxy application when it
+ * starts. */
+ bool
+Index: src/vidalia/config/vidaliasettings.h
+===================================================================
+--- src/vidalia/config/vidaliasettings.h (revision 2665)
++++ src/vidalia/config/vidaliasettings.h (working copy)
+@@ -68,6 +68,13 @@
+ * string. If set to the empty string, the browser will not be started. */
+ void setBrowserExecutable(const QString &browserExecutable);
+
++ /** Returns a fully-qualified path to the IM client, including the
++ * executable name. */
++ QString getIMExecutable() const;
++ /** Sets the location and name of the IM client executable to the given
++ * string. If set to the empty string, the client will not be started. */
++ void setIMExecutable(const QString &IMExecutable);
++
+ /** Returns true if Vidalia should start a proxy application when it
+ * starts. */
+ bool runProxyAtStart();
+Index: src/vidalia/helperprocess.cpp
+===================================================================
+--- src/vidalia/helperprocess.cpp (revision 2665)
++++ src/vidalia/helperprocess.cpp (working copy)
+@@ -50,6 +50,12 @@
+ // Call error handling routine on errors
+ QObject::connect(this, SIGNAL(error(QProcess::ProcessError)),
+ this, SLOT(onError(QProcess::ProcessError)));
++ // Call started handler on successful startup
++ QObject::connect(this, SIGNAL(started()),
++ this, SLOT(onStart()));
++
++ // Mark as not having started
++ _okStart = false;
+ }
+
+ /** Start the specified application. */
+@@ -70,4 +76,16 @@
+ }
+ }
+
++/** Invoked when underlying QProcess starts. */
++void
++HelperProcess::onStart()
++{
++ _okStart = true;
++}
+
++/** Returns true iff process is not running. */
++bool
++HelperProcess::isDone() const
++{
++ return state() == NotRunning;
++}
+Index: src/vidalia/helperprocess.h
+===================================================================
+--- src/vidalia/helperprocess.h (revision 2665)
++++ src/vidalia/helperprocess.h (working copy)
+@@ -53,10 +53,18 @@
+ HelperProcess(QObject *parent = 0);
+ /** Start the specified application. */
+ void start(const QString &app, const QStringList &args);
++ /** Returns true iff process is not running. */
++ bool isDone() const;
+
++private:
++ /** True iff the underlying QProcess has sucessfully started */
++ bool _okStart;
++
+ private slots:
+ /** Invoked when underlying QProcess fails. */
+ void onError(QProcess::ProcessError error);
++ /** Invoked when underlying QProcess starts. */
++ void onStart();
+
+ signals:
+ /** Invoked when start() fails. */
+Index: src/vidalia/mainwindow.cpp
+===================================================================
+--- src/vidalia/mainwindow.cpp (revision 2665)
++++ src/vidalia/mainwindow.cpp (working copy)
+@@ -128,10 +128,17 @@
+ /* Create a new HelperProcess object, used to start the web browser */
+ _browserProcess = new HelperProcess(this);
+ connect(_browserProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
+- this, SLOT(onBrowserFinished(int, QProcess::ExitStatus)));
++ this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
+ connect(_browserProcess, SIGNAL(startFailed(QString)),
+ this, SLOT(onBrowserFailed(QString)));
+
++ /* Create a new HelperProcess object, used to start the web browser */
++ _imProcess = new HelperProcess(this);
++ connect(_imProcess, SIGNAL(finished(int, QProcess::ExitStatus)),
++ this, SLOT(onSubprocessFinished(int, QProcess::ExitStatus)));
++ connect(_imProcess, SIGNAL(startFailed(QString)),
++ this, SLOT(onIMFailed(QString)));
++
+ /* Create a new HelperProcess object, used to start the proxy server */
+ _proxyProcess = new HelperProcess(this);
+ connect(_proxyProcess, SIGNAL(startFailed(QString)),
+@@ -409,26 +416,43 @@
+ #endif
+ }
+
+-/** Starts the web browser, if appropriately configured */
+-void MainWindow::startBrowser()
++/** Starts the web browser and IM client, if appropriately configured */
++void MainWindow::startSubprocesses()
+ {
+ VidaliaSettings settings;
+ QString executable = settings.getBrowserExecutable();
+
+ if (!executable.isEmpty())
+ _browserProcess->start(executable, QStringList());
++
++ executable = settings.getIMExecutable();
++
++ if (!executable.isEmpty())
++ _imProcess->start(executable, QStringList());
++
+ }
+
+-/** Called when browser has exited */
+-void MainWindow::onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus)
++/** Called when browser or IM client have exited */
++void MainWindow::onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus)
+ {
+ Q_UNUSED(exitCode)
+ Q_UNUSED(exitStatus)
+
+- shutdown();
++ /* Get path to browser and IM client */
++ VidaliaSettings settings;
++ QString browserExecutable = settings.getBrowserExecutable();
++ QString imExecutable = settings.getIMExecutable();
++
++ /* A subprocess is finished if it successfully exited or was never asked to start */
++ bool browserDone = browserExecutable.isEmpty() || _browserProcess->isDone();
++ bool imDone = imExecutable.isEmpty() || _imProcess->isDone();
++
++ /* Exit if both subprocesses are finished */
++ if (browserDone && imDone)
++ shutdown();
+ }
+
+-/** Called when the web browser, for example, because the path
++/** Called when the web browser failed to start, for example, because the path
+ * specified to the web browser executable didn't lead to an executable. */
+ void
+ MainWindow::onBrowserFailed(QString errmsg)
+@@ -441,6 +465,19 @@
+ VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
+ }
+
++/** Called when the IM client failed to start, for example, because the path
++ * specified to the IM client executable didn't lead to an executable. */
++void
++MainWindow::onIMFailed(QString errmsg)
++{
++ Q_UNUSED(errmsg);
++
++ /* Display an error message and see if the user wants some help */
++ VMessageBox::warning(this, tr("Error starting IM client"),
++ tr("Vidalia was unable to start the configured IM client"),
++ VMessageBox::Ok|VMessageBox::Default|VMessageBox::Escape);
++}
++
+ /** Starts the proxy server, if appropriately configured */
+ void MainWindow::startProxy()
+ {
+@@ -1032,7 +1069,7 @@
+ MainWindow::circuitEstablished()
+ {
+ updateTorStatus(CircuitEstablished);
+- startBrowser();
++ startSubprocesses();
+ }
+
+ /** Checks the status of the current version of Tor to see if it's old,
+Index: src/vidalia/mainwindow.h
+===================================================================
+--- src/vidalia/mainwindow.h (revision 2665)
++++ src/vidalia/mainwindow.h (working copy)
+@@ -101,10 +101,12 @@
+ void showServerConfigDialog();
+ /** Called when the "show on startup" checkbox is toggled. */
+ void toggleShowOnStartup(bool checked);
+- /** Called when the web browser has stopped */
+- void onBrowserFinished(int exitCode, QProcess::ExitStatus exitStatus);
++ /** Called when the web browser or IM client have stopped */
++ void onSubprocessFinished(int exitCode, QProcess::ExitStatus exitStatus);
+ /** Called web the web browser failed to start */
+ void onBrowserFailed(QString errmsg);
++ /** Called web the IM client failed to start */
++ void onIMFailed(QString errmsg);
+ /** Called when the proxy server fails to start */
+ void onProxyFailed(QString errmsg);
+
+@@ -137,7 +139,7 @@
+ * previously set TorStatus value. */
+ TorStatus updateTorStatus(TorStatus status);
+ /** Starts the web browser, if appropriately configured */
+- void startBrowser();
++ void startSubprocesses();
+ /** Starts the proxy server, if appropriately configured */
+ void startProxy();
+ /** Converts a TorStatus enum value to a string for debug logging purposes. */
+@@ -179,6 +181,8 @@
+ TorControl* _torControl;
+ /** A HelperProcess object that manages the web browser */
+ HelperProcess* _browserProcess;
++ /** A HelperProcess object that manages the IM client */
++ HelperProcess* _imProcess;
+ /** A HelperProcess object that manages the proxy server */
+ HelperProcess* _proxyProcess;
+ /** Remembers the control password between when we start Tor with a hash of
More information about the tor-commits
mailing list