* Changed directory structure as suggested on the mailing list.

* Made the TimeZoneView less error prone, and also actually use Haiku code (the
  previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
  to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
  though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
  so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
  update them yet, as we'll probably do so anyway at some point. Also, I think
  we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-04-03 09:02:44 +00:00
parent 7a517c04b0
commit 317bd7dda3
38 changed files with 919 additions and 911 deletions

View File

@ -171,21 +171,21 @@ switch $(HAIKU_CPU) {
{
HAIKU_DEFINES += __POWERPC__ ;
HAIKU_BOOT_PLATFORM = openfirmware ;
# offset in floppy image (>= sizeof(zbeos))
# offset in floppy image (>= sizeof(haiku_loader))
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
}
case x86 :
{
HAIKU_DEFINES += __INTEL__ ;
HAIKU_BOOT_PLATFORM = bios_ia32 ;
# offset in floppy image (>= sizeof(zbeos))
# offset in floppy image (>= sizeof(haiku_loader))
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB
}
case m68k :
{
HAIKU_DEFINES += __M68K__ ;
HAIKU_BOOT_PLATFORM = atari_m68k ;
# offset in floppy image (>= sizeof(zbeos))
# offset in floppy image (>= sizeof(haiku_loader))
HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 130 ; # in kB
}
case * :

View File

@ -18,7 +18,7 @@ if $(INCLUDE_GPL_ADDONS) = 1 {
GPL_ONLY = "" ;
}
BEOS_BIN = "[" addattr alert arp base64 basename bc beep bootman bzip2
SYSTEM_BIN = "[" addattr alert arp base64 basename bc beep bootman bzip2
cal cat catattr checkfs chgrp chmod chop chown chroot cksum clear
clockconfig cmp comm compress copyattr $(X86_ONLY)CortexAddOnHost cp
csplit ctags cut date dc dd desklink df diff diff3 dircolors dirname
@ -48,50 +48,51 @@ BEOS_BIN = "[" addattr alert arp base64 basename bc beep bootman bzip2
zdiff zforce zgrep zip zipcloak <bin>zipgrep zipnote zipsplit zmore znew
;
BEOS_APPS = AboutSystem ActivityMonitor CharacterMap CodyCam DeskCalc DiskProbe
SYSTEM_APPS = AboutSystem ActivityMonitor CharacterMap CodyCam DeskCalc DiskProbe
DiskUsage DriveSetup CDPlayer Expander Icon-O-Matic Installer LaunchBox
Magnify Mail MediaPlayer MidiPlayer NetworkStatus PackageInstaller People
PowerStatus ProcessController Screenshot ShowImage SoundRecorder StyledEdit
Terminal TextSearch TV Workspaces
;
BEOS_PREFERENCES = Appearance Backgrounds DataTranslations E-mail
SYSTEM_PREFERENCES = Appearance Backgrounds DataTranslations E-mail
FileTypes Fonts Keyboard Keymap Media Menu Mouse Network Printers Screen
ScreenSaver Sounds Time Touchpad <preference>Tracker VirtualMemory
;
BEOS_DEMOS = BSnow Chart Clock $(X86_ONLY)Cortex FontDemo
SYSTEM_DEMOS = BSnow Chart Clock $(X86_ONLY)Cortex FontDemo
$(X86_ONLY)GLDirectMode $(X86_ONLY)GLTeapot Mandelbrot Pairs
Playground Pulse Sudoku Gradients
;
BEOS_SYSTEM_LIBS = libbe.so $(HAIKU_LIBSTDC++) libmedia.so libtracker.so
SYSTEM_LIBS = libbe.so $(HAIKU_LIBSTDC++) libmedia.so libtracker.so
libtranslation.so libbnetapi.so libnetwork.so libdebug.so libbsd.so
libmail.so libtextencoding.so libz.so libfreetype.so libpng.so libmidi.so
libmidi2.so libdevice.so libgame.so libscreensaver.so <revisioned>libroot.so
$(X86_ONLY)libGL.so libfluidsynth.so liblpsolve55.so liblinprog.so libalm.so
libilmimf.so libiconv.so
;
BEOS_SYSTEM_SERVERS = registrar debug_server syslog_daemon media_server
SYSTEM_SERVERS = registrar debug_server syslog_daemon media_server
net_server media_addon_server input_server app_server fake_app_server
midi_server print_server mail_daemon
;
BEOS_NETWORK_DEVICES = ethernet loopback ;
BEOS_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame
SYSTEM_NETWORK_DEVICES = ethernet loopback ;
SYSTEM_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame
ipv4_datagram ;
#BEOS_NETWORK_PPP = ipcp modem pap pppoe ;
BEOS_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix ;
#SYSTEM_NETWORK_PPP = ipcp modem pap pppoe ;
SYSTEM_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix ;
BEOS_ADD_ONS_ACCELERANTS = $(X86_ONLY)radeon.accelerant $(X86_ONLY)nvidia.accelerant
$(X86_ONLY)matrox.accelerant $(X86_ONLY)neomagic.accelerant
$(X86_ONLY)intel_extreme.accelerant $(X86_ONLY)s3.accelerant $(X86_ONLY)vesa.accelerant
SYSTEM_ADD_ONS_ACCELERANTS = $(X86_ONLY)radeon.accelerant
$(X86_ONLY)nvidia.accelerant $(X86_ONLY)matrox.accelerant
$(X86_ONLY)neomagic.accelerant $(X86_ONLY)intel_extreme.accelerant
$(X86_ONLY)s3.accelerant $(X86_ONLY)vesa.accelerant
#$(X86_ONLY)via.accelerant
#$(X86_ONLY)vmware.accelerant
;
BEOS_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator JPEGTranslator
JPEG2000Translator PCXTranslator PNGTranslator PPMTranslator RAWTranslator
RTF-Translator SGITranslator STXTTranslator TGATranslator
SYSTEM_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator
JPEGTranslator JPEG2000Translator PCXTranslator PNGTranslator PPMTranslator
RAWTranslator RTF-Translator SGITranslator STXTTranslator TGATranslator
TIFFTranslator WonderBrushTranslator
;
BEOS_ADD_ONS_MEDIA = cortex_audioadapter.media_addon cortex_flanger.media_addon
SYSTEM_ADD_ONS_MEDIA = cortex_audioadapter.media_addon cortex_flanger.media_addon
dvb.media_addon
hmulti_audio.media_addon
mixer.media_addon
@ -103,7 +104,7 @@ BEOS_ADD_ONS_MEDIA = cortex_audioadapter.media_addon cortex_flanger.media_addon
firewire_dv.media_addon
#legacy.media_addon
;
BEOS_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder
SYSTEM_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder
aiff_reader au_reader $(X86_ONLY)avcodec avi_reader
matroska mov_reader
mp3_decoder mp3_reader
@ -112,21 +113,21 @@ BEOS_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder
# theora
vorbis wav_reader
;
BEOS_ADD_ONS_PRINT = Canon\ LIPS3\ Compatible Canon\ LIPS4\ Compatible
SYSTEM_ADD_ONS_PRINT = Canon\ LIPS3\ Compatible Canon\ LIPS4\ Compatible
PCL5\ Compatible PCL6\ Compatible PDF\ Writer PS\ Compatible Preview
;
BEOS_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR Parallel\ Port
SYSTEM_ADD_ONS_PRINT_TRANSPORT = HP\ JetDirect IPP LPR Parallel\ Port
Print\ To\ File Serial\ Port USB\ Port
;
BEOS_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku IFS Spider Message ;
BEOS_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ;
BEOS_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia sis7018 usb_audio ;
BEOS_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia
SYSTEM_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku IFS Spider Message ;
SYSTEM_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ;
SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia sis7018 usb_audio ;
SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia
$(X86_ONLY)neomagic $(X86_ONLY)matrox $(X86_ONLY)intel_extreme
$(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware
;
BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ;
BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x
SYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki ;
SYSTEM_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x
$(X86_ONLY)broadcom570x etherpci $(X86_ONLY)ipro1000
pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900
$(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce
@ -134,44 +135,44 @@ BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x
$(X86_ONLY)marvell_yukon $(X86_ONLY)syskonnect
$(X86_ONLY)attansic_l2 $(X86_ONLY)ar81xx usb_ecm
;
#BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ;
BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi
#SYSTEM_ADD_ONS_DRIVERS_POWER = $(X86_ONLY)acpi_button ;
SYSTEM_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi
config_manager agp_gart usb firewire $(X86_ONLY)acpi
;
BEOS_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs attribute_overlay
SYSTEM_ADD_ONS_FILE_SYSTEMS = bfs cdda ext2 fat iso9660 nfs attribute_overlay
write_overlay $(GPL_ONLY)reiserfs ;
#googlefs $(GPL_ONLY)ntfs ;
# modules
AddFilesToHaikuImage beos system add-ons kernel bus_managers
: $(BEOS_ADD_ONS_BUS_MANAGERS) ;
AddFilesToHaikuImage beos system add-ons kernel busses agp_gart
AddFilesToHaikuImage system add-ons kernel bus_managers
: $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
AddFilesToHaikuImage system add-ons kernel busses agp_gart
: $(X86_ONLY)<agp_gart>intel ;
AddFilesToHaikuImage beos system add-ons kernel busses ide
AddFilesToHaikuImage system add-ons kernel busses ide
: generic_ide_pci it8211 legacy_sata silicon_image_3112 $(X86_ONLY)ide_isa ;
AddFilesToHaikuImage beos system add-ons kernel busses scsi
AddFilesToHaikuImage system add-ons kernel busses scsi
: ahci ;
AddFilesToHaikuImage beos system add-ons kernel busses usb
AddFilesToHaikuImage system add-ons kernel busses usb
: <usb>uhci <usb>ohci <usb>ehci ;
AddFilesToHaikuImage beos system add-ons kernel console : vga_text ;
AddFilesToHaikuImage beos system add-ons kernel debugger
AddFilesToHaikuImage system add-ons kernel console : vga_text ;
AddFilesToHaikuImage system add-ons kernel debugger
: $(X86_ONLY)<kdebug>disasm <kdebug>hangman <kdebug>invalidate_on_exit
<kdebug>usb_keyboard ;
AddFilesToHaikuImage beos system add-ons kernel file_systems
: $(BEOS_ADD_ONS_FILE_SYSTEMS) ;
AddFilesToHaikuImage beos system add-ons kernel generic
AddFilesToHaikuImage system add-ons kernel file_systems
: $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
AddFilesToHaikuImage system add-ons kernel generic
: dpc ide_adapter locked_pool mpu401 scsi_periph ;
AddFilesToHaikuImage beos system add-ons kernel partitioning_systems
AddFilesToHaikuImage system add-ons kernel partitioning_systems
: intel session ;
AddFilesToHaikuImage beos system add-ons kernel interrupt_controllers
AddFilesToHaikuImage system add-ons kernel interrupt_controllers
: $(PPC_ONLY)openpic ;
if $(TARGET_ARCH) = x86 {
AddFilesToHaikuImage beos system add-ons kernel cpu : generic_x86 ;
AddFilesToHaikuImage system add-ons kernel cpu : generic_x86 ;
if $(HAIKU_GCC_VERSION[1]) = 2 {
AddFilesToHaikuImage beos system add-ons kernel debugger demangle :
AddFilesToHaikuImage system add-ons kernel debugger demangle :
<kdebug>gcc2 ;
}
}
@ -182,62 +183,62 @@ AddNewDriversToHaikuImage disk scsi : scsi_cd scsi_disk ;
# legacy drivers
AddDriversToHaikuImage : console dprintf $(X86_ONLY)keyboard null
random <driver>tty zero ;
AddDriversToHaikuImage audio hmulti : $(BEOS_ADD_ONS_DRIVERS_AUDIO) ;
AddDriversToHaikuImage audio old : $(BEOS_ADD_ONS_DRIVERS_AUDIO_OLD) ;
AddDriversToHaikuImage midi : $(BEOS_ADD_ONS_DRIVERS_MIDI) ;
AddDriversToHaikuImage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
AddDriversToHaikuImage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
AddDriversToHaikuImage midi : $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
AddDriversToHaikuImage bus : usb_raw fw_raw ;
AddDriversToHaikuImage disk floppy : $(X86_ONLY)pc_floppy ;
AddDriversToHaikuImage disk usb : usb_disk ;
AddDriversToHaikuImage disk virtual : nbd ;
AddDriversToHaikuImage dvb : cx23882 ;
AddDriversToHaikuImage graphics : $(BEOS_ADD_ONS_DRIVERS_GRAPHICS) ;
AddDriversToHaikuImage graphics : $(SYSTEM_ADD_ONS_DRIVERS_GRAPHICS) ;
AddDriversToHaikuImage input : ps2_hid usb_hid wacom ;
AddDriversToHaikuImage misc : <driver>poke <driver>test <driver>mem ;
AddDriversToHaikuImage net : $(BEOS_ADD_ONS_DRIVERS_NET) ;
#AddDriversToHaikuImage power : $(BEOS_ADD_ONS_DRIVERS_ACPI) ;
AddDriversToHaikuImage net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
#AddDriversToHaikuImage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
# kernel
AddFilesToHaikuImage beos system : <revisioned>kernel_$(TARGET_ARCH) ;
AddFilesToHaikuImage system : <revisioned>kernel_$(TARGET_ARCH) ;
# libs
AddFilesToHaikuImage beos system lib : $(BEOS_SYSTEM_LIBS) ;
AddFilesToHaikuImage system lib : $(SYSTEM_LIBS) ;
# libnetwork.so replaces quite a few libraries
BEOS_SYSTEM_LIBS_LIBNETWORK_ALIASES
SYSTEM_LIBS_LIBNETWORK_ALIASES
= libsocket.so libbind.so libnet.so ;
local lib ;
for lib in $(BEOS_SYSTEM_LIBS_LIBNETWORK_ALIASES) {
AddSymlinkToHaikuImage beos system lib : libnetwork.so : $(lib) ;
for lib in $(SYSTEM_LIBS_LIBNETWORK_ALIASES) {
AddSymlinkToHaikuImage system lib : libnetwork.so : $(lib) ;
}
AddSymlinkToHaikuImage beos system lib : libbnetapi.so : libnetapi.so ;
AddSymlinkToHaikuImage system lib : libbnetapi.so : libnetapi.so ;
# libGL.so has GLU (like BeOS) *and* GLUT API built-in
BEOS_SYSTEM_LIBS_LIBGL_ALIASES
SYSTEM_LIBS_LIBGL_ALIASES
= libGLU.so libglut.so ;
if $(TARGET_ARCH) = x86 {
local lib ;
for lib in $(BEOS_SYSTEM_LIBS_LIBGL_ALIASES) {
AddSymlinkToHaikuImage beos system lib : libGL.so : $(lib) ;
for lib in $(SYSTEM_LIBS_LIBGL_ALIASES) {
AddSymlinkToHaikuImage system lib : libGL.so : $(lib) ;
}
}
# servers
AddFilesToHaikuImage beos system servers : $(BEOS_SYSTEM_SERVERS) ;
AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
# apps
AddFilesToHaikuImage beos system : runtime_loader Deskbar Tracker ;
AddFilesToHaikuImage beos bin : $(BEOS_BIN) consoled ;
AddFilesToHaikuImage beos apps : $(BEOS_APPS) ;
AddFilesToHaikuImage beos preferences : $(BEOS_PREFERENCES) ;
AddFilesToHaikuImage beos demos : $(BEOS_DEMOS) ;
AddFilesToHaikuImage system : runtime_loader Deskbar Tracker ;
AddFilesToHaikuImage system bin : $(SYSTEM_BIN) consoled ;
AddFilesToHaikuImage system apps : $(SYSTEM_APPS) ;
AddFilesToHaikuImage system preferences : $(SYSTEM_PREFERENCES) ;
AddFilesToHaikuImage system demos : $(SYSTEM_DEMOS) ;
SEARCH on which = [ FDirName $(HAIKU_TOP) data bin ] ;
AddFilesToHaikuImage beos bin : which ;
AddFilesToHaikuImage system bin : which ;
AddSymlinkToHaikuImage beos bin : sh : bash ;
AddSymlinkToHaikuImage system bin : sh : bash ;
AddSymlinkToHaikuImage home Desktop : /boot/home : Home ;
@ -250,7 +251,7 @@ DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap CodyCam CDPlayer DeskCalc
local linkTarget ;
for linkTarget in $(DESKBAR_APPLICATIONS) {
AddSymlinkToHaikuImage home config be Applications
: /boot/beos/apps/$(linkTarget) : $(linkTarget) ;
: /boot/system/apps/$(linkTarget) : $(linkTarget) ;
}
# Deskbar Desktop Applets links
@ -260,12 +261,12 @@ DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController
;
for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
AddSymlinkToHaikuImage home config be Desktop\ Applets
: /boot/beos/apps/$(linkTarget) : $(linkTarget) ;
: /boot/system/apps/$(linkTarget) : $(linkTarget) ;
}
# Deskbar Preferences links
AddDirectoryToHaikuImage home config be Preferences ;
# TODO/NOTE: Cannot use $(BEOS_PREFERENCES) here since there is
# TODO/NOTE: Cannot use $(SYSTEM_PREFERENCES) here since there is
# "<preferences>Tracker"...
DESKBAR_PREFERENCES = Appearance Backgrounds DataTranslations E-mail
FileTypes Fonts Keyboard Keymap Media Menu Mouse Network Printers Screen
@ -273,34 +274,34 @@ DESKBAR_PREFERENCES = Appearance Backgrounds DataTranslations E-mail
;
for linkTarget in $(DESKBAR_PREFERENCES) {
AddSymlinkToHaikuImage home config be Preferences
: /boot/beos/preferences/$(linkTarget) : $(linkTarget) ;
: /boot/system/preferences/$(linkTarget) : $(linkTarget) ;
}
# Deskbar Demo links
AddDirectoryToHaikuImage home config be Demos ;
for linkTarget in $(BEOS_DEMOS) {
for linkTarget in $(SYSTEM_DEMOS) {
AddSymlinkToHaikuImage home config be Demos
: /boot/beos/demos/$(linkTarget) : $(linkTarget) ;
: /boot/system/demos/$(linkTarget) : $(linkTarget) ;
}
AddSymlinkToHaikuImage beos bin : bzip2 : bunzip2 ;
AddSymlinkToHaikuImage beos bin : less : more ;
AddSymlinkToHaikuImage beos bin : gzip : gunzip ;
AddSymlinkToHaikuImage beos bin : gzip : zcat ;
AddSymlinkToHaikuImage beos bin : zdiff : zcmp ;
AddSymlinkToHaikuImage beos bin : unzip : zipinfo ;
AddSymlinkToHaikuImage beos bin : gawk : awk ;
AddSymlinkToHaikuImage beos bin : grep : egrep ;
AddSymlinkToHaikuImage beos bin : grep : fgrep ;
AddSymlinkToHaikuImage beos bin : vim : vi ;
AddSymlinkToHaikuImage beos bin : vim : view ;
AddSymlinkToHaikuImage system bin : bzip2 : bunzip2 ;
AddSymlinkToHaikuImage system bin : less : more ;
AddSymlinkToHaikuImage system bin : gzip : gunzip ;
AddSymlinkToHaikuImage system bin : gzip : zcat ;
AddSymlinkToHaikuImage system bin : zdiff : zcmp ;
AddSymlinkToHaikuImage system bin : unzip : zipinfo ;
AddSymlinkToHaikuImage system bin : gawk : awk ;
AddSymlinkToHaikuImage system bin : grep : egrep ;
AddSymlinkToHaikuImage system bin : grep : fgrep ;
AddSymlinkToHaikuImage system bin : vim : vi ;
AddSymlinkToHaikuImage system bin : vim : view ;
# scripts and data files
local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript InstallerInitScript
InstallerFinishScript ;
SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
AddFilesToHaikuImage beos system boot : $(bootScripts) ;
AddFilesToHaikuImage system boot : $(bootScripts) ;
local userBootScripts = UserBootscript.sample UserSetupEnvironment.sample ;
SEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ;
@ -309,25 +310,25 @@ AddFilesToHaikuImage home config boot : $(userBootScripts) ;
local logoArtwork = "HAIKU logo - white on blue - big.png"
"HAIKU logo - white on blue - normal.png" ;
SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ;
AddFilesToHaikuImage beos etc artwork : $(logoArtwork) ;
AddFilesToHaikuImage system data artwork : $(logoArtwork) ;
AddDirectoryToHaikuImage beos etc sounds ;
AddDirectoryToHaikuImage system data sounds ;
# Mail spell check dictionaries
local spellFiles = words geekspeak ;
spellFiles = $(spellFiles:G=spell) ;
SEARCH on $(spellFiles)
= [ FDirName $(HAIKU_TOP) src apps mail ] ;
AddFilesToHaikuImage beos etc word_dictionary : $(spellFiles) ;
AddFilesToHaikuImage system etc word_dictionary : $(spellFiles) ;
local etcFiles = inputrc profile teapot.data ;
etcFiles = $(etcFiles:G=etc) ;
SEARCH on $(etcFiles) = [ FDirName $(HAIKU_TOP) data etc ] ;
etcFiles += <etc>termcap <etc>sysless <etc>sysless.in ;
AddFilesToHaikuImage beos etc : $(etcFiles) ;
AddFilesToHaikuImage system etc : $(etcFiles) ;
SEARCH on <etc>vimrc = [ FDirName $(HAIKU_TOP) data etc vim ] ;
AddFilesToHaikuImage beos etc vim : <etc>vimrc ;
AddFilesToHaikuImage system etc vim : <etc>vimrc ;
local fortuneFiles = Art Computers Education Food Fortunes Goedel Haiku
Humorists Kids Law "Linux cookies" Love Magic Medicine Miscellaneous
@ -335,37 +336,37 @@ local fortuneFiles = Art Computers Education Food Fortunes Goedel Haiku
Sports "Tech Support Excuses" ;
fortuneFiles = $(fortuneFiles:G=etc!fortunes) ;
SEARCH on $(fortuneFiles) = [ FDirName $(HAIKU_TOP) data etc fortunes ] ;
AddFilesToHaikuImage beos etc fortunes : $(fortuneFiles) ;
AddFilesToHaikuImage system etc fortunes : $(fortuneFiles) ;
local fontDir = [ FDirName $(HAIKU_TOP) data etc fonts ] ;
local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ;
AddFilesToHaikuImage beos etc fonts psfonts : $(psFonts) ;
AddFilesToHaikuImage beos etc fonts ttfonts : $(ttFonts) ;
AddFilesToHaikuImage system fonts psfonts : $(psFonts) ;
AddFilesToHaikuImage system fonts ttfonts : $(ttFonts) ;
local kanbeDir = [ FDirName $(HAIKU_TOP) data etc KanBe ] ;
local kanbeDefault = [ Glob $(kanbeDir)/default : *.canna *.gz ] ;
local kanbeDic = [ Glob $(kanbeDir)/dic : *.cbp ] ;
local kanbeDicCanna = [ Glob $(kanbeDir)/dic/canna
: *.cld *.ctd *.cbd *.dir ] ;
AddFilesToHaikuImage beos etc KanBe default : $(kanbeDefault) ;
AddFilesToHaikuImage beos etc KanBe dic : $(kanbeDic) ;
AddFilesToHaikuImage beos etc KanBe dic canna : $(kanbeDicCanna) ;
AddDirectoryToHaikuImage beos etc KanBe dic group ;
AddDirectoryToHaikuImage beos etc KanBe dic user ;
AddFilesToHaikuImage system data KanBe default : $(kanbeDefault) ;
AddFilesToHaikuImage system data KanBe dic : $(kanbeDic) ;
AddFilesToHaikuImage system data KanBe dic canna : $(kanbeDicCanna) ;
AddDirectoryToHaikuImage system data KanBe dic group ;
AddDirectoryToHaikuImage system data KanBe dic user ;
local keymapFiles = [ GLOB [ FDirName $(HAIKU_TOP) src data etc keymaps ]
: *.keymap ] ;
keymapFiles = $(keymapFiles:BG=keymap) ;
AddFilesToHaikuImage beos etc Keymap : $(keymapFiles) ;
AddSymlinkToHaikuImage beos etc Keymap : Swedish : Finnish ;
AddSymlinkToHaikuImage beos etc Keymap : Slovene : Croatian ;
AddSymlinkToHaikuImage beos etc Keymap : US-International : Brazilian ;
AddFilesToHaikuImage system data Keymaps : $(keymapFiles) ;
AddSymlinkToHaikuImage system data Keymaps : Swedish : Finnish ;
AddSymlinkToHaikuImage system data Keymaps : Slovene : Croatian ;
AddSymlinkToHaikuImage system data Keymaps : US-International : Brazilian ;
local timezones = [ FTimeZoneBinaries $(HAIKU_TIME_ZONE_SOURCES) : : true ] ;
for timezone in $(timezones) {
local dir = [ on $(timezone) return $(RELATIVE_TIMEZONE_DIR) ] ;
AddFilesToHaikuImage beos etc timezones $(dir) : $(timezone) ;
AddFilesToHaikuImage system data timezones $(dir) : $(timezone) ;
}
local driverSettingsFiles = <driver-settings>kernel ;
@ -390,7 +391,7 @@ AddFilesToHaikuImage common boot post_install : $(postInstallFiles) ;
AddFilesToHaikuImage common settings : <post-install>fresh_install ;
# boot loader
AddFilesToHaikuImage beos system : zbeos ;
AddFilesToHaikuImage system : haiku_loader ;
# boot module links
AddBootModuleSymlinksToHaikuImage
@ -405,48 +406,48 @@ AddBootModuleSymlinksToHaikuImage
;
# add-ons
AddFilesToHaikuImage beos system add-ons accelerants
: $(BEOS_ADD_ONS_ACCELERANTS) ;
AddFilesToHaikuImage beos system add-ons opengl
AddFilesToHaikuImage system add-ons accelerants
: $(SYSTEM_ADD_ONS_ACCELERANTS) ;
AddFilesToHaikuImage system add-ons opengl
: $(X86_ONLY)Mesa\ Software\ Renderer ;
AddFilesToHaikuImage beos system add-ons Translators
: $(BEOS_ADD_ONS_TRANSLATORS) ;
AddFilesToHaikuImage beos system add-ons mail_daemon inbound_protocols : POP3 IMAP ;
AddFilesToHaikuImage beos system add-ons mail_daemon outbound_protocols : SMTP ;
AddFilesToHaikuImage beos system add-ons mail_daemon inbound_filters : Match\ Header Spam\ Filter R5\ Daemon\ Filter ;
AddFilesToHaikuImage beos system add-ons mail_daemon outbound_filters : Fortune ;
AddFilesToHaikuImage beos system add-ons mail_daemon system_filters : Inbox New\ Mail\ Notification Outbox Message\ Parser ;
AddFilesToHaikuImage beos system add-ons media : $(BEOS_ADD_ONS_MEDIA) ;
AddFilesToHaikuImage beos system add-ons media plugins
: $(BEOS_ADD_ONS_MEDIA_PLUGINS) ;
AddFilesToHaikuImage beos system add-ons Tracker
AddFilesToHaikuImage system add-ons Translators
: $(SYSTEM_ADD_ONS_TRANSLATORS) ;
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 : Match\ Header Spam\ Filter R5\ Daemon\ Filter ;
AddFilesToHaikuImage system add-ons mail_daemon outbound_filters : Fortune ;
AddFilesToHaikuImage system add-ons mail_daemon system_filters : Inbox New\ Mail\ Notification Outbox Message\ Parser ;
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
: FileType-F ZipOMatic-Z Open\ Target\ Folder-T ;
AddSymlinkToHaikuImage beos system add-ons Tracker
: /boot/beos/preferences/Backgrounds : Background-B ;
AddSymlinkToHaikuImage beos system add-ons Tracker
: /boot/beos/apps/TextSearch : TextSearch-G ;
AddSymlinkToHaikuImage beos system add-ons Tracker
: /boot/beos/apps/DiskUsage : DiskUsage-I ;
AddFilesToHaikuImage beos system add-ons input_server devices
AddSymlinkToHaikuImage system add-ons Tracker
: /boot/system/preferences/Backgrounds : Background-B ;
AddSymlinkToHaikuImage system add-ons Tracker
: /boot/system/apps/TextSearch : TextSearch-G ;
AddSymlinkToHaikuImage system add-ons Tracker
: /boot/system/apps/DiskUsage : DiskUsage-I ;
AddFilesToHaikuImage system add-ons input_server devices
: <input>keyboard <input>mouse <input>wacom ;
AddFilesToHaikuImage beos system add-ons input_server filters : screen_saver ;
AddFilesToHaikuImage beos system add-ons kernel network
AddFilesToHaikuImage system add-ons input_server filters : screen_saver ;
AddFilesToHaikuImage system add-ons kernel network
: <net>notifications stack ;
AddFilesToHaikuImage beos system add-ons kernel network devices
: $(BEOS_NETWORK_DEVICES) ;
AddFilesToHaikuImage beos system add-ons kernel network datalink_protocols
: $(BEOS_NETWORK_DATALINK_PROTOCOLS) ;
AddFilesToHaikuImage beos system add-ons kernel network ppp
: $(BEOS_NETWORK_PPP) ;
AddFilesToHaikuImage beos system add-ons kernel network protocols
: $(BEOS_NETWORK_PROTOCOLS) ;
AddFilesToHaikuImage beos system add-ons Print : $(BEOS_ADD_ONS_PRINT) ;
AddFilesToHaikuImage beos system add-ons Print transport
: $(BEOS_ADD_ONS_PRINT_TRANSPORT) ;
AddFilesToHaikuImage beos system add-ons Screen\ Savers
: $(BEOS_ADD_ONS_SCREENSAVERS) ;
AddFilesToHaikuImage system add-ons kernel network devices
: $(SYSTEM_NETWORK_DEVICES) ;
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 transport
: $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
AddFilesToHaikuImage system add-ons Screen\ Savers
: $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
AddFilesToHaikuImage beos system add-ons disk_systems
AddFilesToHaikuImage system add-ons disk_systems
: <disk_system>intel <disk_system>bfs ;
# create directories that will remain empty
@ -469,11 +470,11 @@ AddDirectoryToHaikuImage home config add-ons input_server methods ;
AddDirectoryToHaikuImage home config add-ons Tracker ;
AddDirectoryToHaikuImage home config add-ons Screen\ Savers ;
AddDirectoryToHaikuImage home config add-ons Translators ;
AddDirectoryToHaikuImage beos etc synth ;
AddDirectoryToHaikuImage beos system add-ons input_server methods ;
AddDirectoryToHaikuImage system data synth ;
AddDirectoryToHaikuImage system add-ons input_server methods ;
# optional
AddFilesToHaikuImage optional beos system add-ons input_server methods : canna ;
AddFilesToHaikuImage optional system add-ons input_server methods : canna ;
# printers
AddDirectoryToHaikuImage home config settings printers Preview
@ -482,7 +483,7 @@ AddDirectoryToHaikuImage home config settings printers "Save as PDF"
: home-config-settings-printers-save-as-pdf.rdef ;
# licenses
CopyDirectoryToHaikuImage beos etc
CopyDirectoryToHaikuImage system data
: [ FDirName $(HAIKU_TOP) data etc licenses ]
: licenses : -x .svn ;
@ -512,14 +513,14 @@ MakeLocate $(alternativeSystemLibsZip) : $(HAIKU_OUTPUT_DIR) ;
# collect the targets we would install in the lib directory
local alternativeSystemLibs ;
local libTargets = [ FFilesInHaikuImageDirectory beos system lib ] ;
local libTargets = [ FFilesInHaikuImageDirectory system lib ] ;
local libTarget ;
for libTarget in $(libTargets) {
alternativeSystemLibs += [ on $(libTarget) return $(TARGET) ] ;
}
# collect the symlinks we would install in the lib directory
libTargets = [ FSymlinksInHaikuImageDirectory beos system lib ] ;
libTargets = [ FSymlinksInHaikuImageDirectory system lib ] ;
local tmpAlternativeLibDir
= [ FDirName $(HAIKU_OUTPUT_DIR) tmp alternativeLibs ] ;
for libTarget in $(libTargets) {
@ -567,7 +568,7 @@ if $(HAIKU_ADD_ALTERNATIVE_GCC_LIBS) && $(HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR) {
}
# install the alternative libs in the right directory
UnzipArchiveToHaikuImage beos system lib $(libSubDir)
UnzipArchiveToHaikuImage system lib $(libSubDir)
: $(otherAlternativeSystemLibsZip) ;
}

View File

@ -288,10 +288,10 @@ rule AddDriversToContainer container : relativeDirectoryTokens : targets
{
# AddDriversToContainer <container> : <relative directory> : <targets> ;
#
local directoryTokens = beos system add-ons kernel drivers dev
local directoryTokens = system add-ons kernel drivers dev
$(relativeDirectoryTokens) ;
AddFilesToContainer $(container) : beos 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.
@ -320,7 +320,7 @@ rule AddNewDriversToContainer container : relativeDirectoryTokens
{
# AddNewDriversToContainer <container> : <directory> : <targets> ;
#
local directoryTokens = beos system add-ons kernel drivers
local directoryTokens = system add-ons kernel drivers
$(relativeDirectoryTokens) ;
AddFilesToContainer $(container) : $(directoryTokens)
@ -356,7 +356,7 @@ rule AddBootModuleSymlinksToContainer container : targets
local name = $(target:BS) ;
local linkTarget = [ FDirName /boot $(installDir:G=) $(name) ] ;
AddSymlinkToContainer $(container) : beos system add-ons kernel boot
AddSymlinkToContainer $(container) : system add-ons kernel boot
: $(linkTarget) : $(name) ;
}
}
@ -751,7 +751,7 @@ rule AddEntryToHaikuImageUserGroupFile file : entry
Always $(file) ;
MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
BuildHaikuImageUserGroupFile $(file) ;
AddFilesToHaikuImage beos etc : $(file) ;
AddFilesToHaikuImage system etc : $(file) ;
}
HAIKU_IMAGE_USER_GROUP_ENTRIES on $(file) = $(allEntries) ;
@ -805,7 +805,7 @@ rule AddLicenseToHaikuImage file : name : searchPath
name = ;
}
AddFilesToHaikuImage beos etc licenses : $(file) : $(name) ;
AddFilesToHaikuImage system data licenses : $(file) : $(name) ;
}
@ -1053,9 +1053,9 @@ actions BuildFloppyBootArchive1
# warning: that is quite x86 dependant...
rule BuildFloppyBootImage image : zbeos : archive
rule BuildFloppyBootImage image : haikuLoader : archive
{
Depends $(image) : $(zbeos) ;
Depends $(image) : $(haikuLoader) ;
Depends $(image) : $(archive) ;
#MakeLocateDebug $(image) ;
ARCHIVE_IMAGE_OFFSET on $(image) = $(HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET) ;
@ -1067,7 +1067,7 @@ rule BuildFloppyBootImage image : zbeos : archive
FLOPPY_IMAGE_BLOCK_SIZE on $(image) = 2 ;
}
BuildFloppyBootImage1 $(image) : $(zbeos) $(archive) ;
BuildFloppyBootImage1 $(image) : $(haikuLoader) $(archive) ;
}
actions BuildFloppyBootImage1
@ -1075,11 +1075,9 @@ actions BuildFloppyBootImage1
$(RM) $(<)
# make an empty image
dd if=/dev/zero of=$(<) bs=$(FLOPPY_IMAGE_BLOCK_SIZE)k count=1440
# add zbeos
# add haiku_loader
dd if=$(>[1]) of=$(<) conv=notrunc
# add the boot drivers tgz archive
# keep the offset in sync with
# src/system/boot/loader/file_systems/tarfs/tarfs.cpp:kFloppyArchiveOffset
dd if=$(>[2]) of=$(<) bs=$(ARCHIVE_IMAGE_OFFSET)k seek=1 conv=notrunc
}

View File

@ -102,10 +102,10 @@ if [ IsOptionalHaikuImagePackageAdded Beam ] {
if [ IsOptionalHaikuImagePackageAdded BeBook ] {
InstallOptionalHaikuImagePackage bebook_20081026
: http://haiku-files.org/files/optional-packages/bebook_20081026.zip
: beos documentation
: system documentation
;
AddSymlinkToHaikuImage home Desktop
: /boot/beos/documentation/bebook/index.html : BeBook ;
: /boot/system/documentation/bebook/index.html : BeBook ;
}
@ -147,14 +147,15 @@ if [ IsOptionalHaikuImagePackageAdded BePDF ] {
if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
local bluetoothDrivers = h2generic ;
AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
AddFilesToHaikuImage beos system servers : bluetooth_server ;
AddFilesToHaikuImage beos system lib : libbluetooth.so ;
AddFilesToHaikuImage beos system add-ons kernel network devices : bluetooth ;
AddFilesToHaikuImage beos system add-ons kernel network protocols : l2cap ;
AddFilesToHaikuImage beos system add-ons kernel bluetooth : btCoreData ;
AddFilesToHaikuImage beos preferences : Bluetooth ;
AddFilesToHaikuImage beos bin : bt_dev_info bt_discovery ;
AddSymlinkToHaikuImage home config be Preferences : /boot/beos/preferences/Bluetooth ;
AddFilesToHaikuImage system servers : bluetooth_server ;
AddFilesToHaikuImage system lib : libbluetooth.so ;
AddFilesToHaikuImage system add-ons kernel network devices : bluetooth ;
AddFilesToHaikuImage system add-ons kernel network protocols : l2cap ;
AddFilesToHaikuImage system add-ons kernel bluetooth : btCoreData ;
AddFilesToHaikuImage system preferences : Bluetooth ;
AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
AddSymlinkToHaikuImage home config be Preferences
: /boot/system/preferences/Bluetooth ;
if [ IsOptionalHaikuImagePackageAdded Development ] {
AddSymlinkToHaikuImage develop lib x86 : /system/lib/libbluetooth.so ;
}
@ -198,12 +199,12 @@ if [ IsOptionalHaikuImagePackageAdded Development ] && $(TARGET_ARCH) = x86 {
AddFilesToHaikuImage develop lib x86 : libposix_error_mapper.a ;
# cc and c++ wrapper scripts
AddFilesToHaikuImage beos bin : cc c++ ;
AddFilesToHaikuImage system bin : cc c++ ;
# mkdepend build tool, which is part of the Haiku source tree
# (same as make, but make is already included independent of the
# Development package)
AddFilesToHaikuImage beos bin : mkdepend ;
AddFilesToHaikuImage system bin : mkdepend ;
# skeleton makefile and makefile-engine
local makefileEngineFiles =
@ -520,10 +521,10 @@ if [ IsOptionalHaikuImagePackageAdded Tar ] {
# UserlandFS
if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
# kernel module
AddFilesToHaikuImage beos system add-ons kernel file_systems : userlandfs ;
AddFilesToHaikuImage system add-ons kernel file_systems : userlandfs ;
# server
AddFilesToHaikuImage beos system servers : userlandfs_server ;
AddFilesToHaikuImage system servers : userlandfs_server ;
# libs
local userlandfsLibs =
@ -531,7 +532,7 @@ if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
libuserlandfs_haiku_kernel.so
libuserlandfs_fuse.so
;
AddFilesToHaikuImage beos system lib : $(userlandfsLibs) ;
AddFilesToHaikuImage system lib : $(userlandfsLibs) ;
# development goodies
if [ IsOptionalHaikuImagePackageAdded Development ] {
@ -602,17 +603,17 @@ if [ IsOptionalHaikuImagePackageAdded VLC ] {
# Welcome
if [ IsOptionalHaikuImagePackageAdded Welcome ] {
CopyDirectoryToHaikuImage beos documentation
CopyDirectoryToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs welcome ]
: welcome : -x .svn ;
CopyDirectoryToHaikuImage beos documentation
CopyDirectoryToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs userguide ]
: userguide : -x .svn ;
AddFilesToHaikuImage beos documentation
AddFilesToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs Haiku-doc.css ]
: Haiku-doc.css ;
AddSymlinkToHaikuImage home Desktop
: /boot/beos/documentation/welcome/welcome.html : Welcome ;
: /boot/system/documentation/welcome/welcome.html : Welcome ;
}

View File

@ -83,17 +83,17 @@ SetUpdateHaikuImageOnly 1 ;
# has been added, like for "kernel").
HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel = 1 ;
# Add "crashing_app" to the beos/bin directory of the Haiku image/installation.
# Add "crashing_app" to the system/bin directory of the Haiku image/installation.
# Note, that this also makes the image depend on the target, i.e. it is
# automatically updated when the image is built.
AddFilesToHaikuImage beos bin : crashing_app ;
AddFilesToHaikuImage system bin : crashing_app ;
# Make a symlink to home/config/bin/crash.
AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ;
AddSymlinkToHaikuImage home config bin : /bin/crashing_app : crash ;
# Add timezone and keymap settings.
AddSymlinkToHaikuImage home config settings
: /boot/beos/etc/timezones/Europe/Paris : timezone ;
: /boot/system/data/timezones/Europe/Paris : timezone ;
AddFilesToHaikuImage home config settings : <keymap>US-International : Key_map ;
# Adds the source directories src/kits/storage and src/tests/servers/debug

View File

@ -8,7 +8,7 @@
#HAIKU_INSTALL_DIR = /Haiku ;
# Install Haiku on device /dev/sda57. Be sure you know what you're doing!
#HAIKU_IMAGE_DIR = /dev ;
#HAIKU_IMAGE_DIR = /dev ;
#HAIKU_IMAGE_NAME = sda57 ;
#HAIKU_DONT_CLEAR_IMAGE = 1 ;
@ -19,7 +19,7 @@
# Add symlink/file (timezone and keymap settings) to the image.
#AddSymlinkToHaikuImage home config settings
# : /boot/beos/etc/timezones/Europe/Paris : timezone ;
# : /boot/system/data/timezones/Europe/Paris : timezone ;
#AddFilesToHaikuImage home config settings : <keymap>US-International
# : Key_map ;

View File

@ -135,7 +135,7 @@ if [ -f $copyrightsFile ]; then
$rmAttrs -f $copyrightAttrs
touch $copyrightAttrs
$addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
$copyAttrs $copyrightAttrs ${tPrefix}beos/apps/AboutSystem
$copyAttrs $copyrightAttrs ${tPrefix}system/apps/AboutSystem
fi
# generate the attribute stores

View File

@ -207,7 +207,7 @@ if [ ! $updateOnly ]; then
$rmAttrs -f $copyrightAttrs
touch $copyrightAttrs
$addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
$copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}beos/apps/AboutSystem
$copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}system/apps/AboutSystem
fi
fi

View File

@ -20,7 +20,7 @@ launch() {
echo There is no "$toLaunch"
fi
return 0
}
}
# launchscript <script path>
@ -54,13 +54,13 @@ exec </dev/null
exec >/dev/null 2>&1
# Standard locations of boot files
SCRIPTS=beos/system/boot
SERVERS=beos/system/servers
SCRIPTS=system/boot
SERVERS=system/servers
# clean the shared memory dir
shmDir=/boot/var/shared_memory
rm -rf $shmDir
mkdir $shmDir
mkdir -p $shmDir
chmod 777 $shmDir
# Set up the environment
@ -77,7 +77,7 @@ if [ "$iw" = "yes" ]; then
fi
# Sets timezone etc.
runprog beos/bin/clockconfig
runprog system/bin/clockconfig
# Launch servers
@ -105,18 +105,18 @@ fi
# Launch Terminal or consoled depending on $SAFEMODE
if [ "$SAFEMODE" != "yes" ]; then
if [ -e /etc/users ]; then
launch beos/system/Login
launch system/Login
# nothing more
else
launch beos/system/Tracker
launch beos/system/Deskbar
launch system/Tracker
launch system/Deskbar
# install ProcessController in the deskbar
(sleep 7; /boot/beos/apps/ProcessController -deskbar) &
(sleep 7; /boot/system/apps/ProcessController -deskbar) &
fi
launch beos/apps/Terminal
launch system/apps/Terminal
else
launch beos/bin/consoled
launch system/bin/consoled
fi
if [ "$SAFEMODE" != "yes" ]; then
@ -124,7 +124,7 @@ if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/midi_server
fi
# Launch Print Server
# Launch Print Server
if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/print_server
fi
@ -135,7 +135,7 @@ if [ "$SAFEMODE" != "yes" ]; then
fi
# Check for daily saving time
launch beos/bin/dstcheck
launch system/bin/dstcheck
if [ "$SAFEMODE" != "yes" ]; then
# Start user boot script

View File

@ -72,15 +72,15 @@ fi
# Launch Terminal or consoled depending on $SAFEMODE
if [ "$SAFEMODE" != "yes" ]; then
if [ -x /boot/beos/apps/Installer ]; then
/boot/beos/apps/Installer
#/boot/beos/apps/Terminal -x /boot/beos/apps/Installer
if [ -x /boot/system/apps/Installer ]; then
/boot/system/apps/Installer
#/boot/system/apps/Terminal -x /boot/system/apps/Installer
else
/boot/beos/apps/Terminal
/boot/system/apps/Terminal
fi
#launch beos/apps/Terminal
#launch system/apps/Terminal
else
launch beos/bin/consoled
launch system/bin/consoled
fi
# sync disks

View File

@ -42,13 +42,13 @@ export BE_DEFAULT_CPLUS_FLAGS=""
if [ "$SAFEMODE" != "yes" ]
then
export PATH=.:$HOME/config/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS
export LIBRARY_PATH="%A/lib:$HOME/config/lib:/boot/common/lib:/boot/beos/system/lib"
export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/beos/system/add-ons"
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/system/add-ons"
else
export PATH=.:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS
export LIBRARY_PATH="%A/lib:/boot/common/lib:/boot/beos/system/lib"
export ADDON_PATH="%A/add-ons:/boot/beos/system/add-ons"
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/system/add-ons"
fi
# media kit

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2008, Haiku Inc. All Rights Reserved.
* Copyright 2002-2009, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _FIND_DIRECTORY_H
@ -15,22 +15,21 @@ typedef enum {
B_TRASH_DIRECTORY,
/* System directories */
B_BEOS_DIRECTORY = 1000,
B_BEOS_SYSTEM_DIRECTORY,
B_BEOS_ADDONS_DIRECTORY,
B_BEOS_BOOT_DIRECTORY,
B_BEOS_FONTS_DIRECTORY,
B_BEOS_LIB_DIRECTORY,
B_BEOS_SERVERS_DIRECTORY,
B_BEOS_APPS_DIRECTORY,
B_BEOS_BIN_DIRECTORY,
B_BEOS_ETC_DIRECTORY,
B_BEOS_DOCUMENTATION_DIRECTORY,
B_BEOS_PREFERENCES_DIRECTORY,
B_BEOS_TRANSLATORS_DIRECTORY,
B_BEOS_MEDIA_NODES_DIRECTORY,
B_BEOS_SOUNDS_DIRECTORY,
B_BEOS_DATA_DIRECTORY,
B_SYSTEM_DIRECTORY = 1000,
B_SYSTEM_ADDONS_DIRECTORY = 1002,
B_SYSTEM_BOOT_DIRECTORY,
B_SYSTEM_FONTS_DIRECTORY,
B_SYSTEM_LIB_DIRECTORY,
B_SYSTEM_SERVERS_DIRECTORY,
B_SYSTEM_APPS_DIRECTORY,
B_SYSTEM_BIN_DIRECTORY,
B_SYSTEM_ETC_DIRECTORY,
B_SYSTEM_DOCUMENTATION_DIRECTORY,
B_SYSTEM_PREFERENCES_DIRECTORY,
B_SYSTEM_TRANSLATORS_DIRECTORY,
B_SYSTEM_MEDIA_NODES_DIRECTORY,
B_SYSTEM_SOUNDS_DIRECTORY,
B_SYSTEM_DATA_DIRECTORY,
/* Common directories, shared among all users. */
B_COMMON_DIRECTORY = 2000,
@ -54,7 +53,6 @@ typedef enum {
B_COMMON_SOUNDS_DIRECTORY,
B_COMMON_DATA_DIRECTORY,
/* User directories. These are interpreted in the context
of the user making the find_directory call. */
B_USER_DIRECTORY = 3000,
@ -75,8 +73,25 @@ typedef enum {
/* Global directories. */
B_APPS_DIRECTORY = 4000,
B_PREFERENCES_DIRECTORY,
B_UTILITIES_DIRECTORY
B_UTILITIES_DIRECTORY,
/* Obsolete: Legacy BeOS definition to be phased out */
B_BEOS_DIRECTORY = 1000,
B_BEOS_SYSTEM_DIRECTORY,
B_BEOS_ADDONS_DIRECTORY,
B_BEOS_BOOT_DIRECTORY,
B_BEOS_FONTS_DIRECTORY,
B_BEOS_LIB_DIRECTORY,
B_BEOS_SERVERS_DIRECTORY,
B_BEOS_APPS_DIRECTORY,
B_BEOS_BIN_DIRECTORY,
B_BEOS_ETC_DIRECTORY,
B_BEOS_DOCUMENTATION_DIRECTORY,
B_BEOS_PREFERENCES_DIRECTORY,
B_BEOS_TRANSLATORS_DIRECTORY,
B_BEOS_MEDIA_NODES_DIRECTORY,
B_BEOS_SOUNDS_DIRECTORY,
B_BEOS_DATA_DIRECTORY,
} directory_which;
#ifdef __cplusplus

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005-2008, Haiku, Inc.
* Copyright (c) 2005-2009, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
@ -67,50 +67,54 @@ static const rgb_color kLinkBlue = { 80, 80, 200, 255 };
class AboutApp : public BApplication {
public:
AboutApp(void);
AboutApp();
};
class AboutWindow : public BWindow {
public:
AboutWindow(void);
bool QuitRequested(void);
AboutWindow();
virtual bool QuitRequested();
};
class AboutView : public BView {
public:
AboutView(const BRect &r);
~AboutView(void);
AboutView(const BRect& frame);
~AboutView();
virtual void AttachedToWindow();
virtual void Pulse();
virtual void AttachedToWindow();
virtual void Pulse();
virtual void FrameResized(float width, float height);
virtual void Draw(BRect update);
virtual void MessageReceived(BMessage *msg);
virtual void MouseDown(BPoint pt);
virtual void FrameResized(float width, float height);
virtual void Draw(BRect updateRect);
virtual void MessageReceived(BMessage* msg);
virtual void MouseDown(BPoint point);
void AddCopyrightEntry(const char *name, const char *text,
const Licenses& licenses, const char *url);
void AddCopyrightEntry(const char *name, const char *text,
const char *url = NULL);
void AddCopyrightEntry(const BMessage& packageDescription);
void PickRandomHaiku();
void AddCopyrightEntry(const char* name,
const char* text, const Licenses& licenses,
const char* url);
void AddCopyrightEntry(const char* name,
const char* text, const char* url = NULL);
void AddCopyrightEntry(
const BMessage& packageDescription);
void PickRandomHaiku();
private:
void _AddCopyrightsFromAttribute();
status_t _GetLicensesPath(BPath& path);
void _AddCopyrightsFromAttribute();
BStringView *fMemView;
BTextView *fUptimeView;
BView *fInfoView;
HyperTextView *fCreditsView;
BStringView* fMemView;
BTextView* fUptimeView;
BView* fInfoView;
HyperTextView* fCreditsView;
BBitmap *fLogo;
BBitmap* fLogo;
BPoint fDrawPoint;
BPoint fDrawPoint;
bigtime_t fLastActionTime;
BMessageRunner *fScrollRunner;
BQuery fAppsQuery;
bigtime_t fLastActionTime;
BMessageRunner* fScrollRunner;
BQuery fAppsQuery;
};
@ -548,7 +552,6 @@ AboutView::AboutView(const BRect &rect)
"(sorry!)"
"\n\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Special Thanks To:\n");
@ -558,6 +561,12 @@ AboutView::AboutView(const BRect &rect)
// copyrights for various projects we use
BPath licensesPath;
_GetLicensesPath(licensesPath);
BPath mitPath(licensesPath);
mitPath.Append("MIT license");
font.SetSize(be_bold_font->Size() + 4);
font.SetFace(B_BOLD_FACE);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
@ -572,7 +581,7 @@ AboutView::AboutView(const BRect &rect)
"kernel and all code that applications may link against, is "
"distributed under the terms of the ");
fCreditsView->InsertHyperText("MIT license",
new OpenFileAction("/etc/licenses/MIT"));
new OpenFileAction(mitPath.Path()));
fCreditsView->Insert(". Some system libraries contain third party code "
"distributed under the LGPL license. You can find the copyrights "
"to third party code below.\n\n");
@ -997,6 +1006,9 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
fCreditsView->Insert(text);
fCreditsView->Insert("\n");
BPath licensesPath;
_GetLicensesPath(licensesPath);
if (licenses.CountLicenses() > 0) {
if (licenses.CountLicenses() > 1)
fCreditsView->Insert("Licenses: ");
@ -1005,7 +1017,7 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
for (int32 i = 0; i < licenses.CountLicenses(); i++) {
const char* license = licenses.LicenseAt(i);
BString licensePath("/etc/licenses/");
BString licensePath(licensesPath.Path());
licensePath += license;
if (i > 0)
@ -1102,6 +1114,17 @@ AboutView::PickRandomHaiku()
}
status_t
AboutView::_GetLicensesPath(BPath& path)
{
status_t status = find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
if (status != B_OK)
return status;
return path.Append("licenses");
}
void
AboutView::_AddCopyrightsFromAttribute()
{

View File

@ -2,21 +2,21 @@
PCWorld.cpp
ProcessController © 2000, Georges-Edouard Berenger, All Rights Reserved.
Copyright (C) 2004 beunited.org
Copyright (C) 2004 beunited.org
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@ -126,7 +126,7 @@ PCApplication::ReadyToRun()
be_roster->GetAppList(kSignature, &list);
long count = list.CountItems();
if (count > 1) {
for (long i = 0; i < count - 1; i++) {
for (long i = 0; i < count - 1; i++) {
BMessenger* otherme = new BMessenger(NULL, (team_id)list.ItemAt(i));
BMessage* message = new BMessage(B_QUIT_REQUESTED);
otherme->SendMessage(message);
@ -150,7 +150,7 @@ PCApplication::ArgvReceived(int32 argc, char **argv)
} while (be_roster->IsRunning(kTrackerSig) && k-- > 0);
}
remove("/boot/home/config/settings/Tracker/tracker_shelf");
launch(kTrackerSig, "/boot/beos/system/Tracker");
launch(kTrackerSig, "/boot/system/Tracker");
} else if (argc == 2 && strcmp(argv[1], "-deskbar") == 0) {
BDeskbar deskbar;
if (!gInDeskbar && !deskbar.HasItem(kDeskbarItemName))

View File

@ -3,19 +3,19 @@
Copyright (C) 2004 beunited.org
Copyright (c) 2006 Haiku, Inc. All Rights Reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@ -311,21 +311,21 @@ ProcessController::MessageReceived(BMessage *message)
break;
case 'Trac':
launch(kTrackerSig, "/boot/beos/system/Tracker");
launch(kTrackerSig, "/boot/system/Tracker");
break;
case 'Dbar':
launch(kDeskbarSig, "/boot/beos/system/Deskbar");
launch(kDeskbarSig, "/boot/system/Deskbar");
break;
case 'Term':
launch(kTerminalSig, "/boot/beos/apps/Terminal");
launch(kTerminalSig, "/boot/system/apps/Terminal");
break;
case 'AlDb':
{
if (!be_roster->IsRunning(kDeskbarSig))
launch(kDeskbarSig, "/boot/beos/system/Deskbar");
launch(kDeskbarSig, "/boot/system/Deskbar");
BDeskbar deskbar;
if (gInDeskbar || deskbar.HasItem (kDeskbarItemName))
deskbar.RemoveItem (kDeskbarItemName);
@ -652,7 +652,7 @@ thread_popup(void *arg)
// CPU Load section
TeamBarMenu* CPUPopup = new TeamBarMenu("Threads and CPU Usage", infos, systemInfo.used_teams);
for (m = 0; m < systemInfo.used_teams; m++) {
for (m = 0; m < systemInfo.used_teams; m++) {
if (infos[m].team_info.team >= 0) {
ThreadBarMenu* TeamPopup = new ThreadBarMenu(infos[m].team_name, infos[m].team_info.team, infos[m].team_info.thread_count);
BMessage* kill_team = new BMessage('KlTm');

View File

@ -52,7 +52,7 @@
/* 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/beos/apps:/boot/beos/preferences:/boot/develop/bin"
".:/boot/home/config/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:/boot/develop/bin"
#endif
/* The value for PATH when invoking `command -p'. This is only used when

View File

@ -12,7 +12,7 @@ SubDirSysHdrs [ FDirName $(HAIKU_TOP) src bin gawk intl ] ;
# all interested apps can link against.
UsePrivateHeaders debug ;
SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR=\\\"/boot/beos/etc/locale\\\"
SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR=\\\"/etc/locale\\\"
-DMI_OUT=1 ;
# filter warnings we don't want here

View File

@ -4,7 +4,7 @@ SubDir HAIKU_TOP src bin grep src ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare ] ;
SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR='\"/boot/beos/share/locale\"' ;
SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR='\"/etc/locale\"' ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) lib ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;

View File

@ -2,7 +2,7 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.in by autoheader. */
#define LOCALEDIR "/boot/beos/etc/local/"
#define LOCALEDIR "/etc/local/"
#define LIBDIR "/boot/develop/lib/"
#define INCLUDEDIR "/boot/develop/headers/"

View File

@ -228,7 +228,7 @@ public:
#ifdef USE_INLINE_IM
void DrawIMString(void);
#endif
private:
void init(BRect);
@ -265,7 +265,7 @@ public:
private:
scrollbar_T *gsb;
float ignoreValue;
};
@ -718,7 +718,7 @@ VimWindow::QuitRequested()
#ifdef FEAT_MBYTE
km.csi_escape = false;
#endif
write_port(gui.vdcmp, VimMsg::Key, &km, sizeof(km));
return false;
@ -1323,7 +1323,7 @@ VimTextAreaView::MessageReceived(BMessage *m)
msg.AddFloat("be:height_reply", FILL_Y(1));
IMData.messenger->SendMessage(&msg);
}
break;
break;
case B_INPUT_METHOD_STOPPED:
delete IMData.messenger;
delete IMData.message;
@ -1392,7 +1392,7 @@ VimTextAreaView::mchDrawString(int row, int col, char_u *s, int len, int flags)
FILL_X(col + cells) - PEN_WIDTH, FILL_Y(row + 1) - PEN_WIDTH);
FillRect(r, B_SOLID_LOW);
}
BFont font;
this->GetFont(&font);
if(!font.IsFixed())
@ -1527,7 +1527,7 @@ VimTextAreaView::mchInsertLines(int row, int num_lines)
dest.top = FILL_Y(row + num_lines);
dest.right = FILL_X(gui.scroll_region_right + 1) - PEN_WIDTH;
dest.bottom = FILL_Y(gui.scroll_region_bot + 1) - PEN_WIDTH;
if (gui.vimWindow->Lock()) {
/* Clear one column more for when bold has spilled over */
CopyBits(source, dest);
@ -1567,7 +1567,7 @@ void VimTextAreaView::DrawIMString(void)
IMData.row + IMData.count, W_WIDTH(curwin), GUI_MON_NOCLEAR);
bool confirmed = false;
msg->FindBool("be:confirmed", &confirmed);
if (confirmed)
if (confirmed)
return;
rgb_color hcolor = HighColor(), lcolor = LowColor();
msg->FindString("be:string", &str);
@ -1613,7 +1613,7 @@ void VimTextAreaView::DrawIMString(void)
pos.x += cn;
}
IMData.count = (int)pos.y;
SetHighColor(hcolor);
SetLowColor(lcolor);
}
@ -2039,7 +2039,7 @@ gui_mch_init()
if (gui.vdcmp < B_OK)
return FAIL;
get_key_map(&keyMap, &keyMapChars);
gui.vimWindow = new VimWindow(); /* hidden and locked */
if (!gui.vimWindow)
return FAIL;
@ -2538,7 +2538,7 @@ gui_mch_get_font(
*/
if(*name!='\0') {
end = (char_u *)strchr((char *)name, '/');
if (!end)
if (!end)
strncpy(family, (char *)name, len = strlen((char*)name));
else
strncpy(family, (char *)name, len = end - name);
@ -2549,7 +2549,7 @@ gui_mch_get_font(
if(*name!='\0') {
end = (char_u *)strchr((char *)name, '/');
if (!end)
if (!end)
strncpy(style, (char *)name, len = strlen((char*)name));
else
strncpy(style, (char *)name, len = end - name);
@ -2562,7 +2562,7 @@ gui_mch_get_font(
size = atof((char *)name);
if (size > 0) font->SetSize(size);
}
font->SetSpacing(B_FIXED_SPACING);
font->SetEncoding(B_UNICODE_UTF8);
@ -2730,7 +2730,7 @@ gui_mch_get_color(
char line[LINE_LEN];
char_u *fname;
fname = expand_env_save((char_u *)"/boot/beos/etc/rgb.txt");
fname = expand_env_save((char_u *)"/etc/rgb.txt");
if (fname == NULL)
return INVALCOLOR;
@ -2940,7 +2940,7 @@ gui_mch_settitle(
gui_mch_draw_hollow_cursor(guicolor_T color)
{
gui_mch_set_fg_color(color);
BRect r;
r.left = FILL_X(gui.col);
r.top = FILL_Y(gui.row);
@ -3553,8 +3553,8 @@ im_set_position(int row, int col)
}
return;
}
int
int
im_get_status()
{
return(1);

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,7 @@ class CopyLoopControl {
// inform that a file error occurred while copying <name>
// returns true if user decided to continue
virtual void UpdateStatus(const char *name, entry_ref ref, int32 count,
virtual void UpdateStatus(const char *name, entry_ref ref, int32 count,
bool optional = false) = 0;
virtual bool CheckUserCanceled() = 0;
@ -82,10 +82,10 @@ class CopyLoopControl {
// for files: save original attributes on file.
};
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir,
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir,
bool dstIsDir) = 0;
// override to always overwrite, never overwrite, let user decide,
// override to always overwrite, never overwrite, let user decide,
// compare dates, etc.
virtual bool SkipEntry(const BEntry *, bool file) = 0;
@ -123,8 +123,8 @@ class TrackerCopyLoopControl : public CopyLoopControl {
virtual bool CheckUserCanceled();
// returns true if canceled
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir,
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir,
bool dstIsDir);
virtual bool SkipEntry(const BEntry *, bool file);
@ -137,7 +137,7 @@ class TrackerCopyLoopControl : public CopyLoopControl {
};
inline
inline
TrackerCopyLoopControl::TrackerCopyLoopControl(thread_id thread)
: fThread(thread)
{
@ -157,8 +157,6 @@ _IMPEXP_TRACKER void FSMakeOriginalName(char *name, BDirectory *destDir, const c
_IMPEXP_TRACKER bool FSIsTrashDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsPrintersDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsDeskDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsSystemDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsBeOSDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsHomeDir(const BEntry *);
_IMPEXP_TRACKER void FSMoveToTrash(BObjectList<entry_ref> *srcList, BList *pointList = NULL,
bool async = true);
@ -174,7 +172,7 @@ _IMPEXP_TRACKER status_t FSLaunchItem(const entry_ref *application, const BMessa
// a document; to open documents with the preferred app, pase 0 in <application> and
// stuff all the document refs into <refsReceived>
// Consider having silent mode that does not show alerts, just returns error code
_IMPEXP_TRACKER status_t FSOpenWith(BMessage *listOfRefs);
// runs the Open With window; pas a list of refs
@ -210,7 +208,7 @@ ReadAttrResult ReadAttr(const BNode *, const char *hostAttrName, const char *for
// native attribute name, then the foreign one; an endian swapping function can
// be passed, if null data won't be swapped; if <isForeign> set the foreign endianness
// will be read directly without first trying the native one
ReadAttrResult GetAttrInfo(const BNode *, const char *hostAttrName, const char *foreignAttrName,
type_code * = NULL, size_t * = NULL);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2007-2008 Haiku.
* Copyright 2007-2009 Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -41,7 +41,7 @@
#include <Joystick.h>
#define JOYSTICKPATH "/dev/joystick/"
#define JOYSTICKFILEPATH "/boot/beos/etc/joysticks/"
#define JOYSTICKFILEPATH "/boot/system/data/joysticks/"
#define JOYSTICKFILESETTINGS "/boot/home/config/settings/joysticks/"
#define SELECTGAMEPORTFIRST "Select a game port first"
@ -54,47 +54,47 @@ ShowMessage(char* string)
}
JoyWin::JoyWin(BRect frame, const char *title)
: BWindow(frame, title, B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
: BWindow(frame, title, B_DOCUMENT_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_NOT_ZOOMABLE), fSystemUsedSelect(false),
fJoystick(new BJoystick)
{
fProbeButton = new BButton(BRect(15.00, 260.00, 115.00, 285.00),
fProbeButton = new BButton(BRect(15.00, 260.00, 115.00, 285.00),
"ProbeButton", "Probe", new BMessage(PROBE));
fCalibrateButton = new BButton(BRect(270.00, 260.00, 370.00, 285.00),
fCalibrateButton = new BButton(BRect(270.00, 260.00, 370.00, 285.00),
"CalibrateButton", "Calibrate", new BMessage(CALIBRATE));
fGamePortL = new BListView(BRect(15.00, 30.00, 145.00, 250.00),
fGamePortL = new BListView(BRect(15.00, 30.00, 145.00, 250.00),
"gamePort");
fGamePortL->SetSelectionMessage(new BMessage(PORT_SELECTED));
fGamePortL->SetInvocationMessage(new BMessage(PORT_INVOKE));
fConControllerL = new BListView(BRect(175.00,30.00,370.00,250.00),
"conController");
fConControllerL->SetSelectionMessage(new BMessage(JOY_SELECTED));
fConControllerL->SetInvocationMessage(new BMessage(JOY_INVOKE));
fGamePortS = new BStringView(BRect(15, 5, 160, 25), "gpString",
fGamePortS = new BStringView(BRect(15, 5, 160, 25), "gpString",
"Game Port");
fGamePortS->SetFont(be_bold_font);
fConControllerS = new BStringView(BRect(170, 5, 330, 25), "ccString",
fConControllerS = new BStringView(BRect(170, 5, 330, 25), "ccString",
"Connected Controller");
fConControllerS->SetFont(be_bold_font);
fCheckbox = new BCheckBox(BRect(131.00, 260.00, 227.00, 280.00),
fCheckbox = new BCheckBox(BRect(131.00, 260.00, 227.00, 280.00),
"Disabled", "Disabled", new BMessage(DISABLEPORT));
BBox *box = new BBox( Bounds(),"box", B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE,
BBox *box = new BBox( Bounds(),"box", B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE,
B_PLAIN_BORDER);
box->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// Add listViews with their scrolls
box->AddChild(new BScrollView("PortScroll", fGamePortL,
box->AddChild(new BScrollView("PortScroll", fGamePortL,
B_FOLLOW_LEFT | B_FOLLOW_TOP_BOTTOM, B_WILL_DRAW, false, true));
box->AddChild(new BScrollView("ConScroll", fConControllerL, B_FOLLOW_ALL,
box->AddChild(new BScrollView("ConScroll", fConControllerL, B_FOLLOW_ALL,
B_WILL_DRAW, false, true));
// Adding object
@ -104,7 +104,7 @@ JoyWin::JoyWin(BRect frame, const char *title)
box->AddChild(fProbeButton);
box->AddChild(fCalibrateButton);
AddChild(box);
SetSizeLimits(400, 600, Bounds().Height(), Bounds().Height());
/* Add all the devices */
@ -112,14 +112,14 @@ JoyWin::JoyWin(BRect frame, const char *title)
for (int32 i = 0; i < nr;i++) {
//BString str(path.Path());
char buf[B_OS_NAME_LENGTH];
fJoystick->GetDeviceName(i, buf, B_OS_NAME_LENGTH);
fJoystick->GetDeviceName(i, buf, B_OS_NAME_LENGTH);
fGamePortL->AddItem(new PortItem(buf));
}
fGamePortL->Select(0);
/* Add the joysticks specifications */
/* Add the joysticks specifications */
_AddToList(fConControllerL, JOY_SELECTED, JOYSTICKFILEPATH);
_GetSettings();
}
@ -131,18 +131,18 @@ JoyWin::~JoyWin()
}
void
void
JoyWin::MessageReceived(BMessage *message)
{
// message->PrintToStream();
switch(message->what)
{
{
case DISABLEPORT:
break;
{
PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) {
//ToDo: item->SetEnabled(true);
//ToDo: item->SetEnabled(true);
//don't work as you can't select a item that are disabled
if(fCheckbox->Value()) {
item->SetEnabled(false);
@ -150,16 +150,16 @@ JoyWin::MessageReceived(BMessage *message)
} else {
item->SetEnabled(true);
_SelectDeselectJoystick(fConControllerL, true);
_PerformProbe(item->Text());
_PerformProbe(item->Text());
}
} //else
} //else
//printf("We have a null value\n");
break;
}
case PORT_SELECTED:
{
PortItem *item = _GetSelectedItem(fGamePortL);
PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) {
fSystemUsedSelect = true;
if (item->IsEnabled()) {
@ -171,17 +171,17 @@ JoyWin::MessageReceived(BMessage *message)
fCheckbox->SetValue(true);
_SelectDeselectJoystick(fConControllerL, false);
}
if (_CheckJoystickExist(item->Text()) == B_ERROR) {
if (_ShowCantFindFileMessage(item->Text()) == B_OK) {
_PerformProbe(item->Text());
}
} else {
BString str(_FindFilePathForSymLink(JOYSTICKFILESETTINGS,
} else {
BString str(_FindFilePathForSymLink(JOYSTICKFILESETTINGS,
item));
if (str != NULL) {
BString str(_FixPathToName(str.String()));
int32 id = _FindStringItemInList(fConControllerL,
int32 id = _FindStringItemInList(fConControllerL,
new PortItem(str.String()));
if (id > -1) {
fConControllerL->Select(id);
@ -195,11 +195,11 @@ JoyWin::MessageReceived(BMessage *message)
}
break;
}
case PROBE:
case PORT_INVOKE:
{
PortItem *item = _GetSelectedItem(fGamePortL);
PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) {
//printf("invoke.. inte null\n");
_PerformProbe(item->Text());
@ -215,7 +215,7 @@ JoyWin::MessageReceived(BMessage *message)
PortItem *portname = _GetSelectedItem(fGamePortL);
if (portname != NULL && controllerName != NULL) {
portname->SetJoystickName(BString(controllerName->Text()));
BString str = portname->GetOldJoystickName();
if (str != NULL) {
BString strOldFile(JOYSTICKFILESETTINGS);
@ -225,21 +225,21 @@ JoyWin::MessageReceived(BMessage *message)
}
BString strLinkPlace(JOYSTICKFILESETTINGS);
strLinkPlace.Append(portname->Text());
BString strLinkTo(JOYSTICKFILEPATH);
strLinkTo.Append(controllerName->Text());
BDirectory *dir = new BDirectory();
dir->CreateSymLink(strLinkPlace.String(),
dir->CreateSymLink(strLinkPlace.String(),
strLinkTo.String(), NULL);
} else
ShowMessage(SELECTGAMEPORTFIRST);
}
fSystemUsedSelect = false;
break;
}
case CALIBRATE:
case JOY_INVOKE:
{
@ -255,18 +255,18 @@ JoyWin::MessageReceived(BMessage *message)
Check for a device, and show calibrate window if so
*/
}
} else
} else
ShowMessage(SELECTGAMEPORTFIRST);
break;
}
default:
BWindow::MessageReceived(message);
break;
}
}
}
bool
bool
JoyWin::QuitRequested()
{
_ApplyChanges();
@ -276,9 +276,9 @@ JoyWin::QuitRequested()
//---------------------- Private ---------------------------------//
status_t
JoyWin::_AddToList(BListView *list, uint32 command,
JoyWin::_AddToList(BListView *list, uint32 command,
const char* rootPath, BEntry *rootEntry = NULL)
{
{
BDirectory root;
if ( rootEntry != NULL )
@ -287,7 +287,7 @@ JoyWin::_AddToList(BListView *list, uint32 command,
root.SetTo( rootPath );
else
return B_ERROR;
BEntry entry;
while ((root.GetNextEntry(&entry)) > B_ERROR ) {
if (entry.IsDirectory()) {
@ -305,7 +305,7 @@ JoyWin::_AddToList(BListView *list, uint32 command,
status_t
JoyWin::_Calibrate()
JoyWin::_Calibrate()
{
CalibWin* calibw;
BRect rect(100, 100, 500, 400);
@ -316,7 +316,7 @@ JoyWin::_Calibrate()
}
status_t
status_t
JoyWin::_PerformProbe(const char* path)
{
status_t err = B_ERROR;
@ -324,16 +324,16 @@ JoyWin::_PerformProbe(const char* path)
if (err != B_OK) {
return err;
}
MessageWin* mesgw = new MessageWin(Frame(),"Probing", B_MODAL_WINDOW_LOOK,
MessageWin* mesgw = new MessageWin(Frame(),"Probing", B_MODAL_WINDOW_LOOK,
B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_ZOOMABLE);
mesgw->Show();
int32 number = fConControllerL->CountItems();
PortItem *item;
for (int i = 0; i < number; i++) {
// Do a search in JOYSTICKFILEPATH with item->Text() find the string
// that starts with "gadget" (tex gadget = "GamePad Pro") remove
for (int i = 0; i < number; i++) {
// Do a search in JOYSTICKFILEPATH with item->Text() find the string
// that starts with "gadget" (tex gadget = "GamePad Pro") remove
// spacing and the "=" ty to open this one, if failed move to next and
// try to open.. list those that suxesfully work
fConControllerL->Select(i);
@ -347,7 +347,7 @@ JoyWin::_PerformProbe(const char* path)
// don't find message)
}
mesgw->Hide();
//Need a if !found then show this message. else list joysticks.
_ShowNoCompatibleJoystickMessage();
return B_OK;
@ -355,7 +355,7 @@ JoyWin::_PerformProbe(const char* path)
status_t
JoyWin::_ApplyChanges()
JoyWin::_ApplyChanges()
{
BString str = _BuildDisabledJoysticksFile();
//ToDo; Save the string as the file "disabled_joysticks" under settings
@ -365,23 +365,23 @@ JoyWin::_ApplyChanges()
status_t
JoyWin::_GetSettings()
JoyWin::_GetSettings()
{
// ToDo; Read the file "disabled_joysticks" and make the port with the
// ToDo; Read the file "disabled_joysticks" and make the port with the
// same name disabled (/boot/home/config/settings/disabled_joysticks)
return B_OK;
}
status_t
JoyWin::_CheckJoystickExist(const char* path)
JoyWin::_CheckJoystickExist(const char* path)
{
BString str(JOYSTICKFILESETTINGS);
str << path;
BFile file;
status_t status = file.SetTo(str.String(), B_READ_ONLY | B_FAIL_IF_EXISTS);
if (status == B_FILE_EXISTS || status == B_OK)
return B_OK;
else
@ -390,7 +390,7 @@ JoyWin::_CheckJoystickExist(const char* path)
status_t
JoyWin::_ShowProbeMesage(const char* device)
JoyWin::_ShowProbeMesage(const char* device)
{
BString str("An attempt will be made to probe the port '");
str << device << "' to try to figure out what kind of joystick (if any) ";
@ -401,7 +401,7 @@ JoyWin::_ShowProbeMesage(const char* device)
BAlert *alert = new BAlert("test1", str.String(), "Probe", "Cancel");
alert->SetShortcut(1, B_ESCAPE);
int32 bindex = alert->Go();
if (bindex == 0)
return B_OK;
else
@ -409,15 +409,15 @@ JoyWin::_ShowProbeMesage(const char* device)
}
//Used when a files/joysticks are no were to be found
//Used when a files/joysticks are no were to be found
status_t
JoyWin::_ShowCantFindFileMessage(const char* port)
JoyWin::_ShowCantFindFileMessage(const char* port)
{
BString str("The file '");
str << _FixPathToName(port).String() << "' used by '" << port;
str << "' cannot be found.\n Do you want to ";
str << "try to auto-detect a joystick for this port?";
BAlert *alert = new BAlert("test1", str.String(), "Stop", "Probe");
alert->SetShortcut(1, B_ENTER);
int32 bindex = alert->Go();
@ -435,25 +435,25 @@ JoyWin::_ShowNoCompatibleJoystickMessage()
BString str("There where no compatible joysticks detected on this game");
str << " port. Try another port, or ask the manufacture of your jostick";
str << " for a driver designed for Haiku or BeOS.";
BAlert *alert = new BAlert("test1", str.String(), "Ok");
alert->SetShortcut(0, B_ENTER);
alert->Go();
}
void
JoyWin::_ShowNoDeviceConnectedMessage(const char* joy, const char* port)
JoyWin::_ShowNoDeviceConnectedMessage(const char* joy, const char* port)
{
BString str("There does not appear to be a ");
str << joy << " device connected to the port '" << port << "'.";
BAlert *alert = new BAlert("test1", str.String(), "Stop");
alert->SetShortcut(0, B_ENTER);
alert->Go();
}
// Use this function to get a string of disabled ports
// Use this function to get a string of disabled ports
BString
JoyWin::_BuildDisabledJoysticksFile()
{
@ -472,7 +472,7 @@ JoyWin::_BuildDisabledJoysticksFile()
PortItem*
JoyWin::_GetSelectedItem(BListView* list)
JoyWin::_GetSelectedItem(BListView* list)
{
int32 id = list->CurrentSelection();
if (id > -1) {
@ -485,7 +485,7 @@ JoyWin::_GetSelectedItem(BListView* list)
BString
JoyWin::_FixPathToName(const char* port)
JoyWin::_FixPathToName(const char* port)
{
BString temp(port);
temp = temp.Remove(0, temp.FindLast('/') + 1) ;
@ -494,7 +494,7 @@ JoyWin::_FixPathToName(const char* port)
void
JoyWin::_SelectDeselectJoystick(BListView* list, bool enable)
JoyWin::_SelectDeselectJoystick(BListView* list, bool enable)
{
list->DeselectAll();
int32 number = fGamePortL->CountItems();
@ -507,7 +507,7 @@ JoyWin::_SelectDeselectJoystick(BListView* list, bool enable)
int32
JoyWin::_FindStringItemInList(BListView *view, PortItem *item)
JoyWin::_FindStringItemInList(BListView *view, PortItem *item)
{
PortItem *strItem;
int32 number = view->CountItems();
@ -523,7 +523,7 @@ JoyWin::_FindStringItemInList(BListView *view, PortItem *item)
BString
JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item)
JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item)
{
BPath path(symLinkPath);
path.Append(item->Text());
@ -541,7 +541,7 @@ JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item)
status_t
JoyWin::_FindStick(const char* name)
JoyWin::_FindStick(const char* name)
{
BJoystick *stick = new BJoystick();
return stick->Open(name);
@ -549,15 +549,15 @@ JoyWin::_FindStick(const char* name)
const char*
JoyWin::_FindSettingString(const char* name, const char* strPath)
JoyWin::_FindSettingString(const char* name, const char* strPath)
{
//Make a BJoystick try open it
BString str;
BPath path(strPath);
path.Append(name);
fFileTempProbeJoystick = new BFile(path.Path(), B_READ_ONLY);
fFileTempProbeJoystick = new BFile(path.Path(), B_READ_ONLY);
//status_t err = find_directory(B_COMMON_ETC_DIRECTORY, &path);
// if (err == B_OK) {
//BString str(path.Path());
@ -579,19 +579,19 @@ JoyWin::_FindSettingString(const char* name, const char* strPath)
printf("getline %s \n", str.String());
//Test to open joystick with x number
}*/
return "";
} else
return "";
} else
printf("BFile.SetTo error: %s, Path = %s\n", strerror(err), str.String());
// } else
// printf("find_directory error: %s\n", strerror(err));
// delete file;
return "";
}
/*
//Function to get a line from a file
bool
bool
JoyWin::_GetLine(BString& string)
{
// Fill up the buffer with the first chunk of code
@ -612,14 +612,14 @@ JoyWin::_GetLine(BString& string)
string = destination;
return true;
}
string += fBuffer[fPositionInBuffer];
string += fBuffer[fPositionInBuffer];
fPositionInBuffer++;
}
}
// Once the buffer runs out, grab some more and start again
fAmtRead = fFileTempProbeJoystick->Read(&fBuffer, sizeof(fBuffer));
fAmtRead = fFileTempProbeJoystick->Read(&fBuffer, sizeof(fBuffer));
fPositionInBuffer = 0;
}
}
return false;
}
*/

View File

@ -108,10 +108,10 @@ KeymapWindow::KeymapWindow()
create_directory(path.Path(), S_IRWXU | S_IRWXG | S_IRWXO);
}
BMessenger messenger(this);
fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, &ref,
BMessenger messenger(this);
fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, &ref,
B_FILE_NODE, false, NULL);
fSavePanel = new BFilePanel(B_SAVE_PANEL, &messenger, &ref,
fSavePanel = new BFilePanel(B_SAVE_PANEL, &messenger, &ref,
B_FILE_NODE, false, NULL);
BScreen screen(this);
@ -165,7 +165,7 @@ KeymapWindow::~KeymapWindow(void)
}
bool
bool
KeymapWindow::QuitRequested()
{
be_app->PostMessage(B_QUIT_REQUESTED);
@ -173,12 +173,12 @@ KeymapWindow::QuitRequested()
}
void
void
KeymapWindow::MessageReceived(BMessage* message)
{
switch (message->what) {
case B_SIMPLE_DATA:
case B_REFS_RECEIVED:
case B_REFS_RECEIVED:
{
entry_ref ref;
int32 i = 0;
@ -357,7 +357,7 @@ KeymapWindow::_CreateMenu()
for (int32 i = 0; i < numFamilies; i++) {
if (get_font_family(i, &family, &flags) == B_OK) {
BMenuItem *item =
BMenuItem *item =
new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
fFontMenu->AddItem(item);
@ -420,7 +420,7 @@ KeymapWindow::_AddKeyboardLayouts(BMenu* menu)
path.Append("KeyboardLayouts");
BDirectory directory;
BDirectory directory;
if (directory.SetTo(path.Path()) == B_OK) {
entry_ref ref;
while (directory.GetNextRef(&ref) == B_OK) {
@ -489,7 +489,7 @@ KeymapWindow::_SwitchShortcutKeys()
//! Saves previous map to the "Key_map" file.
void
void
KeymapWindow::_RevertKeymap()
{
entry_ref ref;
@ -512,7 +512,7 @@ KeymapWindow::_RevertKeymap()
}
void
void
KeymapWindow::_UseKeymap()
{
entry_ref ref;
@ -538,15 +538,16 @@ KeymapWindow::_FillSystemMaps()
while ((item = fSystemListView->RemoveItem(static_cast<int32>(0))))
delete item;
// TODO: common keymaps!
BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK)
if (find_directory(B_SYSTEM_DATA_DIRECTORY, &path) != B_OK)
return;
path.Append("Keymap");
path.Append("Keymaps");
BDirectory directory;
entry_ref ref;
if (directory.SetTo(path.Path()) == B_OK) {
while (directory.GetNextRef(&ref) == B_OK) {
fSystemListView->AddItem(new KeymapListItem(ref));
@ -555,7 +556,7 @@ KeymapWindow::_FillSystemMaps()
}
void
void
KeymapWindow::_FillUserMaps()
{
BListItem* item;
@ -632,7 +633,7 @@ KeymapWindow::_GetActiveKeymapName()
bool
KeymapWindow::_SelectCurrentMap(BListView* view)
{
if (fCurrentMapName.Length() <= 0)
if (fCurrentMapName.Length() <= 0)
return false;
for (int32 i = 0; i < view->CountItems(); i++) {

View File

@ -9,21 +9,14 @@
*/
/*
Exceptions:
doesn't calc "Time in" time.
Issues:
After experimenting with both Time Prefs, it seems the original
doesn't use the link file in the users settings file to get the
current Timezone. Need to find the call it uses to get its
inital info so I can get exact duplication.
Exceptions:
doesn't calc "Time in" time.
*/
#include "ZoneView.h"
#include "TimeMessages.h"
#include "TZDisplay.h"
#include "TimeWindow.h"
#include <stdio.h>
#include <stdlib.h>
#include <Button.h>
#include <Directory.h>
@ -41,9 +34,11 @@
#include <View.h>
#include <Window.h>
#include <syscalls.h>
#include <stdio.h>
#include <stdlib.h>
#include "TimeMessages.h"
#include "TZDisplay.h"
#include "TimeWindow.h"
class TZoneItem : public BStringItem {
@ -52,10 +47,10 @@ class TZoneItem : public BStringItem {
: BStringItem(text), fZone(new BPath(zone)) { }
~TZoneItem() { delete fZone; }
const char *Zone() const { return fZone->Leaf(); }
const char *Path() const { return fZone->Path(); }
private:
BPath *fZone;
};
@ -83,14 +78,14 @@ TimeZoneView::_Revert()
BPath parent;
fCurrentZone = fOldZone;
int32 czone;
int32 czone = 0;
if (strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) {
if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) {
if (BMenuItem* item = fRegionPopUp->FindItem("Others"))
item->SetMarked(true);
czone = FillCityList("Others");
} else {
fCurrentZone.GetParent(&parent);
} else if (fCurrentZone.GetParent(&parent) == B_OK) {
if (BMenuItem* item = fRegionPopUp->FindItem(parent.Leaf()))
item->SetMarked(true);
czone = FillCityList(parent.Path());
@ -124,9 +119,10 @@ TimeZoneView::AttachedToWindow()
fCityList->SetTarget(this);
fRegionPopUp->SetTargetForItems(this);
// update displays
// update displays
BPath parent;
if (strcmp(fCurrentZone.Leaf(), "Greenwich") != 0) {
if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), "Greenwich") != 0) {
fCurrentZone.GetParent(&parent);
int32 czone = FillCityList(parent.Path());
if (czone > -1) {
@ -148,24 +144,27 @@ TimeZoneView::AttachedToWindow()
void
TimeZoneView::MessageReceived(BMessage *message)
{
int32 change;
switch(message->what) {
switch (message->what) {
case B_OBSERVER_NOTICE_CHANGE:
{
int32 change;
message->FindInt32(B_OBSERVE_WHAT_CHANGE, &change);
switch(change) {
case H_TM_CHANGED:
UpdateDateTime(message);
break;
default:
BView::MessageReceived(message);
break;
}
break;
}
case H_REGION_CHANGED:
ChangeRegion(message);
break;
case H_SET_TIME_ZONE:
{
SetTimeZone();
@ -182,8 +181,8 @@ TimeZoneView::MessageReceived(BMessage *message)
case H_CITY_CHANGED:
SetPreview();
break;
break;
default:
BView::MessageReceived(message);
break;
@ -225,7 +224,7 @@ TimeZoneView::InitView()
BRect frameLeft(Bounds());
frameLeft.right = frameLeft.Width() / 2.0;
frameLeft.InsetBy(10.0f, 10.0f);
BMenuField *menuField = new BMenuField(frameLeft, "regions", NULL, fRegionPopUp, false);
AddChild(menuField);
menuField->ResizeToPreferred();
@ -237,11 +236,11 @@ TimeZoneView::InitView()
fCityList = new BListView(frameLeft, "cityList", B_SINGLE_SELECTION_LIST);
fCityList->SetSelectionMessage(new BMessage(H_CITY_CHANGED));
fCityList->SetInvocationMessage(new BMessage(H_SET_TIME_ZONE));
BScrollView *scrollList = new BScrollView("scrollList", fCityList,
B_FOLLOW_ALL, 0, false, true);
AddChild(scrollList);
// right side
BRect frameRight(Bounds());
frameRight.left = frameRight.Width() / 2.0;
@ -252,21 +251,21 @@ TimeZoneView::InitView()
fCurrent = new TTZDisplay(frameRight, "currentTime", "Current time:");
AddChild(fCurrent);
fCurrent->ResizeToPreferred();
frameRight.top = fCurrent->Frame().bottom + 10.0;
fPreview = new TTZDisplay(frameRight, "previewTime", "Preview time:");
AddChild(fPreview);
fPreview->ResizeToPreferred();
// set button
fSetZone = new BButton(frameRight, "setTimeZone", "Set Time Zone",
fSetZone = new BButton(frameRight, "setTimeZone", "Set Time Zone",
new BMessage(H_SET_TIME_ZONE));
AddChild(fSetZone);
fSetZone->SetEnabled(false);
fSetZone->ResizeToPreferred();
fSetZone->MoveTo(frameRight.right - fSetZone->Bounds().Width(),
scrollList->Frame().bottom - fSetZone->Bounds().Height());
scrollList->Frame().bottom - fSetZone->Bounds().Height());
}
@ -274,15 +273,13 @@ void
TimeZoneView::BuildRegionMenu()
{
BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK)
if (_GetTimezonesPath(path) != B_OK)
return;
path.Append("timezones");
// get current region
BPath region;
fCurrentZone.GetParent(&region);
bool markit;
BEntry entry;
BMenuItem *item;
@ -296,13 +293,13 @@ TimeZoneView::BuildRegionMenu()
if (entry.IsDirectory()) {
path.SetTo(&entry);
itemtext = path.Leaf();
// skip Etc directory
if (itemtext.Compare("Etc", 3) == 0)
continue;
markit = itemtext.Compare(region.Leaf()) == 0;
// add Ocean to oceans :)
if (itemtext.Compare("Atlantic", 8) == 0
||itemtext.Compare("Pacific", 7) == 0
@ -311,7 +308,7 @@ TimeZoneView::BuildRegionMenu()
// underscores are spaces
itemtext = itemtext.ReplaceAll('_', ' ');
BMessage *msg = new BMessage(H_REGION_CHANGED);
msg->AddString("region", path.Path());
@ -324,7 +321,8 @@ TimeZoneView::BuildRegionMenu()
msg->AddString("region", "Others");
item = new BMenuItem("Others", msg);
item->SetMarked(strcmp(fCurrentZone.Leaf(), "Greenwich") == 0);
if (fCurrentZone.Leaf() != NULL)
item->SetMarked(strcmp(fCurrentZone.Leaf(), "Greenwich") == 0);
fRegionPopUp->AddItem(item);
}
@ -341,29 +339,24 @@ TimeZoneView::FillCityList(const char *area)
}
BStringItem *city;
int32 index = -1;
int32 index = -1;
if (strcmp(area, "Others") != 0) {
// Enter time zones directory. Find subdir with name that matches string
// stored in area. Enter subdirectory and count the items. For each item,
// add a StringItem to fCityList Time zones directory
// add a StringItem to fCityList Time zones directory
BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK)
return 0;
_GetTimezonesPath(path);
path.Append("timezones");
BPath Area(area);
BDirectory zoneDir(path.Path());
BPath areaPath(area);
BDirectory zoneDir(path.Path());
BDirectory cityDir;
BString city_name;
BEntry entry;
//locate subdirectory:
if (zoneDir.Contains(Area.Leaf(), B_DIRECTORY_NODE)) {
cityDir.SetTo(&zoneDir, Area.Leaf());
// locate subdirectory:
if (zoneDir.Contains(areaPath.Leaf(), B_DIRECTORY_NODE)) {
cityDir.SetTo(&zoneDir, areaPath.Leaf());
// There is a subdir with a name that matches 'area'. That's the one!!
// Iterate over the items in the subdir, fill listview with TZoneItems
@ -377,15 +370,21 @@ TimeZoneView::FillCityList(const char *area)
city_name.ReplaceAll("_", " ");
city = new TZoneItem(city_name.String(), zone.Path());
fCityList->AddItem(city);
if (strcmp(fCurrentZone.Leaf(), zone.Leaf()) == 0)
if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), zone.Leaf()) == 0)
index = fCityList->IndexOf(city);
}
}
}
} else {
city = new TZoneItem("Greenwich", "/boot/beos/etc/timezones/Greenwich");
BPath path;
_GetTimezonesPath(path);
path.Append("Greenwich");
city = new TZoneItem("Greenwich", path.Path());
fCityList->AddItem(city);
if (strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) {
if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) {
index = fCityList->IndexOf(city);
}
}
@ -406,44 +405,21 @@ TimeZoneView::ChangeRegion(BMessage *message)
void
TimeZoneView::ReadTimeZoneLink()
{
BEntry tzLink;
#if TARGET_PLATFORM_HAIKU
extern status_t _kern_get_tzfilename(char *filename, size_t length, bool *_isGMT);
char tzFileName[B_OS_PATH_LENGTH];
char tzFileName[B_PATH_NAME_LENGTH];
bool isGMT;
_kern_get_tzfilename(tzFileName, B_OS_PATH_LENGTH, &isGMT);
_kern_get_tzfilename(tzFileName, B_PATH_NAME_LENGTH, &isGMT);
BEntry tzLink;
tzLink.SetTo(tzFileName);
#else
/* reads the timezone symlink from B_USER_SETTINGS_DIRECTORY currently
this sets fCurrentZone to the symlink value, this is wrong. The
original can get users timezone without a timezone symlink present.
Defaults are set to different values to clue in on what error was returned
GMT is set when the link is invalid EST is set when the settings dir can't
be found what should never happen.
*/
BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) {
path.Append("timezone");
tzLink.SetTo(path.Path(), true);
if (!tzLink.Exists()) {
BPath path;
_GetTimezonesPath(path);
path.Append("Greenwich");
tzLink.SetTo(path.Path());
}
if (tzLink.InitCheck() != B_OK) {// link is broken
tzLink.SetTo("/boot/beos/etc/timezones/Pacific/fiji");
// do something like set to a default GMT???
}
else if (!tzLink.Exists()) { // link doesn't exists
tzLink.SetTo("/boot/beos/etc/timezones/Greenwich");
}
} else {
// directory doesn't exist
tzLink.SetTo("/boot/beos/etc/timezones/EST");
}
#endif
// we need something in the current zone
fCurrentZone.SetTo(&tzLink);
fOldZone.SetTo(&tzLink);
@ -463,14 +439,14 @@ TimeZoneView::SetPreview()
// calc preview time
time_t current = time(0);
struct tm *ltime = localtime(&current);
// update prview
fPreview->SetText(item->Text());
fPreview->SetTime(ltime->tm_hour, ltime->tm_min);
// set timezone back to current
SetTimeZone(fCurrentZone.Path());
fSetZone->SetEnabled((strcmp(fCurrent->Text(), item->Text()) != 0));
}
}
@ -480,10 +456,10 @@ void
TimeZoneView::SetCurrent(const char *text)
{
SetTimeZone(fCurrentZone.Path());
time_t current = time(0);
struct tm *ltime = localtime(&current);
fCurrent->SetText(text);
fCurrent->SetTime(ltime->tm_hour, ltime->tm_min);
}
@ -498,27 +474,27 @@ TimeZoneView::SetTimeZone()
3) call settz()
4) call set_timezone from OS.h passing path to timezone file
*/
// get path to current link
// update/create timezone symlink in B_USER_SETTINGS_DIRECTORY
BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
return;
path.Append("timezone");
// build target for new link
int32 selection = fCityList->CurrentSelection();
if (selection < 0)
return;
BPath target(((TZoneItem *)fCityList->ItemAt(selection))->Path());
// remove old
BEntry entry(path.Path());
if (entry.Exists())
entry.Remove();
// create new
BDirectory dir(target.Path());
if (dir.CreateSymLink(path.Path(), target.Path(), NULL) != B_OK)
@ -526,15 +502,15 @@ TimeZoneView::SetTimeZone()
// update environment
SetTimeZone(target.Path());
// update display
time_t current = time(0);
struct tm *ltime = localtime(&current);
char tza[B_PATH_NAME_LENGTH];
sprintf(tza, "%s", target.Path());
set_timezone(tza);
// disable button
fSetZone->SetEnabled(false);
@ -546,7 +522,7 @@ TimeZoneView::SetTimeZone()
fMinute = ltime->tm_min;
fCurrentZone.SetTo(target.Path());
SetCurrent(((TZoneItem *)fCityList->ItemAt(selection))->Text());
}
}
void
@ -556,3 +532,14 @@ TimeZoneView::SetTimeZone(const char *zone)
tzset();
}
status_t
TimeZoneView::_GetTimezonesPath(BPath& path)
{
status_t status = find_directory(B_SYSTEM_DATA_DIRECTORY, &path);
if (status != B_OK)
return status;
return path.Append("timezones");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004-2007, Haiku, Inc. All Rights Reserved.
* Copyright 2004-2009, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -25,7 +25,7 @@ class TimeZoneView : public BView {
public:
TimeZoneView(BRect frame);
virtual ~TimeZoneView();
virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *message);
bool CheckCanRevert();
@ -45,13 +45,15 @@ class TimeZoneView : public BView {
// returns index of current zone
int32 FillCityList(const char *area);
status_t _GetTimezonesPath(BPath& path);
private:
BPopUpMenu *fRegionPopUp;
BListView *fCityList;
BButton *fSetZone;
TTZDisplay *fCurrent;
TTZDisplay *fPreview;
int32 fHour;
int32 fMinute;
BPath fCurrentZone;

View File

@ -42,7 +42,7 @@ static const char *kSignature = "application/x-vnd.Haiku-debug_server";
// paths to the apps used for debugging
static const char *kConsoledPath = "/bin/consoled";
static const char *kTerminalPath = "/boot/beos/apps/Terminal";
static const char *kTerminalPath = "/boot/system/apps/Terminal";
static const char *kGDBPath = "/bin/gdb";

View File

@ -38,17 +38,10 @@
using std::nothrow;
using namespace BPrivate;
//------------------------------------------------------------------------------
// Private local function declarations
//------------------------------------------------------------------------------
static bool larger_index(const recent_entry *entry1, const recent_entry *entry2);
//------------------------------------------------------------------------------
// TRoster
//------------------------------------------------------------------------------
/*!
\class TRoster
\brief Implements the application roster.
@ -79,10 +72,10 @@ const bigtime_t kMaximalEarlyPreRegistrationPeriod = 60000000LL;
//! Applications living in this tree are considered "vital system apps".
static const char *const kVitalSystemAppPathPrefix
= "/boot/beos/system/servers";
= "/boot/system/servers";
//! Applications living in this tree are considered "system apps".
static const char *const kSystemAppPathPrefix = "/boot/beos/system";
static const char *const kSystemAppPathPrefix = "/boot/system";
// get_default_roster_settings_file
/*! \brief Returns the path to the default roster settings.
@ -112,18 +105,19 @@ get_default_roster_settings_file(BPath &path)
The object is completely initialized and ready to handle requests.
*/
TRoster::TRoster()
: fLock("roster"),
fRegisteredApps(),
fEarlyPreRegisteredApps(),
fIARRequestsByID(),
fIARRequestsByToken(),
fActiveApp(NULL),
fWatchingService(),
fRecentApps(),
fRecentDocuments(),
fRecentFolders(),
fLastToken(0),
fShuttingDown(false)
:
fLock("roster"),
fRegisteredApps(),
fEarlyPreRegisteredApps(),
fIARRequestsByID(),
fIARRequestsByToken(),
fActiveApp(NULL),
fWatchingService(),
fRecentApps(),
fRecentDocuments(),
fRecentFolders(),
fLastToken(0),
fShuttingDown(false)
{
_LoadRosterSettings();
}
@ -178,7 +172,7 @@ PRINT(("full registration: %d\n", fullReg));
// check the parameters
team_id otherTeam = -1;
uint32 token = 0;
uint32 launchFlags = flags & B_LAUNCH_MASK;
BEntry entry(&ref);
if (!entry.Exists())
@ -262,7 +256,7 @@ PRINT(("added to early pre-regs, token: %lu\n", token));
// add to recent apps if successful
if (signature && signature[0] != '\0')
fRecentApps.Add(signature, flags);
else
else
fRecentApps.Add(&ref, flags);
// fRecentApps.Print();
@ -972,7 +966,7 @@ TRoster::HandleGetRecentApps(BMessage *request)
if (!error)
error = fRecentApps.Get(maxCount, &reply);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1003,7 +997,7 @@ TRoster::HandleAddToRecentDocuments(BMessage *request)
if (!error)
error = fRecentDocuments.Add(&ref, appSig);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1034,7 +1028,7 @@ TRoster::HandleAddToRecentFolders(BMessage *request)
if (!error)
error = fRecentFolders.Add(&ref, appSig);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1062,7 +1056,7 @@ TRoster::HandleAddToRecentApps(BMessage *request)
if (!error)
error = fRecentApps.Add(appSig);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1086,7 +1080,7 @@ TRoster::HandleLoadRecentLists(BMessage *request)
if (!error)
error = _LoadRosterSettings(filename);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1110,7 +1104,7 @@ TRoster::HandleSaveRecentLists(BMessage *request)
if (!error)
error = _SaveRosterSettings(filename);
reply.AddInt32("result", error);
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
@ -1368,7 +1362,7 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
}
// debug server
RosterAppInfo *info =
RosterAppInfo *info =
fRegisteredApps.InfoFor("application/x-vnd.haiku-debug_server");
if (info)
vitalSystemApps.insert(info->team);
@ -1411,7 +1405,7 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
if (error != B_OK) {
userApps.MakeEmpty(true);
systemApps.MakeEmpty(true);
}
}
return error;
}
@ -1691,7 +1685,7 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
status_t error = request->FindInt32("max count", &maxCount);
// Look for optional file type(s)
if (!error) {
type_code typeFound;
type_code typeFound;
status_t typeError = request->GetInfo("file type", &typeFound, &fileTypesCount);
if (!typeError)
typeError = typeFound == B_STRING_TYPE ? B_OK : B_BAD_TYPE;
@ -1730,18 +1724,18 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
fileTypesCount, appSig, &reply);
D(fRecentDocuments.Print());
break;
case B_REG_GET_RECENT_FOLDERS:
error = fRecentFolders.Get(maxCount, (const char**)fileTypes,
fileTypesCount, appSig, &reply);
D(fRecentFolders.Print());
break;
default:
D(PRINT(("WARNING: TRoster::_HandleGetRecentEntries(): unexpected "
"request->what value of 0x%lx\n", request->what)));
error = B_BAD_VALUE;
break;
error = B_BAD_VALUE;
break;
}
}
reply.AddInt32("result", error);
@ -1753,10 +1747,10 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
delete fileTypes;
fileTypes = NULL;
}
request->SendReply(&reply);
request->SendReply(&reply);
FUNCTION_END();
}
}
/*!
@ -1803,7 +1797,7 @@ TRoster::_LoadRosterSettings(const char *path)
const char *settingsPath
= path ? path : get_default_roster_settings_file(_path);
RosterSettingsCharStream stream;
RosterSettingsCharStream stream;
status_t error;
BFile file;
@ -1822,24 +1816,24 @@ TRoster::_LoadRosterSettings(const char *path)
ssize_t bytes = file.Read(data, size);
error = bytes < 0 ? bytes : (bytes == size ? B_OK : B_FILE_ERROR);
}
if (!error)
if (!error)
error = stream.SetTo(std::string(data));
delete[] data;
if (!error) {
if (!error) {
// Clear the current lists as
// we'll be manually building them up
fRecentDocuments.Clear();
fRecentFolders.Clear();
fRecentApps.Clear();
// Now we just walk through the file and read in the info
while (true) {
status_t streamError;
char str[B_PATH_NAME_LENGTH];
// (RecentDoc | RecentFolder | RecentApp)
streamError = stream.GetString(str);
if (!streamError) {
@ -1849,17 +1843,17 @@ TRoster::_LoadRosterSettings(const char *path)
etApp,
etSomethingIsAmiss,
} type;
if (strcmp(str, "RecentDoc") == 0) {
type = etDoc;
} else if (strcmp(str, "RecentFolder") == 0) {
} else if (strcmp(str, "RecentFolder") == 0) {
type = etFolder;
} else if (strcmp(str, "RecentApp") == 0) {
type = etApp;
} else {
type = etSomethingIsAmiss;
}
switch (type) {
case etDoc:
case etFolder:
@ -1868,18 +1862,18 @@ TRoster::_LoadRosterSettings(const char *path)
std::list<recent_entry*> *list = (type == etDoc)
? &fRecentDocuments.fEntryList
: &fRecentFolders.fEntryList;
char path[B_PATH_NAME_LENGTH];
char app[B_PATH_NAME_LENGTH];
char rank[B_PATH_NAME_LENGTH];
entry_ref ref;
uint32 index = 0;
// Convert the given path to an entry ref
streamError = stream.GetString(path);
if (!streamError)
if (!streamError)
streamError = get_ref_for_path(path, &ref);
// Add a new entry to the list for each application
// signature and rank we find
while (!streamError) {
@ -1902,22 +1896,22 @@ TRoster::_LoadRosterSettings(const char *path)
if (!streamError) {
printf("pushing entry, leaf == '%s', app == '%s', index == %ld\n",
entry->ref.name, entry->sig.c_str(), entry->index);
list->push_back(entry);
}
}
if (streamError) {
printf("entry error 0x%lx\n", streamError);
if (streamError != RosterSettingsCharStream::kEndOfLine
&& streamError != RosterSettingsCharStream::kEndOfStream)
stream.SkipLine();
}
break;
}
case etApp:
{
char app[B_PATH_NAME_LENGTH];
@ -1929,24 +1923,24 @@ TRoster::_LoadRosterSettings(const char *path)
stream.SkipLine();
break;
}
default:
// Something was amiss; skip to the next line
stream.SkipLine();
break;
}
}
if (streamError == RosterSettingsCharStream::kEndOfStream)
break;
}
// Now we must sort our lists of documents and folders by the
// indicies we read for each entry (largest index first)
fRecentDocuments.fEntryList.sort(larger_index);
fRecentFolders.fEntryList.sort(larger_index);
printf("----------------------------------------------------------------------\n");
fRecentDocuments.Print();
printf("----------------------------------------------------------------------\n");
@ -1957,7 +1951,7 @@ TRoster::_LoadRosterSettings(const char *path)
}
if (error)
D(PRINT(("WARNING: TRoster::_LoadRosterSettings(): error loading roster settings "
"from '%s', 0x%lx\n", settingsPath, error)));
"from '%s', 0x%lx\n", settingsPath, error)));
return error;
}
@ -1970,7 +1964,7 @@ TRoster::_SaveRosterSettings(const char *path)
status_t error;
FILE* file;
file = fopen(settingsPath, "w+");
error = file ? B_OK : errno;
if (!error) {
@ -1989,19 +1983,18 @@ TRoster::_SaveRosterSettings(const char *path)
"with error 0x%lx\n", saveError)));
fclose(file);
}
return error;
}
//------------------------------------------------------------------------------
// Private local functions
//------------------------------------------------------------------------------
// #pragma mark - Private local functions
/*! \brief Returns true if entry1's index is larger than entry2's index.
Also returns true if either entry is \c NULL.
Used for sorting the recent entry lists loaded from disk into the
proper order.
*/

View File

@ -22,7 +22,7 @@ local librootFunctions =
strtol.o
;
AddResources zbeos : boot_loader.rdef ;
AddResources haiku_loader : boot_loader.rdef ;
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
boot_platform_$(TARGET_BOOT_PLATFORM).o
@ -68,12 +68,12 @@ actions BuildCoffLoader bind HACK_COFF {
BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
rule BuildZbeos {
local zbeos = $(1) ;
rule BuildBiosLoader {
local haikuLoader = $(1) ;
local bootLoader = $(2) ;
Depends $(zbeos) : $(bootLoader) ;
MakeLocateDebug $(zbeos) ;
Depends $(haikuLoader) : $(bootLoader) ;
MakeLocateDebug $(haikuLoader) ;
on $(1) ResAttr $(1) : $(RESFILES) : false ;
if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] {
@ -82,15 +82,15 @@ rule BuildZbeos {
}
}
actions BuildZbeos {
actions BuildBiosLoader {
rm -f $(1)
$(TARGET_OBJCOPY) -O binary $(2) $(1)
}
BuildZbeos zbeos : boot_loader_$(TARGET_BOOT_PLATFORM) ;
BuildBiosLoader haiku_loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
# different target for PXE, to be build with TARGET_BOOT_PLATFORM=pxe_ia32 jam pxehaiku-loader
BuildZbeos pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
BuildBiosLoader pxehaiku-loader : boot_loader_$(TARGET_BOOT_PLATFORM) ;
SubInclude HAIKU_TOP src system boot arch $(TARGET_ARCH) ;
SubInclude HAIKU_TOP src system boot loader ;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2003-2005, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2003-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
@ -24,11 +24,11 @@
#endif
#define KERNEL_IMAGE "kernel_" BOOT_ARCH
#define KERNEL_PATH "beos/system/" KERNEL_IMAGE
#define KERNEL_PATH "system/" KERNEL_IMAGE
static const char *sPaths[] = {
"beos/system/add-ons/kernel",
"system/add-ons/kernel",
"home/config/add-ons/kernel",
NULL
};

View File

@ -22,7 +22,7 @@
/*
* generate boot floppy:
* cd src/system/boot/platform/atari_m68k/ ; make fixup_tos_floppy_chksum; cd -
* dd if=generated/objects/haiku/m68k/release/system/boot/zbeos of=~/floppy.img bs=512 count=20 conv=notrunc
* dd if=generated/objects/haiku/m68k/release/system/boot/haiku_loader of=~/floppy.img bs=512 count=20 conv=notrunc
* src/system/boot/platform/atari_m68k/fixup_tos_floppy_chksum ~/floppy.img
* generate .prg:
* generated.m68k/cross-tools/bin/m68k-unknown-haiku-ld -o haiku.prg -T src/system/ldscripts/m68k/boot_prg_atari_m68k.ld generated/objects/haiku/m68k/release/system/boot/boot_loader_atari_m68k
@ -355,7 +355,7 @@ h5:
unimpl:
.string "Unimplemented."
msg_j1:
.string "jumping to zbeos."
.string "jumping to haiku_loader."
shell_end:

View File

@ -22,7 +22,7 @@
* The offset of the partition in 512 byte blocks must be written at
* position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does
* that) or otherwise the code can't find the partition.
* The partition must be a BFS formatted. The file "beos/system/zbeos"
* The partition must be a BFS formatted. The file "system/haiku_loader"
* (the stage 2 boot loader) loaded into memory at 0x1000:0x0000 (linear address
* 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset
* in 512 byte blocks and dl - BIOS ID of the boot drive.

View File

@ -5,7 +5,7 @@
; partitions. The offset of the partition in 512 byte blocks must be written at
; position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does
; that) or otherwise the code can't find the partition.
; The partition must be a BFS formatted. The file "beos/system/zbeos"
; The partition must be a BFS formatted. The file "system/haiku_loader"
; (the stage 2 boot loader) loaded into memory at 0x1000:0x0000 (linear address
; 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset
; in 512 byte blocks and dl - BIOS ID of the boot drive.
@ -29,7 +29,7 @@
; BFS definitions
%assign SUPER_BLOCK_MAGIC1 '1SFB' ; nasm reverses '...' consts
%define SUPER_BLOCK_MAGIC1 '1SFB' ; nasm reverses '...' consts
%assign SUPER_BLOCK_MAGIC2 0xdd121031
%assign SUPER_BLOCK_MAGIC3 0x15b6830e
@ -92,14 +92,14 @@
; 16 bit code
SECTION
SECTION .text
BITS 16
ORG BOOT_BLOCK_START_ADDRESS ; start code at 0x7c00
; nicer way to get the size of a structure
%define sizeof(s) s %+ _size
; using a structure in a another structure definition
; using a structure in a another structure definition
%macro nstruc 1-2 1
resb sizeof(%1) * %2
%endmacro
@ -265,7 +265,7 @@ start:
; save the BIOS drive ID
mov [bios_drive_id], dl
; check for BIOS int 0x13 (disk services) extensions
mov ah, CHECK_DISK_EXTENSIONS_PRESENT
mov bx, 0x55aa
@ -328,7 +328,7 @@ _writeString:
int BIOS_VIDEO_SERVICES
jmp .loop
.loopend
.loopend:
ret
@ -437,8 +437,8 @@ readBlocks:
push ax
pop es
mov bx, bp
; block count to ax
; block count to ax
mov ax, di ; count
mov dl, [bios_drive_id]
@ -507,7 +507,7 @@ readBuffer:
pushad
xchg eax, edi ; block index to eax
mov ebp, esi ; buffer pointer to ebp
call readOneBlock
popad
@ -525,7 +525,7 @@ readBuffer:
and eax, eax
jz .next_indirect_block
.more_blocks:
; compute blocks_left
xchg eax, ecx ; save eax
@ -549,7 +549,7 @@ readBuffer:
; adjust read_offset
add eax, 2
; success
mov di, [sReadBufferStack]
mov byte [di + PushadStack.eax], 1
@ -607,7 +607,7 @@ readBufferInit:
; position si at the 1st block run
lea si, [inode + BFSInode.data + DataStream.direct]
; buffer address
xor ebp, ebp
mov bp, buffer
@ -631,7 +631,7 @@ kReadErrorString db "read error", 0
kBadSuperBlockMagicString db "bad superblock magic", 0
kNotADirectoryString db "not a directory", 0
kBadInodeMagicString db "bad inode magic", 0
kNoZbeosString db "zbeos not found", 0
kNoZbeosString db "haiku_loader not found", 0
%else
kErrorString db "Failed to load OS. Press any key to reboot..."
db 0
@ -639,9 +639,8 @@ kErrorString db "Failed to load OS. Press any key to reboot..."
; the path to the boot loader
kPathComponents:
pathComponent "beos"
pathComponent "system"
pathComponent "zbeos"
pathComponent "haiku_loader"
db 0
@ -716,7 +715,7 @@ readBootLoader:
xor edx, edx
mov dl, [bios_drive_id]
; ds, es
; ds, es
push 0x07c0
pop ds
push 0x1000
@ -783,7 +782,7 @@ continueMain:
.not_found:
error kNoZbeosString
.read_loop:
; read the next B+ tree node
@ -840,8 +839,8 @@ continueMain:
popa
jne .skip_key
; keys are equal
; keys are equal
; get the current index
pop dx ; pop previous key length
@ -893,13 +892,13 @@ readInode:
; administrative part (not the small data section), which easily fits into
; one disk block.
call readOneBlock
cmp dword [inode + BFSInode.magic1], INODE_MAGIC1
je .no_error
error kBadInodeMagicString
.no_error
.no_error:
popad
ret
@ -913,7 +912,7 @@ readInode:
; eax: disk block number, where the block run begins
blockRunToDiskBlock:
push ecx
; run.allocation_group << superblock.ag_shift
mov cl, [superblock + SuperBlock.ag_shift]
mov eax, [si + BlockRun.allocation_group]
@ -922,7 +921,7 @@ blockRunToDiskBlock:
; add run.start
xor ecx, ecx
mov cx, [si + BlockRun.start]
add eax, ecx
pop ecx
@ -972,7 +971,7 @@ _writeInt32:
jl .digit
add dl, 'a' - '0' - 10
.digit:
.digit:
add dl, '0'
; prepend the digit to the string
@ -990,7 +989,7 @@ _writeInt32:
popad
ret
; check whether we are small enough
end:
%if end - start > 1024

View File

@ -1,5 +1,5 @@
/*
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
@ -100,7 +100,7 @@ print_item_at(int32 line, MenuItem *item, bool clearHelp = true)
printf(" ");
printf(item->Label());
if (item->Submenu() && item->Submenu()->Type() == CHOICE_MENU) {
// show the current choice (if any)
const char *text = " (Current: ";
@ -203,7 +203,7 @@ draw_menu(Menu *menu)
print_centered(2, "Haiku Boot Loader");
console_set_color(kCopyrightColor, kBackgroundColor);
print_centered(4, "Copyright 2004-2008 Haiku Inc.");
print_centered(4, "Copyright 2004-2009 Haiku Inc.");
if (menu->Title()) {
console_set_cursor(kOffsetX, kFirstLine - 2);
@ -459,7 +459,7 @@ run_menu(Menu *menu)
// #pragma mark -
void
void
platform_generic_update_text_menu_item(Menu *menu, MenuItem *item)
{
if (menu->IsHidden())

View File

@ -45,9 +45,9 @@ static struct {
const char *path;
const char *target;
} sPredefinedLinks[] = {
{"/system", "/boot/beos/system"},
{"/bin", "/boot/beos/bin"},
{"/etc", "/boot/beos/etc"},
{"/system", "/boot/system"},
{"/bin", "/boot/system/bin"},
{"/etc", "/boot/system/etc"},
{"/var", "/boot/var"},
{"/tmp", "/boot/var/tmp"},
{NULL}

View File

@ -1,5 +1,7 @@
/*
* Copyright (c) 2004-2008, François Revol.
* Copyright 2004, François Revol.
* Copyright 2007-2009, Axel Dörfler, axeld@pinc-software.de.
*
* Distributed under the terms of the MIT license.
*/
@ -30,28 +32,25 @@
/* Haiku system directories */
/* os root dir; just stick to 'beos' for now */
#define SYSTEM "beos"
//#define SYSTEM "haiku" // :)
//#define SYSTEM "os"
#define SYSTEM "system"
static const char *kSystemDirectories[] = {
SYSTEM, // B_BEOS_DIRECTORY
SYSTEM "/system",
SYSTEM "/system/add-ons",
SYSTEM "/system/boot",
SYSTEM "/etc/fonts",
SYSTEM "/system/lib",
SYSTEM "/system/servers",
SYSTEM, // B_SYSTEM_DIRECTORY
SYSTEM, // B_BEOS_SYSTEM_DIRECTORY
SYSTEM "/add-ons",
SYSTEM "/boot",
SYSTEM "/fonts",
SYSTEM "/lib",
SYSTEM "/servers",
SYSTEM "/apps",
SYSTEM "/bin",
SYSTEM "/etc",
SYSTEM "/documentation",
SYSTEM "/preferences",
SYSTEM "/system/add-ons/Translators",
SYSTEM "/system/add-ons/media",
SYSTEM "/etc/sounds",
SYSTEM "/etc",
SYSTEM "/add-ons/Translators",
SYSTEM "/add-ons/media",
SYSTEM "/data/sounds",
SYSTEM "/data",
};
/* Common directories, shared among users */
@ -79,7 +78,7 @@ static const char *kCommonDirectories[] = {
"var", // B_COMMON_VAR_DIRECTORY
COMMON "/add-ons/Translators",
COMMON "/add-ons/media",
COMMON "/sounds",
COMMON "/data/sounds",
COMMON "/data",
};
@ -99,7 +98,7 @@ static const char *kUserDirectories[] = {
HOME "/config/settings/printers",
HOME "/config/add-ons/Translators",
HOME "/config/add-ons/media",
HOME "/config/sounds",
HOME "/config/data/sounds",
HOME "/config/data",
HOME "/config/cache",
};
@ -208,23 +207,23 @@ find_directory(directory_which which, dev_t device, bool createIt,
break;
/* Haiku system directories */
case B_BEOS_DIRECTORY:
case B_SYSTEM_DIRECTORY:
case B_BEOS_SYSTEM_DIRECTORY:
case B_BEOS_ADDONS_DIRECTORY:
case B_BEOS_BOOT_DIRECTORY:
case B_BEOS_FONTS_DIRECTORY:
case B_BEOS_LIB_DIRECTORY:
case B_BEOS_SERVERS_DIRECTORY:
case B_BEOS_APPS_DIRECTORY:
case B_BEOS_BIN_DIRECTORY:
case B_BEOS_ETC_DIRECTORY:
case B_BEOS_DOCUMENTATION_DIRECTORY:
case B_BEOS_PREFERENCES_DIRECTORY:
case B_BEOS_TRANSLATORS_DIRECTORY:
case B_BEOS_MEDIA_NODES_DIRECTORY:
case B_BEOS_SOUNDS_DIRECTORY:
case B_BEOS_DATA_DIRECTORY:
template = kSystemDirectories[which - B_BEOS_DIRECTORY];
case B_SYSTEM_ADDONS_DIRECTORY:
case B_SYSTEM_BOOT_DIRECTORY:
case B_SYSTEM_FONTS_DIRECTORY:
case B_SYSTEM_LIB_DIRECTORY:
case B_SYSTEM_SERVERS_DIRECTORY:
case B_SYSTEM_APPS_DIRECTORY:
case B_SYSTEM_BIN_DIRECTORY:
case B_SYSTEM_ETC_DIRECTORY:
case B_SYSTEM_DOCUMENTATION_DIRECTORY:
case B_SYSTEM_PREFERENCES_DIRECTORY:
case B_SYSTEM_TRANSLATORS_DIRECTORY:
case B_SYSTEM_MEDIA_NODES_DIRECTORY:
case B_SYSTEM_SOUNDS_DIRECTORY:
case B_SYSTEM_DATA_DIRECTORY:
template = kSystemDirectories[which - B_SYSTEM_DIRECTORY];
break;
/* Common directories, shared among users */

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de.
* Copyright 2005-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*
* Copyright 2002, Manuel J. Petit. All rights reserved.
@ -65,22 +65,22 @@ search_path_for_type(image_type type)
":/bin"
":/boot/apps"
":/boot/preferences"
":/boot/beos/apps"
":/boot/beos/preferences"
":/boot/system/apps"
":/boot/system/preferences"
":/boot/develop/tools/gnupro/bin";
case B_LIBRARY_IMAGE:
return "%A/lib"
":/boot/home/config/lib"
// TODO: Remove!
":/boot/common/lib:/boot/beos/system/lib";
":/boot/common/lib:/boot/system/lib";
case B_ADD_ON_IMAGE:
return "%A/add-ons"
":/boot/home/config/add-ons"
// TODO: Remove!
":/boot/common/add-ons"
":/boot/beos/system/add-ons";
":/boot/system/add-ons";
default:
return NULL;
@ -395,8 +395,7 @@ runtime_loader(void *_args)
gProgramArgs->env[i] += relocationOffset;
}
if (!strcmp(gProgramArgs->program_path,
"/boot/beos/system/runtime_loader")) {
if (!strcmp(gProgramArgs->program_path, "/boot/system/runtime_loader")) {
// TODO: this is a (temporary) work-around for bug #2273 which causes
// the cache's mutex to be locked twice when starting the runtime_loader
// itself.