Flat commit of all changes from package-management branch in svn
This commit is contained in:
parent
b353a9a30a
commit
3dfd9cb95c
@ -1,63 +0,0 @@
|
||||
# This file defines what ends up in the alternative GCC archive and it executes
|
||||
# the rules building the archive. Included by HaikuImage.
|
||||
|
||||
|
||||
#sanity check - make sure the primary gcc is different than the alternative gcc
|
||||
if $(HAIKU_PRIMARY_GCC) = $(HAIKU_GCC_VERSION[1]) {
|
||||
Exit "Error: Your alternative gcc is the same as the main gcc!"
|
||||
"You need to reconfigure your generated directories." ;
|
||||
}
|
||||
|
||||
#pragma mark - Build The Archive
|
||||
|
||||
|
||||
# archive target
|
||||
HAIKU_ALTERNATIVE_GCC_ARCHIVE = alternative_system_libs.zip ;
|
||||
MakeLocate $(HAIKU_ALTERNATIVE_GCC_ARCHIVE) : $(HAIKU_OUTPUT_DIR) ;
|
||||
|
||||
# the pseudo target all archive contents is attached to
|
||||
NotFile $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) ;
|
||||
|
||||
# prepare the script that initializes the shell variables
|
||||
local initVarsScript = <AlternativeGCCArchive>haiku-alternative-gcc-init-vars ;
|
||||
local script = $(initVarsScript) ;
|
||||
MakeLocate $(script) : $(HAIKU_OUTPUT_DIR) ;
|
||||
Always $(script) ;
|
||||
|
||||
AddVariableToScript $(script) : tmpDir : $(HAIKU_TMP_DIR) ;
|
||||
AddVariableToScript $(script) : addBuildCompatibilityLibDir
|
||||
: $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) ;
|
||||
AddTargetVariableToScript $(script) : <build>copyattr ;
|
||||
AddTargetVariableToScript $(script) : <build>zip ;
|
||||
if $(HOST_RM_ATTRS_TARGET) {
|
||||
AddTargetVariableToScript $(script) : $(HOST_RM_ATTRS_TARGET) : rmAttrs ;
|
||||
} else {
|
||||
AddVariableToScript $(script) : rmAttrs : rm ;
|
||||
}
|
||||
|
||||
# create the other scripts
|
||||
local makeDirsScript = <AlternativeGCCArchive>haiku-alternative-gcc-make-dirs ;
|
||||
local copyFilesScript
|
||||
= <AlternativeGCCArchive>haiku-alternative-gcc-copy-files ;
|
||||
MakeLocate $(makeDirsScript) $(copyFilesScript) : $(HAIKU_OUTPUT_DIR) ;
|
||||
|
||||
CreateAlternativeGCCArchiveMakeDirectoriesScript $(makeDirsScript) ;
|
||||
CreateAlternativeGCCArchiveCopyFilesScript $(copyFilesScript) ;
|
||||
|
||||
# build the archive
|
||||
|
||||
BuildAlternativeGCCArchive $(HAIKU_ALTERNATIVE_GCC_ARCHIVE) :
|
||||
$(initVarsScript)
|
||||
$(makeDirsScript)
|
||||
$(copyFilesScript)
|
||||
;
|
||||
|
||||
# remove the scripts we have generated
|
||||
RmTemps $(HAIKU_ALTERNATIVE_GCC_ARCHIVE) :
|
||||
$(initVarsScript)
|
||||
$(makeDirsScript)
|
||||
$(copyFilesScript)
|
||||
;
|
||||
|
||||
NotFile haiku-alternative-gcc-archive ;
|
||||
Depends haiku-alternative-gcc-archive : $(HAIKU_ALTERNATIVE_GCC_ARCHIVE) ;
|
@ -29,15 +29,6 @@ HAIKU_CONTAINER_GRIST on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME)
|
||||
HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_NET_BOOT_ARCHIVE_CONTAINER_NAME)
|
||||
= HAIKU_NET_BOOT_ARCHIVE_INSTALL_TARGETS ;
|
||||
|
||||
# alternative gcc archive
|
||||
HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME
|
||||
= haiku-alternative-gcc-archive-container ;
|
||||
HAIKU_CONTAINER_GRIST on $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME)
|
||||
= AlternativeGCCArchive ;
|
||||
# HAIKU_INCLUDE_IN_CONTAINER_VAR -- update only mode not supported
|
||||
HAIKU_INSTALL_TARGETS_VAR on $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME)
|
||||
= HAIKU_ALTERNATIVE_GCC_ARCHIVE_INSTALL_TARGETS ;
|
||||
|
||||
# boot floppy
|
||||
HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME = haiku-boot-floppy-container ;
|
||||
HAIKU_CONTAINER_GRIST on $(HAIKU_FLOPPY_BOOT_IMAGE_CONTAINER_NAME)
|
||||
@ -151,13 +142,6 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
HAIKU_GCC_HEADERS_DIR = [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
|
||||
}
|
||||
|
||||
# the subdirectory into which the alternative GCC libraries are to be installed
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
HAIKU_ALTERNATIVE_GCC_LIB_SUBDIR = gcc2 ;
|
||||
} else {
|
||||
HAIKU_ALTERNATIVE_GCC_LIB_SUBDIR = gcc4 ;
|
||||
}
|
||||
|
||||
# initial state for flags etc.
|
||||
HAIKU_C++ ?= $(HAIKU_CC) ;
|
||||
HAIKU_LINK = $(HAIKU_CC) ;
|
||||
|
@ -59,23 +59,28 @@ AddFilesToFloppyBootArchive system add-ons kernel busses ide
|
||||
: generic_ide_pci $(X86_ONLY)ide_isa silicon_image_3112 legacy_sata it8211 ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel busses scsi
|
||||
: ahci ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel console : vga_text ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel console
|
||||
: vga_text ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel file_systems
|
||||
: $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel generic
|
||||
: $(ATA_ONLY)ata_adapter $(IDE_ONLY)ide_adapter locked_pool scsi_periph ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel partitioning_systems
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel partitioning_systems
|
||||
: intel session ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel interrupt_controllers
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel interrupt_controllers
|
||||
: $(PPC_ONLY)openpic ;
|
||||
|
||||
if $(USB_BOOT) = 1 {
|
||||
AddFilesToFloppyBootArchive system add-ons kernel busses usb
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel busses usb
|
||||
: <usb>uhci <usb>ohci <usb>ehci ;
|
||||
}
|
||||
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
AddFilesToFloppyBootArchive system add-ons kernel cpu : generic_x86 ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel cpu
|
||||
: generic_x86 ;
|
||||
}
|
||||
|
||||
# drivers
|
||||
@ -89,7 +94,8 @@ if $(NET_BOOT) = 1 {
|
||||
}
|
||||
|
||||
# kernel
|
||||
AddFilesToFloppyBootArchive system : <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
AddFilesToFloppyBootArchive system
|
||||
: <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
|
||||
# scripts and data files
|
||||
|
||||
@ -103,13 +109,17 @@ if $(NET_BOOT) = 1 {
|
||||
# add-ons
|
||||
AddFilesToFloppyBootArchive system add-ons kernel network
|
||||
: stack socket ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel network devices
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel network devices
|
||||
: $(SYSTEM_NETWORK_DEVICES) ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel network datalink_protocols
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel network datalink_protocols
|
||||
: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel network ppp
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel network ppp
|
||||
: $(SYSTEM_NETWORK_PPP) ;
|
||||
AddFilesToFloppyBootArchive system add-ons kernel network protocols
|
||||
AddFilesToFloppyBootArchive
|
||||
system add-ons kernel network protocols
|
||||
: $(SYSTEM_NETWORK_PROTOCOLS) ;
|
||||
}
|
||||
|
||||
|
@ -8,13 +8,6 @@ HAIKU_CD = $(HAIKU_CD_NAME) ;
|
||||
HAIKU_CD_LABEL ?= $(HAIKU_DEFAULT_CD_LABEL) ;
|
||||
MakeLocate $(HAIKU_CD) : $(HAIKU_CD_DIR) ;
|
||||
|
||||
# Detect a hybrid GCC2/GCC4 image.
|
||||
local isHybridBuild ;
|
||||
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
||||
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
||||
isHybridBuild = 1 ;
|
||||
}
|
||||
|
||||
# prepare the script that initializes the shell variables
|
||||
HAIKU_CD_INIT_VARIABLES_SCRIPT = <HaikuCD>haiku.cd-init-vars ;
|
||||
local script = $(HAIKU_CD_INIT_VARIABLES_SCRIPT) ;
|
||||
|
@ -47,14 +47,14 @@ SYSTEM_BIN = "[" addattr alert arp base64 basename bash bc beep bzip2
|
||||
mkfifo mkfs mkindex mktemp modifiers mount mount_nfs mountvolume mv
|
||||
netcat netstat nl nohup notify nproc
|
||||
od open
|
||||
passwd paste patch pathchk pc ping ping6 play playfile playsound playwav
|
||||
pr prio printenv printf profile ps ptx pwd
|
||||
package package_repo passwd paste patch pathchk pc ping ping6 pkgman play
|
||||
playfile playsound playwav pr prio printenv printf profile ps ptx pwd
|
||||
query quit
|
||||
rc readlink ReadOnlyBootPrompt reindex release renice rlog rm rmattr
|
||||
rmindex rmdir roster route
|
||||
safemode screen_blanker screenmode screenshot sdiff setdecor settype
|
||||
setversion setvolume seq sha1sum shar shred shuf shutdown sleep sort
|
||||
spamdbm
|
||||
setversion setvolume seq sha1sum sha256sum shar shred shuf shutdown sleep
|
||||
sort spamdbm
|
||||
split stat strace stty su sum sync sysinfo
|
||||
tac tail tcpdump tcptester tee telnet telnetd test timeout top touch
|
||||
tput tr traceroute translate trash true truncate tsort tty
|
||||
@ -89,8 +89,8 @@ SYSTEM_LIBS =
|
||||
liblocale.so
|
||||
libmail.so libmedia.so libmidi.so libmidi2.so
|
||||
libnetwork.so
|
||||
libpng.so
|
||||
<revisioned>libroot.so libroot-addon-icu.so
|
||||
libpackage.so libpng.so
|
||||
<revisioned>libroot.so
|
||||
libscreensaver.so
|
||||
libtextencoding.so libtiff.so libtracker.so libtranslation.so
|
||||
libz.so
|
||||
@ -101,6 +101,7 @@ PRIVATE_SYSTEM_LIBS =
|
||||
libfluidsynth.so
|
||||
libilmimf.so
|
||||
liblpsolve55.so
|
||||
libroot-addon-icu.so
|
||||
;
|
||||
SYSTEM_SERVERS = app_server cddb_daemon debug_server input_server mail_daemon
|
||||
media_addon_server media_server midi_server mount_server net_server
|
||||
@ -190,8 +191,8 @@ SYSTEM_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)atheros813x
|
||||
SYSTEM_ADD_ONS_BUS_MANAGERS = $(ATA_ONLY)ata pci $(X86_ONLY)ps2 $(X86_ONLY)isa
|
||||
$(IDE_ONLY)ide scsi config_manager agp_gart usb firewire $(X86_ONLY)acpi
|
||||
;
|
||||
SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs btrfs cdda exfat ext2 fat iso9660 nfs
|
||||
attribute_overlay write_overlay ntfs reiserfs udf googlefs ;
|
||||
SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs bindfs btrfs cdda exfat ext2 fat iso9660 nfs
|
||||
attribute_overlay write_overlay ntfs packagefs reiserfs udf googlefs ;
|
||||
|
||||
# wifi firmware
|
||||
for driver in $(SYSTEM_ADD_ONS_DRIVERS_NET) {
|
||||
@ -232,7 +233,8 @@ AddFilesToHaikuImage system add-ons kernel busses scsi
|
||||
: ahci ;
|
||||
AddFilesToHaikuImage system add-ons kernel busses usb
|
||||
: <usb>uhci <usb>ohci <usb>ehci ;
|
||||
AddFilesToHaikuImage system add-ons kernel console : vga_text ;
|
||||
AddFilesToHaikuImage system add-ons kernel console
|
||||
: vga_text ;
|
||||
AddFilesToHaikuImage system add-ons kernel debugger
|
||||
: <kdebug>demangle $(X86_ONLY)<kdebug>disasm
|
||||
<kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>run_on_exit ;
|
||||
@ -241,13 +243,16 @@ AddFilesToHaikuImage system add-ons kernel file_systems
|
||||
AddFilesToHaikuImage system add-ons kernel generic
|
||||
: $(ATA_ONLY)ata_adapter dpc $(IDE_ONLY)ide_adapter locked_pool mpu401
|
||||
scsi_periph <module>tty ;
|
||||
AddFilesToHaikuImage system add-ons kernel partitioning_systems
|
||||
AddFilesToHaikuImage
|
||||
system add-ons kernel partitioning_systems
|
||||
: amiga_rdb apple efi_gpt intel session ;
|
||||
AddFilesToHaikuImage system add-ons kernel interrupt_controllers
|
||||
AddFilesToHaikuImage
|
||||
system add-ons kernel interrupt_controllers
|
||||
: $(PPC_ONLY)openpic ;
|
||||
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
AddFilesToHaikuImage system add-ons kernel cpu : generic_x86 ;
|
||||
AddFilesToHaikuImage system add-ons kernel cpu
|
||||
: generic_x86 ;
|
||||
}
|
||||
|
||||
# drivers
|
||||
@ -276,10 +281,11 @@ AddDriversToHaikuImage ports : usb_serial ;
|
||||
#AddDriversToHaikuImage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
|
||||
|
||||
# kernel
|
||||
AddFilesToHaikuImage system : <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
AddFilesToHaikuImage system
|
||||
: <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
|
||||
# libs
|
||||
AddLibrariesToHaikuHybridImage system lib
|
||||
AddLibrariesToHaikuImage system lib
|
||||
: $(SYSTEM_LIBS) $(PRIVATE_SYSTEM_LIBS) ;
|
||||
|
||||
# libnetwork.so replaces quite a few libraries
|
||||
@ -289,12 +295,12 @@ SYSTEM_LIBS_LIBNETWORK_ALIASES
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
local lib ;
|
||||
for lib in $(SYSTEM_LIBS_LIBNETWORK_ALIASES) {
|
||||
AddSymlinkToHaikuHybridImage system lib : libnetwork.so : $(lib)
|
||||
: : true ;
|
||||
AddSymlinkToHaikuImage system lib
|
||||
: libnetwork.so : $(lib) ;
|
||||
}
|
||||
|
||||
AddSymlinkToHaikuHybridImage system lib : libbnetapi.so : libnetapi.so
|
||||
: : true ;
|
||||
AddSymlinkToHaikuImage system lib : libbnetapi.so
|
||||
: libnetapi.so ;
|
||||
}
|
||||
|
||||
|
||||
@ -305,7 +311,8 @@ SYSTEM_LIBS_LIBGL_ALIASES
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
local lib ;
|
||||
for lib in $(SYSTEM_LIBS_LIBGL_ALIASES) {
|
||||
AddSymlinkToHaikuHybridImage system lib : libGL.so : $(lib) : : true ;
|
||||
AddSymlinkToHaikuImage system lib
|
||||
: libGL.so : $(lib) ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -319,10 +326,12 @@ SYSTEM_LIBS_ALIASES =
|
||||
AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
|
||||
|
||||
# apps
|
||||
AddFilesToHaikuImage system : runtime_loader Deskbar Tracker ;
|
||||
AddFilesToHaikuImage system : runtime_loader ;
|
||||
AddFilesToHaikuImage system : Deskbar Tracker ;
|
||||
AddFilesToHaikuImage system bin : $(SYSTEM_BIN) consoled ;
|
||||
AddFilesToHaikuImage system apps : $(SYSTEM_APPS) ;
|
||||
AddFilesToHaikuImage system preferences : $(SYSTEM_PREFERENCES) ;
|
||||
AddFilesToHaikuImage system preferences
|
||||
: $(SYSTEM_PREFERENCES) ;
|
||||
AddFilesToHaikuImage system demos : $(SYSTEM_DEMOS) ;
|
||||
|
||||
SEARCH on which = [ FDirName $(HAIKU_TOP) data bin ] ;
|
||||
@ -330,15 +339,18 @@ AddFilesToHaikuImage system bin : which ;
|
||||
SEARCH on installoptionalpackage = [ FDirName $(HAIKU_TOP) data bin ] ;
|
||||
AddFilesToHaikuImage system bin : installoptionalpackage ;
|
||||
SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
|
||||
AddFilesToHaikuImage system bin : install-wifi-firmwares.sh ;
|
||||
AddFilesToHaikuImage system bin
|
||||
: install-wifi-firmwares.sh ;
|
||||
|
||||
# TODO: remove!
|
||||
# Add the files to be used by installoptionalpackage.
|
||||
AddDirectoryToHaikuImage common data optional-packages ;
|
||||
local optional-pkg-files = OptionalBuildFeatures OptionalPackageDependencies
|
||||
OptionalPackages OptionalLibPackages ;
|
||||
for name in $(optional-pkg-files) {
|
||||
local file = [ FDirName $(HAIKU_TOP) build jam $(name) ] ;
|
||||
AddFilesToHaikuImage common data optional-packages : $(file) ;
|
||||
AddFilesToHaikuImage common data optional-packages
|
||||
: $(file) ;
|
||||
}
|
||||
AddInstalledPackagesFileToHaikuImage ;
|
||||
|
||||
@ -352,8 +364,9 @@ AddDirectoryToHaikuImage home mail draft ;
|
||||
AddDirectoryToHaikuImage home mail in ;
|
||||
AddDirectoryToHaikuImage home mail out ;
|
||||
|
||||
AddSymlinkToHaikuImage home config settings : deskbar : be ;
|
||||
# Deskbar Application links
|
||||
AddDirectoryToHaikuImage home config be Applications ;
|
||||
AddDirectoryToHaikuImage home config settings deskbar Applications ;
|
||||
DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap CodyCam CDPlayer DeskCalc
|
||||
Devices DiskProbe DriveSetup DiskUsage Expander Icon-O-Matic Installer
|
||||
Magnify Mail MediaConverter MediaPlayer MidiPlayer People PoorMan
|
||||
@ -361,32 +374,33 @@ DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap CodyCam CDPlayer DeskCalc
|
||||
;
|
||||
local linkTarget ;
|
||||
for linkTarget in $(DESKBAR_APPLICATIONS) {
|
||||
AddSymlinkToHaikuImage home config be Applications
|
||||
AddSymlinkToHaikuImage home config settings deskbar Applications
|
||||
: /boot/system/apps/$(linkTarget) : $(linkTarget) ;
|
||||
}
|
||||
|
||||
# Deskbar Desktop applets links
|
||||
AddDirectoryToHaikuImage home config be Desktop\ applets ;
|
||||
AddDirectoryToHaikuImage home config settings deskbar Desktop\ applets ;
|
||||
DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController
|
||||
Workspaces
|
||||
;
|
||||
for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
|
||||
AddSymlinkToHaikuImage home config be Desktop\ applets
|
||||
AddSymlinkToHaikuImage home config settings deskbar Desktop\ applets
|
||||
: /boot/system/apps/$(linkTarget) : $(linkTarget) ;
|
||||
}
|
||||
|
||||
# Deskbar Preferences links
|
||||
AddDirectoryToHaikuImage home config be Preferences ;
|
||||
AddDirectoryToHaikuImage home config settings deskbar Preferences ;
|
||||
DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
|
||||
for linkTarget in $(DESKBAR_PREFERENCES) {
|
||||
AddSymlinkToHaikuImage home config be Preferences
|
||||
: /boot/system/preferences/$(linkTarget) : $(linkTarget) ;
|
||||
AddSymlinkToHaikuImage home config settings deskbar Preferences
|
||||
: /boot/system/preferences/$(linkTarget)
|
||||
: $(linkTarget) ;
|
||||
}
|
||||
|
||||
# Deskbar Demo links
|
||||
AddDirectoryToHaikuImage home config be Demos ;
|
||||
AddDirectoryToHaikuImage home config settings deskbar Demos ;
|
||||
for linkTarget in $(SYSTEM_DEMOS) {
|
||||
AddSymlinkToHaikuImage home config be Demos
|
||||
AddSymlinkToHaikuImage home config settings deskbar Demos
|
||||
: /boot/system/demos/$(linkTarget) : $(linkTarget) ;
|
||||
}
|
||||
|
||||
@ -431,14 +445,15 @@ local spellFiles = words geekspeak ;
|
||||
spellFiles = $(spellFiles:G=spell) ;
|
||||
SEARCH on $(spellFiles)
|
||||
= [ FDirName $(HAIKU_TOP) src apps mail ] ;
|
||||
AddFilesToHaikuImage system data spell_check word_dictionary : $(spellFiles) ;
|
||||
AddFilesToHaikuImage system data spell_check word_dictionary
|
||||
: $(spellFiles) ;
|
||||
|
||||
local etcDir = [ FDirName $(HAIKU_TOP) data etc ] ;
|
||||
local etcFiles = inputrc profile ;
|
||||
etcFiles = $(etcFiles:G=etc) ;
|
||||
SEARCH on $(etcFiles) = [ FDirName $(etcDir) ] ;
|
||||
etcFiles += <etc>termcap <etc>sysless <etc>sysless.in ;
|
||||
AddFilesToHaikuImage common etc : $(etcFiles) ;
|
||||
AddFilesToHaikuImage common settings etc : $(etcFiles) ;
|
||||
|
||||
local profileFiles = [ Glob $(etcDir)/profile.d : *.sh ] ;
|
||||
profileFiles = $(profileFiles:G=profile-d) ;
|
||||
@ -477,9 +492,11 @@ local cannaDefault = [ Glob $(cannaDir)/default : *.canna *.gz ] ;
|
||||
local cannaDic = [ Glob $(cannaDir)/dic : *.cbp ] ;
|
||||
local cannaDicCanna = [ Glob $(cannaDir)/dic/canna
|
||||
: *.cld *.ctd *.cbd *.dir ] ;
|
||||
AddFilesToHaikuImage system data Canna default : $(cannaDefault) ;
|
||||
AddFilesToHaikuImage system data Canna default
|
||||
: $(cannaDefault) ;
|
||||
AddFilesToHaikuImage system data Canna dic : $(cannaDic) ;
|
||||
AddFilesToHaikuImage system data Canna dic canna : $(cannaDicCanna) ;
|
||||
AddFilesToHaikuImage system data Canna dic canna
|
||||
: $(cannaDicCanna) ;
|
||||
AddDirectoryToHaikuImage system data Canna dic group ;
|
||||
AddDirectoryToHaikuImage system data Canna dic user ;
|
||||
|
||||
@ -487,14 +504,18 @@ local keymapFiles = [ Glob [ FDirName $(HAIKU_TOP) src data keymaps ]
|
||||
: *.keymap ] ;
|
||||
keymapFiles = $(keymapFiles:BG=keymap) ;
|
||||
AddFilesToHaikuImage system data Keymaps : $(keymapFiles) ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : Swedish : Finnish ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : Slovene : Croatian ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : US-International : Brazilian ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : Swedish
|
||||
: Finnish ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : Slovene
|
||||
: Croatian ;
|
||||
AddSymlinkToHaikuImage system data Keymaps : US-International
|
||||
: Brazilian ;
|
||||
|
||||
local keyboardLayoutsDir
|
||||
= [ FDirName $(HAIKU_TOP) data system data KeyboardLayouts ] ;
|
||||
local keyboardLayouts = [ Glob $(keyboardLayoutsDir) : [^.]* ] ;
|
||||
AddFilesToHaikuImage system data KeyboardLayouts : $(keyboardLayouts) ;
|
||||
AddFilesToHaikuImage system data KeyboardLayouts
|
||||
: $(keyboardLayouts) ;
|
||||
|
||||
local driverSettingsFiles = <driver-settings>kernel ;
|
||||
SEARCH on $(driverSettingsFiles)
|
||||
@ -515,7 +536,8 @@ SEARCH on $(postInstallFiles)
|
||||
= [ FDirName $(HAIKU_TOP) data common boot post_install ] ;
|
||||
SEARCH on <post-install>fresh_install
|
||||
= [ FDirName $(HAIKU_TOP) data common settings ] ;
|
||||
AddFilesToHaikuImage common boot post_install : $(postInstallFiles) ;
|
||||
AddFilesToHaikuImage common boot post_install
|
||||
: $(postInstallFiles) ;
|
||||
AddFilesToHaikuImage common settings : <post-install>fresh_install ;
|
||||
|
||||
# boot loader
|
||||
@ -538,20 +560,27 @@ AddBootModuleSymlinksToHaikuImage
|
||||
# add-ons
|
||||
AddFilesToHaikuImage system add-ons accelerants
|
||||
: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
|
||||
AddFilesToHaikuHybridImage system add-ons opengl
|
||||
: Mesa\ Software\ Renderer : : true ;
|
||||
AddFilesToHaikuHybridImage system add-ons Translators
|
||||
: $(SYSTEM_ADD_ONS_TRANSLATORS) : : true ;
|
||||
AddFilesToHaikuImage system add-ons opengl
|
||||
: Mesa\ Software\ Renderer ;
|
||||
AddFilesToHaikuImage system add-ons Translators
|
||||
: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
|
||||
AddFilesToHaikuImage system add-ons locale catalogs
|
||||
: $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
|
||||
AddFilesToHaikuHybridImage system add-ons locale catalogs
|
||||
: $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) : : true ;
|
||||
AddFilesToHaikuImage system add-ons mail_daemon inbound_protocols : POP3 IMAP ;
|
||||
AddFilesToHaikuImage system add-ons mail_daemon outbound_protocols : SMTP ;
|
||||
AddFilesToHaikuImage system add-ons mail_daemon inbound_filters
|
||||
AddFilesToHaikuImage system add-ons locale catalogs
|
||||
: $(SYSTEM_ADD_ONS_LOCALE_CATALOGS) ;
|
||||
AddFilesToHaikuImage
|
||||
system add-ons mail_daemon inbound_protocols
|
||||
: POP3 IMAP ;
|
||||
AddFilesToHaikuImage
|
||||
system add-ons mail_daemon outbound_protocols : SMTP ;
|
||||
AddFilesToHaikuImage
|
||||
system add-ons mail_daemon inbound_filters
|
||||
: MatchHeader SpamFilter NewMailNotification ;
|
||||
AddFilesToHaikuImage system add-ons mail_daemon outbound_filters : Fortune ;
|
||||
AddFilesToHaikuImage system add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
|
||||
AddFilesToHaikuImage
|
||||
system add-ons mail_daemon outbound_filters
|
||||
: Fortune ;
|
||||
AddFilesToHaikuImage system add-ons media
|
||||
: $(SYSTEM_ADD_ONS_MEDIA) ;
|
||||
AddFilesToHaikuImage system add-ons media plugins
|
||||
: $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
|
||||
AddFilesToHaikuImage system add-ons Tracker
|
||||
@ -571,13 +600,15 @@ AddFilesToHaikuImage system add-ons kernel network
|
||||
: <net>notifications stack ;
|
||||
AddFilesToHaikuImage system add-ons kernel network devices
|
||||
: $(SYSTEM_NETWORK_DEVICES) ;
|
||||
AddFilesToHaikuImage system add-ons kernel network datalink_protocols
|
||||
AddFilesToHaikuImage
|
||||
system add-ons kernel network datalink_protocols
|
||||
: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
|
||||
AddFilesToHaikuImage system add-ons kernel network ppp
|
||||
: $(SYSTEM_NETWORK_PPP) ;
|
||||
AddFilesToHaikuImage system add-ons kernel network protocols
|
||||
: $(SYSTEM_NETWORK_PROTOCOLS) ;
|
||||
AddFilesToHaikuImage system add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
|
||||
AddFilesToHaikuImage system add-ons Print
|
||||
: $(SYSTEM_ADD_ONS_PRINT) ;
|
||||
AddFilesToHaikuImage system add-ons Print transport
|
||||
: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
|
||||
AddFilesToHaikuImage system add-ons Screen\ Savers
|
||||
@ -593,15 +624,17 @@ AddFilesToHaikuImage home config add-ons decorators :
|
||||
|
||||
# create directories that will remain empty
|
||||
AddDirectoryToHaikuImage common bin ;
|
||||
AddDirectoryToHaikuImage common include ;
|
||||
AddDirectoryToHaikuImage common cache tmp ;
|
||||
AddDirectoryToHaikuImage common develop headers ;
|
||||
AddDirectoryToHaikuImage common lib ;
|
||||
AddDirectoryToHaikuImage common non-packaged ;
|
||||
AddDirectoryToHaikuImage common var empty ;
|
||||
AddDirectoryToHaikuImage common var log ;
|
||||
AddDirectoryToHaikuImage home Desktop ;
|
||||
AddDirectoryToHaikuImage home config bin ;
|
||||
AddDirectoryToHaikuImage home config lib ;
|
||||
AddDirectoryToHaikuImage home config non-packaged ;
|
||||
AddDirectoryToHaikuImage home mail ;
|
||||
AddDirectoryToHaikuImage common var empty ;
|
||||
AddDirectoryToHaikuImage common var log ;
|
||||
AddDirectoryToHaikuImage common cache tmp ;
|
||||
|
||||
AddDirectoryToHaikuImage home config add-ons kernel drivers bin ;
|
||||
AddDirectoryToHaikuImage home config add-ons kernel drivers dev ;
|
||||
@ -688,49 +721,6 @@ if $(HAIKU_IMAGE_OPTIONAL_PACKAGE_DESCRIPTIONS) {
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Alternative GCC Libraries
|
||||
|
||||
|
||||
# We build a zip archive containing the libraries built with the alternative
|
||||
# GCC and unzip onto our image. Building the archive is done by a sub-jam.
|
||||
include [ FDirName $(HAIKU_BUILD_RULES_DIR) AlternativeGCCArchive ] ;
|
||||
|
||||
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
||||
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
||||
# let another jam build a zip with the system libraries
|
||||
rule InvokeSubJam target : directory : jamLine
|
||||
{
|
||||
DIRECTORY on $(target) = $(directory) ;
|
||||
COMMAND_LINE on $(target) = $(jamLine) ;
|
||||
local optionalPackages = $(HAIKU_ADDED_OPTIONAL_PACKAGES:J=/) ;
|
||||
OPTIONAL_PACKAGES on $(target) = $(optionalPackages:E="") ;
|
||||
Always $(target) ;
|
||||
InvokeSubJam1 $(target) ;
|
||||
}
|
||||
|
||||
actions InvokeSubJam1
|
||||
{
|
||||
cd $(DIRECTORY)
|
||||
export HAIKU_IGNORE_USER_BUILD_CONFIG=1
|
||||
export HAIKU_ADD_OPTIONAL_PACKAGES=$(OPTIONAL_PACKAGES)
|
||||
export HAIKU_PRIMARY_GCC=$(HAIKU_GCC_VERSION[1])
|
||||
$(JAM:E=jam) -q $(COMMAND_LINE) ;
|
||||
}
|
||||
|
||||
local otherAlternativeSystemLibsZip
|
||||
= <other-image>alternative_system_libs.zip ;
|
||||
MakeLocate $(otherAlternativeSystemLibsZip)
|
||||
: $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) ;
|
||||
|
||||
InvokeSubJam $(otherAlternativeSystemLibsZip)
|
||||
: $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR)
|
||||
: "haiku-alternative-gcc-archive" ;
|
||||
|
||||
# install the alternative libs in the right directory
|
||||
ExtractArchiveToHaikuImage : $(otherAlternativeSystemLibsZip) ;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - User/Group Setup
|
||||
|
||||
|
||||
@ -778,13 +768,6 @@ HAIKU_INSTALL_DIR ?= $(HAIKU_DEFAULT_INSTALL_DIR) ;
|
||||
# the pseudo target all image contents is attached to
|
||||
NotFile $(HAIKU_IMAGE_CONTAINER_NAME) ;
|
||||
|
||||
# Detect a hybrid GCC2/GCC4 image.
|
||||
local isHybridBuild ;
|
||||
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
||||
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
||||
isHybridBuild = 1 ;
|
||||
}
|
||||
|
||||
# prepare the script that initializes the shell variables
|
||||
HAIKU_IMAGE_INIT_VARIABLES_SCRIPT = <HaikuImage>haiku.image-init-vars ;
|
||||
local script = $(HAIKU_IMAGE_INIT_VARIABLES_SCRIPT) ;
|
||||
|
@ -195,7 +195,8 @@ rule AddFilesToContainer container : directoryTokens : targets : destName
|
||||
if $(catalogs) {
|
||||
local signature
|
||||
= [ on $(target) return $(HAIKU_CATALOG_SIGNATURE) ] ;
|
||||
AddFilesToHaikuImage system data locale catalogs $(signature)
|
||||
AddFilesToHaikuImage
|
||||
system data locale catalogs $(signature)
|
||||
: $(catalogs) ;
|
||||
}
|
||||
}
|
||||
@ -302,7 +303,8 @@ rule AddDriversToContainer container : relativeDirectoryTokens : targets
|
||||
local directoryTokens = system add-ons kernel drivers dev
|
||||
$(relativeDirectoryTokens) ;
|
||||
|
||||
AddFilesToContainer $(container) : system add-ons kernel drivers bin
|
||||
AddFilesToContainer $(container)
|
||||
: system add-ons kernel drivers bin
|
||||
: $(targets) ;
|
||||
|
||||
# If the image shall only be updated, we don't add any symlinks.
|
||||
@ -367,7 +369,8 @@ rule AddBootModuleSymlinksToContainer container : targets
|
||||
local name = $(target:BS) ;
|
||||
local linkTarget = [ FDirName /boot $(installDir:G=) $(name) ] ;
|
||||
|
||||
AddSymlinkToContainer $(container) : system add-ons kernel boot
|
||||
AddSymlinkToContainer $(container)
|
||||
: system add-ons kernel boot
|
||||
: $(linkTarget) : $(name) ;
|
||||
}
|
||||
}
|
||||
@ -672,6 +675,8 @@ rule AddSymlinkToHaikuImage directoryTokens : linkTarget : linkName
|
||||
{
|
||||
# AddSymlinkToHaikuImage <directory> : <link target> [ : <link name> ] ;
|
||||
|
||||
linkTarget = $(linkTarget:J=/) ;
|
||||
|
||||
AddSymlinkToContainer $(HAIKU_IMAGE_CONTAINER_NAME) : $(directoryTokens)
|
||||
: $(linkTarget) : $(linkName) ;
|
||||
}
|
||||
@ -704,7 +709,7 @@ rule AddHeaderDirectoryToHaikuImage dirTokens : dirName : alwaysUpdate
|
||||
# AddHeaderDirectoryToHaikuImage <dirTokens> : [ <dirName> ]
|
||||
# : <alwaysUpdate> ;
|
||||
|
||||
CopyDirectoryToHaikuImage develop headers
|
||||
CopyDirectoryToHaikuImage system develop headers
|
||||
: [ FDirName $(HAIKU_TOP) headers $(dirTokens) ]
|
||||
: $(dirName) : -x .svn : $(alwaysUpdate) ;
|
||||
}
|
||||
@ -822,6 +827,15 @@ rule InstallSourceArchive file : url
|
||||
}
|
||||
}
|
||||
|
||||
rule InstallCommonPackage package : url
|
||||
{
|
||||
# download archive file
|
||||
local archiveFile = [ DownloadFile $(package) : $(url) ] ;
|
||||
|
||||
# copy onto image
|
||||
ExtractArchiveToHaikuImage common packages : $(archiveFile) ;
|
||||
}
|
||||
|
||||
rule InstallOptionalHaikuImagePackage package : url : dirTokens : isCDPackage
|
||||
{
|
||||
# download archive file
|
||||
@ -850,7 +864,7 @@ rule AddEntryToHaikuImageUserGroupFile file : entry
|
||||
Always $(file) ;
|
||||
MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
|
||||
BuildHaikuImageUserGroupFile $(file) ;
|
||||
AddFilesToHaikuImage common etc : $(file) ;
|
||||
AddFilesToHaikuImage common settings etc : $(file) ;
|
||||
}
|
||||
|
||||
HAIKU_IMAGE_USER_GROUP_ENTRIES on $(file) = $(allEntries) ;
|
||||
@ -917,7 +931,8 @@ rule AddExpanderRuleToHaikuImage mimetype : extension : list : extract
|
||||
Exit "Invalid expander rule specification passed to AddExpanderRule." ;
|
||||
}
|
||||
|
||||
local entry = "\\\"$(mimetype)\\\"\\\t$(extension)\\\t\\\"$(list)\\\"\\\t\\\"$(extract)\\\"" ;
|
||||
local entry
|
||||
= "\\\"$(mimetype)\\\"\\\t$(extension)\\\t\\\"$(list)\\\"\\\t\\\"$(extract)\\\"" ;
|
||||
AddEntryToHaikuImageExpanderRuleFile <haiku-image>expander.rules
|
||||
: $(entry) ;
|
||||
}
|
||||
@ -930,7 +945,8 @@ rule AddInstalledPackagesFileToHaikuImage
|
||||
Always $(file) ;
|
||||
MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
|
||||
BuildHaikuImageInstalledPackagesFile $(file) ;
|
||||
AddFilesToHaikuImage common data optional-packages : $(file) ;
|
||||
AddFilesToHaikuImage common data optional-packages
|
||||
: $(file) ;
|
||||
}
|
||||
|
||||
actions BuildHaikuImageInstalledPackagesFile
|
||||
@ -957,7 +973,8 @@ rule AddLicenseToHaikuImage file : name : searchPath
|
||||
name = ;
|
||||
}
|
||||
|
||||
AddFilesToHaikuImage system data licenses : $(file) : $(name) ;
|
||||
AddFilesToHaikuImage system data licenses : $(file)
|
||||
: $(name) ;
|
||||
}
|
||||
|
||||
|
||||
@ -1116,138 +1133,9 @@ actions BuildNetBootArchive1
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Alternative GCC Archive rules
|
||||
|
||||
|
||||
rule AddDirectoryToAlternativeGCCArchive directoryTokens
|
||||
rule AddLibrariesToHaikuImage directory : libs
|
||||
{
|
||||
# AddDirectoryToAlternativeGCCArchive <directoryTokens>
|
||||
|
||||
return [ AddDirectoryToContainer
|
||||
$(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) : $(directoryTokens) ] ;
|
||||
}
|
||||
|
||||
rule AddFilesToAlternativeGCCArchive directory : targets : destName
|
||||
{
|
||||
# AddFilesToAlternativeGCCArchive <directory> : <targets> [ : dest name ]
|
||||
|
||||
AddFilesToContainer $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME)
|
||||
: $(directory) : $(targets) : $(destName) ;
|
||||
}
|
||||
|
||||
rule AddSymlinkToAlternativeGCCArchive directoryTokens : linkTarget : linkName
|
||||
{
|
||||
# AddSymlinkToAlternativeGCCArchive <directory> : <link target>
|
||||
# [ : <link name> ] ;
|
||||
|
||||
AddSymlinkToContainer $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME)
|
||||
: $(directoryTokens) : $(linkTarget) : $(linkName) ;
|
||||
}
|
||||
|
||||
rule CopyDirectoryToAlternativeGCCArchive directoryTokens : sourceDirectory
|
||||
: targetDirectoryName : excludePatterns : alwaysUpdate
|
||||
{
|
||||
CopyDirectoryToContainer $(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME)
|
||||
: $(directoryTokens) : $(sourceDirectory) : $(targetDirectoryName)
|
||||
: $(excludePatterns) : $(alwaysUpdate) ;
|
||||
}
|
||||
|
||||
rule CreateAlternativeGCCArchiveMakeDirectoriesScript script
|
||||
{
|
||||
CreateContainerMakeDirectoriesScript
|
||||
$(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) : $(script) ;
|
||||
}
|
||||
|
||||
rule CreateAlternativeGCCArchiveCopyFilesScript script
|
||||
{
|
||||
CreateContainerCopyFilesScript
|
||||
$(HAIKU_ALTERNATIVE_GCC_ARCHIVE_CONTAINER_NAME) : $(script) ;
|
||||
}
|
||||
|
||||
rule BuildAlternativeGCCArchive archive : scripts
|
||||
{
|
||||
# BuildAlternativeGCCArchive <archive> : <scripts> ;
|
||||
|
||||
local mainScript = build_archive ;
|
||||
SEARCH on $(mainScript) = [ FDirName $(HAIKU_TOP) build scripts ] ;
|
||||
|
||||
Depends $(archive) : $(mainScript) $(scripts) ;
|
||||
BuildAlternativeGCCArchive1 $(archive) : $(mainScript) $(scripts) ;
|
||||
}
|
||||
|
||||
actions BuildAlternativeGCCArchive1
|
||||
{
|
||||
$(2[1]) $(1) $(2[2-])
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Haiku Hybrid Image rules
|
||||
|
||||
|
||||
rule AddFilesToHaikuHybridImage directory : targets : destName
|
||||
: useABISubDir
|
||||
{
|
||||
# AddFilesToHaikuHybridImage <directory> : <targets> : <destName>
|
||||
# : <useABISubDir>
|
||||
#
|
||||
# Convenience rule calling both AddFilesToHaikuImage and
|
||||
# AddFilesToAlternativeGCCArchive.
|
||||
#
|
||||
# <useABISubDir>
|
||||
# if non-empty, specifies that an ABI subdirectory shall be appended to
|
||||
# <directory> for the alternative GCC archive.
|
||||
|
||||
local alternativeSubDir ;
|
||||
if $(useABISubDir) {
|
||||
alternativeSubDir = gcc$(HAIKU_GCC_VERSION[1]) ;
|
||||
}
|
||||
|
||||
AddFilesToHaikuImage $(directory) : $(targets) : $(destName) ;
|
||||
AddFilesToAlternativeGCCArchive $(directory) $(alternativeSubDir)
|
||||
: $(targets) : $(destName) ;
|
||||
}
|
||||
|
||||
rule AddSymlinkToHaikuHybridImage directoryTokens : linkTarget : linkName
|
||||
: useSymlinkTargetABISubDir : useABISubDir
|
||||
{
|
||||
# AddSymlinkToHaikuHybridImage <directoryTokens> : <linkTarget> : <linkName>
|
||||
# [ : <useSymlinkTargetABISubDir> [ : <useABISubDir> ] ]
|
||||
#
|
||||
# Convenience rule calling both AddSymlinkToHaikuImage and
|
||||
# AddSymlinkToAlternativeGCCArchive.
|
||||
#
|
||||
# <linkTarget>
|
||||
# Can be a list of components that will be joined to path inserting
|
||||
# "/"s inbetween.
|
||||
# <useSymlinkTargetABISubDir>
|
||||
# If non-empty, specifies that an ABI subdirectory shall be inserted
|
||||
# into <linkTarget> (between the first and second component) for the
|
||||
# alternative GCC archive.
|
||||
# <useABISubDir>
|
||||
# If non-empty, specifies that an ABI subdirectory part shall be appended
|
||||
# to the directory tokens for the alternative GCC archive.
|
||||
|
||||
local alternativeDirTokens = $(directoryTokens) ;
|
||||
if $(useABISubDir) {
|
||||
alternativeDirTokens += gcc$(HAIKU_GCC_VERSION[1]) ;
|
||||
}
|
||||
|
||||
local alternativeLinkTarget = $(linkTarget) ;
|
||||
if $(useSymlinkTargetABISubDir) {
|
||||
alternativeLinkTarget = $(linkTarget[1]) gcc$(HAIKU_GCC_VERSION[1])
|
||||
$(linkTarget[2-]) ;
|
||||
}
|
||||
linkTarget = $(linkTarget:J=/) ;
|
||||
alternativeLinkTarget = $(alternativeLinkTarget:J=/) ;
|
||||
|
||||
AddSymlinkToHaikuImage $(directoryTokens) : $(linkTarget) : $(linkName) ;
|
||||
AddSymlinkToAlternativeGCCArchive $(alternativeDirTokens)
|
||||
: $(alternativeLinkTarget) : $(linkName) ;
|
||||
}
|
||||
|
||||
rule AddLibrariesToHaikuHybridImage directory : libs
|
||||
{
|
||||
# AddLibraryToHaikuHybridImage <directory> : <libs>
|
||||
# AddLibraryToHaikuImage <directory> : <libs>
|
||||
#
|
||||
# Installs libraries with the appropriate links onto the image.
|
||||
#
|
||||
@ -1257,12 +1145,10 @@ rule AddLibrariesToHaikuHybridImage directory : libs
|
||||
local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
|
||||
if $(abiVersion) {
|
||||
local abiVersionedLib = $(lib).$(abiVersion) ;
|
||||
AddFilesToHaikuHybridImage $(directory)
|
||||
: $(lib) : $(abiVersionedLib) : true ;
|
||||
AddSymlinkToHaikuHybridImage $(directory)
|
||||
: $(abiVersionedLib) : $(lib) : : true ;
|
||||
AddFilesToHaikuImage $(directory) : $(lib) : $(abiVersionedLib) ;
|
||||
AddSymlinkToHaikuImage $(directory) : $(abiVersionedLib) : $(lib) ;
|
||||
} else {
|
||||
AddFilesToHaikuHybridImage $(directory) : $(lib) : : true ;
|
||||
AddFilesToHaikuImage $(directory) : $(lib) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,18 +50,22 @@ AddFilesToNetBootArchive system add-ons kernel busses ide
|
||||
: generic_ide_pci $(X86_ONLY)ide_isa silicon_image_3112 ;
|
||||
AddFilesToNetBootArchive system add-ons kernel busses scsi
|
||||
: ahci ;
|
||||
AddFilesToNetBootArchive system add-ons kernel console : vga_text ;
|
||||
AddFilesToNetBootArchive system add-ons kernel console
|
||||
: vga_text ;
|
||||
AddFilesToNetBootArchive system add-ons kernel file_systems
|
||||
: $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
|
||||
AddFilesToNetBootArchive system add-ons kernel generic
|
||||
: $(IDE_ONLY)ide_adapter $(ATA_ONLY)ata_adapter locked_pool scsi_periph ;
|
||||
AddFilesToNetBootArchive system add-ons kernel partitioning_systems
|
||||
AddFilesToNetBootArchive
|
||||
system add-ons kernel partitioning_systems
|
||||
: intel session ;
|
||||
AddFilesToNetBootArchive system add-ons kernel interrupt_controllers
|
||||
AddFilesToNetBootArchive
|
||||
system add-ons kernel interrupt_controllers
|
||||
: $(PPC_ONLY)openpic ;
|
||||
|
||||
if $(TARGET_ARCH) = x86 {
|
||||
AddFilesToNetBootArchive system add-ons kernel cpu : generic_x86 ;
|
||||
AddFilesToNetBootArchive system add-ons kernel cpu
|
||||
: generic_x86 ;
|
||||
}
|
||||
|
||||
# drivers
|
||||
@ -71,7 +75,8 @@ AddDriversToNetBootArchive disk virtual : remote_disk ;
|
||||
AddDriversToNetBootArchive net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
|
||||
|
||||
# kernel
|
||||
AddFilesToNetBootArchive system : <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
AddFilesToNetBootArchive system
|
||||
: <revisioned>kernel_$(TARGET_ARCH) ;
|
||||
|
||||
# scripts and data files
|
||||
|
||||
@ -86,11 +91,13 @@ AddFilesToNetBootArchive system add-ons kernel network
|
||||
: <net>notifications stack ;
|
||||
AddFilesToNetBootArchive system add-ons kernel network devices
|
||||
: $(SYSTEM_NETWORK_DEVICES) ;
|
||||
AddFilesToNetBootArchive system add-ons kernel network datalink_protocols
|
||||
AddFilesToNetBootArchive
|
||||
system add-ons kernel network datalink_protocols
|
||||
: $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
|
||||
AddFilesToNetBootArchive system add-ons kernel network ppp
|
||||
: $(SYSTEM_NETWORK_PPP) ;
|
||||
AddFilesToNetBootArchive system add-ons kernel network protocols
|
||||
AddFilesToNetBootArchive
|
||||
system add-ons kernel network protocols
|
||||
: $(SYSTEM_NETWORK_PROTOCOLS) ;
|
||||
|
||||
# boot module links
|
||||
|
@ -2,15 +2,6 @@
|
||||
# It is directly included from HaikuImage -- all variables defined there can
|
||||
# be used
|
||||
|
||||
# Detect a hybrid GCC2/GCC4 image and disable the checks for unavailable GCC4
|
||||
# packages. (It does not matter if a package was built with either compiler,
|
||||
# the system should have the respective other system libs.)
|
||||
local isHybridBuild ;
|
||||
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
||||
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
||||
isHybridBuild = 1 ;
|
||||
}
|
||||
|
||||
|
||||
# Available Optional Lib Packages:
|
||||
# AllegroLibs
|
||||
@ -65,7 +56,7 @@ if [ IsOptionalHaikuImagePackageAdded box2d ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package box2d available for $(TARGET_ARCH)" ;
|
||||
} else {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 || $(isHybridBuild) {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
box2d-2.1.2-r1a3-r1a3-x86-gcc4-2011-05-26.zip
|
||||
: $(baseURL)/lib/box2d-2.1.2-r1a3-x86-gcc4-2011-05-26.zip
|
||||
|
@ -2,15 +2,6 @@
|
||||
# It is directly included from HaikuImage -- all variables defined there can
|
||||
# be used
|
||||
|
||||
# Detect a hybrid GCC2/GCC4 image and disable the checks for unavailable GCC4
|
||||
# packages. (It does not matter if a package was built with either compiler,
|
||||
# the system should have the respective other system libs.)
|
||||
local isHybridBuild ;
|
||||
if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) = 1
|
||||
&& $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
|
||||
isHybridBuild = 1 ;
|
||||
}
|
||||
|
||||
|
||||
# Available Optional Packages:
|
||||
# ABI-compliance-checker - tool for checking ABI compatibility between libs
|
||||
@ -99,7 +90,7 @@ local baseSourceURL = http://haiku-files.org/files/sources ;
|
||||
|
||||
# ABI-compliance-checker
|
||||
if [ IsOptionalHaikuImagePackageAdded ABI-compliance-checker ] {
|
||||
if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
|
||||
if $(HAIKU_GCC_VERSION[1]) < 4 {
|
||||
Echo "No optional package ABI-compliance-checker for gcc2" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
@ -114,12 +105,12 @@ if [ IsOptionalHaikuImagePackageAdded APR ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package APR available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
apr-1.4.2-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/apr-1.4.2-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: : true ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
apr-1.4.2-r1a3-x86-gcc2-2011-05-17.zip
|
||||
: $(baseURL)/apr-1.4.2-r1a3-x86-gcc2-2011-05-17.zip
|
||||
: : true ;
|
||||
@ -132,12 +123,12 @@ if [ IsOptionalHaikuImagePackageAdded APR-util ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package APR-util available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
apr-util-1.3.10-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/apr-util-1.3.10-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: : true ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
apr-util-1.3.10-r1a3-x86-gcc2-2011-05-17.zip
|
||||
: $(baseURL)/apr-util-1.3.10-r1a3-x86-gcc2-2011-05-17.zip
|
||||
: : true ;
|
||||
@ -149,10 +140,10 @@ if [ IsOptionalHaikuImagePackageAdded APR-util ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded ArmyKnife ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package ArmyKnife available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package ArmyKnife for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
armyknife-63-r1a3-x86-gcc2-2011-06-04.zip
|
||||
: $(baseURL)/armyknife-63-r1a3-x86-gcc2-2011-06-04.zip ;
|
||||
AddSymlinkToHaikuImage home config be Applications
|
||||
@ -181,7 +172,7 @@ if [ IsOptionalHaikuImagePackageAdded BeAE ] {
|
||||
Echo "No optional package BeAE available for $(TARGET_ARCH)" ;
|
||||
} else {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
beae-22-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/beae-22-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
@ -199,7 +190,7 @@ if [ IsOptionalHaikuImagePackageAdded BeAE ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded Beam ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package Beam available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package Beam available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage Beam-1.2alpha-x86-gcc2-2010-04-29.zip
|
||||
@ -216,7 +207,8 @@ if [ IsOptionalHaikuImagePackageAdded BeBook ] {
|
||||
: $(baseURL)/bebook_20081026.zip
|
||||
: system documentation ;
|
||||
AddSymlinkToHaikuImage home Desktop
|
||||
: /boot/system/documentation/bebook/index.html : BeBook ;
|
||||
: /boot/system/documentation/bebook/index.html
|
||||
: BeBook ;
|
||||
}
|
||||
|
||||
|
||||
@ -224,7 +216,7 @@ if [ IsOptionalHaikuImagePackageAdded BeBook ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded BeHappy ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package BeHappy available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package BeHappy available for gcc4" ;
|
||||
} else {
|
||||
Echo "No optional package BeHappy available for gcc2" ;
|
||||
@ -236,14 +228,15 @@ if [ IsOptionalHaikuImagePackageAdded BeHappy ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package BeOSCompatibility available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package BeOSCompatibility available for gcc4" ;
|
||||
} else {
|
||||
Echo "Warning: Adding BeOS compatibility symlinks. This will go away. Please fix your apps!" ;
|
||||
AddSymlinkToHaikuImage beos : ../system/apps ;
|
||||
AddSymlinkToHaikuImage beos : ../system/bin ;
|
||||
AddSymlinkToHaikuImage beos : ../system/documentation ;
|
||||
AddSymlinkToHaikuImage beos : ../common/etc ;
|
||||
AddSymlinkToHaikuImage beos
|
||||
: ../system/documentation ;
|
||||
AddSymlinkToHaikuImage beos : ../common/settings/etc ;
|
||||
AddSymlinkToHaikuImage beos : ../system/preferences ;
|
||||
AddSymlinkToHaikuImage beos : ../system ;
|
||||
AddDirectoryToHaikuImage var ;
|
||||
@ -257,7 +250,7 @@ if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded BePDF ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package BePDF available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package BePDF available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
@ -297,18 +290,21 @@ if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
|
||||
AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
|
||||
AddFilesToHaikuImage system servers : bluetooth_server ;
|
||||
AddFilesToHaikuImage system lib : libbluetooth.so ;
|
||||
AddFilesToHaikuImage system add-ons kernel network protocols : l2cap ;
|
||||
AddFilesToHaikuImage system add-ons kernel bluetooth : btCoreData hci ;
|
||||
AddFilesToHaikuImage
|
||||
system add-ons kernel network protocols : l2cap ;
|
||||
AddFilesToHaikuImage system add-ons kernel bluetooth
|
||||
: btCoreData hci ;
|
||||
AddFilesToHaikuImage system preferences : Bluetooth ;
|
||||
AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
|
||||
AddFilesToHaikuImage system bin
|
||||
: bt_dev_info bt_discovery ;
|
||||
AddSymlinkToHaikuImage home config be Preferences
|
||||
: /boot/system/preferences/Bluetooth ;
|
||||
if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ]
|
||||
&& $(HAIKU_GCC_VERSION[1]) in 2 4 {
|
||||
local arch = $(TARGET_ARCH) ;
|
||||
local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
|
||||
AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
|
||||
: /system/lib libbluetooth.so : : true ;
|
||||
AddSymlinkToHaikuImage system develop lib
|
||||
: /system/lib libbluetooth.so ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,7 +403,7 @@ if [ IsOptionalHaikuImagePackageAdded Clockwerk ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded CLucene ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package CLucene available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) < 4 {
|
||||
Echo "No optional package CLucene available for GCC2" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
@ -517,37 +513,20 @@ if [ IsOptionalHaikuImagePackageAdded Development ] && $(TARGET_ARCH) = x86 {
|
||||
if [ IsOptionalHaikuImagePackageAdded DevelopmentBase ]
|
||||
&& $(TARGET_ARCH) = x86 {
|
||||
# gcc and binutils
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
|
||||
InstallOptionalHaikuImagePackage
|
||||
gcc-2.95.3-r1a3-x86-gcc2-2010-08-18.zip
|
||||
: $(baseURL)/gcc-2.95.3-r1a3-x86-gcc2-2010-08-18.zip ;
|
||||
}
|
||||
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
# symlink to the appropriate system/lib[/gcc2] folder
|
||||
AddSymlinkToHaikuHybridImage
|
||||
develop abi x86 gcc2 tools gcc-2.95.3-haiku-100818 lib
|
||||
: /system/lib libstdc++.r4.so : : true ;
|
||||
}
|
||||
InstallCommonPackage gcc-2.95.3_110304-1.hpkg
|
||||
: $(baseURL)/gcc-2.95.3_110304.hpkg ;
|
||||
|
||||
if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) {
|
||||
InstallOptionalHaikuImagePackage
|
||||
gcc-4.5.3-r1a3-x86-gcc4-2011-06-20.zip
|
||||
: $(baseURL)/gcc-4.5.3-r1a3-x86-gcc4-2011-06-20.zip ;
|
||||
# TODO: remove this when we have a mechanism to switch gcc via PATH
|
||||
AddSymlinkToHaikuImage common settings develop tools
|
||||
: /boot/common/develop/tools/gcc-2.95.3-110304
|
||||
: current ;
|
||||
}
|
||||
|
||||
if $(HAIKU_GCC_VERSION[1]) = 4 {
|
||||
# symlink cpp to g++'s headers
|
||||
AddSymlinkToHaikuHybridImage develop abi x86 gcc4 headers
|
||||
: ../tools/current/include/g++ : cpp ;
|
||||
|
||||
# symlink to the appropriate system/lib[/gcc4] folder
|
||||
local libs = libstdc++.so libsupc++.so ;
|
||||
for lib in $(libs) {
|
||||
AddSymlinkToHaikuHybridImage
|
||||
develop abi x86 gcc4 tools gcc-4.5.3-haiku-110620 lib
|
||||
: /system/lib $(lib) : : true ;
|
||||
}
|
||||
InstallOptionalHaikuImagePackage
|
||||
gcc-4.5.3-r1a3-x86-gcc4-2011-06-20.zip
|
||||
: $(baseURL)/gcc-4.5.3-r1a3-x86-gcc4-2011-06-20.zip ;
|
||||
}
|
||||
|
||||
# other commonly used tools
|
||||
@ -606,7 +585,8 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentJava ] {
|
||||
InstallOptionalHaikuImagePackage
|
||||
jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip
|
||||
: $(baseURL)/jamvm-1.5.4-r1a3-x86-gcc4-2011-06-08.zip ;
|
||||
AddSymlinkToHaikuImage common bin : /boot/common/bin/jamvm : java ;
|
||||
AddSymlinkToHaikuImage common bin
|
||||
: /boot/common/bin/jamvm : java ;
|
||||
InstallOptionalHaikuImagePackage
|
||||
ecj-3.6.2-haiku-2011-06-08.zip
|
||||
: $(baseURL)/ecj-3.6.2-haiku-2011-06-08.zip ;
|
||||
@ -622,11 +602,10 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
}
|
||||
|
||||
local arch = $(TARGET_ARCH) ;
|
||||
local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
|
||||
local abiDirTokens = develop abi $(arch) $(abi) ;
|
||||
local developDirTokens = system develop ;
|
||||
|
||||
# glue code
|
||||
AddFilesToHaikuHybridImage $(abiDirTokens) lib :
|
||||
AddFilesToHaikuImage $(developDirTokens) lib :
|
||||
<src!system!glue!arch!$(arch)>crti.o
|
||||
<src!system!glue!arch!$(arch)>crtn.o
|
||||
<src!system!glue>init_term_dyn.o
|
||||
@ -635,44 +614,31 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
;
|
||||
|
||||
# kernel
|
||||
AddFilesToHaikuHybridImage $(abiDirTokens) lib : kernel.so : _KERNEL_ ;
|
||||
AddFilesToHaikuImage $(developDirTokens) lib : kernel.so : _KERNEL_ ;
|
||||
|
||||
# additional libraries
|
||||
local developmentLibs = <revisioned>libroot_debug.so ;
|
||||
AddFilesToHaikuHybridImage system lib : $(developmentLibs) : : true ;
|
||||
AddFilesToHaikuImage system lib : $(developmentLibs) ;
|
||||
|
||||
# library symlinks
|
||||
local lib ;
|
||||
for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) $(developmentLibs) {
|
||||
AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
|
||||
: /system/lib $(lib:BS) : : true ;
|
||||
AddSymlinkToHaikuImage $(developDirTokens) lib
|
||||
: /system/lib $(lib:BS) ;
|
||||
local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
|
||||
if $(abiVersion) {
|
||||
local abiVersionedLib = $(lib:BS).$(abiVersion) ;
|
||||
AddSymlinkToHaikuHybridImage $(abiDirTokens) lib
|
||||
: /system/lib $(abiVersionedLib) : : true ;
|
||||
AddSymlinkToHaikuImage $(developDirTokens) lib
|
||||
: /system/lib $(abiVersionedLib) ;
|
||||
}
|
||||
}
|
||||
|
||||
# static libraries
|
||||
AddFilesToHaikuHybridImage $(abiDirTokens) lib : libncurses.a ;
|
||||
AddFilesToHaikuHybridImage $(abiDirTokens) lib : liblocalestub.a ;
|
||||
AddFilesToHaikuImage $(developDirTokens) lib : libncurses.a ;
|
||||
AddFilesToHaikuImage $(developDirTokens) lib : liblocalestub.a ;
|
||||
|
||||
# the POSIX error code mapper library
|
||||
AddFilesToHaikuHybridImage $(abiDirTokens) lib : libposix_error_mapper.a ;
|
||||
|
||||
# symlinks for ABI abstraction
|
||||
AddSymlinkToHaikuImage develop abi : $(arch)/$(abi) : current ;
|
||||
AddSymlinkToHaikuImage develop lib : /boot/develop/abi/current/lib
|
||||
: $(arch) ;
|
||||
AddSymlinkToHaikuImage develop tools
|
||||
: /boot/develop/abi/current/tools/current : gnupro ;
|
||||
AddSymlinkToHaikuImage develop headers
|
||||
: /boot/develop/abi/current/headers/cpp ;
|
||||
AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
|
||||
: /boot/common/lib : common : true ;
|
||||
AddSymlinkToHaikuHybridImage $(abiDirTokens) library-paths
|
||||
: /boot/home/config/lib : home : true ;
|
||||
AddFilesToHaikuImage $(developDirTokens) lib : libposix_error_mapper.a ;
|
||||
|
||||
# ABI independent stuff
|
||||
|
||||
@ -688,7 +654,8 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
;
|
||||
SEARCH on $(makefileEngineFiles)
|
||||
= [ FDirName $(HAIKU_TOP) data develop ] ;
|
||||
AddFilesToHaikuImage develop etc : $(makefileEngineFiles) ;
|
||||
AddFilesToHaikuImage common develop etc
|
||||
: $(makefileEngineFiles) ;
|
||||
|
||||
# headers
|
||||
AddHeaderDirectoryToHaikuImage config ;
|
||||
@ -697,7 +664,7 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
AddHeaderDirectoryToHaikuImage posix ;
|
||||
|
||||
# create be -> os symlink for now
|
||||
AddSymlinkToHaikuImage develop headers : os : be ;
|
||||
AddSymlinkToHaikuImage $(developDirTokens) headers : os : be ;
|
||||
|
||||
# BSD and GNU compatibility headers
|
||||
AddHeaderDirectoryToHaikuImage compatibility bsd : bsd ;
|
||||
@ -715,10 +682,8 @@ if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] && $(TARGET_ARCH) = x86 {
|
||||
# cpp headers
|
||||
if $(HAIKU_GCC_VERSION[1]) = 2 {
|
||||
# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
|
||||
CopyDirectoryToHaikuImage $(abiDirTokens) headers
|
||||
: [ FDirName $(HAIKU_TOP) headers cpp ] : : -x .svn ;
|
||||
CopyDirectoryToAlternativeGCCArchive $(abiDirTokens) headers
|
||||
: [ FDirName $(HAIKU_TOP) headers cpp ] : : -x .svn ;
|
||||
CopyDirectoryToHaikuImage $(developDirTokens) headers c++
|
||||
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 : -x .svn ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -783,9 +748,13 @@ if [ IsOptionalHaikuImagePackageAdded Fastdep ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded friss ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package friss available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage friss-0.5pre7-x86-gcc4.zip
|
||||
: $(baseURL)/friss-0.5pre7-x86-gcc4.zip
|
||||
: : true ;
|
||||
} else {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
friss-24-r1a3-x86-gcc4-2011-05-31.zip
|
||||
: $(baseURL)/friss-24-r1a3-x86-gcc4-2011-05-31.zip ;
|
||||
} else {
|
||||
@ -889,26 +858,14 @@ if [ IsOptionalHaikuImagePackageAdded ICU ] {
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_2_PACKAGE)
|
||||
: $(baseURL)/$(HAIKU_ICU_GCC_2_PACKAGE)
|
||||
: system lib ;
|
||||
if $(isHybridBuild) {
|
||||
# unzip gcc4 to gcc4 subdir
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_4_PACKAGE)
|
||||
: $(baseURL)/$(HAIKU_ICU_GCC_4_PACKAGE)
|
||||
: system lib gcc4 ;
|
||||
}
|
||||
} else {
|
||||
# unzip gcc4
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_4_PACKAGE)
|
||||
: $(baseURL)/$(HAIKU_ICU_GCC_4_PACKAGE)
|
||||
: system lib ;
|
||||
if $(isHybridBuild) {
|
||||
# unzip gcc2 to gcc2 subdir
|
||||
InstallOptionalHaikuImagePackage $(HAIKU_ICU_GCC_2_PACKAGE)
|
||||
: $(baseURL)/$(HAIKU_ICU_GCC_2_PACKAGE)
|
||||
: system lib gcc2 ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# ICU-devel
|
||||
@ -921,9 +878,9 @@ if [ IsOptionalHaikuImagePackageAdded ICU-devel ] {
|
||||
for abiVersionedLib in $(HAIKU_ICU_LIBS) {
|
||||
abiVersionedLib = $(abiVersionedLib:G=) ;
|
||||
local lib = $(abiVersionedLib:B) ;
|
||||
AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
|
||||
: /system/lib $(abiVersionedLib) : : true ;
|
||||
AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
|
||||
AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
|
||||
: /system/lib $(abiVersionedLib) ;
|
||||
AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
|
||||
: $(abiVersionedLib) : $(lib) ;
|
||||
}
|
||||
}
|
||||
@ -991,7 +948,7 @@ if [ IsOptionalHaikuImagePackageAdded LibIconv ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded LibLayout ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package LibLayout available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package LibLayout available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage liblayout-1.4.0-gcc2-2009-03-08.zip
|
||||
@ -1005,11 +962,11 @@ if [ IsOptionalHaikuImagePackageAdded Libmng ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package Libmng available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
libmng-1.0.10-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/lib/libmng-1.0.10-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
libmng-1.0.10-r1a3-x86-gcc2-2011-05-18.zip
|
||||
: $(baseURL)/lib/libmng-1.0.10-r1a3-x86-gcc2-2011-05-18.zip ;
|
||||
}
|
||||
@ -1041,7 +998,7 @@ if [ IsOptionalHaikuImagePackageAdded LibXSLT ] {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
libxslt-1.1.26-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/libxslt-1.1.26-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
: $(baseURL)/libxslt-1.1.26-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
libxslt-1.1.26-r1a3-x86-gcc2-2011-05-18.zip
|
||||
@ -1055,7 +1012,7 @@ if [ IsOptionalHaikuImagePackageAdded LibXSLT ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded Links ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package Links available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package Links available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage Links.zip
|
||||
@ -1093,7 +1050,7 @@ if [ IsOptionalHaikuImagePackageAdded Man ] {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
man-1.6f-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/man-1.6f-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
: $(baseURL)/man-1.6f-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
man-1.6f-r1a3-x86-gcc2-2011-05-18.zip
|
||||
@ -1167,11 +1124,13 @@ if [ IsOptionalHaikuImagePackageAdded Neon ] {
|
||||
# NetFS network file system
|
||||
if [ IsOptionalHaikuImagePackageAdded NetFS ] {
|
||||
# userlandfs module
|
||||
AddFilesToHaikuImage home config add-ons userlandfs : netfs ;
|
||||
AddFilesToHaikuImage home config add-ons userlandfs
|
||||
: netfs ;
|
||||
|
||||
# servers
|
||||
AddFilesToHaikuImage system servers : netfs_server ;
|
||||
AddFilesToHaikuImage system servers : authentication_server ;
|
||||
AddFilesToHaikuImage system servers
|
||||
: authentication_server ;
|
||||
|
||||
# tools
|
||||
AddFilesToHaikuImage system bin : netfs_config ;
|
||||
@ -1197,10 +1156,10 @@ if [ IsOptionalHaikuImagePackageAdded NetFS ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded NetSurf ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package NetSurf available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package NetSurf available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
netsurf-2.7-r1a3-x86-gcc2-2011-06-04.zip
|
||||
: $(baseURL)/netsurf-2.7-r1a3-x86-gcc2-2011-06-04.zip ;
|
||||
AddSymlinkToHaikuImage home config be Applications
|
||||
@ -1213,7 +1172,7 @@ if [ IsOptionalHaikuImagePackageAdded NetSurf ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded OCaml ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package OCaml available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package OCaml available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
@ -1309,11 +1268,11 @@ if [ IsOptionalHaikuImagePackageAdded Paladin ] {
|
||||
Echo "No optional package Paladin available for $(TARGET_ARCH)" ;
|
||||
} else {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
paladin-1.3-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/paladin-1.3-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
paladin-1.3-r1a3-x86-gcc2-2011-05-18.zip
|
||||
: $(baseURL)/paladin-1.3-r1a3-x86-gcc2-2011-05-18.zip ;
|
||||
}
|
||||
@ -1332,7 +1291,7 @@ if [ IsOptionalHaikuImagePackageAdded PCRE ] {
|
||||
Echo "No optional package PCRE available for $(TARGET_ARCH)" ;
|
||||
} else {
|
||||
if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
libpcre-8.12-r1a3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/libpcre-8.12-r1a3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
@ -1503,7 +1462,7 @@ if [ IsOptionalHaikuImagePackageAdded TagLib ] {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
InstallOptionalHaikuImagePackage
|
||||
taglib-1.6.3-r1r3-x86-gcc4-2011-05-24.zip
|
||||
: $(baseURL)/taglib-1.6.3-r1r3-x86-gcc4-2011-05-24.zip ;
|
||||
: $(baseURL)/taglib-1.6.3-r1r3-x86-gcc4-2011-05-24.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
taglib-1.6.3-r1a3-x86-gcc2-2011-05-20.zip
|
||||
@ -1572,7 +1531,8 @@ if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
|
||||
local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
|
||||
|
||||
# kernel module
|
||||
AddFilesToHaikuImage system add-ons kernel file_systems : userlandfs ;
|
||||
AddFilesToHaikuImage system add-ons kernel file_systems
|
||||
: userlandfs ;
|
||||
|
||||
# server
|
||||
AddFilesToHaikuImage system servers : userlandfs_server ;
|
||||
@ -1583,7 +1543,7 @@ if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
|
||||
libuserlandfs_haiku_kernel.so
|
||||
libuserlandfs_fuse.so
|
||||
;
|
||||
AddFilesToHaikuHybridImage system lib : $(userlandfsLibs) : : true ;
|
||||
AddFilesToHaikuImage system lib : $(userlandfsLibs) ;
|
||||
|
||||
# development goodies
|
||||
if [ IsOptionalHaikuImagePackageAdded DevelopmentMin ] {
|
||||
@ -1597,8 +1557,6 @@ if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
|
||||
for lib in $(userlandfsLibs) {
|
||||
AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
|
||||
: /system/lib/$(lib:BS) ;
|
||||
AddSymlinkToAlternativeGCCArchive develop abi $(arch) $(abi) lib
|
||||
: /system/lib/$(arch)/$(lib:BS) ;
|
||||
}
|
||||
|
||||
# FUSE headers
|
||||
@ -1650,7 +1608,7 @@ if [ IsOptionalHaikuImagePackageAdded Vision ] {
|
||||
InstallOptionalHaikuImagePackage vision-908-r1a3-x86-gcc4-2011-06-07.zip
|
||||
: $(baseURL)/vision-908-r1a3-x86-gcc4-2011-06-07.zip ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
InstallOptionalHaikuImagePackage
|
||||
vision-908-r1a3-x86-gcc2-2011-06-07.zip
|
||||
: $(baseURL)/vision-908-r1a3-x86-gcc2-2011-06-07.zip ;
|
||||
}
|
||||
@ -1664,7 +1622,7 @@ if [ IsOptionalHaikuImagePackageAdded Vision ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded WebPositive ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package WebPositive available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) < 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) < 4 {
|
||||
Echo "No optional package WebPositive available for gcc2" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage
|
||||
@ -1685,9 +1643,11 @@ if [ IsOptionalHaikuImagePackageAdded Welcome ] {
|
||||
: [ FDirName $(HAIKU_TOP) docs userguide ]
|
||||
: userguide : -x .svn ;
|
||||
AddSymlinkToHaikuImage home Desktop
|
||||
: /boot/system/documentation/welcome/welcome_en.html : Welcome ;
|
||||
: /boot/system/documentation/welcome/welcome_en.html
|
||||
: Welcome ;
|
||||
AddSymlinkToHaikuImage home Desktop
|
||||
: /boot/system/documentation/userguide/en/contents.html : User\ Guide ;
|
||||
: /boot/system/documentation/userguide/en/contents.html
|
||||
: User\ Guide ;
|
||||
}
|
||||
|
||||
|
||||
@ -1707,18 +1667,21 @@ if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
|
||||
http://bu3sch.de/b43/fwcutter/$(broadcomFWCutterArchive) ;
|
||||
local broadcomFWCutterFile = [ DownloadFile $(broadcomFWCutterArchive)
|
||||
: $(broadcomFWCutterURL) ] ;
|
||||
AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
|
||||
AddFilesToHaikuImage
|
||||
system data firmware broadcom43xx b43-fwcutter
|
||||
: $(broadcomFWCutterFile) ;
|
||||
|
||||
# headers needed to compile firmware cutter
|
||||
local glibcDir = [ FDirName
|
||||
$(HAIKU_TOP) src system libroot posix glibc ] ;
|
||||
local byteswapHeader = [ FDirName $(glibcDir) string byteswap.h ] ;
|
||||
AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter
|
||||
AddFilesToHaikuImage
|
||||
system data firmware broadcom43xx b43-fwcutter
|
||||
: $(byteswapHeader) ;
|
||||
local bitByteswapHeader = [ FDirName
|
||||
$(glibcDir) include arch x86 bits byteswap.h ] ;
|
||||
AddFilesToHaikuImage system data firmware broadcom43xx b43-fwcutter bits
|
||||
AddFilesToHaikuImage
|
||||
system data firmware broadcom43xx b43-fwcutter bits
|
||||
: $(bitByteswapHeader) ;
|
||||
|
||||
# file containing firmware
|
||||
@ -1732,7 +1695,8 @@ if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
|
||||
local marvelArchive = malo-firmware-1.4.tgz ;
|
||||
local marvelURL = http://www.nazgul.ch/malo/$(marvelArchive) ;
|
||||
local marvelFile = [ DownloadFile $(marvelArchive) : $(marvelURL) ] ;
|
||||
AddFilesToHaikuImage system data firmware marvell88w8335
|
||||
AddFilesToHaikuImage
|
||||
system data firmware marvell88w8335
|
||||
: $(marvelFile) ;
|
||||
}
|
||||
}
|
||||
@ -1742,7 +1706,7 @@ if [ IsOptionalHaikuImagePackageAdded WifiFirmwareScriptData ] {
|
||||
if [ IsOptionalHaikuImagePackageAdded WonderBrush ] {
|
||||
if $(TARGET_ARCH) != x86 {
|
||||
Echo "No optional package WonderBrush available for $(TARGET_ARCH)" ;
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 && ! $(isHybridBuild) {
|
||||
} else if $(HAIKU_GCC_VERSION[1]) >= 4 {
|
||||
Echo "No optional package WonderBrush available for gcc4" ;
|
||||
} else {
|
||||
InstallOptionalHaikuImagePackage WonderBrush-2.1.2.zip
|
||||
|
@ -137,14 +137,6 @@ AddOptionalHaikuImagePackages WonderBrush ;
|
||||
AddOptionalHaikuImagePackages WebPositive ;
|
||||
SuppressOptionalHaikuImagePackages SQLite ;
|
||||
|
||||
# Don't add the libraries built with the alternative gcc version.
|
||||
# If the alternative gcc generated directory has been specified via the
|
||||
# configure option --alternative-gcc-output-dir, the libraries for the
|
||||
# alternative gcc version are added by default. Unsetting this variable disables
|
||||
# building and adding the libraries. Ignored, if --alternative-gcc-output-dir
|
||||
# was not specified.
|
||||
HAIKU_ADD_ALTERNATIVE_GCC_LIBS = 0 ;
|
||||
|
||||
# Specify scripts that shall be run when populating the image/installation
|
||||
# directory. The "early" script is run before anything has been copied onto
|
||||
# the image/into the installation directory. The "late" script is run after
|
||||
|
@ -27,6 +27,3 @@
|
||||
|
||||
# Add the optional package WonderBrush to the image.
|
||||
#AddOptionalHaikuImagePackages WonderBrush ;
|
||||
|
||||
# Don't add the libraries built with the alternative gcc version.
|
||||
#HAIKU_ADD_ALTERNATIVE_GCC_LIBS = 0 ;
|
||||
|
@ -163,19 +163,23 @@ extractFile()
|
||||
targetExtractedDir=$2
|
||||
extractedSubDir=$3
|
||||
|
||||
echo "Extracting $archiveFile ..."
|
||||
|
||||
extractDir=$tmpDir/extract
|
||||
$rmAttrs -rf "$extractDir"
|
||||
mkdir -p "$extractDir"
|
||||
|
||||
case "$archiveFile" in
|
||||
*.zip)
|
||||
echo "Extracting $archiveFile ..."
|
||||
$unzip -q -d "$extractDir" "$archiveFile"
|
||||
;;
|
||||
*.tgz|*.tar.gz)
|
||||
echo "Extracting $archiveFile ..."
|
||||
tar -C "$extractDir" -xf "$archiveFile"
|
||||
;;
|
||||
*.hpkg)
|
||||
echo "Adding package $archiveFile ..."
|
||||
cp "$archiveFile" "$extractDir"
|
||||
;;
|
||||
*)
|
||||
echo "Unhandled archive extension in build_haiku_image extractFile()"
|
||||
exit 1
|
||||
|
28
configure
vendored
28
configure
vendored
@ -12,20 +12,6 @@ usage()
|
||||
|
||||
Usage: $0 <options>
|
||||
options:
|
||||
--alternative-gcc-output-dir <dir>
|
||||
Build a Haiku installation that supports running
|
||||
executables built with a gcc version incompatible
|
||||
with the primary gcc (e.g. gcc 2 executables under
|
||||
a gcc 4 Haiku or vice versa). <dir> specifies the
|
||||
output directory of the other gcc. The directory
|
||||
must already be fully configured.
|
||||
Note, that a sub-jam will be executed when
|
||||
building Haiku. When using a jam that is not
|
||||
simply invoked by "jam", the JAM build variable
|
||||
needs to be set accordingly.
|
||||
To disable building the alternative libraries
|
||||
the variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS can be
|
||||
unset in the UserBuildConfig file.
|
||||
--build-cross-tools <build tools dir>
|
||||
Assume cross compilation. <build tools dir>
|
||||
defines the location of the build tools sources.
|
||||
@ -320,14 +306,12 @@ TARGET_PLATFORM=haiku
|
||||
HAIKU_USE_GCC_PIPE=0
|
||||
HAIKU_HOST_USE_32BIT=0
|
||||
HAIKU_HOST_USE_XATTR=0
|
||||
HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=
|
||||
HAIKU_ADD_ALTERNATIVE_GCC_LIBS=0
|
||||
HOST_GCC_LD=`gcc -print-prog-name=ld`
|
||||
HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy`
|
||||
SFDISK_BINARY=sfdisk
|
||||
HOST_SFDISK=$SFDISK_BINARY
|
||||
|
||||
haikuRequiredLegacyGCCVersion="2.95.3-haiku-100818"
|
||||
haikuRequiredLegacyGCCVersion="2.95.3-110228"
|
||||
export haikuRequiredLegacyGCCVersion
|
||||
# version of legacy gcc required to build haiku
|
||||
|
||||
@ -377,14 +361,6 @@ fi
|
||||
#
|
||||
while [ $# -gt 0 ] ; do
|
||||
case "$1" in
|
||||
--alternative-gcc-output-dir)
|
||||
assertparam "$1" $#
|
||||
cd $2 || exit 1
|
||||
HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=`pwd`
|
||||
HAIKU_ADD_ALTERNATIVE_GCC_LIBS=1
|
||||
cd $currentDir
|
||||
shift 2
|
||||
;;
|
||||
--build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;;
|
||||
--build-cross-tools-gcc4)
|
||||
assertparams "$1" 2 $#
|
||||
@ -558,8 +534,6 @@ HAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ;
|
||||
HAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ;
|
||||
HAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ;
|
||||
HAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ;
|
||||
HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR ?= ${HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR} ;
|
||||
HAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= ${HAIKU_ADD_ALTERNATIVE_GCC_LIBS} ;
|
||||
|
||||
HAIKU_GCC_RAW_VERSION ?= ${HAIKU_GCC_RAW_VERSION} ;
|
||||
HAIKU_GCC_MACHINE ?= ${HAIKU_GCC_MACHINE} ;
|
||||
|
@ -6,8 +6,10 @@
|
||||
export HOME=/boot/home
|
||||
export LC_CTYPE="en_US.UTF-8"
|
||||
|
||||
BUILDHOME=/boot/develop
|
||||
BETOOLS="$BUILDHOME/tools/gnupro/bin"
|
||||
BUILDHOME=/boot/system/develop
|
||||
|
||||
#TODO: fix this or drop it!
|
||||
BETOOLS="/boot/common/settings/develop/tools/current/bin"
|
||||
|
||||
case `uname -m` in
|
||||
BePC|Intel|unknown)
|
||||
@ -20,7 +22,9 @@ BeMac|BeBox)
|
||||
BE_HOST_CPU=unknown
|
||||
esac
|
||||
|
||||
BELIBRARIES="$BUILDHOME/abi/current/library-paths/common:$BUILDHOME/lib/$BE_HOST_CPU"
|
||||
BELIBRARIES="/boot/common/non-packaged/lib:/boot/common/lib:$BUILDHOME/lib"
|
||||
|
||||
# not used by Haiku, but probably by legacy applications (BeIDE?)
|
||||
BH=$BUILDHOME/headers
|
||||
BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/locale;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/Deskbar;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker"
|
||||
|
||||
@ -40,13 +44,13 @@ export BE_DEFAULT_CPLUS_FLAGS=""
|
||||
|
||||
if [ "$SAFEMODE" != "yes" ]
|
||||
then
|
||||
export PATH=.:$HOME/config/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
|
||||
export LIBRARY_PATH="%A/lib:$HOME/config/lib:/boot/common/lib:/boot/system/lib"
|
||||
export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/common/add-ons:/boot/system/add-ons"
|
||||
export PATH=.:$HOME/config/non-packaged/bin:$HOME/config/bin:/boot/common/non-packaged/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
|
||||
export LIBRARY_PATH="%A/lib:$HOME/config/non-packaged/lib:$HOME/config/lib:/boot/common/non-packaged/lib:/boot/common/lib:/boot/system/lib"
|
||||
export ADDON_PATH="%A/add-ons:$HOME/config/non-packaged/add-ons:$HOME/config/add-ons:/boot/common/non-packaged/add-ons:/boot/common/add-ons:/boot/system/add-ons"
|
||||
else
|
||||
export PATH=.:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
|
||||
export LIBRARY_PATH="%A/lib:/boot/common/lib:/boot/system/lib"
|
||||
export ADDON_PATH="%A/add-ons:/boot/common/add-ons:/boot/system/add-ons"
|
||||
export PATH=.:/bin:/boot/apps:/boot/system/apps:/boot/system/preferences:$BETOOLS
|
||||
export LIBRARY_PATH="%A/lib:/boot/system/lib"
|
||||
export ADDON_PATH="%A/add-ons:/boot/system/add-ons"
|
||||
fi
|
||||
|
||||
# media kit
|
||||
|
@ -9,6 +9,7 @@
|
||||
/* Determine the architecture and define macros for some fundamental
|
||||
properties:
|
||||
__HAIKU_ARCH - short name of the architecture (used in paths)
|
||||
__HAIKU_ARCH_ABI - name of ABI (as in package architecture)
|
||||
__HAIKU_ARCH_<arch> - defined to 1 for the respective architecture
|
||||
__HAIKU_ARCH_BITS - defined to 32/64 on 32/64 bit architectures
|
||||
(defaults to 32)
|
||||
@ -19,25 +20,35 @@
|
||||
*/
|
||||
#ifdef __INTEL__
|
||||
# define __HAIKU_ARCH x86
|
||||
# if __GNUC__ == 2
|
||||
# define __HAIKU_ARCH_ABI "x86_gcc2"
|
||||
# else
|
||||
# define __HAIKU_ARCH_ABI "x86"
|
||||
# endif
|
||||
# define __HAIKU_ARCH_X86 1
|
||||
# define __HAIKU_ARCH_PHYSICAL_BITS 64
|
||||
#elif __x86_64__
|
||||
# define __HAIKU_ARCH x86_64
|
||||
# define __HAIKU_ARCH_ABI "x86_64"
|
||||
# define __HAIKU_ARCH_X86_64 1
|
||||
# define __HAIKU_ARCH_BITS 64
|
||||
#elif __POWERPC__
|
||||
# define __HAIKU_ARCH ppc
|
||||
# define __HAIKU_ARCH_ABI "ppc"
|
||||
# define __HAIKU_ARCH_PPC 1
|
||||
# define __HAIKU_BIG_ENDIAN 1
|
||||
#elif __M68K__
|
||||
# define __HAIKU_ARCH m68k
|
||||
# define __HAIKU_ARCH_ABI "m68k"
|
||||
# define __HAIKU_ARCH_M68K 1
|
||||
# define __HAIKU_BIG_ENDIAN 1
|
||||
#elif __MIPSEL__
|
||||
# define __HAIKU_ARCH mipsel
|
||||
# define __HAIKU_ARCH_ABI "mipsel"
|
||||
# define __HAIKU_ARCH_MIPSEL 1
|
||||
#elif __ARM__
|
||||
# define __HAIKU_ARCH arm
|
||||
# define __HAIKU_ARCH_ABI "arm"
|
||||
# define __HAIKU_ARCH_ARM 1
|
||||
#else
|
||||
# error Unsupported architecture!
|
||||
|
@ -39,6 +39,8 @@
|
||||
#define B_HAIKU_ABI_GCC_2_BEOS 0x00020001
|
||||
#define B_HAIKU_ABI_GCC_2_HAIKU 0x00020002
|
||||
|
||||
#define B_HAIKU_ABI_NAME __HAIKU_ARCH_ABI
|
||||
|
||||
#if __GNUC__ == 2
|
||||
# define B_HAIKU_ABI B_HAIKU_ABI_GCC_2_HAIKU
|
||||
#elif __GNUC__ == 4
|
||||
|
@ -29,6 +29,9 @@ typedef enum {
|
||||
B_SYSTEM_MEDIA_NODES_DIRECTORY,
|
||||
B_SYSTEM_SOUNDS_DIRECTORY,
|
||||
B_SYSTEM_DATA_DIRECTORY,
|
||||
B_SYSTEM_DEVELOP_DIRECTORY,
|
||||
B_SYSTEM_PACKAGES_DIRECTORY,
|
||||
B_SYSTEM_HEADERS_DIRECTORY,
|
||||
|
||||
/* Common directories, shared among all users. */
|
||||
B_COMMON_DIRECTORY = 2000,
|
||||
@ -52,6 +55,19 @@ typedef enum {
|
||||
B_COMMON_SOUNDS_DIRECTORY,
|
||||
B_COMMON_DATA_DIRECTORY,
|
||||
B_COMMON_CACHE_DIRECTORY,
|
||||
B_COMMON_PACKAGES_DIRECTORY,
|
||||
B_COMMON_HEADERS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_BIN_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_FONTS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_LIB_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_HEADERS_DIRECTORY,
|
||||
|
||||
/* User directories. These are interpreted in the context
|
||||
of the user making the find_directory call. */
|
||||
@ -69,11 +85,25 @@ typedef enum {
|
||||
B_USER_SOUNDS_DIRECTORY,
|
||||
B_USER_DATA_DIRECTORY,
|
||||
B_USER_CACHE_DIRECTORY,
|
||||
B_USER_PACKAGES_DIRECTORY,
|
||||
B_USER_HEADERS_DIRECTORY,
|
||||
B_USER_NONPACKAGED_DIRECTORY,
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_NONPACKAGED_TRANSLATORS_DIRECTORY,
|
||||
B_USER_NONPACKAGED_MEDIA_NODES_DIRECTORY,
|
||||
B_USER_NONPACKAGED_BIN_DIRECTORY,
|
||||
B_USER_NONPACKAGED_DATA_DIRECTORY,
|
||||
B_USER_NONPACKAGED_FONTS_DIRECTORY,
|
||||
B_USER_NONPACKAGED_SOUNDS_DIRECTORY,
|
||||
B_USER_NONPACKAGED_DOCUMENTATION_DIRECTORY,
|
||||
B_USER_NONPACKAGED_LIB_DIRECTORY,
|
||||
B_USER_NONPACKAGED_HEADERS_DIRECTORY,
|
||||
|
||||
/* Global directories. */
|
||||
B_APPS_DIRECTORY = 4000,
|
||||
B_PREFERENCES_DIRECTORY,
|
||||
B_UTILITIES_DIRECTORY,
|
||||
B_PACKAGE_LINKS_DIRECTORY,
|
||||
|
||||
/* Obsolete: Legacy BeOS definition to be phased out */
|
||||
B_BEOS_DIRECTORY = 1000,
|
||||
|
68
headers/private/libroot/directories.h
Normal file
68
headers/private/libroot/directories.h
Normal file
@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _LIBROOT_DIRECTORIES_H
|
||||
#define _LIBROOT_DIRECTORIES_H
|
||||
|
||||
|
||||
#define kGlobalBinDirectory "/bin"
|
||||
#define kGlobalEtcDirectory "/etc"
|
||||
#define kGlobalPackageLinksDirectory "/package-links"
|
||||
#define kGlobalSystemDirectory "/system"
|
||||
#define kGlobalTempDirectory "/tmp"
|
||||
#define kGlobalVarDirectory "/var"
|
||||
|
||||
#define kAppsDirectory "/boot/apps"
|
||||
#define kPreferencesDirectory "/boot/preferences"
|
||||
|
||||
#define kAppLocalAddonsDirectory "%A/add-ons"
|
||||
#define kAppLocalLibDirectory "%A/lib"
|
||||
|
||||
#define kVolumeLocalSystemKernelAddonsDirectory "system/add-ons/kernel"
|
||||
#define kVolumeLocalCommonNonpackagedKernelAddonsDirectory \
|
||||
"common/non-packaged/add-ons/kernel"
|
||||
#define kVolumeLocalCommonKernelAddonsDirectory "common/add-ons/kernel"
|
||||
#define kVolumeLocalUserNonpackagedKernelAddonsDirectory \
|
||||
"home/config/non-packaged/add-ons/kernel"
|
||||
#define kVolumeLocalUserKernelAddonsDirectory "home/config/add-ons/kernel"
|
||||
|
||||
#define kSystemDirectory "/boot/system"
|
||||
#define kSystemAddonsDirectory "/boot/system/add-ons"
|
||||
#define kSystemAppsDirectory "/boot/system/apps"
|
||||
#define kSystemBinDirectory "/boot/system/bin"
|
||||
#define kSystemDataDirectory "/boot/system/data"
|
||||
#define kSystemDevelopDirectory "/boot/system/develop"
|
||||
#define kSystemLibDirectory "/boot/system/lib"
|
||||
#define kSystemPackagesDirectory "/boot/system/packages"
|
||||
#define kSystemPreferencesDirectory "/boot/system/preferences"
|
||||
#define kSystemServersDirectory "/boot/system/servers"
|
||||
|
||||
#define kCommonDirectory "/boot/common"
|
||||
#define kCommonAddonsDirectory "/boot/common/add-ons"
|
||||
#define kCommonBinDirectory "/boot/common/bin"
|
||||
#define kCommonDevelopToolsBinDirectory "/boot/common/develop/tools/current/bin"
|
||||
#define kCommonEtcDirectory "/boot/common/settings/etc"
|
||||
#define kCommonLibDirectory "/boot/common/lib"
|
||||
#define kCommonPackagesDirectory "/boot/common/packages"
|
||||
#define kCommonSettingsDirectory "/boot/common/settings"
|
||||
#define kCommonTempDirectory "/boot/common/cache/tmp"
|
||||
#define kCommonVarDirectory "/boot/common/var"
|
||||
#define kCommonLogDirectory "/boot/common/var/log"
|
||||
#define kCommonNonpackagedAddonsDirectory "/boot/common/non-packaged/add-ons"
|
||||
#define kCommonNonpackagedBinDirectory "/boot/common/non-packaged/bin"
|
||||
#define kCommonNonpackagedLibDirectory "/boot/common/non-packaged/lib"
|
||||
|
||||
#define kUserDirectory "/boot/home"
|
||||
#define kUserConfigDirectory "/boot/home/config"
|
||||
#define kUserAddonsDirectory "/boot/home/config/add-ons"
|
||||
#define kUserBinDirectory "/boot/home/config/bin"
|
||||
#define kUserLibDirectory "/boot/home/config/lib"
|
||||
#define kUserPackagesDirectory "/boot/home/config/packages"
|
||||
#define kUserSettingsDirectory "/boot/home/config/settings"
|
||||
#define kUserNonpackagedAddonsDirectory "/boot/home/config/non-packaged/add-ons"
|
||||
#define kUserNonpackagedBinDirectory "/boot/home/config/non-packaged/bin"
|
||||
#define kUserNonpackagedLibDirectory "/boot/home/config/non-packaged/lib"
|
||||
|
||||
|
||||
#endif // _LIBROOT_DIRECTORIES_H
|
@ -191,7 +191,7 @@ ScreenSaverFilter::_Invoke()
|
||||
BPath path;
|
||||
if (find_directory(B_SYSTEM_BIN_DIRECTORY, &path) != B_OK
|
||||
|| path.Append("screen_blanker") != B_OK)
|
||||
path.SetTo("/boot/system/bin/screen_blanker");
|
||||
path.SetTo("/bin/screen_blanker");
|
||||
BEntry entry(path.Path());
|
||||
entry_ref ref;
|
||||
if (entry.GetRef(&ref) == B_OK
|
||||
|
@ -16,16 +16,19 @@
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include <Roster.h>
|
||||
#include <List.h>
|
||||
#include <Entry.h>
|
||||
#include <Directory.h>
|
||||
#include <Entry.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <List.h>
|
||||
#include <Path.h>
|
||||
#include <Roster.h>
|
||||
#include <String.h>
|
||||
#include <SupportKit.h>
|
||||
|
||||
|
||||
// This char is used to hold words together into single words...
|
||||
#define GUNK_CHAR 0x01
|
||||
#define PATHTOTRACKER "/boot/system/Tracker"
|
||||
#define PATHTOTRACKER "/system/Tracker"
|
||||
|
||||
// Turn all spaces that are not-to-be-counted-as-spaces into GUNK_CHAR chars.
|
||||
static void
|
||||
@ -299,11 +302,14 @@ LaunchCommand(char** argv, int32 argc)
|
||||
// Hack way to do this--really I should be able to do this by
|
||||
// sending a BMessage. But how? When I finally get my copy of the
|
||||
// BeOS Bible, maybe then I'll find out.
|
||||
const char* trackerFile = PATHTOTRACKER;
|
||||
char* temp = new char[strlen(trackerFile) + strlen(argv[0]) + 10];
|
||||
sprintf(temp, "%s '%s'", trackerFile, argv[0]);
|
||||
system(temp);
|
||||
delete [] temp;
|
||||
BPath trackerPath;
|
||||
if (find_directory(B_SYSTEM_DIRECTORY, &trackerPath) != B_OK
|
||||
|| trackerPath.Append("Tracker") != B_OK) {
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
BString cmd(trackerPath.Path());
|
||||
cmd << " '" << argv[0] << "'";
|
||||
system(cmd.String());
|
||||
return B_NO_ERROR;
|
||||
} else {
|
||||
// It's not a directory. Must be a file.
|
||||
|
@ -5,6 +5,7 @@
|
||||
# include <debug.h>
|
||||
#endif
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
#include <image.h>
|
||||
#include <ctype.h>
|
||||
@ -26,7 +27,7 @@
|
||||
#define MAX_FAILS_BEFORE_BSOD 0
|
||||
|
||||
#ifdef __HAIKU__
|
||||
# define FORTUNE_FILE "/boot/system/data/fortunes/Fortunes"
|
||||
# define FORTUNE_FILE kSystemDataDirectory "/fortunes/Fortunes"
|
||||
#else
|
||||
# define FORTUNE_FILE "/etc/fortunes/default"
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 auich ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) ] ;
|
||||
|
||||
|
@ -28,23 +28,32 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "auich.h"
|
||||
|
||||
|
||||
#if DEBUG > 0
|
||||
static const char * logfile="/boot/home/auich.log";
|
||||
static const char *logfile = kCommonLogDirectory "/auich.log";
|
||||
static sem_id loglock;
|
||||
#endif
|
||||
|
||||
|
||||
void debug_printf(const char *text,...);
|
||||
void log_printf(const char *text,...);
|
||||
void log_create(void);
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -57,6 +66,7 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
|
||||
void log_create()
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -68,6 +78,7 @@ void log_create()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -92,4 +103,3 @@ void log_printf(const char *text,...)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 auvia ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) ] ;
|
||||
|
||||
|
@ -28,23 +28,32 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "auvia.h"
|
||||
|
||||
|
||||
#if DEBUG > 0
|
||||
static const char * logfile="/boot/home/auvia.log";
|
||||
static const char *logfile = kCommonLogDirectory "/auvia.log";
|
||||
static sem_id loglock;
|
||||
#endif
|
||||
|
||||
|
||||
void debug_printf(const char *text,...);
|
||||
void log_printf(const char *text,...);
|
||||
void log_create(void);
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -57,6 +66,7 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
|
||||
void log_create()
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -68,6 +78,7 @@ void log_create()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -92,4 +103,3 @@ void log_printf(const char *text,...)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 es1370 ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
|
||||
|
||||
KernelAddon es1370 :
|
||||
|
@ -8,24 +8,33 @@
|
||||
* Marcus Overhagen, marcus@overhagen.de
|
||||
* Jerome Duval, jerome.duval@free.fr
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "es1370.h"
|
||||
|
||||
|
||||
#if DEBUG > 0
|
||||
static const char * logfile="/boot/home/es1370.log";
|
||||
static const char *logfile = kCommonLogDirectory "/es1370.log";
|
||||
static sem_id loglock;
|
||||
#endif
|
||||
|
||||
|
||||
void debug_printf(const char *text,...);
|
||||
void log_printf(const char *text,...);
|
||||
void log_create(void);
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -38,6 +47,7 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
|
||||
void log_create()
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -49,6 +59,7 @@ void log_create()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -73,4 +84,3 @@ void log_printf(const char *text,...)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 ich ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
|
||||
KernelAddon ich_ac97 :
|
||||
ac97_multi.c
|
||||
|
@ -25,14 +25,21 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "ich.h"
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -45,11 +52,12 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
#if DEBUG > 0
|
||||
|
||||
static const char * logfile="/boot/home/ich_ac97.log";
|
||||
#if DEBUG > 0
|
||||
static const char *logfile = kCommonLogDirectory "/ich_ac97.log";
|
||||
static sem_id loglock;
|
||||
|
||||
|
||||
void log_create(void)
|
||||
{
|
||||
int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
@ -59,6 +67,7 @@ void log_create(void)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
int fd;
|
||||
@ -81,5 +90,4 @@ void log_printf(const char *text,...)
|
||||
snooze(150000);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic DSP ;
|
||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel ] # For kernel_cpp.cpp
|
||||
media ;
|
||||
libroot media ;
|
||||
|
||||
# set some additional defines
|
||||
SubDirCcFlags -DECHO_BEOS -DECHO24_FAMILY ;
|
||||
|
@ -13,7 +13,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic DSP ;
|
||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel ] # For kernel_cpp.cpp
|
||||
media ;
|
||||
libroot media ;
|
||||
|
||||
# set some additional defines
|
||||
SubDirCcFlags -DECHO_BEOS -DECHO3G_FAMILY ;
|
||||
|
@ -28,21 +28,30 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#if DEBUG > 0
|
||||
static const char * logfile="/boot/home/"DRIVER_NAME".log";
|
||||
static const char *logfile = kCommonLogDirectory "/" DRIVER_NAME ".log";
|
||||
static sem_id loglock;
|
||||
#endif
|
||||
|
||||
|
||||
void debug_printf(const char *text,...);
|
||||
void log_printf(const char *text,...);
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -55,6 +64,7 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
|
||||
void log_create()
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -66,6 +76,7 @@ void log_create()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -90,4 +101,3 @@ void log_printf(const char *text,...)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic DSP ;
|
||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel ] # For kernel_cpp.cpp
|
||||
media ;
|
||||
libroot media ;
|
||||
|
||||
# set some additional defines
|
||||
SubDirCcFlags -DECHO_BEOS -DECHOGALS_FAMILY ;
|
||||
|
@ -13,7 +13,7 @@ SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic DSP ;
|
||||
SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
|
||||
|
||||
UsePrivateHeaders [ FDirName kernel ] # For kernel_cpp.cpp
|
||||
media ;
|
||||
libroot media ;
|
||||
|
||||
# set some additional defines
|
||||
SubDirCcFlags -DECHO_BEOS -DINDIGO_FAMILY -DCARDBUS ;
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers audio emuxki ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
|
||||
KernelAddon emuxki :
|
||||
ac97.c
|
||||
|
@ -28,23 +28,32 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "emuxki.h"
|
||||
|
||||
|
||||
#if DEBUG > 0
|
||||
static const char * logfile="/boot/home/emuxki.log";
|
||||
static const char *logfile = kCommonLogDirectory "/emuxki.log";
|
||||
static sem_id loglock;
|
||||
#endif
|
||||
|
||||
|
||||
void debug_printf(const char *text,...);
|
||||
void log_printf(const char *text,...);
|
||||
void log_create(void);
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -57,6 +66,7 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
|
||||
void log_create()
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -68,6 +78,7 @@ void log_create()
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
#if DEBUG > 0
|
||||
@ -92,4 +103,3 @@ void log_printf(const char *text,...)
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers audio module_driver ;
|
||||
|
||||
UsePrivateHeaders media ;
|
||||
UsePrivateHeaders libroot media ;
|
||||
|
||||
KernelAddon audio_module_driver :
|
||||
audio_module_driver.c
|
||||
|
@ -8,15 +8,20 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <directories.h>
|
||||
#include <Drivers.h>
|
||||
#include <Errors.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include <malloc.h>
|
||||
#include <fcntl.h>
|
||||
#include <image.h>
|
||||
|
||||
#include "audio_module.h"
|
||||
|
||||
|
||||
int32 api_version = B_CUR_DRIVER_API_VERSION;
|
||||
|
||||
#define DRIVER_NAME "audio_module_driver"
|
||||
@ -29,6 +34,7 @@ void republish_devices(void);
|
||||
extern image_id load_kernel_addon(const char *path);
|
||||
extern status_t unload_kernel_addon(image_id imid);
|
||||
|
||||
|
||||
status_t
|
||||
init_hardware(void)
|
||||
{
|
||||
@ -36,6 +42,7 @@ init_hardware(void)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
init_driver(void)
|
||||
{
|
||||
@ -44,8 +51,9 @@ init_driver(void)
|
||||
status_t rv;
|
||||
void (*print_hello_world)(void);
|
||||
|
||||
id = load_kernel_addon("/boot/home/config/add-ons/kernel/media/audio/ich");
|
||||
get_image_symbol(id, "print_hello_world", B_SYMBOL_TYPE_TEXT, (void **) &print_hello_world);
|
||||
id = load_kernel_addon(kUserAddonsDirectory "/kernel/media/audio/ich");
|
||||
get_image_symbol(id, "print_hello_world", B_SYMBOL_TYPE_TEXT,
|
||||
(void **) &print_hello_world);
|
||||
print_hello_world();
|
||||
unload_kernel_addon(id);
|
||||
if (rv != B_OK)
|
||||
@ -71,12 +79,14 @@ init_driver(void)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
uninit_driver(void)
|
||||
{
|
||||
dprintf("audio_module_driver: uninit_driver\n");
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_open(const char *name, uint32 flags, void **cookie)
|
||||
{
|
||||
@ -84,6 +94,7 @@ audio_module_driver_open(const char *name, uint32 flags, void **cookie)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_close(void *cookie)
|
||||
{
|
||||
@ -91,6 +102,7 @@ audio_module_driver_close(void *cookie)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_free(void *cookie)
|
||||
{
|
||||
@ -98,6 +110,7 @@ audio_module_driver_free(void *cookie)
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_control(void *cookie, uint32 op, void *arg, size_t len)
|
||||
{
|
||||
@ -108,22 +121,28 @@ audio_module_driver_control(void *cookie, uint32 op, void *arg, size_t len)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_read(void *cookie, off_t position, void *buf, size_t *num_bytes)
|
||||
audio_module_driver_read(void *cookie, off_t position, void *buf,
|
||||
size_t *num_bytes)
|
||||
{
|
||||
*num_bytes = 0;
|
||||
return B_IO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
static status_t
|
||||
audio_module_driver_write(void *cookie, off_t position, const void *buffer, size_t *num_bytes)
|
||||
audio_module_driver_write(void *cookie, off_t position, const void *buffer,
|
||||
size_t *num_bytes)
|
||||
{
|
||||
static int keep_open_fd = -1;
|
||||
if (*num_bytes >= 5 && 0 == memcmp("start", buffer, 5) && keep_open_fd == -1) {
|
||||
if (*num_bytes >= 5 && 0 == memcmp("start", buffer, 5)
|
||||
&& keep_open_fd == -1) {
|
||||
keep_open_fd = open("/dev/audio/audio_module_driver", O_RDWR);
|
||||
return B_OK;
|
||||
}
|
||||
if (*num_bytes >= 4 && 0 == memcmp("stop", buffer, 4) && keep_open_fd != -1) {
|
||||
if (*num_bytes >= 4 && 0 == memcmp("stop", buffer, 4)
|
||||
&& keep_open_fd != -1) {
|
||||
close(keep_open_fd);
|
||||
keep_open_fd = -1;
|
||||
return B_OK;
|
||||
@ -136,6 +155,7 @@ audio_module_driver_write(void *cookie, off_t position, const void *buffer, size
|
||||
return B_IO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
static const char *ich_name[] = {
|
||||
"audio/" DRIVER_NAME,
|
||||
"audio/modules/foobar/1",
|
||||
@ -145,6 +165,7 @@ static const char *ich_name[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
device_hooks audio_module_driver_hooks = {
|
||||
audio_module_driver_open,
|
||||
audio_module_driver_close,
|
||||
@ -158,6 +179,7 @@ device_hooks audio_module_driver_hooks = {
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
const char**
|
||||
publish_devices(void)
|
||||
{
|
||||
@ -165,6 +187,7 @@ publish_devices(void)
|
||||
return ich_name;
|
||||
}
|
||||
|
||||
|
||||
device_hooks*
|
||||
find_device(const char *name)
|
||||
{
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics matrox ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics matrox ] ;
|
||||
|
||||
KernelAddon matrox :
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <KernelExport.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h> // for strtoXX
|
||||
@ -142,7 +143,7 @@ static void dumprom (void *rom, size_t size, pci_info pcii)
|
||||
char fname[64];
|
||||
|
||||
/* determine the romfile name: we need split-up per card in the system */
|
||||
sprintf (fname, "/boot/home/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
sprintf (fname, kUserDirectory "/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
pcii.vendor_id, pcii.device_id, pcii.bus, pcii.device, pcii.function);
|
||||
|
||||
fd = open (fname, O_WRONLY | O_CREAT, 0666);
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics neomagic ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics neomagic ] ;
|
||||
|
||||
KernelAddon neomagic :
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <ISA.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h> // for strtoXX
|
||||
@ -138,7 +139,8 @@ static void dumprom (void *rom, uint32 size)
|
||||
int fd;
|
||||
uint32 cnt;
|
||||
|
||||
fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
||||
fd = open (kUserDirectory "/" DRIVER_PREFIX ".rom",
|
||||
O_WRONLY | O_CREAT, 0666);
|
||||
if (fd < 0) return;
|
||||
|
||||
/* apparantly max. 32kb may be written at once;
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics nvidia ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics nvidia ] ;
|
||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <ISA.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -400,7 +401,7 @@ dumprom(void *rom, uint32 size, pci_info pcii)
|
||||
char fname[64];
|
||||
|
||||
/* determine the romfile name: we need split-up per card in the system */
|
||||
sprintf (fname, "/boot/home/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
sprintf (fname, kUserDirectory "//" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
pcii.vendor_id, pcii.device_id, pcii.bus, pcii.device, pcii.function);
|
||||
|
||||
fd = open (fname, O_WRONLY | O_CREAT, 0666);
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics nvidia_gpgpu ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics nvidia_gpgpu ] ;
|
||||
|
||||
KernelAddon nvidia_gpgpu :
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <ISA.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -160,7 +161,7 @@ dumprom(void *rom, uint32 size, pci_info pcii)
|
||||
char fname[64];
|
||||
|
||||
/* determine the romfile name: we need split-up per card in the system */
|
||||
sprintf (fname, "/boot/home/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
sprintf (fname, kUserDirectory "/" DRIVER_PREFIX "." DEVICE_FORMAT ".rom",
|
||||
pcii.vendor_id, pcii.device_id, pcii.bus, pcii.device, pcii.function);
|
||||
|
||||
fd = open (fname, O_WRONLY | O_CREAT, 0666);
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics skeleton ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics skeleton ] ;
|
||||
|
||||
KernelAddon skel.driver :
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <ISA.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h> // for strtoXX
|
||||
@ -130,7 +131,8 @@ static void dumprom (void *rom, uint32 size)
|
||||
int fd;
|
||||
uint32 cnt;
|
||||
|
||||
fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
||||
fd = open (kUserDirectory "/" DRIVER_PREFIX ".rom",
|
||||
O_WRONLY | O_CREAT, 0666);
|
||||
if (fd < 0) return;
|
||||
|
||||
/* apparantly max. 32kb may be written at once;
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers graphics via ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders graphics ;
|
||||
UsePrivateHeaders graphics libroot ;
|
||||
UsePrivateHeaders [ FDirName graphics via ] ;
|
||||
|
||||
KernelAddon via :
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <ISA.h>
|
||||
#include <PCI.h>
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
#include <malloc.h>
|
||||
#include <stdlib.h> // for strtoXX
|
||||
@ -135,7 +136,8 @@ static void dumprom (void *rom, uint32 size)
|
||||
int fd;
|
||||
uint32 cnt;
|
||||
|
||||
fd = open ("/boot/home/" DRIVER_PREFIX ".rom", O_WRONLY | O_CREAT, 0666);
|
||||
fd = open (kUserDirectory "/" DRIVER_PREFIX ".rom",
|
||||
O_WRONLY | O_CREAT, 0666);
|
||||
if (fd < 0) return;
|
||||
|
||||
/* apparantly max. 32kb may be written at once;
|
||||
|
@ -4,7 +4,7 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
|
||||
# For ether_driver.h
|
||||
UsePrivateHeaders net ;
|
||||
UsePrivateHeaders libroot net ;
|
||||
|
||||
KernelAddon sis900 :
|
||||
driver.c
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "interface.h"
|
||||
#include "sis900.h"
|
||||
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -63,7 +64,8 @@ bug(const char *format, ...)
|
||||
int i;
|
||||
int file;
|
||||
|
||||
if ((file = open("/boot/home/sis900-driver.log", O_RDWR | O_APPEND | O_CREAT)) >= 0) {
|
||||
if ((file = open(kCommonLogDirectory "/sis900-driver.log",
|
||||
O_RDWR | O_APPEND | O_CREAT)) >= 0) {
|
||||
// time_t timer = time(NULL);
|
||||
// strftime(c, 2048, "%H:%M:S: ", localtime(&timer));
|
||||
|
||||
|
@ -26,15 +26,18 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <directories.h>
|
||||
#include <util/kernel_cpp.h>
|
||||
|
||||
|
||||
#define DRIVER_NAME "usb_beceemwmx"
|
||||
#define MAX_DEVICES 8
|
||||
|
||||
#define FIRM_BIN "/boot/system/data/firmware/macxvi200/macxvi200.bin"
|
||||
#define FIRM_BIN \
|
||||
kSystemDataDirectory "/firmware/macxvi200/macxvi200.bin"
|
||||
// location on file system of device firmware
|
||||
#define FIRM_CFG "/boot/system/data/firmware/macxvi200/macxvi.cfg"
|
||||
#define FIRM_CFG \
|
||||
kSystemDataDirectory "/firmware/macxvi200/macxvi.cfg"
|
||||
// location on file system of vendor configuration
|
||||
|
||||
#define SYS_CFG 0x0F000C00
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers network wimax usb_beceemwmx ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders kernel net ;
|
||||
UsePrivateHeaders kernel libroot net ;
|
||||
|
||||
KernelAddon usb_beceemwmx :
|
||||
Driver.cpp
|
||||
|
@ -3,6 +3,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers ports pc_serial ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
if $(TARGET_PLATFORM_HAIKU_COMPATIBLE) {
|
||||
UsePrivateHeaders libroot ;
|
||||
UsePrivateKernelHeaders ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers os drivers tty ] : true ;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <stdio.h> //sprintf
|
||||
#include <unistd.h> //posix file i/o - create, write, close
|
||||
#include <Drivers.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
|
||||
@ -26,7 +27,7 @@ bool gLogFunctionCalls = false;
|
||||
bool gLogFunctionReturns = false;
|
||||
bool gLogFunctionResults = false;
|
||||
|
||||
static const char *sLogFilePath="/boot/home/"DRIVER_NAME".log";
|
||||
static const char *sLogFilePath = kCommonLogDirectory "/" DRIVER_NAME ".log";
|
||||
static sem_id sLogLock;
|
||||
|
||||
|
||||
@ -187,4 +188,4 @@ trace_tty(struct tty *tty)
|
||||
}
|
||||
|
||||
|
||||
#endif /* __BEOS__ */
|
||||
#endif /* __BEOS__ */
|
||||
|
@ -1,6 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel drivers ports usb_serial ;
|
||||
|
||||
UsePrivateKernelHeaders ;
|
||||
UsePrivateHeaders libroot ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers os drivers tty ] : true ;
|
||||
|
||||
SubDirC++Flags -fno-rtti ;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <stdio.h> //sprintf
|
||||
#include <unistd.h> //posix file i/o - create, write, close
|
||||
#include <Drivers.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
|
||||
@ -27,7 +28,7 @@ bool gLogFunctionCalls = true;
|
||||
bool gLogFunctionReturns = true;
|
||||
bool gLogFunctionResults = true;
|
||||
|
||||
static const char *sLogFilePath="/boot/home/"DRIVER_NAME".log";
|
||||
static const char *sLogFilePath = kCommonLogDirectory "/" DRIVER_NAME ".log";
|
||||
static sem_id sLogLock;
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src add-ons kernel drivers video usb_vision ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders usb_vision ;
|
||||
UsePrivateHeaders libroot usb_vision ;
|
||||
|
||||
#local defines = [ FDefines DB_USB_USE_V2_MODULE ] ;
|
||||
#SubDirCcFlags $(defines) ;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <stdio.h> //sprintf
|
||||
#include <string.h> //strcpy
|
||||
#include <unistd.h> //posix file i/o - create, write, close
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
#include "usb_vision.h"
|
||||
@ -30,7 +31,8 @@ bool b_log_funcres = false;
|
||||
|
||||
bool b_log_settings_loaded = false;
|
||||
|
||||
static const char *private_log_path="/boot/home/"DRIVER_NAME".log";
|
||||
static const char *private_log_path
|
||||
= kCommonLogDirectory "/" DRIVER_NAME ".log";
|
||||
static sem_id loglock;
|
||||
|
||||
void load_setting(void){
|
||||
|
@ -4,7 +4,7 @@ local userlandFSTop = [ FDirName $(HAIKU_TOP) src add-ons kernel file_systems
|
||||
userlandfs ] ;
|
||||
local userlandFSIncludes = [ PrivateHeaders userlandfs ] ;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
UsePrivateHeaders libroot shared ;
|
||||
UsePrivateKernelHeaders ;
|
||||
SubDirHdrs [ FDirName $(userlandFSIncludes) private ] ;
|
||||
SubDirHdrs [ FDirName $(userlandFSIncludes) shared ] ;
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
|
||||
#include <OS.h>
|
||||
#include <directories.h>
|
||||
#include <driver_settings.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
@ -37,7 +38,7 @@ strlcat(char *dst, char const *src, size_t s)
|
||||
return j + i + strlen(src + i);
|
||||
}
|
||||
|
||||
#define SETTINGS_DIRECTORY "/boot/home/config/settings/kernel/drivers/"
|
||||
#define SETTINGS_DIRECTORY kUserSettingsDirectory "/kernel/drivers/"
|
||||
#define SETTINGS_MAGIC 'DrvS'
|
||||
|
||||
// Those maximum values are independent from the implementation - they
|
||||
|
@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons kernel generic mpu401 ;
|
||||
|
||||
UsePrivateHeaders libroot ;
|
||||
|
||||
KernelAddon mpu401 :
|
||||
mpu401.c
|
||||
debug.c
|
||||
|
@ -25,17 +25,25 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <KernelExport.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <OS.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <directories.h>
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
#define DRIVER_NAME "mpu401"
|
||||
#define VERSION "0.2"
|
||||
|
||||
|
||||
void debug_printf(const char *text,...)
|
||||
{
|
||||
char buf[1024];
|
||||
@ -48,11 +56,12 @@ void debug_printf(const char *text,...)
|
||||
dprintf(DRIVER_NAME ": %s",buf);
|
||||
}
|
||||
|
||||
#if DEBUG > 0
|
||||
|
||||
static const char * logfile="/boot/home/mpu401.log";
|
||||
#if DEBUG > 0
|
||||
static const char *logfile = kCommonLogDirectory "/mpu401.log";
|
||||
static sem_id loglock;
|
||||
|
||||
|
||||
void log_create(void)
|
||||
{
|
||||
int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
@ -62,6 +71,7 @@ void log_create(void)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
|
||||
void log_printf(const char *text,...)
|
||||
{
|
||||
int fd;
|
||||
@ -84,5 +94,4 @@ void log_printf(const char *text,...)
|
||||
snooze(150000);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -10,7 +10,7 @@ if $(TARGET_PLATFORM) != haiku {
|
||||
# Unfortunately we get more than we want, namely all POSIX headers.
|
||||
}
|
||||
|
||||
UsePrivateHeaders net ;
|
||||
UsePrivateHeaders libroot net ;
|
||||
UsePrivateHeaders [ FDirName kernel ] ;
|
||||
UsePrivateHeaders [ FDirName kernel util ] ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src add-ons kernel network ppp shared
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <directories.h>
|
||||
|
||||
#include "net_module.h"
|
||||
|
||||
|
||||
@ -37,10 +39,10 @@ typedef uint32 ppp_interface_id;
|
||||
// path defines
|
||||
#define PPP_MODULES_PATH NETWORK_MODULES_ROOT "ppp"
|
||||
#define PTP_INTERFACE_SETTINGS_PATH \
|
||||
"/boot/home/config/settings/kernel/drivers/ptpnet"
|
||||
kUserSettingsDirectory "/kernel/drivers/ptpnet"
|
||||
// TODO: should be: /etc/ptpnet
|
||||
#define PTP_SETTINGS_PATH \
|
||||
"/boot/home/config/settings/kernel/drivers/ptpnet.settings"
|
||||
kUserSettingsDirectory "/kernel/drivers/ptpnet.settings"
|
||||
// TODO: should be: /etc/ptpnet.settings
|
||||
|
||||
// built-in protocols
|
||||
|
@ -555,28 +555,10 @@ AboutView::AboutView()
|
||||
versionView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||
B_ALIGN_VERTICAL_UNSET));
|
||||
|
||||
// GCC version
|
||||
BEntry gccFourHybrid("/boot/system/lib/gcc2/libstdc++.r4.so");
|
||||
BEntry gccTwoHybrid("/boot/system/lib/gcc4/libsupc++.so");
|
||||
bool isHybrid = gccFourHybrid.Exists() || gccTwoHybrid.Exists();
|
||||
|
||||
if (isHybrid) {
|
||||
snprintf(string, sizeof(string), B_TRANSLATE("GCC %d Hybrid"),
|
||||
__GNUC__);
|
||||
} else
|
||||
snprintf(string, sizeof(string), "GCC %d", __GNUC__);
|
||||
|
||||
BStringView* gccView = new BStringView("gcctext", string);
|
||||
gccView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||
BStringView* abiView = new BStringView("abitext", B_HAIKU_ABI_NAME);
|
||||
abiView->SetExplicitAlignment(BAlignment(B_ALIGN_LEFT,
|
||||
B_ALIGN_VERTICAL_UNSET));
|
||||
|
||||
#if __GNUC__ == 2
|
||||
if (isHybrid) {
|
||||
// do now show the GCC version if it's the default
|
||||
gccView->Hide();
|
||||
}
|
||||
#endif
|
||||
|
||||
// CPU count, type and clock speed
|
||||
char processorLabel[256];
|
||||
if (systemInfo.cpu_count > 1) {
|
||||
@ -643,7 +625,7 @@ AboutView::AboutView()
|
||||
.AddGroup(B_VERTICAL, 0)
|
||||
.Add(_CreateLabel("oslabel", B_TRANSLATE("Version:")))
|
||||
.Add(versionView)
|
||||
.Add(gccView)
|
||||
.Add(abiView)
|
||||
.AddStrut(offset)
|
||||
.Add(_CreateLabel("cpulabel", processorLabel))
|
||||
.Add(cpuView)
|
||||
|
@ -56,7 +56,7 @@ All rights reserved.
|
||||
#include "BarApp.h"
|
||||
#include "BarView.h"
|
||||
#include "BarWindow.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "FSUtils.h"
|
||||
#include "PublicCommands.h"
|
||||
#include "ResourceSet.h"
|
||||
@ -69,7 +69,7 @@ BList TBarApp::sBarTeamInfoList;
|
||||
BList TBarApp::sSubscribers;
|
||||
|
||||
|
||||
const uint32 kShowBeMenu = 'BeMn';
|
||||
const uint32 kShowDeskbarMenu = 'BeMn';
|
||||
const uint32 kShowTeamMenu = 'TmMn';
|
||||
|
||||
|
||||
@ -332,9 +332,9 @@ TBarApp::MessageReceived(BMessage* message)
|
||||
fPreferencesWindow->PostMessage(kStateChanged);
|
||||
break;
|
||||
|
||||
case kShowBeMenu:
|
||||
case kShowDeskbarMenu:
|
||||
if (fBarWindow->Lock()) {
|
||||
fBarWindow->ShowBeMenu();
|
||||
fBarWindow->ShowDeskbarMenu();
|
||||
fBarWindow->Unlock();
|
||||
}
|
||||
break;
|
||||
|
@ -45,8 +45,8 @@ All rights reserved.
|
||||
#include "icons.h"
|
||||
#include "icons_logo.h"
|
||||
#include "BarWindow.h"
|
||||
#include "BeMenu.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarMenu.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "ResourceSet.h"
|
||||
#include "TeamMenu.h"
|
||||
|
||||
@ -58,12 +58,12 @@ TBarMenuBar::TBarMenuBar(TBarView* bar, BRect frame, const char* name)
|
||||
{
|
||||
SetItemMargins(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
TBeMenu* beMenu = new TBeMenu(bar);
|
||||
TBarWindow::SetBeMenu(beMenu);
|
||||
TDeskbarMenu* beMenu = new TDeskbarMenu(bar);
|
||||
TBarWindow::SetDeskbarMenu(beMenu);
|
||||
|
||||
fBeMenuItem = new TBarMenuTitle(frame.Width(), frame.Height(),
|
||||
fDeskbarMenuItem = new TBarMenuTitle(frame.Width(), frame.Height(),
|
||||
AppResSet()->FindBitmap(B_MESSAGE_TYPE, R_LeafLogoBitmap), beMenu);
|
||||
AddItem(fBeMenuItem);
|
||||
AddItem(fDeskbarMenuItem);
|
||||
}
|
||||
|
||||
|
||||
@ -85,8 +85,8 @@ TBarMenuBar::SmartResize(float width, float height)
|
||||
width -= 1;
|
||||
|
||||
int32 count = CountItems();
|
||||
if (fBeMenuItem)
|
||||
fBeMenuItem->SetWidthHeight(width / count, height);
|
||||
if (fDeskbarMenuItem)
|
||||
fDeskbarMenuItem->SetWidthHeight(width / count, height);
|
||||
if (fAppListMenuItem)
|
||||
fAppListMenuItem->SetWidthHeight(width / count, height);
|
||||
|
||||
@ -195,10 +195,10 @@ TBarMenuBar::InitTrackingHook(bool (*hookFunction)(BMenu*, void*),
|
||||
uint32 buttons;
|
||||
GetMouse(&loc, &buttons);
|
||||
// set the hook functions for the two menus
|
||||
// will always have the be menu
|
||||
// will always have the deskbar menu
|
||||
// may have the app menu as well (mini mode)
|
||||
if (fBeMenuItem->Frame().Contains(loc) || both)
|
||||
init_tracking_hook(fBeMenuItem, hookFunction, state);
|
||||
if (fDeskbarMenuItem->Frame().Contains(loc) || both)
|
||||
init_tracking_hook(fDeskbarMenuItem, hookFunction, state);
|
||||
|
||||
if (fAppListMenuItem && (fAppListMenuItem->Frame().Contains(loc) || both))
|
||||
init_tracking_hook(fAppListMenuItem, hookFunction, state);
|
||||
|
@ -67,7 +67,7 @@ class TBarMenuBar : public BMenuBar {
|
||||
|
||||
private:
|
||||
TBarView* fBarView;
|
||||
TBarMenuTitle* fBeMenuItem;
|
||||
TBarMenuTitle* fDeskbarMenuItem;
|
||||
TBarMenuTitle* fAppListMenuItem;
|
||||
};
|
||||
|
||||
|
@ -200,8 +200,8 @@ TBarMenuTitle::Invoke(BMessage* message)
|
||||
if (barview) {
|
||||
BLooper* looper = barview->Looper();
|
||||
if (looper->Lock()) {
|
||||
// tell barview to add the refs to the be menu
|
||||
barview->HandleBeMenu(NULL);
|
||||
// tell barview to add the refs to the deskbar menu
|
||||
barview->HandleDeskbarMenu(NULL);
|
||||
looper->Unlock();
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ All rights reserved.
|
||||
#include "BarApp.h"
|
||||
#include "BarMenuBar.h"
|
||||
#include "BarWindow.h"
|
||||
#include "BeMenu.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarMenu.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "ExpandoMenuBar.h"
|
||||
#include "FSUtils.h"
|
||||
#include "ResourceSet.h"
|
||||
@ -157,7 +157,7 @@ TBarView::MessageReceived(BMessage* message)
|
||||
case B_REFS_RECEIVED:
|
||||
// received when an item is selected during DnD
|
||||
// message is targeted here from Be menu
|
||||
HandleBeMenu(message);
|
||||
HandleDeskbarMenu(message);
|
||||
break;
|
||||
|
||||
case B_ARCHIVED_OBJECT:
|
||||
@ -261,7 +261,7 @@ TBarView::MouseDown(BPoint where)
|
||||
|
||||
|
||||
void
|
||||
TBarView::PlaceBeMenu()
|
||||
TBarView::PlaceDeskbarMenu()
|
||||
{
|
||||
// top or bottom, full
|
||||
if (!fVertical && fBarMenuBar) {
|
||||
@ -302,7 +302,7 @@ TBarView::PlaceBeMenu()
|
||||
width = floorf(width) / 2;
|
||||
loc = Bounds().LeftTop();
|
||||
} else {
|
||||
// mini mode, BeMenu next to team menu
|
||||
// mini mode, DeskbarMenu next to team menu
|
||||
fBarMenuBar->AddTeamMenu();
|
||||
}
|
||||
|
||||
@ -525,7 +525,7 @@ TBarView::ChangeState(int32 state, bool vertical, bool left, bool top)
|
||||
|
||||
BRect screenFrame = (BScreen(Window())).Frame();
|
||||
|
||||
PlaceBeMenu();
|
||||
PlaceDeskbarMenu();
|
||||
PlaceTray(vertSwap, leftSwap, screenFrame);
|
||||
|
||||
// We need to keep track of what apps are expanded.
|
||||
@ -773,12 +773,12 @@ TBarView::MenuTrackingHook(BMenu* menu, void* castToThis)
|
||||
// keep tracking
|
||||
endMenu = false;
|
||||
} else {
|
||||
// see if the mouse is in the team/be menu item
|
||||
// see if the mouse is in the team/deskbar menu item
|
||||
menu->ConvertToScreen(&location);
|
||||
if (barview->LockLooper()) {
|
||||
TExpandoMenuBar* expando = barview->ExpandoMenuBar();
|
||||
TBeMenu* bemenu
|
||||
= (dynamic_cast<TBarWindow*>(barview->Window()))->BeMenu();
|
||||
TDeskbarMenu* bemenu
|
||||
= (dynamic_cast<TBarWindow*>(barview->Window()))->DeskbarMenu();
|
||||
|
||||
if (bemenu && bemenu->LockLooper()) {
|
||||
bemenu->ConvertFromScreen(&location);
|
||||
@ -939,7 +939,7 @@ TBarView::InvokeItem(const char* signature)
|
||||
|
||||
|
||||
void
|
||||
TBarView::HandleBeMenu(BMessage* messagewithdestination)
|
||||
TBarView::HandleDeskbarMenu(BMessage* messagewithdestination)
|
||||
{
|
||||
if (!Dragging())
|
||||
return;
|
||||
@ -963,13 +963,13 @@ TBarView::HandleBeMenu(BMessage* messagewithdestination)
|
||||
if (entry.IsDirectory()) {
|
||||
// if the ref received (should only be 1) is a directory
|
||||
// then add the drag refs to the directory
|
||||
AddRefsToBeMenu(DragMessage(), &ref);
|
||||
AddRefsToDeskbarMenu(DragMessage(), &ref);
|
||||
} else
|
||||
SendDragMessage(NULL, &ref);
|
||||
}
|
||||
} else {
|
||||
// adds drag refs to top level in be menu
|
||||
AddRefsToBeMenu(DragMessage(), NULL);
|
||||
// adds drag refs to top level in deskbar menu
|
||||
AddRefsToDeskbarMenu(DragMessage(), NULL);
|
||||
}
|
||||
|
||||
// clean up drag message and types list
|
||||
|
@ -114,7 +114,7 @@ class TBarView : public BView {
|
||||
bool DragOverride();
|
||||
bool InvokeItem(const char* signature);
|
||||
|
||||
void HandleBeMenu(BMessage* targetmessage);
|
||||
void HandleDeskbarMenu(BMessage* targetmessage);
|
||||
|
||||
status_t ItemInfo(int32 id, const char** name, DeskbarShelf* shelf);
|
||||
status_t ItemInfo(const char* name, int32* id, DeskbarShelf* shelf);
|
||||
@ -143,12 +143,12 @@ class TBarView : public BView {
|
||||
TDragRegion* DragRegion() const { return fDragRegion; }
|
||||
|
||||
private:
|
||||
friend class TBeMenu;
|
||||
friend class TDeskbarMenu;
|
||||
friend class PreferencesWindow;
|
||||
|
||||
status_t SendDragMessage(const char* signature, entry_ref* ref = NULL);
|
||||
|
||||
void PlaceBeMenu();
|
||||
void PlaceDeskbarMenu();
|
||||
void PlaceTray(bool vertSwap, bool leftSwap, BRect screenFrame);
|
||||
void PlaceApplicationBar(BRect screenFrame);
|
||||
|
||||
|
@ -52,7 +52,7 @@ All rights reserved.
|
||||
#include "BarApp.h"
|
||||
#include "BarMenuBar.h"
|
||||
#include "BarView.h"
|
||||
#include "BeMenu.h"
|
||||
#include "DeskbarMenu.h"
|
||||
#include "PublicCommands.h"
|
||||
#include "StatusView.h"
|
||||
#include "tracker_private.h"
|
||||
@ -80,7 +80,7 @@ extern "C" void
|
||||
BMenuBar_StartMenuBar_Hack(BMenuBar*, int32, bool, bool, BRect*);
|
||||
|
||||
|
||||
TBeMenu* TBarWindow::sBeMenu = NULL;
|
||||
TDeskbarMenu* TBarWindow::sDeskbarMenu = NULL;
|
||||
|
||||
|
||||
TBarWindow::TBarWindow()
|
||||
@ -118,18 +118,18 @@ TBarWindow::MenusBeginning()
|
||||
if (entry.InitCheck() == B_OK && entry.IsDirectory()) {
|
||||
// need the entry_ref to the actual item
|
||||
entry.GetRef(&ref);
|
||||
// set the nav directory to the be folder
|
||||
sBeMenu->SetNavDir(&ref);
|
||||
// set the nav directory to the deskbar folder
|
||||
sDeskbarMenu->SetNavDir(&ref);
|
||||
} else if (!entry.Exists()) {
|
||||
// the Be folder does not exist
|
||||
// the deskbar folder does not exist
|
||||
// create one now
|
||||
BDirectory dir;
|
||||
if (entry.GetParent(&dir) == B_OK) {
|
||||
BDirectory bedir;
|
||||
dir.CreateDirectory("be", &bedir);
|
||||
if (bedir.GetEntry(&entry) == B_OK
|
||||
BDirectory deskbarDir;
|
||||
dir.CreateDirectory("deskbar", &deskbarDir);
|
||||
if (deskbarDir.GetEntry(&entry) == B_OK
|
||||
&& entry.GetRef(&ref) == B_OK)
|
||||
sBeMenu->SetNavDir(&ref);
|
||||
sDeskbarMenu->SetNavDir(&ref);
|
||||
}
|
||||
} else {
|
||||
// this really should never happen
|
||||
@ -137,8 +137,8 @@ TBarWindow::MenusBeginning()
|
||||
return;
|
||||
}
|
||||
|
||||
sBeMenu->NeedsToRebuild();
|
||||
sBeMenu->ResetTargets();
|
||||
sDeskbarMenu->NeedsToRebuild();
|
||||
sDeskbarMenu->ResetTargets();
|
||||
|
||||
fBarView->SetEventMask(0);
|
||||
// This works around a BeOS bug - the menu is quit with every
|
||||
@ -153,10 +153,10 @@ TBarWindow::MenusEnded()
|
||||
{
|
||||
BWindow::MenusEnded();
|
||||
|
||||
if (sBeMenu->LockLooper()) {
|
||||
if (sDeskbarMenu->LockLooper()) {
|
||||
// TODO: is this ok?
|
||||
sBeMenu->RemoveItems(0, sBeMenu->CountItems(), true);
|
||||
sBeMenu->UnlockLooper();
|
||||
sDeskbarMenu->RemoveItems(0, sDeskbarMenu->CountItems(), true);
|
||||
sDeskbarMenu->UnlockLooper();
|
||||
}
|
||||
|
||||
fBarView->UpdateEventMask();
|
||||
@ -273,21 +273,21 @@ TBarWindow::ScreenChanged(BRect size, color_space depth)
|
||||
|
||||
|
||||
void
|
||||
TBarWindow::SetBeMenu(TBeMenu* menu)
|
||||
TBarWindow::SetDeskbarMenu(TDeskbarMenu* menu)
|
||||
{
|
||||
sBeMenu = menu;
|
||||
sDeskbarMenu = menu;
|
||||
}
|
||||
|
||||
|
||||
TBeMenu*
|
||||
TBarWindow::BeMenu()
|
||||
TDeskbarMenu*
|
||||
TBarWindow::DeskbarMenu()
|
||||
{
|
||||
return sBeMenu;
|
||||
return sDeskbarMenu;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TBarWindow::ShowBeMenu()
|
||||
TBarWindow::ShowDeskbarMenu()
|
||||
{
|
||||
BMenuBar* menuBar = fBarView->BarMenuBar();
|
||||
if (menuBar == NULL)
|
||||
|
@ -40,7 +40,7 @@ All rights reserved.
|
||||
#include <Window.h>
|
||||
|
||||
|
||||
class TBeMenu;
|
||||
class TDeskbarMenu;
|
||||
class TBarView;
|
||||
|
||||
|
||||
@ -59,10 +59,10 @@ public:
|
||||
|
||||
void SaveSettings();
|
||||
TBarView* BarView() const { return fBarView; };
|
||||
static void SetBeMenu(TBeMenu* menu);
|
||||
TBeMenu* BeMenu();
|
||||
static void SetDeskbarMenu(TDeskbarMenu* menu);
|
||||
TDeskbarMenu* DeskbarMenu();
|
||||
|
||||
void ShowBeMenu();
|
||||
void ShowDeskbarMenu();
|
||||
void ShowTeamMenu();
|
||||
|
||||
void GetLocation(BMessage* message);
|
||||
@ -88,7 +88,7 @@ private:
|
||||
bool _IsFocusMessage(BMessage* message);
|
||||
|
||||
private:
|
||||
static TBeMenu* sBeMenu;
|
||||
static TDeskbarMenu* sDeskbarMenu;
|
||||
TBarView* fBarView;
|
||||
};
|
||||
|
||||
|
@ -42,10 +42,14 @@ All rights reserved.
|
||||
#include <MenuItem.h>
|
||||
#include <Roster.h>
|
||||
|
||||
#include "BeMenu.h"
|
||||
#include "DeskbarMenu.h"
|
||||
#include "BarApp.h"
|
||||
#include "BarView.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "IconMenuItem.h"
|
||||
#include "MountMenu.h"
|
||||
#include "IconMenuItem.h"
|
||||
#include "MountMenu.h"
|
||||
#include "IconMenuItem.h"
|
||||
#include "MountMenu.h"
|
||||
#include "PublicCommands.h"
|
||||
@ -54,7 +58,7 @@ All rights reserved.
|
||||
#include "tracker_private.h"
|
||||
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "BeMenu"
|
||||
#define B_TRANSLATE_CONTEXT "DeskbarMenu"
|
||||
|
||||
#define ROSTER_SIG "application/x-vnd.Be-ROST"
|
||||
|
||||
@ -81,8 +85,8 @@ using namespace BPrivate;
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
TBeMenu::TBeMenu(TBarView* barView)
|
||||
: BNavMenu("BeMenu", B_REFS_RECEIVED, DefaultTarget()),
|
||||
TDeskbarMenu::TDeskbarMenu(TBarView* barView)
|
||||
: BNavMenu("DeskbarMenu", B_REFS_RECEIVED, DefaultTarget()),
|
||||
fAddState(kStart),
|
||||
fBarView(barView)
|
||||
{
|
||||
@ -90,7 +94,7 @@ TBeMenu::TBeMenu(TBarView* barView)
|
||||
|
||||
|
||||
void
|
||||
TBeMenu::AttachedToWindow()
|
||||
TDeskbarMenu::AttachedToWindow()
|
||||
{
|
||||
if (fBarView && fBarView->LockLooper()) {
|
||||
if (fBarView->Dragging()) {
|
||||
@ -113,7 +117,7 @@ TBeMenu::AttachedToWindow()
|
||||
|
||||
|
||||
void
|
||||
TBeMenu::DetachedFromWindow()
|
||||
TDeskbarMenu::DetachedFromWindow()
|
||||
{
|
||||
if (fBarView) {
|
||||
BLooper* looper = fBarView->Looper();
|
||||
@ -130,7 +134,7 @@ TBeMenu::DetachedFromWindow()
|
||||
|
||||
|
||||
bool
|
||||
TBeMenu::StartBuildingItemList()
|
||||
TDeskbarMenu::StartBuildingItemList()
|
||||
{
|
||||
RemoveItems(0, CountItems(), true);
|
||||
fAddState = kStart;
|
||||
@ -139,11 +143,11 @@ TBeMenu::StartBuildingItemList()
|
||||
|
||||
|
||||
void
|
||||
TBeMenu::DoneBuildingItemList()
|
||||
TDeskbarMenu::DoneBuildingItemList()
|
||||
{
|
||||
if (fItemList->CountItems() <= 0) {
|
||||
BMenuItem* item = new BMenuItem(B_TRANSLATE("<Be folder is empty>"),
|
||||
0);
|
||||
BMenuItem* item
|
||||
= new BMenuItem(B_TRANSLATE("<Deskbar folder is empty>"), 0);
|
||||
item->SetEnabled(false);
|
||||
AddItem(item);
|
||||
} else
|
||||
@ -152,10 +156,10 @@ TBeMenu::DoneBuildingItemList()
|
||||
|
||||
|
||||
bool
|
||||
TBeMenu::AddNextItem()
|
||||
TDeskbarMenu::AddNextItem()
|
||||
{
|
||||
if (fAddState == kStart)
|
||||
return AddStandardBeMenuItems();
|
||||
return AddStandardDeskbarMenuItems();
|
||||
|
||||
TrackingHookData* data = fBarView->GetTrackingHookData();
|
||||
if (fAddState == kAddingRecents) {
|
||||
@ -199,11 +203,11 @@ TBeMenu::AddNextItem()
|
||||
}
|
||||
|
||||
AddSeparatorItem();
|
||||
fAddState = kAddingBeMenu;
|
||||
fAddState = kAddingDeskbarMenu;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (fAddState == kAddingBeMenu) {
|
||||
if (fAddState == kAddingDeskbarMenu) {
|
||||
// keep reentering and adding items
|
||||
// until this returns false
|
||||
bool done = BNavMenu::AddNextItem();
|
||||
@ -229,7 +233,7 @@ TBeMenu::AddNextItem()
|
||||
|
||||
|
||||
bool
|
||||
TBeMenu::AddStandardBeMenuItems()
|
||||
TDeskbarMenu::AddStandardDeskbarMenuItems()
|
||||
{
|
||||
bool dragging = false;
|
||||
if (fBarView)
|
||||
@ -245,8 +249,7 @@ TBeMenu::AddStandardBeMenuItems()
|
||||
}
|
||||
|
||||
#ifdef HAIKU_DISTRO_COMPATIBILITY_OFFICIAL
|
||||
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK(
|
||||
"About Haiku");
|
||||
static const char* kAboutHaikuMenuItemStr = B_TRANSLATE_MARK("About Haiku");
|
||||
#else
|
||||
static const char* kAboutThisSystemMenuItemStr = B_TRANSLATE_MARK(
|
||||
"About this system");
|
||||
@ -334,7 +337,7 @@ TBeMenu::AddStandardBeMenuItems()
|
||||
|
||||
|
||||
void
|
||||
TBeMenu::ClearMenuBuildingState()
|
||||
TDeskbarMenu::ClearMenuBuildingState()
|
||||
{
|
||||
fAddState = kDone;
|
||||
fMenuBuilt = false;
|
||||
@ -344,7 +347,7 @@ TBeMenu::ClearMenuBuildingState()
|
||||
|
||||
|
||||
void
|
||||
TBeMenu::ResetTargets()
|
||||
TDeskbarMenu::ResetTargets()
|
||||
{
|
||||
// This method does not recurse into submenus
|
||||
// and does not affect menu items in submenus.
|
||||
@ -389,7 +392,7 @@ TBeMenu::ResetTargets()
|
||||
|
||||
|
||||
BPoint
|
||||
TBeMenu::ScreenLocation()
|
||||
TDeskbarMenu::ScreenLocation()
|
||||
{
|
||||
bool vertical = fBarView->Vertical();
|
||||
int32 expando = (fBarView->State() == kExpandoState);
|
||||
@ -413,7 +416,7 @@ TBeMenu::ScreenLocation()
|
||||
|
||||
/*static*/
|
||||
BMessenger
|
||||
TBeMenu::DefaultTarget()
|
||||
TDeskbarMenu::DefaultTarget()
|
||||
{
|
||||
// if Tracker is not available we target the BarApp
|
||||
BMessenger target(kTrackerSignature);
|
||||
@ -429,7 +432,7 @@ TBeMenu::DefaultTarget()
|
||||
|
||||
TRecentsMenu::TRecentsMenu(const char* name, TBarView* bar, int32 which,
|
||||
const char* signature, entry_ref* appRef)
|
||||
: BNavMenu(name, B_REFS_RECEIVED, TBeMenu::DefaultTarget()),
|
||||
: BNavMenu(name, B_REFS_RECEIVED, TDeskbarMenu::DefaultTarget()),
|
||||
fWhich(which),
|
||||
fAppRef(NULL),
|
||||
fSignature(NULL),
|
||||
@ -633,7 +636,7 @@ TRecentsMenu::ResetTargets()
|
||||
// if we are dragging, set the target to whatever was set
|
||||
// else set it to the default (Tracker)
|
||||
if (!fBarView->Dragging())
|
||||
SetTarget(TBeMenu::DefaultTarget());
|
||||
SetTarget(TDeskbarMenu::DefaultTarget());
|
||||
|
||||
// now set the target for the menuitems to the currently
|
||||
// set target, which may or may not be tracker
|
@ -33,8 +33,8 @@ holders.
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _BE_MENU_H_
|
||||
#define _BE_MENU_H_
|
||||
#ifndef _DESKBAR_MENU_H_
|
||||
#define _DESKBAR_MENU_H_
|
||||
|
||||
|
||||
#include "NavMenu.h"
|
||||
@ -96,9 +96,9 @@ TRecentsMenu::RecentsEnabled()
|
||||
}
|
||||
|
||||
|
||||
class TBeMenu : public BNavMenu {
|
||||
class TDeskbarMenu : public BNavMenu {
|
||||
public:
|
||||
TBeMenu(TBarView* bar);
|
||||
TDeskbarMenu(TBarView* bar);
|
||||
|
||||
void AttachedToWindow();
|
||||
void DetachedFromWindow();
|
||||
@ -111,13 +111,13 @@ class TBeMenu : public BNavMenu {
|
||||
enum State {
|
||||
kStart,
|
||||
kAddingRecents,
|
||||
kAddingBeMenu,
|
||||
kAddingDeskbarMenu,
|
||||
kDone
|
||||
};
|
||||
protected:
|
||||
BPoint ScreenLocation();
|
||||
|
||||
bool AddStandardBeMenuItems();
|
||||
bool AddStandardDeskbarMenuItems();
|
||||
|
||||
private:
|
||||
virtual bool StartBuildingItemList();
|
||||
@ -130,5 +130,5 @@ class TBeMenu : public BNavMenu {
|
||||
TBarView* fBarView;
|
||||
};
|
||||
|
||||
#endif /* _BE_MENU_H_ */
|
||||
|
||||
#endif /* _DESKBAR_MENU_H_ */
|
@ -51,11 +51,11 @@ All rights reserved.
|
||||
#include <SymLink.h>
|
||||
|
||||
#include "BarMenuBar.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "ExpandoMenuBar.h"
|
||||
|
||||
void
|
||||
AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory)
|
||||
AddRefsToDeskbarMenu(const BMessage* m, entry_ref* subdirectory)
|
||||
{
|
||||
if (m) {
|
||||
int32 count = 0;
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#include "tracker_private.h"
|
||||
|
||||
|
||||
void AddRefsToBeMenu(const BMessage* m, entry_ref* subdirectory);
|
||||
void AddRefsToDeskbarMenu(const BMessage* m, entry_ref* subdirectory);
|
||||
|
||||
|
||||
#endif /* DB_UTILS_H */
|
@ -49,8 +49,8 @@ All rights reserved.
|
||||
#include "BarApp.h"
|
||||
#include "BarMenuTitle.h"
|
||||
#include "BarView.h"
|
||||
#include "BeMenu.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarMenu.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "ExpandoMenuBar.h"
|
||||
#include "ResourceSet.h"
|
||||
#include "ShowHideMenuItem.h"
|
||||
@ -59,7 +59,7 @@ All rights reserved.
|
||||
#include "WindowMenu.h"
|
||||
#include "WindowMenuItem.h"
|
||||
|
||||
const float kDefaultBeMenuWidth = 50.0f;
|
||||
const float kDefaultDeskbarMenuWidth = 50.0f;
|
||||
const float kSepItemWidth = 5.0f;
|
||||
|
||||
const uint32 kMinimizeTeam = 'mntm';
|
||||
@ -82,7 +82,7 @@ TExpandoMenuBar::TExpandoMenuBar(TBarView* bar, BRect frame, const char* name,
|
||||
fIsScrolling(false),
|
||||
fShowTeamExpander(static_cast<TBarApp*>(be_app)->Settings()->superExpando),
|
||||
fExpandNewTeams(static_cast<TBarApp*>(be_app)->Settings()->expandNewTeams),
|
||||
fBeMenuWidth(kDefaultBeMenuWidth),
|
||||
fDeskbarMenuWidth(kDefaultDeskbarMenuWidth),
|
||||
fBarView(bar),
|
||||
fFirstApp(0),
|
||||
fPreviousDragTargetItem(NULL),
|
||||
@ -111,24 +111,25 @@ TExpandoMenuBar::AttachedToWindow()
|
||||
float width = fVertical ? Frame().Width() : sMinimumWindowWidth;
|
||||
float height = -1.0f;
|
||||
|
||||
// top or bottom mode, add be menu and sep for menubar tracking consistency
|
||||
// top or bottom mode, add deskbar menu and sep for menubar tracking
|
||||
// consistency
|
||||
if (!fVertical) {
|
||||
TBeMenu* beMenu = new TBeMenu(fBarView);
|
||||
TBarWindow::SetBeMenu(beMenu);
|
||||
TDeskbarMenu* beMenu = new TDeskbarMenu(fBarView);
|
||||
TBarWindow::SetDeskbarMenu(beMenu);
|
||||
const BBitmap* logoBitmap = AppResSet()->FindBitmap(B_MESSAGE_TYPE,
|
||||
R_LeafLogoBitmap);
|
||||
if (logoBitmap != NULL)
|
||||
fBeMenuWidth = logoBitmap->Bounds().Width() + 16;
|
||||
fBeMenuItem = new TBarMenuTitle(fBeMenuWidth, Frame().Height(),
|
||||
fDeskbarMenuWidth = logoBitmap->Bounds().Width() + 16;
|
||||
fDeskbarMenuItem = new TBarMenuTitle(fDeskbarMenuWidth, Frame().Height(),
|
||||
logoBitmap, beMenu, true);
|
||||
AddItem(fBeMenuItem);
|
||||
AddItem(fDeskbarMenuItem);
|
||||
|
||||
fSeparatorItem = new TTeamMenuItem(kSepItemWidth, height, fVertical);
|
||||
AddItem(fSeparatorItem);
|
||||
fSeparatorItem->SetEnabled(false);
|
||||
fFirstApp = 2;
|
||||
} else {
|
||||
fBeMenuItem = NULL;
|
||||
fDeskbarMenuItem = NULL;
|
||||
fSeparatorItem = NULL;
|
||||
}
|
||||
|
||||
@ -438,21 +439,21 @@ TExpandoMenuBar::MouseUp(BPoint where)
|
||||
|
||||
|
||||
bool
|
||||
TExpandoMenuBar::InBeMenu(BPoint loc) const
|
||||
TExpandoMenuBar::InDeskbarMenu(BPoint loc) const
|
||||
{
|
||||
if (!fVertical) {
|
||||
if (fBeMenuItem && fBeMenuItem->Frame().Contains(loc))
|
||||
if (fDeskbarMenuItem && fDeskbarMenuItem->Frame().Contains(loc))
|
||||
return true;
|
||||
} else {
|
||||
TBarWindow* window = dynamic_cast<TBarWindow*>(Window());
|
||||
if (window) {
|
||||
if (TBeMenu* bemenu = window->BeMenu()) {
|
||||
bool inBeMenu = false;
|
||||
if (TDeskbarMenu* bemenu = window->DeskbarMenu()) {
|
||||
bool inDeskbarMenu = false;
|
||||
if (bemenu->LockLooper()) {
|
||||
inBeMenu = bemenu->Frame().Contains(loc);
|
||||
inDeskbarMenu = bemenu->Frame().Contains(loc);
|
||||
bemenu->UnlockLooper();
|
||||
}
|
||||
return inBeMenu;
|
||||
return inDeskbarMenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -617,8 +618,8 @@ TExpandoMenuBar::CheckItemSizes(int32 delta)
|
||||
// - The Be Menu
|
||||
// - The little separator item
|
||||
fullWidth = fullWidth - (sMinimumWindowWidth * 2)
|
||||
+ (fBeMenuWidth + kSepItemWidth);
|
||||
width -= (fBeMenuWidth + kSepItemWidth);
|
||||
+ (fDeskbarMenuWidth + kSepItemWidth);
|
||||
width -= (fDeskbarMenuWidth + kSepItemWidth);
|
||||
count -= 2;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ class TTeamMenuItem;
|
||||
|
||||
enum drag_and_drop_selection {
|
||||
kNoSelection,
|
||||
kBeMenuSelection,
|
||||
kDeskbarMenuSelection,
|
||||
kAppMenuSelection,
|
||||
kAnyMenuSelection
|
||||
};
|
||||
@ -74,7 +74,7 @@ class TExpandoMenuBar : public BMenuBar {
|
||||
|
||||
TTeamMenuItem* TeamItemAtPoint(BPoint location,
|
||||
BMenuItem** _item = NULL);
|
||||
bool InBeMenu(BPoint) const;
|
||||
bool InDeskbarMenu(BPoint) const;
|
||||
|
||||
void CheckItemSizes(int32 delta);
|
||||
|
||||
@ -100,12 +100,12 @@ class TExpandoMenuBar : public BMenuBar {
|
||||
bool fShowTeamExpander : 1;
|
||||
bool fExpandNewTeams : 1;
|
||||
|
||||
float fBeMenuWidth;
|
||||
float fDeskbarMenuWidth;
|
||||
|
||||
TBarView* fBarView;
|
||||
int32 fFirstApp;
|
||||
|
||||
TBarMenuTitle* fBeMenuItem;
|
||||
TBarMenuTitle* fDeskbarMenuItem;
|
||||
TTeamMenuItem* fSeparatorItem;
|
||||
TTeamMenuItem* fPreviousDragTargetItem;
|
||||
|
||||
|
@ -24,8 +24,8 @@ Application Deskbar :
|
||||
BarMenuTitle.cpp
|
||||
BarView.cpp
|
||||
BarWindow.cpp
|
||||
BeMenu.cpp
|
||||
DeskBarUtils.cpp
|
||||
DeskbarMenu.cpp
|
||||
DeskbarUtils.cpp
|
||||
ExpandoMenuBar.cpp
|
||||
PreferencesWindow.cpp
|
||||
ShowHideMenuItem.cpp
|
||||
@ -46,7 +46,7 @@ DoCatalogs Deskbar :
|
||||
x-vnd.Be-TSKB
|
||||
:
|
||||
BarWindow.cpp
|
||||
BeMenu.cpp
|
||||
DeskbarMenu.cpp
|
||||
LocalizedFolders.h
|
||||
PreferencesWindow.cpp
|
||||
StatusView.cpp
|
||||
|
@ -66,7 +66,7 @@ All rights reserved.
|
||||
|
||||
#include "icons_logo.h"
|
||||
#include "BarApp.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "ResourceSet.h"
|
||||
#include "StatusView.h"
|
||||
#include "StatusViewShelf.h"
|
||||
|
@ -40,7 +40,7 @@ All rights reserved.
|
||||
|
||||
#include "BarApp.h"
|
||||
#include "BarMenuBar.h"
|
||||
#include "DeskBarUtils.h"
|
||||
#include "DeskbarUtils.h"
|
||||
#include "TeamMenuItem.h"
|
||||
#include "TeamMenu.h"
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <Application.h>
|
||||
#include <Catalog.h>
|
||||
#include <Deskbar.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <Path.h>
|
||||
#include <Roster.h>
|
||||
|
||||
#include <stdio.h>
|
||||
@ -139,8 +141,16 @@ PCApplication::ArgvReceived(int32 argc, char **argv)
|
||||
snooze(10000);
|
||||
} while (be_roster->IsRunning(kTrackerSig) && k-- > 0);
|
||||
}
|
||||
remove("/boot/home/config/settings/Tracker/tracker_shelf");
|
||||
launch(kTrackerSig, "/boot/system/Tracker");
|
||||
BPath shelfPath;
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &shelfPath) == B_OK
|
||||
&& shelfPath.Append("Tracker/tracker_shelf") == B_OK) {
|
||||
remove(shelfPath.Path());
|
||||
}
|
||||
BPath trackerPath;
|
||||
if (find_directory(B_SYSTEM_DIRECTORY, &trackerPath) == B_OK
|
||||
&& trackerPath.Append("Tracker") == B_OK) {
|
||||
launch(kTrackerSig, trackerPath.Path());
|
||||
}
|
||||
} else if (argc == 2 && strcmp(argv[1], "-deskbar") == 0) {
|
||||
BDeskbar deskbar;
|
||||
if (!gInDeskbar && !deskbar.HasItem(kDeskbarItemName))
|
||||
|
@ -345,21 +345,45 @@ ProcessController::MessageReceived(BMessage *message)
|
||||
break;
|
||||
|
||||
case 'Trac':
|
||||
launch(kTrackerSig, "/boot/system/Tracker");
|
||||
{
|
||||
BPath trackerPath;
|
||||
if (find_directory(B_SYSTEM_DIRECTORY, &trackerPath) == B_OK
|
||||
&& trackerPath.Append("Tracker") == B_OK) {
|
||||
launch(kTrackerSig, trackerPath.Path());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'Dbar':
|
||||
launch(kDeskbarSig, "/boot/system/Deskbar");
|
||||
{
|
||||
BPath deskbarPath;
|
||||
if (find_directory(B_SYSTEM_DIRECTORY, &deskbarPath) == B_OK
|
||||
&& deskbarPath.Append("Deskbar") == B_OK) {
|
||||
launch(kDeskbarSig, deskbarPath.Path());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'Term':
|
||||
launch(kTerminalSig, "/boot/system/apps/Terminal");
|
||||
{
|
||||
BPath terminalPath;
|
||||
if (find_directory(B_SYSTEM_APPS_DIRECTORY, &terminalPath) == B_OK
|
||||
&& terminalPath.Append("Deskbar") == B_OK) {
|
||||
launch(kTerminalSig, terminalPath.Path());
|
||||
}
|
||||
launch(kTerminalSig, terminalPath.Path());
|
||||
break;
|
||||
}
|
||||
|
||||
case 'AlDb':
|
||||
{
|
||||
if (!be_roster->IsRunning(kDeskbarSig))
|
||||
launch(kDeskbarSig, "/boot/system/Deskbar");
|
||||
if (!be_roster->IsRunning(kDeskbarSig)) {
|
||||
BPath deskbarPath;
|
||||
if (find_directory(B_SYSTEM_DIRECTORY, &deskbarPath) == B_OK
|
||||
&& deskbarPath.Append("Deskbar") == B_OK) {
|
||||
launch(kDeskbarSig, deskbarPath.Path());
|
||||
}
|
||||
}
|
||||
BDeskbar deskbar;
|
||||
if (gInDeskbar || deskbar.HasItem (kDeskbarItemName))
|
||||
deskbar.RemoveItem (kDeskbarItemName);
|
||||
|
@ -7,6 +7,8 @@
|
||||
*/
|
||||
|
||||
#include <Application.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <Path.h>
|
||||
#include <Screen.h>
|
||||
#include <Window.h>
|
||||
|
||||
@ -40,7 +42,6 @@ main(int argc, char *argv[])
|
||||
bool listenOnly = false;
|
||||
uint32 listenPort = 10900;
|
||||
uint32 sshPort = 22;
|
||||
const char *command = "/system/apps/Terminal";
|
||||
|
||||
for (int32 i = 2; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-p") == 0) {
|
||||
@ -85,10 +86,21 @@ main(int argc, char *argv[])
|
||||
|
||||
pid_t sshPID = -1;
|
||||
if (!listenOnly) {
|
||||
|
||||
BPath terminalPath;
|
||||
if (find_directory(B_SYSTEM_APPS_DIRECTORY, &terminalPath) != B_OK) {
|
||||
printf("failed to determine system-apps directory\n");
|
||||
return 3;
|
||||
}
|
||||
if (terminalPath.Append("Terminal") != B_OK) {
|
||||
printf("failed to append to system-apps path\n");
|
||||
return 3;
|
||||
}
|
||||
|
||||
char shellCommand[4096];
|
||||
snprintf(shellCommand, sizeof(shellCommand),
|
||||
"echo connected; export TARGET_SCREEN=localhost:%lu; %s\n",
|
||||
listenPort, command);
|
||||
listenPort, terminalPath.Path());
|
||||
|
||||
int pipes[4];
|
||||
if (pipe(&pipes[0]) != 0 || pipe(&pipes[2]) != 0) {
|
||||
|
@ -54,7 +54,10 @@
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
".:/boot/home/config/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:/boot/develop/bin"
|
||||
".:/boot/home/config/bin:/bin:/boot/apps:/boot/preferences" \
|
||||
":/boot/system/apps" \
|
||||
":/boot/system/preferences" \
|
||||
":/boot/common/settings/develop/tools/current/bin"
|
||||
#endif
|
||||
|
||||
/* The value for PATH when invoking `command -p'. This is only used when
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define SYS_PROFILE "/etc/profile"
|
||||
|
||||
/* The default location of the bash debugger initialization/startup file. */
|
||||
#define DEBUGGER_START_FILE "/boot/common/share/bashdb/bashdb-main.inc"
|
||||
#define DEBUGGER_START_FILE \
|
||||
"/boot/common/share/bashdb/bashdb-main.inc"
|
||||
|
||||
#endif /* _PATHNAMES_H */
|
||||
|
@ -17,7 +17,9 @@
|
||||
#include <string>
|
||||
|
||||
#include <debugger.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <OS.h>
|
||||
#include <Path.h>
|
||||
#include <String.h>
|
||||
|
||||
#include <syscalls.h>
|
||||
@ -454,7 +456,13 @@ private:
|
||||
BString name = imageInfo.name;
|
||||
if (name.FindFirst('/') == -1) {
|
||||
// modules without a path are likely to be boot modules
|
||||
name.Prepend("/system/add-ons/kernel/boot/");
|
||||
BPath bootAddonPath;
|
||||
if (find_directory(B_SYSTEM_ADDONS_DIRECTORY,
|
||||
&bootAddonPath) == B_OK
|
||||
&& bootAddonPath.Append("kernel") == B_OK
|
||||
&& bootAddonPath.Append("boot") == B_OK) {
|
||||
name = BString(bootAddonPath.Path()) << "/" << name;
|
||||
}
|
||||
}
|
||||
|
||||
error = sharedImage->Init(name.String());
|
||||
|
@ -28,6 +28,7 @@ directoryType directoryTypes[] = {
|
||||
KEYVALUE_PAIR(B_DESKTOP_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_TRASH_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_APPS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_PACKAGE_LINKS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_PREFERENCES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_UTILITIES_DIRECTORY),
|
||||
|
||||
@ -46,6 +47,9 @@ directoryType directoryTypes[] = {
|
||||
KEYVALUE_PAIR(B_SYSTEM_MEDIA_NODES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_SYSTEM_SOUNDS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_SYSTEM_DATA_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_SYSTEM_DEVELOP_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_SYSTEM_PACKAGES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_SYSTEM_HEADERS_DIRECTORY),
|
||||
|
||||
// Common directories
|
||||
KEYVALUE_PAIR(B_COMMON_DIRECTORY),
|
||||
@ -69,6 +73,19 @@ directoryType directoryTypes[] = {
|
||||
KEYVALUE_PAIR(B_COMMON_SOUNDS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_DATA_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_CACHE_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_PACKAGES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_HEADERS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_BIN_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DATA_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_FONTS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_LIB_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_HEADERS_DIRECTORY),
|
||||
|
||||
// User directories
|
||||
KEYVALUE_PAIR(B_USER_DIRECTORY),
|
||||
@ -85,6 +102,19 @@ directoryType directoryTypes[] = {
|
||||
KEYVALUE_PAIR(B_USER_SOUNDS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_DATA_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_CACHE_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_PACKAGES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_HEADERS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_ADDONS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_TRANSLATORS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_MEDIA_NODES_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_BIN_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_DATA_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_FONTS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_SOUNDS_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_DOCUMENTATION_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_LIB_DIRECTORY),
|
||||
KEYVALUE_PAIR(B_USER_NONPACKAGED_HEADERS_DIRECTORY),
|
||||
|
||||
// Legacy system directories
|
||||
KEYVALUE_PAIR(B_BEOS_DIRECTORY),
|
||||
|
@ -149,9 +149,7 @@ struct PackageContentListHandler : BPackageContentHandler {
|
||||
break;
|
||||
|
||||
case B_PACKAGE_INFO_VERSION:
|
||||
printf("\tversion: %s.%s.%s-%d\n", value.version.major,
|
||||
value.version.minor, value.version.micro,
|
||||
value.version.release);
|
||||
_PrintPackageVersion(value.version);
|
||||
break;
|
||||
|
||||
case B_PACKAGE_INFO_COPYRIGHTS:
|
||||
|
@ -244,13 +244,15 @@ compare_queried_apps(const entry_ref* app1, const entry_ref* app2)
|
||||
}
|
||||
}
|
||||
|
||||
// Check system folder
|
||||
// Check system servers folder
|
||||
BPath path;
|
||||
find_directory(B_SYSTEM_SERVERS_DIRECTORY, &path);
|
||||
BString serverPath(path.Path());
|
||||
serverPath << '/';
|
||||
size_t length = serverPath.Length();
|
||||
|
||||
static const char* kSystemPath = "/boot/system/servers/";
|
||||
size_t length = strlen(kSystemPath);
|
||||
|
||||
bool inSystem1 = !strncmp(kSystemPath, path1.Path(), length);
|
||||
bool inSystem2 = !strncmp(kSystemPath, path2.Path(), length);
|
||||
bool inSystem1 = !strncmp(serverPath.String(), path1.Path(), length);
|
||||
bool inSystem2 = !strncmp(serverPath.String(), path2.Path(), length);
|
||||
if (inSystem1 != inSystem2)
|
||||
return inSystem1 ? 1 : -1;
|
||||
|
||||
|
@ -366,15 +366,17 @@ RosterData::_InitializeCatalogAddOns()
|
||||
fCatalogAddOnInfos.AddItem((void*)defaultCatalogAddOnInfo);
|
||||
|
||||
directory_which folders[] = {
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY,
|
||||
B_SYSTEM_ADDONS_DIRECTORY,
|
||||
static_cast<directory_which>(-1)
|
||||
};
|
||||
BPath addOnPath;
|
||||
BDirectory addOnFolder;
|
||||
char buf[4096];
|
||||
status_t err;
|
||||
for (int f = 0; folders[f]>=0; ++f) {
|
||||
for (uint32 f = 0; f < sizeof(folders) / sizeof(directory_which); ++f) {
|
||||
find_directory(folders[f], &addOnPath);
|
||||
BString addOnFolderName(addOnPath.Path());
|
||||
addOnFolderName << "/locale/catalogs";
|
||||
|
@ -107,12 +107,14 @@ GLRendererRoster::AddDefaultPaths()
|
||||
{
|
||||
// add user directories first, so that they can override system renderers
|
||||
const directory_which paths[] = {
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY,
|
||||
B_BEOS_ADDONS_DIRECTORY,
|
||||
B_SYSTEM_ADDONS_DIRECTORY,
|
||||
};
|
||||
|
||||
for (uint32 i = fSafeMode ? 2 : 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
|
||||
for (uint32 i = fSafeMode ? 4 : 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
|
||||
BPath path;
|
||||
status_t status = find_directory(paths[i], &path, true);
|
||||
if (status == B_OK && path.Append("opengl") == B_OK)
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
|
||||
private:
|
||||
struct Token;
|
||||
struct ListElementParser;
|
||||
friend struct ListElementParser;
|
||||
|
||||
Token _NextToken();
|
||||
void _RewindTo(const Token& token);
|
||||
@ -77,6 +79,7 @@ private:
|
||||
BPackageArchitecture* value);
|
||||
void _ParseVersionValue(BPackageVersion* value,
|
||||
bool releaseIsOptional);
|
||||
void _ParseList(ListElementParser& elementParser);
|
||||
void _ParseStringList(BObjectList<BString>* value,
|
||||
bool allowQuotedStrings = true);
|
||||
void _ParseResolvableList(
|
||||
@ -139,6 +142,11 @@ struct BPackageInfo::Parser::Token {
|
||||
};
|
||||
|
||||
|
||||
struct BPackageInfo::Parser::ListElementParser {
|
||||
virtual void operator()(const Token& token) = 0;
|
||||
};
|
||||
|
||||
|
||||
BPackageInfo::ParseErrorListener::~ParseErrorListener()
|
||||
{
|
||||
}
|
||||
@ -277,7 +285,7 @@ BPackageInfo::Parser::_NextToken()
|
||||
{
|
||||
const char* start = fPos;
|
||||
while (isalnum(*fPos) || *fPos == '.' || *fPos == '-'
|
||||
|| *fPos == '_' || *fPos == ':') {
|
||||
|| *fPos == '_' || *fPos == ':' || *fPos == '+') {
|
||||
fPos++;
|
||||
}
|
||||
if (fPos == start)
|
||||
@ -384,8 +392,7 @@ BPackageInfo::Parser::_ParseVersionValue(BPackageVersion* value,
|
||||
|
||||
|
||||
void
|
||||
BPackageInfo::Parser::_ParseStringList(BObjectList<BString>* value, bool
|
||||
allowQuotedStrings)
|
||||
BPackageInfo::Parser::_ParseList(ListElementParser& elementParser)
|
||||
{
|
||||
Token openBracket = _NextToken();
|
||||
if (openBracket.type != TOKEN_OPEN_BRACKET)
|
||||
@ -401,12 +408,41 @@ BPackageInfo::Parser::_ParseStringList(BObjectList<BString>* value, bool
|
||||
if (token.type != TOKEN_COMMA)
|
||||
throw ParseError("expected comma", token.pos);
|
||||
token = _NextToken();
|
||||
if (token.type == TOKEN_CLOSE_BRACKET) {
|
||||
// silently skip trailing comma at end of list
|
||||
return;
|
||||
}
|
||||
} else
|
||||
needComma = true;
|
||||
|
||||
elementParser(token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BPackageInfo::Parser::_ParseStringList(BObjectList<BString>* value,
|
||||
bool allowQuotedStrings)
|
||||
{
|
||||
struct StringParser : public ListElementParser {
|
||||
BObjectList<BString>* value;
|
||||
bool allowQuotedStrings;
|
||||
|
||||
StringParser(BObjectList<BString>* value_, bool allowQuotedStrings_)
|
||||
:
|
||||
value(value_),
|
||||
allowQuotedStrings(allowQuotedStrings_)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void operator()(const Token& token)
|
||||
{
|
||||
if (allowQuotedStrings) {
|
||||
if (token.type != TOKEN_QUOTED_STRING && token.type != TOKEN_WORD)
|
||||
throw ParseError("expected quoted-string or word", token.pos);
|
||||
if (token.type != TOKEN_QUOTED_STRING
|
||||
&& token.type != TOKEN_WORD) {
|
||||
throw ParseError("expected quoted-string or word",
|
||||
token.pos);
|
||||
}
|
||||
} else {
|
||||
if (token.type != TOKEN_WORD)
|
||||
throw ParseError("expected word", token.pos);
|
||||
@ -414,31 +450,26 @@ BPackageInfo::Parser::_ParseStringList(BObjectList<BString>* value, bool
|
||||
|
||||
value->AddItem(new BString(token.text));
|
||||
}
|
||||
} stringParser(value, allowQuotedStrings);
|
||||
|
||||
_ParseList(stringParser);
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
BPackageInfo::Parser::_ParseFlags()
|
||||
{
|
||||
uint32 flags = 0;
|
||||
struct FlagParser : public ListElementParser {
|
||||
uint32 flags;
|
||||
|
||||
Token openBracket = _NextToken();
|
||||
if (openBracket.type != TOKEN_OPEN_BRACKET)
|
||||
throw ParseError("expected start of list ('[')", openBracket.pos);
|
||||
|
||||
bool needComma = false;
|
||||
while (true) {
|
||||
Token token = _NextToken();
|
||||
if (token.type == TOKEN_CLOSE_BRACKET)
|
||||
break;
|
||||
|
||||
if (needComma) {
|
||||
if (token.type != TOKEN_COMMA)
|
||||
throw ParseError("expected comma", token.pos);
|
||||
token = _NextToken();
|
||||
} else
|
||||
needComma = true;
|
||||
FlagParser()
|
||||
:
|
||||
flags(0)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void operator()(const Token& token)
|
||||
{
|
||||
if (token.type != TOKEN_WORD)
|
||||
throw ParseError("expected word (a flag)", token.pos);
|
||||
|
||||
@ -447,12 +478,16 @@ BPackageInfo::Parser::_ParseFlags()
|
||||
else if (token.text.ICompare("system_package") == 0)
|
||||
flags |= B_PACKAGE_FLAG_SYSTEM_PACKAGE;
|
||||
else {
|
||||
throw ParseError("expected 'approve_license' or 'system_package'",
|
||||
throw ParseError(
|
||||
"expected 'approve_license' or 'system_package'",
|
||||
token.pos);
|
||||
}
|
||||
}
|
||||
} flagParser;
|
||||
|
||||
return flags;
|
||||
_ParseList(flagParser);
|
||||
|
||||
return flagParser.flags;
|
||||
}
|
||||
|
||||
|
||||
@ -460,60 +495,63 @@ void
|
||||
BPackageInfo::Parser::_ParseResolvableList(
|
||||
BObjectList<BPackageResolvable>* value)
|
||||
{
|
||||
Token openBracket = _NextToken();
|
||||
if (openBracket.type != TOKEN_OPEN_BRACKET)
|
||||
throw ParseError("expected start of list ('[')", openBracket.pos);
|
||||
struct ResolvableParser : public ListElementParser {
|
||||
Parser& parser;
|
||||
BObjectList<BPackageResolvable>* value;
|
||||
|
||||
bool needComma = false;
|
||||
while (true) {
|
||||
BPackageResolvableType type = B_PACKAGE_RESOLVABLE_TYPE_DEFAULT;
|
||||
ResolvableParser(Parser& parser_,
|
||||
BObjectList<BPackageResolvable>* value_)
|
||||
:
|
||||
parser(parser_),
|
||||
value(value_)
|
||||
{
|
||||
}
|
||||
|
||||
Token word = _NextToken();
|
||||
if (word.type == TOKEN_CLOSE_BRACKET)
|
||||
return;
|
||||
virtual void operator()(const Token& token)
|
||||
{
|
||||
if (token.type != TOKEN_WORD) {
|
||||
throw ParseError("expected word (a resolvable name)",
|
||||
token.pos);
|
||||
}
|
||||
|
||||
if (needComma) {
|
||||
if (word.type != TOKEN_COMMA)
|
||||
throw ParseError("expected comma", word.pos);
|
||||
word = _NextToken();
|
||||
} else
|
||||
needComma = true;
|
||||
|
||||
if (word.type != TOKEN_WORD)
|
||||
throw ParseError("expected word (a resolvable name)", word.pos);
|
||||
|
||||
int32 colonPos = word.text.FindFirst(':');
|
||||
BPackageResolvableType type = B_PACKAGE_RESOLVABLE_TYPE_DEFAULT;
|
||||
int32 colonPos = token.text.FindFirst(':');
|
||||
if (colonPos >= 0) {
|
||||
BString typeName(word.text, colonPos);
|
||||
BString typeName(token.text, colonPos);
|
||||
for (int i = 0; i < B_PACKAGE_RESOLVABLE_TYPE_ENUM_COUNT; ++i) {
|
||||
if (typeName.ICompare(BPackageResolvable::kTypeNames[i]) == 0) {
|
||||
if (typeName.ICompare(BPackageResolvable::kTypeNames[i])
|
||||
== 0) {
|
||||
type = (BPackageResolvableType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (type == B_PACKAGE_RESOLVABLE_TYPE_DEFAULT) {
|
||||
BString error("resolvable type (<type>:) must be one of [");
|
||||
for (int i = 1; i < B_PACKAGE_RESOLVABLE_TYPE_ENUM_COUNT; ++i) {
|
||||
for (int i = 1; i < B_PACKAGE_RESOLVABLE_TYPE_ENUM_COUNT;
|
||||
++i) {
|
||||
if (i > 1)
|
||||
error << ",";
|
||||
error << BPackageResolvable::kTypeNames[i];
|
||||
}
|
||||
error << "]";
|
||||
throw ParseError(error, word.pos);
|
||||
throw ParseError(error, token.pos);
|
||||
}
|
||||
}
|
||||
|
||||
BPackageVersion version;
|
||||
Token op = _NextToken();
|
||||
Token op = parser._NextToken();
|
||||
if (op.type == TOKEN_OPERATOR_ASSIGN)
|
||||
_ParseVersionValue(&version, true);
|
||||
parser._ParseVersionValue(&version, true);
|
||||
else if (op.type == TOKEN_COMMA || op.type == TOKEN_CLOSE_BRACKET)
|
||||
_RewindTo(op);
|
||||
parser._RewindTo(op);
|
||||
else
|
||||
throw ParseError("expected '=', comma or ']'", op.pos);
|
||||
|
||||
value->AddItem(new BPackageResolvable(word.text, type, version));
|
||||
value->AddItem(new BPackageResolvable(token.text, type, version));
|
||||
}
|
||||
} resolvableParser(*this, value);
|
||||
|
||||
_ParseList(resolvableParser);
|
||||
}
|
||||
|
||||
|
||||
@ -521,37 +559,36 @@ void
|
||||
BPackageInfo::Parser::_ParseResolvableExprList(
|
||||
BObjectList<BPackageResolvableExpression>* value)
|
||||
{
|
||||
Token openBracket = _NextToken();
|
||||
if (openBracket.type != TOKEN_OPEN_BRACKET)
|
||||
throw ParseError("expected start of list ('[')", openBracket.pos);
|
||||
struct ResolvableExpressionParser : public ListElementParser {
|
||||
Parser& parser;
|
||||
BObjectList<BPackageResolvableExpression>* value;
|
||||
|
||||
bool needComma = false;
|
||||
while (true) {
|
||||
Token name = _NextToken();
|
||||
if (name.type == TOKEN_CLOSE_BRACKET)
|
||||
return;
|
||||
ResolvableExpressionParser(Parser& parser_,
|
||||
BObjectList<BPackageResolvableExpression>* value_)
|
||||
:
|
||||
parser(parser_),
|
||||
value(value_)
|
||||
{
|
||||
}
|
||||
|
||||
if (needComma) {
|
||||
if (name.type != TOKEN_COMMA)
|
||||
throw ParseError("expected comma", name.pos);
|
||||
name = _NextToken();
|
||||
} else
|
||||
needComma = true;
|
||||
|
||||
if (name.type != TOKEN_WORD)
|
||||
throw ParseError("expected word (a resolvable name)", name.pos);
|
||||
virtual void operator()(const Token& token)
|
||||
{
|
||||
if (token.type != TOKEN_WORD) {
|
||||
throw ParseError("expected word (a resolvable name)",
|
||||
token.pos);
|
||||
}
|
||||
|
||||
BPackageVersion version;
|
||||
Token op = _NextToken();
|
||||
Token op = parser._NextToken();
|
||||
if (op.type == TOKEN_OPERATOR_LESS
|
||||
|| op.type == TOKEN_OPERATOR_LESS_EQUAL
|
||||
|| op.type == TOKEN_OPERATOR_EQUAL
|
||||
|| op.type == TOKEN_OPERATOR_NOT_EQUAL
|
||||
|| op.type == TOKEN_OPERATOR_GREATER_EQUAL
|
||||
|| op.type == TOKEN_OPERATOR_GREATER)
|
||||
_ParseVersionValue(&version, true);
|
||||
parser._ParseVersionValue(&version, true);
|
||||
else if (op.type == TOKEN_COMMA || op.type == TOKEN_CLOSE_BRACKET)
|
||||
_RewindTo(op);
|
||||
parser._RewindTo(op);
|
||||
else {
|
||||
throw ParseError(
|
||||
"expected '<', '<=', '==', '!=', '>=', '>', comma or ']'",
|
||||
@ -561,9 +598,12 @@ BPackageInfo::Parser::_ParseResolvableExprList(
|
||||
BPackageResolvableOperator resolvableOperator
|
||||
= (BPackageResolvableOperator)(op.type - TOKEN_OPERATOR_LESS);
|
||||
|
||||
value->AddItem(new BPackageResolvableExpression(name.text,
|
||||
value->AddItem(new BPackageResolvableExpression(token.text,
|
||||
resolvableOperator, version));
|
||||
}
|
||||
} resolvableExpressionParser(*this, value);
|
||||
|
||||
_ParseList(resolvableExpressionParser);
|
||||
}
|
||||
|
||||
|
||||
@ -665,6 +705,11 @@ BPackageInfo::Parser::_Parse(BPackageInfo* packageInfo)
|
||||
_ParseVersionValue(&version, false);
|
||||
packageInfo->SetVersion(version);
|
||||
seen[B_PACKAGE_INFO_VERSION] = true;
|
||||
} else if (t.text.ICompare("copyright") == 0) {
|
||||
BString copyright;
|
||||
_ParseStringValue(©right);
|
||||
packageInfo->AddCopyright(copyright);
|
||||
seen[B_PACKAGE_INFO_COPYRIGHTS] = true;
|
||||
} else if (t.text.ICompare(names[B_PACKAGE_INFO_COPYRIGHTS]) == 0) {
|
||||
if (seen[B_PACKAGE_INFO_COPYRIGHTS]) {
|
||||
BString error = BString(names[B_PACKAGE_INFO_COPYRIGHTS])
|
||||
@ -678,6 +723,11 @@ BPackageInfo::Parser::_Parse(BPackageInfo* packageInfo)
|
||||
for (int i = 0; i < count; ++i)
|
||||
packageInfo->AddCopyright(*(copyrightList.ItemAt(i)));
|
||||
seen[B_PACKAGE_INFO_COPYRIGHTS] = true;
|
||||
} else if (t.text.ICompare("license") == 0) {
|
||||
BString license;
|
||||
_ParseStringValue(&license);
|
||||
packageInfo->AddLicense(license);
|
||||
seen[B_PACKAGE_INFO_LICENSES] = true;
|
||||
} else if (t.text.ICompare(names[B_PACKAGE_INFO_LICENSES]) == 0) {
|
||||
if (seen[B_PACKAGE_INFO_LICENSES]) {
|
||||
BString error = BString(names[B_PACKAGE_INFO_LICENSES])
|
||||
@ -769,8 +819,7 @@ BPackageInfo::Parser::_Parse(BPackageInfo* packageInfo)
|
||||
for (int i = 0; i < count; ++i)
|
||||
packageInfo->AddReplaces(*(replacesList.ItemAt(i)));
|
||||
seen[B_PACKAGE_INFO_REPLACES] = true;
|
||||
} else if (t.text.ICompare(names[B_PACKAGE_INFO_FLAGS])
|
||||
== 0) {
|
||||
} else if (t.text.ICompare(names[B_PACKAGE_INFO_FLAGS]) == 0) {
|
||||
if (seen[B_PACKAGE_INFO_FLAGS]) {
|
||||
BString error = BString(names[B_PACKAGE_INFO_FLAGS])
|
||||
<< " already seen!";
|
||||
|
@ -70,19 +70,22 @@ status_t PrintTransport::Open(BNode* printerFolder)
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
// try first in user add-ons directory
|
||||
const directory_which paths[] = {
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY,
|
||||
B_SYSTEM_ADDONS_DIRECTORY,
|
||||
};
|
||||
BPath path;
|
||||
find_directory(B_USER_ADDONS_DIRECTORY, &path);
|
||||
for (uint32 i = 0; i < sizeof(paths) / sizeof(paths[0]); ++i) {
|
||||
if (find_directory(paths[i], &path) != B_OK)
|
||||
continue;
|
||||
path.Append("Print/transport");
|
||||
path.Append(transportName.String());
|
||||
fAddOnID = load_add_on(path.Path());
|
||||
|
||||
if (fAddOnID < 0) {
|
||||
// on failure try in system add-ons directory
|
||||
find_directory(B_BEOS_ADDONS_DIRECTORY, &path);
|
||||
path.Append("Print/transport");
|
||||
path.Append(transportName.String());
|
||||
fAddOnID = load_add_on(path.Path());
|
||||
if (fAddOnID >= 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (fAddOnID < 0) {
|
||||
|
@ -403,13 +403,18 @@ BPrinter::_DriverPath() const
|
||||
if (driverName.Length() <= 0)
|
||||
return BPath();
|
||||
|
||||
directory_which directorys[] = { B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY, B_BEOS_ADDONS_DIRECTORY };
|
||||
directory_which directories[] = {
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY,
|
||||
B_SYSTEM_ADDONS_DIRECTORY
|
||||
};
|
||||
|
||||
BPath path;
|
||||
driverName.Prepend("Print/");
|
||||
for (int32 i = 0; i < 3; ++i) {
|
||||
if (find_directory(directorys[i], &path) == B_OK) {
|
||||
for (int32 i = 0; i < sizeof(directories) / sizeof(directories[0]); ++i) {
|
||||
if (find_directory(directories[i], &path) == B_OK) {
|
||||
path.Append(driverName.String());
|
||||
|
||||
BEntry driver(path.Path());
|
||||
|
@ -159,17 +159,27 @@ status_t
|
||||
PrinterDriverAddOn::FindPathToDriver(const char* driver, BPath* path)
|
||||
{
|
||||
status_t result;
|
||||
result = ::TestForAddonExistence(driver,
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
|
||||
if (result == B_OK)
|
||||
return B_OK;
|
||||
|
||||
result = ::TestForAddonExistence(driver, B_USER_ADDONS_DIRECTORY,
|
||||
kPrinterDriverFolderName, *path);
|
||||
if (result == B_OK)
|
||||
return B_OK;
|
||||
|
||||
result = ::TestForAddonExistence(driver,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
|
||||
if (result == B_OK)
|
||||
return B_OK;
|
||||
|
||||
result = ::TestForAddonExistence(driver, B_COMMON_ADDONS_DIRECTORY,
|
||||
kPrinterDriverFolderName, *path);
|
||||
if (result == B_OK)
|
||||
return B_OK;
|
||||
|
||||
result = ::TestForAddonExistence(driver, B_BEOS_ADDONS_DIRECTORY,
|
||||
result = ::TestForAddonExistence(driver, B_SYSTEM_ADDONS_DIRECTORY,
|
||||
kPrinterDriverFolderName, *path);
|
||||
return result;
|
||||
}
|
||||
|
@ -117,8 +117,13 @@ ScreenSaverRunner::_LoadAddOn()
|
||||
|
||||
// try all directories until the first one succeeds
|
||||
|
||||
directory_which which[] = {B_BEOS_ADDONS_DIRECTORY, B_COMMON_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY};
|
||||
directory_which which[] = {
|
||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_USER_ADDONS_DIRECTORY,
|
||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
||||
B_COMMON_ADDONS_DIRECTORY,
|
||||
B_SYSTEM_ADDONS_DIRECTORY,
|
||||
};
|
||||
BPath path;
|
||||
|
||||
for (uint32 i = 0; i < sizeof(which) / sizeof(which[0]); i++) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user