Merge branch 'master' into x86_64

This commit is contained in:
Alex Smith 2012-07-11 12:24:47 +01:00
commit fc644104ac
14 changed files with 131 additions and 146 deletions

View File

@ -128,15 +128,15 @@ Depends LocaleKit :
LocaleKitTests
;
# Prepare the optional build features before parsing the Jamfile tree.
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalBuildFeatures ] ;
# Add optional packages given via HAIKU_ADD_OPTIONAL_PACKAGES.
if $(HAIKU_ADD_OPTIONAL_PACKAGES) {
AddOptionalHaikuImagePackages
[ FSplitString $(HAIKU_ADD_OPTIONAL_PACKAGES) : / ] ;
}
# Prepare the optional build features before parsing the Jamfile tree.
include [ FDirName $(HAIKU_BUILD_RULES_DIR) OptionalBuildFeatures ] ;
# Include packages that are required by all images.
AddOptionalHaikuImagePackages MandatoryPackages ;

7
ReadMe
View File

@ -75,6 +75,13 @@ The following darwin ports need to be installed:
* libiconv
* gnuregex
* gsed
* cdrtools
* yasm
* wget
* less
* mpfr
* gmp
* libmpc
More information about individual distributions of Linux and BSD can be found
at http://haiku-os.org/guides/building/pre-reqs

View File

@ -634,6 +634,13 @@ if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd
}
}
# On recent versions of OS X cc and c++ point to clang, which fails to
# compile some of the host tools. As a workaround, force use of GCC.
if $(HOST_PLATFORM) = darwin {
HOST_CC = gcc ;
HOST_C++ = g++ ;
}
if $(HOST_PLATFORM) = cygwin {
HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker
--enable-auto-import ;

View File

@ -3,6 +3,9 @@
# likely the same file use for an optional package.
local baseURL = http://www.haiku-files.org/files/optional-packages ;
# SSL
# Automatically enable the SSL feature, when the optional OpenSSL optional
@ -17,7 +20,6 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_OPENSSL_PACKAGE = openssl-1.0.0j-x86-gcc2-2012-06-19.zip ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_OPENSSL_URL = $(baseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_SSL) {
@ -135,7 +137,7 @@ if [ IsOptionalHaikuImagePackageAdded CLucene ] {
HAIKU_BUILD_FEATURE_CLUCENE = 1 ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_CLUCENE_PACKAGE = clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip ;
HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ;
@ -171,7 +173,6 @@ if $(HAIKU_BUILD_FEATURE_CLUCENE) {
# Mesa
local mesaBaseURL = http://haiku-files.org/files/optional-packages ;
if $(TARGET_ARCH) = x86 {
local glslObject ;
local galliumObjects ;
@ -186,7 +187,7 @@ if $(TARGET_ARCH) = x86 {
}
zipFile = [ DownloadFile $(HAIKU_MESA_FILE)
: $(mesaBaseURL)/$(HAIKU_MESA_FILE) ] ;
: $(baseURL)/$(HAIKU_MESA_FILE) ] ;
HAIKU_MESA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_MESA_FILE:B) ] ;
@ -197,7 +198,7 @@ if $(TARGET_ARCH) = x86 {
HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libglu.a
$(galliumObjects)
$(galliumObjects)
lib.haiku/libglapi.a
$(glslObject)
lib.haiku/libmesa.a
@ -212,7 +213,7 @@ if $(TARGET_ARCH) = x86 {
# FFmpeg
local ffmpegBaseURL = http://haiku-files.org/files/optional-packages/lib ;
local ffmpegBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-x86-gcc4-2012-03-28.zip ;
@ -334,7 +335,7 @@ if $(TARGET_ARCH) = x86 {
# Freetype
local freetypeBaseURL = http://haiku-files.org/files/optional-packages/lib ;
local freetypeBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = ppc || $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = ppc {
HAIKU_FREETYPE_FILE = freetype-2.4.9-ppc-gcc4-2012-06-26.zip ;
@ -384,7 +385,6 @@ if [ IsOptionalHaikuImagePackageAdded TagLib ] {
HAIKU_BUILD_FEATURE_TAGLIB = 1 ;
}
local baseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_TAGLIB_PACKAGE = taglib-1.6.3-r1a3-x86-gcc2-2011-05-20.zip ;
HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ;
@ -421,34 +421,32 @@ if $(HAIKU_BUILD_FEATURE_TAGLIB) {
# WebKit
local webkitBaseURL = http://haiku-files.org/files/optional-packages ;
HAIKU_WEBKIT_FILE = webkit-0.1.1-x86-gcc4-2012-07-03.zip ;
if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) < 4 {
Echo "WebKit support not available on gcc $(HAIKU_GCC_VERSION[1])" ;
} else {
HAIKU_WEBKIT_FILE = webkit-0.1.1-x86-gcc4-2012-07-03.zip ;
local zipFile = [ DownloadFile $(HAIKU_WEBKIT_FILE)
: $(baseURL)/$(HAIKU_WEBKIT_FILE) ] ;
local zipFile = [ DownloadFile $(HAIKU_WEBKIT_FILE)
: $(webkitBaseURL)/$(HAIKU_WEBKIT_FILE) ] ;
HAIKU_WEBKIT_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_WEBKIT_FILE:B) ] ;
HAIKU_WEBKIT_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_WEBKIT_FILE:B) ] ;
HAIKU_WEBKIT_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
: include/ : $(zipFile) : extracted-webkit ] ;
HAIKU_WEBKIT_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
: include/ : $(zipFile) : extracted-webkit ] ;
HAIKU_WEBKIT_LIBS = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
:
lib/libwtf.so
lib/libjavascriptcore.so
lib/libwebcore.so
lib/libwebkit.so
: $(zipFile)
: extracted-webkit
] ;
HAIKU_WEBKIT_LIBS = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
:
lib/libwtf.so
lib/libjavascriptcore.so
lib/libwebcore.so
lib/libwebkit.so
: $(zipFile)
: extracted-webkit
] ;
HAIKU_WEBKIT_HEADERS = [ FDirName $(HAIKU_WEBKIT_DIR) include ] ;
}
HAIKU_WEBKIT_HEADERS = [ FDirName $(HAIKU_WEBKIT_DIR) include ] ;
}
} else {
Echo "WebKit support not available on $(TARGET_ARCH)" ;
}

19
configure vendored
View File

@ -479,15 +479,18 @@ for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
fi
done
# check for case-sensitive filesystem if on darwin
if [ $HOST_PLATFORM = "darwin" ]; then
diskutil info $(pwd)/.. | grep -i "case-sensitive" > /dev/null
if [ $? != 0 ]; then
echo "You need a case-sensitive file-system to build Haiku."
echo "Please see the following guide on how to set one up:"
echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x"
exit 1
# check for case-sensitive filesystem
mkdir haikuCaseTest 2>/dev/null
mkdir haikucasetest 2>/dev/null
caseInsensitive=$?
rm -df haikuCaseTest haikucasetest
if [ $caseInsensitive != 0 ]; then
echo "You need a case-sensitive file-system to build Haiku."
if [ $HOST_PLATFORM = "darwin" ]; then
echo "You can create a case-sensitive disk image using Disk Utility and use"
echo "it to store the Haiku sources on."
fi
exit 1
fi
# create output directory

View File

@ -312,7 +312,7 @@ status_t
DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event)
{
while (true) {
char buffer[1024];
char buffer[2048];
int32 messageCode;
ssize_t size = read_port(fDebuggerPort, &messageCode, buffer,
sizeof(buffer));
@ -324,7 +324,7 @@ DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event)
}
if (messageCode <= B_DEBUGGER_MESSAGE_HANDED_OVER) {
debug_debugger_message_data message;
debug_debugger_message_data message;
memcpy(&message, buffer, size);
if (message.origin.team != fTeamID)
continue;

View File

@ -7,7 +7,6 @@ UsePrivateHeaders interface ;
Application Screenshot :
ScreenshotApp.cpp
ScreenshotWindow.cpp
PreviewView.cpp
Utility.cpp
: be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
: ScreenshotApp.rdef

View File

@ -1,30 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com
* Distributed under the terms of the MIT License.
*/
#include "PreviewView.h"
#include <ControlLook.h>
PreviewView::PreviewView()
:
BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE)
{
}
PreviewView::~PreviewView()
{
}
void
PreviewView::Draw(BRect updateRect)
{
BRect rect = Frame();
be_control_look->DrawTextControlBorder(this, rect, rect,
ui_color(B_PANEL_BACKGROUND_COLOR));
}

View File

@ -1,21 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, stpere@gmail.com
* Distributed under the terms of the MIT License.
*/
#ifndef PREVIEW_VIEW_H
#define PREVIEW_VIEW_H
#include <View.h>
class PreviewView : public BView {
public:
PreviewView();
~PreviewView();
protected:
virtual void Draw(BRect updateRect);
};
#endif /* PREVIEW_VIEW_H */

View File

@ -41,7 +41,6 @@
#include <TranslationUtils.h>
#include <TranslatorRoster.h>
#include "PreviewView.h"
#include "Utility.h"
@ -174,11 +173,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
fOutputPathMenu);
menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
_SetupTranslatorMenu();
BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
fTranslatorMenu);
menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
new BMessage(kSettings));
@ -193,12 +194,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
const float kSpacing = be_control_look->DefaultItemSpacing();
const float kLabelSpacing = be_control_look->DefaultLabelSpacing();
fPreview = new PreviewView();
fPreview = new BView("preview", B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE);
BBox *previewBox = new BBox(B_FANCY_BORDER, fPreview);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(kSpacing)
.AddGroup(B_HORIZONTAL, kSpacing)
.Add(fPreview)
.Add(previewBox)
.AddGroup(B_VERTICAL, 0)
.Add(fActiveWindow)
.Add(fWindowBorder)

View File

@ -26,7 +26,6 @@ class BPath;
class BTextControl;
class BTextView;
class PreviewView;
class Utility;
@ -58,7 +57,7 @@ private:
const Utility& fUtility;
PreviewView* fPreview;
BView* fPreview;
BCheckBox* fActiveWindow;
BTextControl* fDelayControl;
BCheckBox* fWindowBorder;

View File

@ -1,8 +1,9 @@
/*
* Copyright (c) 2001-2010, Haiku, Inc.
* Copyright (c) 2001-2012, Haiku, Inc.
* Distributed under the terms of the MIT License.
*
* Authors:
* Rene Gollent (rene@gollent.com)
* Erik Jaesler (erik@cgsoftware.com)
* Alex Wilson (yourpalal2@gmail.com)
*/
@ -236,6 +237,67 @@ check_signature(const char* signature, image_info& info)
}
namespace BPrivate
{
instantiation_func
find_instantiation_func(const char* className, const char* signature,
image_id* id)
{
if (className == NULL) {
errno = B_BAD_VALUE;
return NULL;
}
thread_info threadInfo;
status_t err = get_thread_info(find_thread(NULL), &threadInfo);
if (err != B_OK) {
errno = err;
return NULL;
}
instantiation_func instantiationFunc = NULL;
image_info imageInfo;
BString name = className;
for (int32 pass = 0; pass < 2; pass++) {
BString funcName;
build_function_name(name, funcName);
// for each image_id in team_id
int32 cookie = 0;
while (instantiationFunc == NULL
&& get_next_image_info(threadInfo.team, &cookie, &imageInfo)
== B_OK) {
instantiationFunc = find_function_in_image(funcName, imageInfo.id,
err);
}
if (instantiationFunc != NULL) {
// if requested, save the image id in
// which the function was found
if (id != NULL)
*id = imageInfo.id;
break;
}
// Check if we have a private class, and add the BPrivate namespace
// (for backwards compatibility)
if (!add_private_namespace(name))
break;
}
if (instantiationFunc != NULL
&& check_signature(signature, imageInfo) != B_OK)
return NULL;
return instantiationFunc;
}
}
// #pragma mark -
@ -597,8 +659,8 @@ instantiate_object(BMessage* archive, image_id* _id)
const char* signature = NULL;
bool hasSignature = archive->FindString(B_ADD_ON_FIELD, &signature) == B_OK;
instantiation_func instantiationFunc = find_instantiation_func(className,
signature);
instantiation_func instantiationFunc = BPrivate::find_instantiation_func(
className, signature, _id);
// if find_instantiation_func() can't locate Class::Instantiate()
// and a signature was specified
@ -714,48 +776,7 @@ validate_instantiation(BMessage* from, const char* className)
instantiation_func
find_instantiation_func(const char* className, const char* signature)
{
if (className == NULL) {
errno = B_BAD_VALUE;
return NULL;
}
thread_info threadInfo;
status_t err = get_thread_info(find_thread(NULL), &threadInfo);
if (err != B_OK) {
errno = err;
return NULL;
}
instantiation_func instantiationFunc = NULL;
image_info imageInfo;
BString name = className;
for (int32 pass = 0; pass < 2; pass++) {
BString funcName;
build_function_name(name, funcName);
// for each image_id in team_id
int32 cookie = 0;
while (instantiationFunc == NULL
&& get_next_image_info(threadInfo.team, &cookie, &imageInfo)
== B_OK) {
instantiationFunc = find_function_in_image(funcName, imageInfo.id,
err);
}
if (instantiationFunc != NULL)
break;
// Check if we have a private class, and add the BPrivate namespace
// (for backwards compatibility)
if (!add_private_namespace(name))
break;
}
if (instantiationFunc != NULL
&& check_signature(signature, imageInfo) != B_OK)
return NULL;
return instantiationFunc;
return BPrivate::find_instantiation_func(className, signature, NULL);
}

View File

@ -1231,7 +1231,7 @@ user_debug_image_deleted(const image_info *imageInfo)
message.image_event = atomic_add(&thread->team->debug_info.image_event, 1)
+ 1;
thread_hit_debug_event(B_DEBUGGER_MESSAGE_IMAGE_CREATED, &message,
thread_hit_debug_event(B_DEBUGGER_MESSAGE_IMAGE_DELETED, &message,
sizeof(message), true);
}

View File

@ -71,9 +71,9 @@ void
add_menu_fields(BGridLayout* layout, int32& row)
{
BPopUpMenu* menu1 = new BPopUpMenu("Selection");
BMenuField* control1 = new BMenuField("Enabled", menu1, NULL);
BMenuField* control1 = new BMenuField("Enabled", menu1);
BPopUpMenu* menu2 = new BPopUpMenu("Selection");
BMenuField* control2 = new BMenuField("Disabled", menu2, NULL);
BMenuField* control2 = new BMenuField("Disabled", menu2);
control2->SetEnabled(false);
#if USE_LAYOUT_ITEMS