On Fri, May 28, 2010 at 4:46 AM, Marcel Holtmann <[email protected]> wrote:
> Hi Naresh,
>
>
> actually all the includes are local to phonesim and that is why they are
> inside the src/ directory.
>
> I also don't see the clutter you are talking about. The *.h are named
> the same as their *.cpp files and are side by side. I actually call that
> pretty clean.
>

Hi Marcel,

I generally prefer to keep the header files separate then the actual
source files. I had also
moved the xml files into an xml folder. But I have now reverted those changes.

>> I have also added a HACKING file for people to quickly understand and
>> grasp the concept and execution of phonesim.
>
> Please send that as a separate patch.

Patch file for HACKING attached.
-- 

BR; Naresh

visit me at:
http://www.naresh.se/
From 0f07717e5885dfb3968b6bb7115f977f563540d9 Mon Sep 17 00:00:00 2001
From: Naresh Mehta <[email protected]>
Date: Fri, 28 May 2010 02:42:38 +0200
Subject: [PATCH] Added a HACKING file for people to quickly understand and grasp the
 concept and execution of phonesim. Also allows to understand how to
 use in conjunction with Ofono.

	new file:   HACKING
---
 HACKING |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 102 insertions(+), 0 deletions(-)
 create mode 100644 HACKING

diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..76dc66f
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,102 @@
+Hacking on phonesim
+*******************
+
+phonesim is a soft modem that eliminates the need to have an actual AT
+modem connected to the system for testing and developing Ofono.
+
+Build tools requirements
+========================
+
+When building and testing directly from the repository it is important to
+have at least automake version 1.10 or later installed. All modern
+distributions should default to the latest version, but it seems that
+Debian's default is still an earlier version:
+
+  Check version
+    # dpkg -l '*automake*'
+
+  Install new version
+    # apt-get install automake1.10
+    # update-alternatives --config automake
+
+QT development libraries (libqt4-dev) are also required for building 
+phonesim. It is recommended to install the QT 4 development tools package 
+(qt4-dev-tools) as an alternative if available with your distribution.
+
+Working with the source code repository
+=======================================
+
+The repository contains two extra scripts that accomplish the bootstrap
+process. One is called "bootstrap" which is the basic scripts that uses the
+autotools scripts to create the needed files for building and installing.
+It makes sure to call the right programs depending on the usage of shared or
+static libraries or translations etc.
+
+The second program is called "bootstrap-configure". This program will make
+sure to properly clean the repository, call the "bootstrap" script and then
+call configure with proper settings for development. It will use the best
+options and pass them over to configure. These options normally include
+the enabling the maintainer mode and the debugging features.
+
+So while in a normal source project the call "./configure ..." is used to
+configure the project with its settings like prefix and extra options. In
+case of bare repositories call "./bootstrap-configure" and it will bootstrap
+the repository and calls configure with all the correct options to make
+development easier.
+
+In case of preparing for a release with "make distcheck", don't use
+bootstrap-configure since it could export development specific settings.
+
+So the normal steps to checkout, build and install such a repository is
+like this:
+
+  Checkout repository
+    # git clone git://git.kernel.org/pub/scm/network/ofono/phonesim.git
+    # cd phonesim
+
+  Configure and build
+    # ./bootstrap-configure
+    # make
+
+  Check installation
+    # make install DESTDIR=$PWD/x
+    # find x
+    # rm -rf x
+
+  Check distribution
+    # make distcheck
+
+  Final installation
+    # sudo make install
+
+  Remove autogenerated files
+    # make maintainer-clean
+
+
+Running from within the source code repository
+==============================================
+
+When using "./configure --enable-maintainer-mode" the automake scripts will
+use the plugins directly from within the repository. This removes the need
+to use "make install" when testing "phonesim". The "bootstrap-configure"
+automatically includes this option.
+
+  Run phonesim in foreground using the following options
+    # ./src/phonesim -p 12345 -gui src/default.xml
+
+Check your modem.conf file and enable the phonesim configuration before
+executing the above command. Argument -p should be followed by the proper
+port number, in case you have changed the default "12345". Argument -gui
+will launch the gui once the modem is enabled. 
+
+To enable the modem, make sure the ofono daemon is running and execute the 
+enable-modem script with /phonesim argument (default defined in modem.conf,
+change if changes to that section has been made). The AT chat can then
+be seen in the GUI window. Running the script disable-modem with /phonesim
+argument will turn off the soft modem.
+
+The default.xml can be tweaked further to include additional AT-Commands and
+supposed responses from the soft modem.
+
+For production installations or distribution packaging it is important that
+the "--enable-maintainer-mode" option is NOT used.
-- 
1.7.0.4

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to