Merge branch 'master' into x86_64

This commit is contained in:
Alex Smith
2012-07-11 12:24:47 +01:00
14 changed files with 131 additions and 146 deletions
+3 -3
View File
@@ -128,15 +128,15 @@ Depends LocaleKit :
LocaleKitTests 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. # Add optional packages given via HAIKU_ADD_OPTIONAL_PACKAGES.
if $(HAIKU_ADD_OPTIONAL_PACKAGES) { if $(HAIKU_ADD_OPTIONAL_PACKAGES) {
AddOptionalHaikuImagePackages AddOptionalHaikuImagePackages
[ FSplitString $(HAIKU_ADD_OPTIONAL_PACKAGES) : / ] ; [ 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. # Include packages that are required by all images.
AddOptionalHaikuImagePackages MandatoryPackages ; AddOptionalHaikuImagePackages MandatoryPackages ;
+7
View File
@@ -75,6 +75,13 @@ The following darwin ports need to be installed:
* libiconv * libiconv
* gnuregex * gnuregex
* gsed * gsed
* cdrtools
* yasm
* wget
* less
* mpfr
* gmp
* libmpc
More information about individual distributions of Linux and BSD can be found More information about individual distributions of Linux and BSD can be found
at http://haiku-os.org/guides/building/pre-reqs at http://haiku-os.org/guides/building/pre-reqs
+7
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 { if $(HOST_PLATFORM) = cygwin {
HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker
--enable-auto-import ; --enable-auto-import ;
+26 -28
View File
@@ -3,6 +3,9 @@
# likely the same file use for an optional package. # likely the same file use for an optional package.
local baseURL = http://www.haiku-files.org/files/optional-packages ;
# SSL # SSL
# Automatically enable the SSL feature, when the optional OpenSSL optional # 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 ; 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) ; HAIKU_OPENSSL_URL = $(baseURL)/$(HAIKU_OPENSSL_PACKAGE) ;
if $(HAIKU_BUILD_FEATURE_SSL) { if $(HAIKU_BUILD_FEATURE_SSL) {
@@ -135,7 +137,7 @@ if [ IsOptionalHaikuImagePackageAdded CLucene ] {
HAIKU_BUILD_FEATURE_CLUCENE = 1 ; 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_PACKAGE = clucene-0.9.21-x86-gcc4-haiku-2009-08-11.zip ;
HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ; HAIKU_CLUCENE_URL = $(baseURL)/$(HAIKU_CLUCENE_PACKAGE) ;
@@ -171,7 +173,6 @@ if $(HAIKU_BUILD_FEATURE_CLUCENE) {
# Mesa # Mesa
local mesaBaseURL = http://haiku-files.org/files/optional-packages ;
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
local glslObject ; local glslObject ;
local galliumObjects ; local galliumObjects ;
@@ -186,7 +187,7 @@ if $(TARGET_ARCH) = x86 {
} }
zipFile = [ DownloadFile $(HAIKU_MESA_FILE) zipFile = [ DownloadFile $(HAIKU_MESA_FILE)
: $(mesaBaseURL)/$(HAIKU_MESA_FILE) ] ; : $(baseURL)/$(HAIKU_MESA_FILE) ] ;
HAIKU_MESA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) HAIKU_MESA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
$(HAIKU_MESA_FILE:B) ] ; $(HAIKU_MESA_FILE:B) ] ;
@@ -197,7 +198,7 @@ if $(TARGET_ARCH) = x86 {
HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR) HAIKU_MESA_LIBS = [ ExtractArchive $(HAIKU_MESA_DIR)
: :
lib.haiku/libglu.a lib.haiku/libglu.a
$(galliumObjects) $(galliumObjects)
lib.haiku/libglapi.a lib.haiku/libglapi.a
$(glslObject) $(glslObject)
lib.haiku/libmesa.a lib.haiku/libmesa.a
@@ -212,7 +213,7 @@ if $(TARGET_ARCH) = x86 {
# FFmpeg # FFmpeg
local ffmpegBaseURL = http://haiku-files.org/files/optional-packages/lib ; local ffmpegBaseURL = $(baseURL)/lib ;
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 { if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-x86-gcc4-2012-03-28.zip ; HAIKU_FFMPEG_FILE = ffmpeg-0.10.2-x86-gcc4-2012-03-28.zip ;
@@ -334,7 +335,7 @@ if $(TARGET_ARCH) = x86 {
# Freetype # 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 || $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = ppc { if $(TARGET_ARCH) = ppc {
HAIKU_FREETYPE_FILE = freetype-2.4.9-ppc-gcc4-2012-06-26.zip ; 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 ; 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_PACKAGE = taglib-1.6.3-r1a3-x86-gcc2-2011-05-20.zip ;
HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ; HAIKU_TAGLIB_URL = $(baseURL)/$(HAIKU_TAGLIB_PACKAGE) ;
@@ -421,34 +421,32 @@ if $(HAIKU_BUILD_FEATURE_TAGLIB) {
# WebKit # 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 $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) < 4 { if $(HAIKU_GCC_VERSION[1]) < 4 {
Echo "WebKit support not available on gcc $(HAIKU_GCC_VERSION[1])" ; Echo "WebKit support not available on gcc $(HAIKU_GCC_VERSION[1])" ;
} else { } 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) HAIKU_WEBKIT_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR)
: $(webkitBaseURL)/$(HAIKU_WEBKIT_FILE) ] ; $(HAIKU_WEBKIT_FILE:B) ] ;
HAIKU_WEBKIT_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) HAIKU_WEBKIT_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
$(HAIKU_WEBKIT_FILE:B) ] ; : include/ : $(zipFile) : extracted-webkit ] ;
HAIKU_WEBKIT_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_WEBKIT_DIR) HAIKU_WEBKIT_LIBS = [ ExtractArchive $(HAIKU_WEBKIT_DIR)
: include/ : $(zipFile) : extracted-webkit ] ; :
lib/libwtf.so
lib/libjavascriptcore.so
lib/libwebcore.so
lib/libwebkit.so
: $(zipFile)
: extracted-webkit
] ;
HAIKU_WEBKIT_LIBS = [ ExtractArchive $(HAIKU_WEBKIT_DIR) HAIKU_WEBKIT_HEADERS = [ FDirName $(HAIKU_WEBKIT_DIR) include ] ;
: }
lib/libwtf.so
lib/libjavascriptcore.so
lib/libwebcore.so
lib/libwebkit.so
: $(zipFile)
: extracted-webkit
] ;
HAIKU_WEBKIT_HEADERS = [ FDirName $(HAIKU_WEBKIT_DIR) include ] ;
}
} else { } else {
Echo "WebKit support not available on $(TARGET_ARCH)" ; Echo "WebKit support not available on $(TARGET_ARCH)" ;
} }
Vendored
+11 -8
View File
@@ -479,15 +479,18 @@ for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
fi fi
done done
# check for case-sensitive filesystem if on darwin # check for case-sensitive filesystem
if [ $HOST_PLATFORM = "darwin" ]; then mkdir haikuCaseTest 2>/dev/null
diskutil info $(pwd)/.. | grep -i "case-sensitive" > /dev/null mkdir haikucasetest 2>/dev/null
if [ $? != 0 ]; then caseInsensitive=$?
echo "You need a case-sensitive file-system to build Haiku." rm -df haikuCaseTest haikucasetest
echo "Please see the following guide on how to set one up:" if [ $caseInsensitive != 0 ]; then
echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x" echo "You need a case-sensitive file-system to build Haiku."
exit 1 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 fi
exit 1
fi fi
# create output directory # create output directory
@@ -312,7 +312,7 @@ status_t
DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event) DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event)
{ {
while (true) { while (true) {
char buffer[1024]; char buffer[2048];
int32 messageCode; int32 messageCode;
ssize_t size = read_port(fDebuggerPort, &messageCode, buffer, ssize_t size = read_port(fDebuggerPort, &messageCode, buffer,
sizeof(buffer)); sizeof(buffer));
@@ -324,7 +324,7 @@ DebuggerInterface::GetNextDebugEvent(DebugEvent*& _event)
} }
if (messageCode <= B_DEBUGGER_MESSAGE_HANDED_OVER) { if (messageCode <= B_DEBUGGER_MESSAGE_HANDED_OVER) {
debug_debugger_message_data message; debug_debugger_message_data message;
memcpy(&message, buffer, size); memcpy(&message, buffer, size);
if (message.origin.team != fTeamID) if (message.origin.team != fTeamID)
continue; continue;
-1
View File
@@ -7,7 +7,6 @@ UsePrivateHeaders interface ;
Application Screenshot : Application Screenshot :
ScreenshotApp.cpp ScreenshotApp.cpp
ScreenshotWindow.cpp ScreenshotWindow.cpp
PreviewView.cpp
Utility.cpp Utility.cpp
: be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++) : be $(HAIKU_LOCALE_LIBS) tracker translation $(TARGET_LIBSUPC++)
: ScreenshotApp.rdef : ScreenshotApp.rdef
-30
View File
@@ -1,30 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, [email protected]
* 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));
}
-21
View File
@@ -1,21 +0,0 @@
/*
* Copyright 2009, Philippe Saint-Pierre, [email protected]
* 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 */
+5 -3
View File
@@ -41,7 +41,6 @@
#include <TranslationUtils.h> #include <TranslationUtils.h>
#include <TranslatorRoster.h> #include <TranslatorRoster.h>
#include "PreviewView.h"
#include "Utility.h" #include "Utility.h"
@@ -174,11 +173,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"), BMenuField* menuLocation = new BMenuField(B_TRANSLATE("Save in:"),
fOutputPathMenu); fOutputPathMenu);
menuLocation->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
fTranslatorMenu = new BMenu(B_TRANSLATE("Please select")); fTranslatorMenu = new BMenu(B_TRANSLATE("Please select"));
_SetupTranslatorMenu(); _SetupTranslatorMenu();
BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"), BMenuField* menuFormat = new BMenuField(B_TRANSLATE("Save as:"),
fTranslatorMenu); fTranslatorMenu);
menuFormat->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS), BButton* showSettings = new BButton("", B_TRANSLATE("Settings"B_UTF8_ELLIPSIS),
new BMessage(kSettings)); new BMessage(kSettings));
@@ -193,12 +194,13 @@ ScreenshotWindow::ScreenshotWindow(const Utility& utility, bool silent,
const float kSpacing = be_control_look->DefaultItemSpacing(); const float kSpacing = be_control_look->DefaultItemSpacing();
const float kLabelSpacing = be_control_look->DefaultLabelSpacing(); 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) BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(kSpacing) .SetInsets(kSpacing)
.AddGroup(B_HORIZONTAL, kSpacing) .AddGroup(B_HORIZONTAL, kSpacing)
.Add(fPreview) .Add(previewBox)
.AddGroup(B_VERTICAL, 0) .AddGroup(B_VERTICAL, 0)
.Add(fActiveWindow) .Add(fActiveWindow)
.Add(fWindowBorder) .Add(fWindowBorder)
+1 -2
View File
@@ -26,7 +26,6 @@ class BPath;
class BTextControl; class BTextControl;
class BTextView; class BTextView;
class PreviewView;
class Utility; class Utility;
@@ -58,7 +57,7 @@ private:
const Utility& fUtility; const Utility& fUtility;
PreviewView* fPreview; BView* fPreview;
BCheckBox* fActiveWindow; BCheckBox* fActiveWindow;
BTextControl* fDelayControl; BTextControl* fDelayControl;
BCheckBox* fWindowBorder; BCheckBox* fWindowBorder;
+66 -45
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. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Rene Gollent (rene@gollent.com)
* Erik Jaesler (erik@cgsoftware.com) * Erik Jaesler (erik@cgsoftware.com)
* Alex Wilson (yourpalal2@gmail.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 - // #pragma mark -
@@ -597,8 +659,8 @@ instantiate_object(BMessage* archive, image_id* _id)
const char* signature = NULL; const char* signature = NULL;
bool hasSignature = archive->FindString(B_ADD_ON_FIELD, &signature) == B_OK; bool hasSignature = archive->FindString(B_ADD_ON_FIELD, &signature) == B_OK;
instantiation_func instantiationFunc = find_instantiation_func(className, instantiation_func instantiationFunc = BPrivate::find_instantiation_func(
signature); className, signature, _id);
// if find_instantiation_func() can't locate Class::Instantiate() // if find_instantiation_func() can't locate Class::Instantiate()
// and a signature was specified // and a signature was specified
@@ -714,48 +776,7 @@ validate_instantiation(BMessage* from, const char* className)
instantiation_func instantiation_func
find_instantiation_func(const char* className, const char* signature) find_instantiation_func(const char* className, const char* signature)
{ {
if (className == NULL) { return BPrivate::find_instantiation_func(className, signature, 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;
} }
+1 -1
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) message.image_event = atomic_add(&thread->team->debug_info.image_event, 1)
+ 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); sizeof(message), true);
} }
+2 -2
View File
@@ -71,9 +71,9 @@ void
add_menu_fields(BGridLayout* layout, int32& row) add_menu_fields(BGridLayout* layout, int32& row)
{ {
BPopUpMenu* menu1 = new BPopUpMenu("Selection"); BPopUpMenu* menu1 = new BPopUpMenu("Selection");
BMenuField* control1 = new BMenuField("Enabled", menu1, NULL); BMenuField* control1 = new BMenuField("Enabled", menu1);
BPopUpMenu* menu2 = new BPopUpMenu("Selection"); BPopUpMenu* menu2 = new BPopUpMenu("Selection");
BMenuField* control2 = new BMenuField("Disabled", menu2, NULL); BMenuField* control2 = new BMenuField("Disabled", menu2);
control2->SetEnabled(false); control2->SetEnabled(false);
#if USE_LAYOUT_ITEMS #if USE_LAYOUT_ITEMS