John Scipione 3cf2d117e5 Change Time Format Options in Deskbar preferences.
Added two new methods to the Locale Kit in order to create a custom time
formats from a format string. One method is outputs into a char* array,
the other into a BString() and you can set the timezone.

These methods should be cleaned up, we only need 2, one to get
the time in a predefined style, the other to get a custom time format.
Also should probably do the same for dates and datetimes. But I'll let
this go for now.

I added myself to the Locale.cpp file. I retained the copyright instead
of assigning it to Haiku, Inc. because the file is under the OpenBeOS
license and I don't know what the concequences of copyright sharing are
for that license, unlike MIT.

These new methods are used to generate custom time formats in Deskbar.
Instead of using a set of Radio Buttons to choose between the predefined
time options I build my own by creating a format string and passing it
to the Locale Kit. The format string is generated from 3 checkboxes,
show seconds, show day of week, and show time zone. You can mix and match
between them choose any that you like. By default they are all off.

There are 3 new deskbar settings associated with these new options:
showSeconds, showDayOfWeek, and showTimeZone. timeFormat has gone away.

The time format string gets cached and updated only when Update() gets called
on the TimeView class.

In order to fit all the options in (there is 1 more than before) I had to
reduce the font size of the clock to 11pt when all options are turned on in
12 hour mode. For those with no imagination it looks like this:

http://imagebin.org/208162

Renamed "Open time preferences..." menuitem to "Time preferences...".
Renamed "Show Time" and "Hide Time" to "Show time" and "Hide time".

Other changes include refactoring the header files a bit. There were a lot
of headers included by header files uneccessarily. For instance BarWindow.h
now only includes <Window.h> and <Deskbar.h>. This change is mainly to
to speed up the compile time since it takes a while right now.

I copy the fBarView pointer from BarWindow in the BarApp constructor and then
use that throughout the file rather than getting the pointer from the window
each time by calling BarView(). BarView() is still available in the header
for other classes though.

I moved some message constants around since it was getting a bit jumbled.
Most of the messages related to settings are in PreferenceWindow.h.
fChangeState is moved to BarView.h since that is where the ChangeState()
function is and BarView.cpp uses that constant.

The time interval and format constants are in TimeView.h.

Make some methods public in their respective classes where it made sense.
The preference window methods to update dependent items are public, that
might get called from BarWindow when a message gets received at some point.

Also made ShowHideTime() and Time() public in StatusView.h. These methods
activate showing and hiding the clock and return the fTime clock object.
No reason they should be private.

I reindented the StatusView.h and PreferenceWindow.h headers to the standard
style. Question here, are the public: protected: and private: lines inside
of classes suppose to get indented 1 tab or not? I've seen both, the style
guide says no indent but 1 indent seems reasonable and looks pretty good.

Style fixes here and there. That's enough for one commit I think.
2012-04-15 00:17:54 -04:00
2012-04-14 16:25:38 +02:00
2012-01-21 18:38:27 +13:00
2012-04-04 22:44:42 +02:00

Building Haiku from source
==========================

This is a overview into the process of building HAIKU from source.
An online version is available at http://www.haiku-os.org/guides/building/

Official releases of Haiku are at http://www.haiku-os.org/get-haiku
The (unstable) nightly builds are available at http://www.haiku-files.org

To build Haiku, you will need to
 * ensure pre-requisite software is installed
 * download sources
 * configure your build
 * run jam to initiate the build process

We currently support these platforms:
 * Haiku
 * Linux
 * FreeBSD
 * Mac OS X Intel

Pre-requisite software
======================

Tools provided within Haiku's repositories

 * Jam (Jam 2.5-haiku-20111222)
 * Haiku's cross-compiler (needed only for non-Haiku platforms)

The tools to compile Haiku will vary, depending on the platform that you are
using to build Haiku. When building from Haiku, all of the necessary
development tools are included in official releases (e.g. R1 alpha 1) and in the
(unstable) nightly builds.

 * Git client
 * SSH client (for developers with commit access)
 * gcc and the binutils (as, ld, etc., required by gcc)
 * make (GNU make)
 * bison
 * flex and lex (usually a mini shell script invoking flex)
 * makeinfo (part of texinfo, needed for building gcc 4 only)
 * autoheader (part of autoconf, needed for building gcc)
 * automake
 * gawk
 * yasm (http://www.tortall.net/projects/yasm/wiki/Download)
 * wget
 * (un)zip
 * cdrtools (not genisoimage!)
 * case-sensitive file system

Whether they are installed can be tested for instance by running them in the
shell with the "--version" parameter.

Specific: Haiku for the ARM platform
------------------------------------

The following tools are needed to compile Haiku for the ARM platform

 * mkimage (http://www.denx.de/wiki/UBoot)
 * Mtools (http://www.gnu.org/software/mtools/intro.html)
 * sfdisk

Specific: Mac OS X
------------------

Disk Utility can create a case-sensitive disk image of at least 3 GiB in size.
The following darwin ports need to be installed:
 * expat
 * gawk
 * gettext
 * libiconv
 * gnuregex
 * gsed

More information about individual distributions of Linux and BSD can be found
at http://haiku-os.org/guides/building/pre-reqs


Download Haiku's sources
========================

There are two parts to Haiku's sources -- the code for Haiku itself and a set
of build tools for compiling Haiku on an operating system other than Haiku.
The buildtools are needed only for non-Haiku platform.

Anonymous checkout:
  git clone git://git.haiku-os.org/haiku
  git clone git://git.haiku-os.org/buildtools

Developer with commit access:
  git clone ssh://git.haiku-os.org/haiku
  git clone ssh://git.haiku-os.org/buildtools


Building the Jam executable
===========================

This step applies only to non-Haiku platforms.

Change to the buildtools folder and we will start to build 'jam' which is a
requirement for building Haiku. Run the following commands to generate and
install the tool:

  cd  buildtools/jam
  make
  sudo ./jam0 install
    -- or --
  ./jam0 -sBINDIR=$HOME/bin install


Configuring your build
======================

The configure script generates a file named "BuildConfig" in the
"generated/build" directory. As long as configure is not modified (!), there
is no need to call it again. That is for re-building you only need to invoke
jam (see below). If you don't update the source tree very frequently, you may
want to execute 'configure' after each update just to be on the safe side.

Depending on your goal, there are several different ways to configure Haiku.
You can either call configure from within your Haiku trunk folder. That will
prepare a folder named 'generated', which will contain the compiled objects.
Another option is to manually created one or more 'generated.*' folders and run
configure from within them. For example imagine the following directory setup

  buildtools-trunk/
  haiku-trunk/
  haiku-trunk/generated.x86gcc2
  haiku-trunk/generated.x86gcc4

Configure a GCC 2.95 Hybrid, from non-Haiku platform
----------------------------------------------------

  cd haiku-trunk/generated.x86gcc4
  ../configure --use-gcc-pipe --use-xattr \
    --build-cross-tools-gcc4 x86 ../../buildtools/ \
    --alternative-gcc-output-dir ../generated.x86gcc2
  cd ../generated.x86gcc2
  ../configure --use-gcc-pipe --use-xattr \
    --build-cross-tools ../../buildtools/ \
    --alternative-gcc-output-dir ../generated.x86gcc4

Configure a GCC 2.95 Hybrid, from within Haiku
----------------------------------------------

  cd haiku-trunk/generated.x86gcc4
  ../configure --use-gcc-pipe \
    --alternative-gcc-output-dir ../generated.x86gcc2 \
    --cross-tools-prefix /boot/develop/abi/x86/gcc4/tools/current/bin/
  cd ../generated.x86gcc2
  ../configure --use-gcc-pipe \
    --alternative-gcc-output-dir ../generated.x86gcc4 \
    --cross-tools-prefix /boot/develop/abi/x86/gcc2/tools/current/bin/

Additional information about GCC Hybrids can be found on the website,
http://www.haiku-os.org/guides/building/gcc-hybrid

Configure options
-----------------

The various runtime options for configure are documented in its onscreen help

  ./configure --help


Building via Jam
================

Haiku can be built in either of two ways, as disk image file (e.g. for use
with emulators, to be written directly to a usb stick, burned as a compact
disc) or as installation in a directory.

Running Jam
-----------

There are various ways in which you can run jam.

 * If you have a single generated folder,
   you can run 'jam' from the top level of Haiku's trunk.
 * If you have one or more generated folders,
   (e.g. generated.x86gcc2), you can cd into that directory and run 'jam'
 * In either case, you can cd into a certain folder in the source tree (e.g.
   src/apps/debugger) and run jam -sHAIKU_OUTPUT_DIR=<path to generated folder>

Be sure to read build/jam/UserBuildConfig.ReadMe and UserBuildConfig.sample,
as they contain information on customizing your build of Haiku.

Building a Haiku anyboot file
---------------------------

  jam -q haiku-anyboot-image

This generates an image file named 'haiku-anyboot.image' in your output
directory under 'generated/'.

Building a VMware image file
----------------------------

  jam -q haiku-vmware-image

This generates an image file named 'haiku.vmdk' in your output
directory under 'generated/'.

Directory Installation
----------------------

  HAIKU_INSTALL_DIR=/Haiku jam -q install-haiku

Installs all Haiku components into the volume mounted at "/Haiku" and
automatically marks it as bootable. To create a partition in the first place
use DriveSetup and initialize it to BFS.

Note that installing Haiku in a directory only works as expected under Haiku,
but it is not yet supported under Linux and other non-Haiku platforms.

Building individual components
------------------------------

If you don't want to build the complete Haiku, but only a certain
app/driver/etc. you can specify it as argument to jam, e.g.:

  jam Debugger

Alternatively, you can 'cd' to the directory of the component you want to
build and run 'jam' from there. Note: if your generated directory named
something other than "generated/", you will need to tell jam where it is.

  jam -sHAIKU_OUTPUT_DIR=<path to generated folder>

You can also force rebuilding of a component by using the "-a" parameter:

  jam -a Debugger


Running
=======

Generally there are two ways of running Haiku. On real hardware using a
partition and on emulated hardware using an emulator like Bochs or QEMU.

On Real Hardware
----------------

If you have installed Haiku to its own partition you can include this
partition in your bootmanager and try to boot Haiku like any other OS you
have installed. To include a new partition in the Haiku bootmanager run this
in a Terminal:

  BootManager

On Emulated Hardware
--------------------

For emulated hardware you should build disk image (see above). How to setup
this image depends on your emulater. If you use QEMU, you can usually just
provide the path to the image as command line argument to the "qemu"
executable.


Docbook documentation
=====================

Our documentation can be found in 'src/documentation/'. You can build it by
running 'jam' in that folder. The results will be stored in the 'generated/'
folder.
Description
The Haiku operating system
Readme 553 MiB
Languages
C++ 52.2%
C 46.6%
Assembly 0.4%
HTML 0.3%
Python 0.1%