Fremantle: Prestart MicroB if appropriate when reconfiguring browser-switchboard If, in changing the browser-switchboard configuration, we go from a configuration where MicroB is not left running to one where it is, we should start MicroB in the background in order to make sure that the MicroB browser window comes up quickly when requested. Make a best-effort attempt at this in both the command-line utility and the GUI, refactoring to give a swb_reconfig() function that can be shared between the two along the way. Ideally, we'd also kill MicroB when making a config change in the other direction, but we don't have an easy way of knowing whether MicroB is actually in use and we don't want to kill MicroB if it's in use at the time.
Eliminate trailing whitespace from lines
Add command-line utility to Makefile install target
Introduce command-line config utility Add a simple command-line configuration utility, browser-switchboard-config, which can be used to query or set browser-switchboard config settings. The primary purpose of this tool is to allow browser vendors to provide an option in their browsers to set themselves as the default browser, via something like this (shell-like pseudocode): if [ -x /usr/bin/browser-switchboard-config ]; then if [ `browser-switchboard-config -b` = "mybrowser" ]; then display "MyBrowser is the default browser." else button "Make MyBrowser the default browser" action "browser-switchboard-config -s -b mybrowser" fi else display "Install Browser Switchboard to make MyBrowser the default browser" fi Browser vendors: setting yourself as the default browser without prompting the user first (via package maintainer scripts, for example) is strongly discouraged.
Refactor configuration Most of the code for loading configuration from the config file was being duplicated between the UI and the main browser-switchboard code; also, the forthcoming command-line configuration tool should share the code for loading and saving configuration with the UI. Therefore, move code for loading and saving configuration information into functions generic enough to be shared between the UIs and browser-switchboard.
Link binaries with -Wl,--as-needed to reduce library dependencies Using pkg-config --libs to get library link lines has the disadvantage of bringing in many more library dependencies than actually necessary, since that assumes that dependencies of libraries need to be specified explicitly at link time (even when the library is itself linked against those dependencies). Using GNU ld's --as-needed option causes these unnecessary dependencies to be omitted from the binary. --as-needed needs to be specified after all the objects to be linked into the binary and before the libraries, so some reordering of the link command line is needed.
Fix Makefile install targets The overhaul of the Makefile targets broke the dependencies of the install targets; fix this (along with a broken strip target in config-ui/Makefile).
Fix Makefile clean targets Since we have a list of objects that we build already, use that in the clean targets instead of *.o. This fixes the config-ui Makefile clean target, which was potentially missing ../configfile.plugin.o.
Update build system As currently set up, it takes far too much external knowledge to generate builds for Fremantle (a set of EXTRA_CPPFLAGS as well as EXTRA_LDFLAGS); this is because the Makefiles were originally written when there was only one target system (Diablo). To fix this, provide new "diablo" and "fremantle" targets that can be used to build the appropriate browser-switchboard without further configuration, and make the "all" target print out a help message. For the config UI, provide new "fremantle-hildon-app" and "fremantle-plugin" targets, and rename the existing targets to "diablo-hildon-app" and "diablo-plugin" to match.
Add support for EXTRA_CPPFLAGS/EXTRA_LDFLAGS in Makefiles
Support EXTRA_CFLAGS in Makefiles This makes it possible to specify additional CFLAGS at build time.
Use pkg-config libosso instead of pkg-config dbus-1 for the plugin The hildon-control-panel plugin interface needs libosso to compile; the use of pkg-config dbus-1 was just covering this up.
Make the default prefix /usr We're already assuming this in several places, and it's too much work to make those files autogenerated when no one's going to use that feature.
config-ui: the strip and install targets only work for the plugin
Ensure that all objects for the plugin are built with -fPIC
mkdir all the directories to which we install files, not just some of them
Remove the N8x0-specific CFLAGS These should move to packaging.
Implement loading and saving config settings
Add a .desktop file for the control panel plugin The .desktop file is needed for hildon-control-panel to pick up the applet. Modify the Makefile to install it, and also fix a silly plugin installation bug in the process.
Makefile updates Make three build modes (app, hildon-app, plugin) instead of two, and use up pkg-config flags so that the plugin mode actually builds.