summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-09Workaround firefox-gtk3 bugHEADmasterChristophe Fergeau1-0/+8
When it's built with gtk3, firefox plugin-container will use some LD_PRELOAD hack in order to be able to load the gtk2 flash plugin. However, this LD_PRELOAD'ed .so will cause gtk3 remote-viewer to crash when it's started by spice-xpi This commit just cleans up the unwanted LD_PRELOAD variable from the environment before starting remote-viewer.
2014-06-03controller: return immediately if already connectedMarc-André Lureau2-0/+4
Do not try again if the unix socket is already connected, but fail immediately. https://bugzilla.redhat.com/show_bug.cgi?id=1073461
2014-06-03controller: try connection every secondMarc-André Lureau1-2/+1
Currently, with 10 tries, it takes up to n(n+1)/2 = 55s before returning failure. The default firefox plugin timeout is 45s, passed that time, the plugin is killed. 10s should be enough in normal usage for the client to setup the unix socket. https://bugzilla.redhat.com/show_bug.cgi?id=1073461
2014-01-06Fix compilation with -Werror=format-securityPetter Reinholdtsen2-2/+2
The Debian package of spice-xpi failed to build on powerpc and sparc in Debian, failing with this error message: make[6]: Entering directory `/«PKGBUILDDIR»/SpiceXPI/src/plugin' CXX libnsISpicec_la-controller.lo controller.cpp: In destructor 'SpiceController::~SpiceController()': controller.cpp:73:5: error: format not a string literal and no format arguments [-Werror=format-security] cc1plus: some warnings being treated as errors The error is in a call to g_debug(G_STRFUNC). As this is a constant string, we can just replace the call with g_debug("%s", G_STRFUNC).
2013-10-21generator, fix missing whitespacePeter Hatina1-5/+5
2013-10-21generator, fix uppercase for SetUsbFilter()Peter Hatina1-2/+2
2013-10-21generator, do not install generator, if compiledPeter Hatina1-1/+1
2013-10-21generator, resize certificate textareaPeter Hatina1-1/+1
2013-10-21generator, reverse log orderPeter Hatina1-1/+1
2013-10-21generator, add parseInt() and parseFloat() into ↵Peter Hatina2-4/+31
Generator::generateConnectVars() output
2013-08-07Prepare for 2.8.90 releasespice-xpi-2.8.90Christophe Fergeau2-1/+9
2013-04-17build: Make sure $(PYTHON) is set when building xpiChristophe Fergeau1-0/+1
Python is needed to generate nsISpicec.h and nsISpicec.xpt from nsISpicec.idl.
2013-04-17build: Use correct plugin name in Windows resource fileChristophe Fergeau1-1/+1
The nsISpicec -> npSpiceConsole rename was not propagated there.
2013-04-17build: Adjust plugin name when building xpiChristophe Fergeau1-2/+2
The plugin binary name was changed from libnsISpice to npSpiceConsole, but the Makefile.am rule optionnally building SpiceXpi.xpi was not changed to take this rename into account.
2013-03-25Add glib Windows loggingChristophe Fergeau1-0/+46
As it's not very convenient to get logging output from the plugin while firefox is running, this commit adds a dumb glib logging implementation that writes the logging information to a file. As this is not efficient at all, it's disabled by default unless the SPICE_XPI_LOG_TO_FILE environment variable is set.
2013-03-25Add SpiceControllerWin classChristophe Fergeau6-3/+353
This class implements the controller interface for Windows/mingw.
2013-03-23Only export needed symbolsChristophe Fergeau2-1/+11
NPAPI plugins only need to have 3 symbols exported, make that explicit. This is also required when building Windows plugins as these symbols *must* be explicitly exported.
2013-03-23Rename plugin binary from libnsISpicec to npSpiceConsoleChristophe Fergeau1-8/+8
Windows Firefox expects the plugin filename to start with 'np' otherwise it won't pick it up as a plugin.
2013-03-23mingw: Add support for mingw buildChristophe Fergeau3-4/+72
Based on a patch from Nerijus Baliunas <nerijus@users.sourceforge.net>
2013-03-14Add an abstract controller base classChristophe Fergeau7-220/+407
It contains all the generic code, then platform-specific controller implementations will inherit from it and overload the non-generic parts abstract methods.
2013-03-14Use g_usleep in SpiceController::connect(int retries)Christophe Fergeau1-1/+1
g_usleep is more portable than sleep()
2013-03-14Add helper function to get client pathsChristophe Fergeau2-20/+60
The SPICE client paths will be different on Windows and Unix so add a helper function returning the paths to use to spawn the clients.
2013-03-14Add SpiceController::SetupControllerPipeChristophe Fergeau2-4/+13
Communication with the client is done differently on Windows and Linux (named pipe VS unix socket), so move this platform-specific setup to a distinct method.
2013-03-14Use glib functions to spawn/watch clientChristophe Fergeau3-67/+85
This removes quite a lot of OS-specific code.
2013-03-14Move StartClient() to the controller classChristophe Fergeau4-106/+130
This is platform specific, and is related to starting the receiver of controller messages, so let's move it with the rest of the platform-specific code.
2013-03-14Mark Controller::Connect() as privateChristophe Fergeau1-1/+1
It's only used internally, external code calls Connect(int retries)
2013-03-14Remove unused controller constructorChristophe Fergeau2-7/+0
2013-03-14Update copyright noticesChristophe Fergeau3-3/+6
2013-03-14Rename controller.cpp to controller-unix.cppChristophe Fergeau2-3/+1
It mostly contain low-level controller/plugin communication code, and this is mainly non-portable code, let's rename this file to make this explicit. We will then add a controller.cpp file containing the generic code, and a controller-win.cpp file with the Windows specific code.
2013-03-14Use gio to write trust storeChristophe Fergeau3-34/+39
This has the big advantage of being portable, in addition to removing some code. Big disadvantage is that this adds a dependency on gio.
2013-03-12Split nsPluginInstance::connect a bitChristophe Fergeau2-74/+99
This makes it more readable, and moves OS-specific code to separate functions.
2013-03-12Make spice.xpi build optionalChristophe Fergeau3-1/+16
Now that we switched to using the headers from npapi-sdk to build the spice-xpi plugin, the only reason we are depending on xulrunner is to build an xpi package for the plugin for easier installation in firefox. However, this .xpi is not installed by default nor packaged by distributions, so it's not in wide use. This commit makes its build optional as this has the side-effect on making the xulrunner dependency optional as well, which is a good thing as xulrunner is huge and not necessarily available on all platforms we'd like to build spice-xpi on.
2013-03-08Switch to using npapi-sdk headers rather than XULChristophe Fergeau5-1/+1804
The main reason for us depending on xulrunner/libxul is to get the 4 headers defining NPAPI. Standalone headers are maintained at http://code.google.com/p/npapi-sdk/ , using them allows to drop a huge dependency on firefox code. This will make it easier to build spice-xpi on other platforms.
2013-03-08Don't try to use xpidlChristophe Fergeau2-19/+0
The xpidl binary is no longer available in xulrunner 10, so we no longer need the Makefile magic using xpidl now that we require it. We'll always directly use header.py/typelib.py instead.
2013-03-08Drop support for xulrunner < 1.9.1Christophe Fergeau4-61/+2
Even RHEL5 has at least xulrunner 10 these days, so no need to keep that compat code around.
2013-03-08Fix AC_ARG_ENABLE use for --enable-generatorChristophe Fergeau1-2/+2
AC_ARG_ENABLE 3rd argument is what to do when the argument is specified and the 4th arg is what to do when the argument is not specified. Using [enable_generator=true] as the 3rd argument is wrong as this would enable the generator when using --disable-generator.
2013-03-08Remove obsolete configure.ac logChristophe Fergeau1-2/+0
Nothing sets $red_target anymore
2013-03-01Get rid of nspr useChristophe Fergeau4-53/+51
The only thing from nspr we use are typedef for bool, int32_t and definitions of TRUE/FALSE. Any decent C/C++ compiler should provide all of these. If this proves to be an issue, the NPAPI headers we use to build the plugin have a nptypes.h header with the needed defines for bool/true/false and int32_t.
2013-03-01Move some preprocessor #define to configure.acChristophe Fergeau9-2/+15
They were hardcoded in CPPFLAGS in Makefile.am, having them in configure.ac makes things more obvious and more flexible.
2013-03-01Remove unused xulrunner includesChristophe Fergeau1-15/+0
They are only used on non-Unix platforms, and we are only building the plugin for Unix at the moment. As we are trying to remove our dependencies on xulrunner, let's just remove these.
2013-02-28Remove #include <dlfcn.h>Christophe Fergeau1-1/+0
We are not dlopening anything.
2013-02-05Remove unused preprocessor symbolsChristophe Fergeau1-4/+0
2013-02-05Remove unused #includeChristophe Fergeau3-5/+1
We include some files from the XUL SDK which gives the impression that we are depending on some features from them, however they are actually not used at all, so let's remove them.
2013-02-05Remove unused XUL_* entries in CPPFLAGS/LIBADDChristophe Fergeau1-6/+0
2013-01-29xpi: add Proxy memberMarc-André Lureau5-1/+29
Set SPICE_PROXY environment variable accordingly.
2013-01-29xpi: use safer g_environ_setenv()Marc-André Lureau1-8/+11
Quoting GLib: Environment variable handling in UNIX is not thread-safe, and your program may crash if one thread calls g_setenv() while another thread is calling getenv(). (And note that many functions, such as gettext(), call getenv() internally.) This function is only safe to use at the very start of your program, before creating any other threads (or creating objects that create worker threads of their own). If you need to set up the environment for a child process, you can use g_get_environ() to get an environment array, modify that with g_environ_setenv() and g_environ_unsetenv(), and then pass that array directly to execvpe(), g_spawn_async(), or the like.
2013-01-29xpi: add a few g_environ functions from GLib >= 2.28Marc-André Lureau4-0/+240
2012-12-10fix issues in ScriptablePluginObject::SetPropertyFederico Simoncelli1-3/+9
2012-12-10support smaller NPNetscapeFuncs tablesFederico Simoncelli1-47/+5
2012-11-21bump post release version to 2.9prePeter Hatina1-1/+1