* 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
+3 -3
View File
@@ -171,21 +171,21 @@ switch $(HAIKU_CPU) {
{ {
HAIKU_DEFINES += __POWERPC__ ; HAIKU_DEFINES += __POWERPC__ ;
HAIKU_BOOT_PLATFORM = openfirmware ; 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 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 192 ; # in kB - unused yet
} }
case x86 : case x86 :
{ {
HAIKU_DEFINES += __INTEL__ ; HAIKU_DEFINES += __INTEL__ ;
HAIKU_BOOT_PLATFORM = bios_ia32 ; 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 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 300 ; # in kB
} }
case m68k : case m68k :
{ {
HAIKU_DEFINES += __M68K__ ; HAIKU_DEFINES += __M68K__ ;
HAIKU_BOOT_PLATFORM = atari_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 HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET = 130 ; # in kB
} }
case * : case * :
+149 -148
View File
@@ -18,7 +18,7 @@ if $(INCLUDE_GPL_ADDONS) = 1 {
GPL_ONLY = "" ; 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 cal cat catattr checkfs chgrp chmod chop chown chroot cksum clear
clockconfig cmp comm compress copyattr $(X86_ONLY)CortexAddOnHost cp clockconfig cmp comm compress copyattr $(X86_ONLY)CortexAddOnHost cp
csplit ctags cut date dc dd desklink df diff diff3 dircolors dirname 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 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 DiskUsage DriveSetup CDPlayer Expander Icon-O-Matic Installer LaunchBox
Magnify Mail MediaPlayer MidiPlayer NetworkStatus PackageInstaller People Magnify Mail MediaPlayer MidiPlayer NetworkStatus PackageInstaller People
PowerStatus ProcessController Screenshot ShowImage SoundRecorder StyledEdit PowerStatus ProcessController Screenshot ShowImage SoundRecorder StyledEdit
Terminal TextSearch TV Workspaces 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 FileTypes Fonts Keyboard Keymap Media Menu Mouse Network Printers Screen
ScreenSaver Sounds Time Touchpad <preference>Tracker VirtualMemory 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 $(X86_ONLY)GLDirectMode $(X86_ONLY)GLTeapot Mandelbrot Pairs
Playground Pulse Sudoku Gradients 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 libtranslation.so libbnetapi.so libnetwork.so libdebug.so libbsd.so
libmail.so libtextencoding.so libz.so libfreetype.so libpng.so libmidi.so libmail.so libtextencoding.so libz.so libfreetype.so libpng.so libmidi.so
libmidi2.so libdevice.so libgame.so libscreensaver.so <revisioned>libroot.so libmidi2.so libdevice.so libgame.so libscreensaver.so <revisioned>libroot.so
$(X86_ONLY)libGL.so libfluidsynth.so liblpsolve55.so liblinprog.so libalm.so $(X86_ONLY)libGL.so libfluidsynth.so liblpsolve55.so liblinprog.so libalm.so
libilmimf.so libiconv.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 net_server media_addon_server input_server app_server fake_app_server
midi_server print_server mail_daemon midi_server print_server mail_daemon
; ;
BEOS_NETWORK_DEVICES = ethernet loopback ; SYSTEM_NETWORK_DEVICES = ethernet loopback ;
BEOS_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame SYSTEM_NETWORK_DATALINK_PROTOCOLS = ethernet_frame <module>arp loopback_frame
ipv4_datagram ; ipv4_datagram ;
#BEOS_NETWORK_PPP = ipcp modem pap pppoe ; #SYSTEM_NETWORK_PPP = ipcp modem pap pppoe ;
BEOS_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix ; SYSTEM_NETWORK_PROTOCOLS = ipv4 tcp udp icmp unix ;
BEOS_ADD_ONS_ACCELERANTS = $(X86_ONLY)radeon.accelerant $(X86_ONLY)nvidia.accelerant SYSTEM_ADD_ONS_ACCELERANTS = $(X86_ONLY)radeon.accelerant
$(X86_ONLY)matrox.accelerant $(X86_ONLY)neomagic.accelerant $(X86_ONLY)nvidia.accelerant $(X86_ONLY)matrox.accelerant
$(X86_ONLY)intel_extreme.accelerant $(X86_ONLY)s3.accelerant $(X86_ONLY)vesa.accelerant $(X86_ONLY)neomagic.accelerant $(X86_ONLY)intel_extreme.accelerant
$(X86_ONLY)s3.accelerant $(X86_ONLY)vesa.accelerant
#$(X86_ONLY)via.accelerant #$(X86_ONLY)via.accelerant
#$(X86_ONLY)vmware.accelerant #$(X86_ONLY)vmware.accelerant
; ;
BEOS_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator JPEGTranslator SYSTEM_ADD_ONS_TRANSLATORS = BMPTranslator EXRTranslator GIFTranslator
JPEG2000Translator PCXTranslator PNGTranslator PPMTranslator RAWTranslator JPEGTranslator JPEG2000Translator PCXTranslator PNGTranslator PPMTranslator
RTF-Translator SGITranslator STXTTranslator TGATranslator RAWTranslator RTF-Translator SGITranslator STXTTranslator TGATranslator
TIFFTranslator WonderBrushTranslator 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 dvb.media_addon
hmulti_audio.media_addon hmulti_audio.media_addon
mixer.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 firewire_dv.media_addon
#legacy.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 aiff_reader au_reader $(X86_ONLY)avcodec avi_reader
matroska mov_reader matroska mov_reader
mp3_decoder mp3_reader mp3_decoder mp3_reader
@@ -112,21 +113,21 @@ BEOS_ADD_ONS_MEDIA_PLUGINS = $(GPL_ONLY)ac3_decoder
# theora # theora
vorbis wav_reader 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 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 Print\ To\ File Serial\ Port USB\ Port
; ;
BEOS_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku IFS Spider Message ; SYSTEM_ADD_ONS_SCREENSAVERS = DebugNow Flurry Haiku IFS Spider Message ;
BEOS_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ; SYSTEM_ADD_ONS_DRIVERS_AUDIO = auich auvia echo3g emuxki hda ;
BEOS_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia sis7018 usb_audio ; SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD = ; #cmedia sis7018 usb_audio ;
BEOS_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia SYSTEM_ADD_ONS_DRIVERS_GRAPHICS = $(X86_ONLY)radeon $(X86_ONLY)nvidia
$(X86_ONLY)neomagic $(X86_ONLY)matrox $(X86_ONLY)intel_extreme $(X86_ONLY)neomagic $(X86_ONLY)matrox $(X86_ONLY)intel_extreme
$(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware $(X86_ONLY)s3 $(X86_ONLY)vesa #$(X86_ONLY)via #$(X86_ONLY)vmware
; ;
BEOS_ADD_ONS_DRIVERS_MIDI = emuxki ; SYSTEM_ADD_ONS_DRIVERS_MIDI = emuxki ;
BEOS_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x SYSTEM_ADD_ONS_DRIVERS_NET = $(X86_ONLY)3com $(X86_ONLY)broadcom440x
$(X86_ONLY)broadcom570x etherpci $(X86_ONLY)ipro1000 $(X86_ONLY)broadcom570x etherpci $(X86_ONLY)ipro1000
pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900 pegasus $(X86_ONLY)rtl8139 rtl8169 $(X86_ONLY)rtl81xx sis900
$(X86_ONLY)via_rhine wb840 $(X86_ONLY)ipro100 $(X86_ONLY)nforce $(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)marvell_yukon $(X86_ONLY)syskonnect
$(X86_ONLY)attansic_l2 $(X86_ONLY)ar81xx usb_ecm $(X86_ONLY)attansic_l2 $(X86_ONLY)ar81xx usb_ecm
; ;
#BEOS_ADD_ONS_DRIVERS_ACPI = $(X86_ONLY)acpi_button ; #SYSTEM_ADD_ONS_DRIVERS_POWER = $(X86_ONLY)acpi_button ;
BEOS_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi SYSTEM_ADD_ONS_BUS_MANAGERS = pci $(X86_ONLY)ps2 $(X86_ONLY)isa ide scsi
config_manager agp_gart usb firewire $(X86_ONLY)acpi 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 ; write_overlay $(GPL_ONLY)reiserfs ;
#googlefs $(GPL_ONLY)ntfs ; #googlefs $(GPL_ONLY)ntfs ;
# modules # modules
AddFilesToHaikuImage beos system add-ons kernel bus_managers AddFilesToHaikuImage system add-ons kernel bus_managers
: $(BEOS_ADD_ONS_BUS_MANAGERS) ; : $(SYSTEM_ADD_ONS_BUS_MANAGERS) ;
AddFilesToHaikuImage beos system add-ons kernel busses agp_gart AddFilesToHaikuImage system add-ons kernel busses agp_gart
: $(X86_ONLY)<agp_gart>intel ; : $(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 ; : 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 ; : ahci ;
AddFilesToHaikuImage beos system add-ons kernel busses usb AddFilesToHaikuImage system add-ons kernel busses usb
: <usb>uhci <usb>ohci <usb>ehci ; : <usb>uhci <usb>ohci <usb>ehci ;
AddFilesToHaikuImage beos system add-ons kernel console : vga_text ; AddFilesToHaikuImage system add-ons kernel console : vga_text ;
AddFilesToHaikuImage beos system add-ons kernel debugger AddFilesToHaikuImage system add-ons kernel debugger
: $(X86_ONLY)<kdebug>disasm <kdebug>hangman <kdebug>invalidate_on_exit : $(X86_ONLY)<kdebug>disasm <kdebug>hangman <kdebug>invalidate_on_exit
<kdebug>usb_keyboard ; <kdebug>usb_keyboard ;
AddFilesToHaikuImage beos system add-ons kernel file_systems AddFilesToHaikuImage system add-ons kernel file_systems
: $(BEOS_ADD_ONS_FILE_SYSTEMS) ; : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;
AddFilesToHaikuImage beos system add-ons kernel generic AddFilesToHaikuImage system add-ons kernel generic
: dpc ide_adapter locked_pool mpu401 scsi_periph ; : 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 ; : intel session ;
AddFilesToHaikuImage beos system add-ons kernel interrupt_controllers AddFilesToHaikuImage system add-ons kernel interrupt_controllers
: $(PPC_ONLY)openpic ; : $(PPC_ONLY)openpic ;
if $(TARGET_ARCH) = x86 { 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 { if $(HAIKU_GCC_VERSION[1]) = 2 {
AddFilesToHaikuImage beos system add-ons kernel debugger demangle : AddFilesToHaikuImage system add-ons kernel debugger demangle :
<kdebug>gcc2 ; <kdebug>gcc2 ;
} }
} }
@@ -182,62 +183,62 @@ AddNewDriversToHaikuImage disk scsi : scsi_cd scsi_disk ;
# legacy drivers # legacy drivers
AddDriversToHaikuImage : console dprintf $(X86_ONLY)keyboard null AddDriversToHaikuImage : console dprintf $(X86_ONLY)keyboard null
random <driver>tty zero ; random <driver>tty zero ;
AddDriversToHaikuImage audio hmulti : $(BEOS_ADD_ONS_DRIVERS_AUDIO) ; AddDriversToHaikuImage audio hmulti : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO) ;
AddDriversToHaikuImage audio old : $(BEOS_ADD_ONS_DRIVERS_AUDIO_OLD) ; AddDriversToHaikuImage audio old : $(SYSTEM_ADD_ONS_DRIVERS_AUDIO_OLD) ;
AddDriversToHaikuImage midi : $(BEOS_ADD_ONS_DRIVERS_MIDI) ; AddDriversToHaikuImage midi : $(SYSTEM_ADD_ONS_DRIVERS_MIDI) ;
AddDriversToHaikuImage bus : usb_raw fw_raw ; AddDriversToHaikuImage bus : usb_raw fw_raw ;
AddDriversToHaikuImage disk floppy : $(X86_ONLY)pc_floppy ; AddDriversToHaikuImage disk floppy : $(X86_ONLY)pc_floppy ;
AddDriversToHaikuImage disk usb : usb_disk ; AddDriversToHaikuImage disk usb : usb_disk ;
AddDriversToHaikuImage disk virtual : nbd ; AddDriversToHaikuImage disk virtual : nbd ;
AddDriversToHaikuImage dvb : cx23882 ; 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 input : ps2_hid usb_hid wacom ;
AddDriversToHaikuImage misc : <driver>poke <driver>test <driver>mem ; AddDriversToHaikuImage misc : <driver>poke <driver>test <driver>mem ;
AddDriversToHaikuImage net : $(BEOS_ADD_ONS_DRIVERS_NET) ; AddDriversToHaikuImage net : $(SYSTEM_ADD_ONS_DRIVERS_NET) ;
#AddDriversToHaikuImage power : $(BEOS_ADD_ONS_DRIVERS_ACPI) ; #AddDriversToHaikuImage power : $(SYSTEM_ADD_ONS_DRIVERS_POWER) ;
# kernel # kernel
AddFilesToHaikuImage beos system : <revisioned>kernel_$(TARGET_ARCH) ; AddFilesToHaikuImage system : <revisioned>kernel_$(TARGET_ARCH) ;
# libs # libs
AddFilesToHaikuImage beos system lib : $(BEOS_SYSTEM_LIBS) ; AddFilesToHaikuImage system lib : $(SYSTEM_LIBS) ;
# libnetwork.so replaces quite a few libraries # libnetwork.so replaces quite a few libraries
BEOS_SYSTEM_LIBS_LIBNETWORK_ALIASES SYSTEM_LIBS_LIBNETWORK_ALIASES
= libsocket.so libbind.so libnet.so ; = libsocket.so libbind.so libnet.so ;
local lib ; local lib ;
for lib in $(BEOS_SYSTEM_LIBS_LIBNETWORK_ALIASES) { for lib in $(SYSTEM_LIBS_LIBNETWORK_ALIASES) {
AddSymlinkToHaikuImage beos system lib : libnetwork.so : $(lib) ; 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 # libGL.so has GLU (like BeOS) *and* GLUT API built-in
BEOS_SYSTEM_LIBS_LIBGL_ALIASES SYSTEM_LIBS_LIBGL_ALIASES
= libGLU.so libglut.so ; = libGLU.so libglut.so ;
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
local lib ; local lib ;
for lib in $(BEOS_SYSTEM_LIBS_LIBGL_ALIASES) { for lib in $(SYSTEM_LIBS_LIBGL_ALIASES) {
AddSymlinkToHaikuImage beos system lib : libGL.so : $(lib) ; AddSymlinkToHaikuImage system lib : libGL.so : $(lib) ;
} }
} }
# servers # servers
AddFilesToHaikuImage beos system servers : $(BEOS_SYSTEM_SERVERS) ; AddFilesToHaikuImage system servers : $(SYSTEM_SERVERS) ;
# apps # apps
AddFilesToHaikuImage beos system : runtime_loader Deskbar Tracker ; AddFilesToHaikuImage system : runtime_loader Deskbar Tracker ;
AddFilesToHaikuImage beos bin : $(BEOS_BIN) consoled ; AddFilesToHaikuImage system bin : $(SYSTEM_BIN) consoled ;
AddFilesToHaikuImage beos apps : $(BEOS_APPS) ; AddFilesToHaikuImage system apps : $(SYSTEM_APPS) ;
AddFilesToHaikuImage beos preferences : $(BEOS_PREFERENCES) ; AddFilesToHaikuImage system preferences : $(SYSTEM_PREFERENCES) ;
AddFilesToHaikuImage beos demos : $(BEOS_DEMOS) ; AddFilesToHaikuImage system demos : $(SYSTEM_DEMOS) ;
SEARCH on which = [ FDirName $(HAIKU_TOP) data bin ] ; 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 ; AddSymlinkToHaikuImage home Desktop : /boot/home : Home ;
@@ -250,7 +251,7 @@ DESKBAR_APPLICATIONS = ActivityMonitor CharacterMap CodyCam CDPlayer DeskCalc
local linkTarget ; local linkTarget ;
for linkTarget in $(DESKBAR_APPLICATIONS) { for linkTarget in $(DESKBAR_APPLICATIONS) {
AddSymlinkToHaikuImage home config be Applications AddSymlinkToHaikuImage home config be Applications
: /boot/beos/apps/$(linkTarget) : $(linkTarget) ; : /boot/system/apps/$(linkTarget) : $(linkTarget) ;
} }
# Deskbar Desktop Applets links # Deskbar Desktop Applets links
@@ -260,12 +261,12 @@ DESKBAR_DESKTOP_APPLETS = LaunchBox NetworkStatus PowerStatus ProcessController
; ;
for linkTarget in $(DESKBAR_DESKTOP_APPLETS) { for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
AddSymlinkToHaikuImage home config be Desktop\ Applets AddSymlinkToHaikuImage home config be Desktop\ Applets
: /boot/beos/apps/$(linkTarget) : $(linkTarget) ; : /boot/system/apps/$(linkTarget) : $(linkTarget) ;
} }
# Deskbar Preferences links # Deskbar Preferences links
AddDirectoryToHaikuImage home config be Preferences ; 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"... # "<preferences>Tracker"...
DESKBAR_PREFERENCES = Appearance Backgrounds DataTranslations E-mail DESKBAR_PREFERENCES = Appearance Backgrounds DataTranslations E-mail
FileTypes Fonts Keyboard Keymap Media Menu Mouse Network Printers Screen 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) { for linkTarget in $(DESKBAR_PREFERENCES) {
AddSymlinkToHaikuImage home config be Preferences AddSymlinkToHaikuImage home config be Preferences
: /boot/beos/preferences/$(linkTarget) : $(linkTarget) ; : /boot/system/preferences/$(linkTarget) : $(linkTarget) ;
} }
# Deskbar Demo links # Deskbar Demo links
AddDirectoryToHaikuImage home config be Demos ; AddDirectoryToHaikuImage home config be Demos ;
for linkTarget in $(BEOS_DEMOS) { for linkTarget in $(SYSTEM_DEMOS) {
AddSymlinkToHaikuImage home config be Demos AddSymlinkToHaikuImage home config be Demos
: /boot/beos/demos/$(linkTarget) : $(linkTarget) ; : /boot/system/demos/$(linkTarget) : $(linkTarget) ;
} }
AddSymlinkToHaikuImage beos bin : bzip2 : bunzip2 ; AddSymlinkToHaikuImage system bin : bzip2 : bunzip2 ;
AddSymlinkToHaikuImage beos bin : less : more ; AddSymlinkToHaikuImage system bin : less : more ;
AddSymlinkToHaikuImage beos bin : gzip : gunzip ; AddSymlinkToHaikuImage system bin : gzip : gunzip ;
AddSymlinkToHaikuImage beos bin : gzip : zcat ; AddSymlinkToHaikuImage system bin : gzip : zcat ;
AddSymlinkToHaikuImage beos bin : zdiff : zcmp ; AddSymlinkToHaikuImage system bin : zdiff : zcmp ;
AddSymlinkToHaikuImage beos bin : unzip : zipinfo ; AddSymlinkToHaikuImage system bin : unzip : zipinfo ;
AddSymlinkToHaikuImage beos bin : gawk : awk ; AddSymlinkToHaikuImage system bin : gawk : awk ;
AddSymlinkToHaikuImage beos bin : grep : egrep ; AddSymlinkToHaikuImage system bin : grep : egrep ;
AddSymlinkToHaikuImage beos bin : grep : fgrep ; AddSymlinkToHaikuImage system bin : grep : fgrep ;
AddSymlinkToHaikuImage beos bin : vim : vi ; AddSymlinkToHaikuImage system bin : vim : vi ;
AddSymlinkToHaikuImage beos bin : vim : view ; AddSymlinkToHaikuImage system bin : vim : view ;
# scripts and data files # scripts and data files
local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript InstallerInitScript local bootScripts = Bootscript Bootscript.cd SetupEnvironment Netscript InstallerInitScript
InstallerFinishScript ; InstallerFinishScript ;
SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ; SEARCH on $(bootScripts) = [ FDirName $(HAIKU_TOP) data system boot ] ;
AddFilesToHaikuImage beos system boot : $(bootScripts) ; AddFilesToHaikuImage system boot : $(bootScripts) ;
local userBootScripts = UserBootscript.sample UserSetupEnvironment.sample ; local userBootScripts = UserBootscript.sample UserSetupEnvironment.sample ;
SEARCH on $(userBootScripts) = [ FDirName $(HAIKU_TOP) data config boot ] ; 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" local logoArtwork = "HAIKU logo - white on blue - big.png"
"HAIKU logo - white on blue - normal.png" ; "HAIKU logo - white on blue - normal.png" ;
SEARCH on $(logoArtwork) = [ FDirName $(HAIKU_TOP) data artwork ] ; 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 # Mail spell check dictionaries
local spellFiles = words geekspeak ; local spellFiles = words geekspeak ;
spellFiles = $(spellFiles:G=spell) ; spellFiles = $(spellFiles:G=spell) ;
SEARCH on $(spellFiles) SEARCH on $(spellFiles)
= [ FDirName $(HAIKU_TOP) src apps mail ] ; = [ FDirName $(HAIKU_TOP) src apps mail ] ;
AddFilesToHaikuImage beos etc word_dictionary : $(spellFiles) ; AddFilesToHaikuImage system etc word_dictionary : $(spellFiles) ;
local etcFiles = inputrc profile teapot.data ; local etcFiles = inputrc profile teapot.data ;
etcFiles = $(etcFiles:G=etc) ; etcFiles = $(etcFiles:G=etc) ;
SEARCH on $(etcFiles) = [ FDirName $(HAIKU_TOP) data etc ] ; SEARCH on $(etcFiles) = [ FDirName $(HAIKU_TOP) data etc ] ;
etcFiles += <etc>termcap <etc>sysless <etc>sysless.in ; 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 ] ; 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 local fortuneFiles = Art Computers Education Food Fortunes Goedel Haiku
Humorists Kids Law "Linux cookies" Love Magic Medicine Miscellaneous 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" ; Sports "Tech Support Excuses" ;
fortuneFiles = $(fortuneFiles:G=etc!fortunes) ; fortuneFiles = $(fortuneFiles:G=etc!fortunes) ;
SEARCH on $(fortuneFiles) = [ FDirName $(HAIKU_TOP) data 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 fontDir = [ FDirName $(HAIKU_TOP) data etc fonts ] ;
local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ; local psFonts = [ Glob $(fontDir)/psfonts : *.afm *.pfb ] ;
local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ; local ttFonts = [ Glob $(fontDir)/ttfonts : *.ttf ] ;
AddFilesToHaikuImage beos etc fonts psfonts : $(psFonts) ; AddFilesToHaikuImage system fonts psfonts : $(psFonts) ;
AddFilesToHaikuImage beos etc fonts ttfonts : $(ttFonts) ; AddFilesToHaikuImage system fonts ttfonts : $(ttFonts) ;
local kanbeDir = [ FDirName $(HAIKU_TOP) data etc KanBe ] ; local kanbeDir = [ FDirName $(HAIKU_TOP) data etc KanBe ] ;
local kanbeDefault = [ Glob $(kanbeDir)/default : *.canna *.gz ] ; local kanbeDefault = [ Glob $(kanbeDir)/default : *.canna *.gz ] ;
local kanbeDic = [ Glob $(kanbeDir)/dic : *.cbp ] ; local kanbeDic = [ Glob $(kanbeDir)/dic : *.cbp ] ;
local kanbeDicCanna = [ Glob $(kanbeDir)/dic/canna local kanbeDicCanna = [ Glob $(kanbeDir)/dic/canna
: *.cld *.ctd *.cbd *.dir ] ; : *.cld *.ctd *.cbd *.dir ] ;
AddFilesToHaikuImage beos etc KanBe default : $(kanbeDefault) ; AddFilesToHaikuImage system data KanBe default : $(kanbeDefault) ;
AddFilesToHaikuImage beos etc KanBe dic : $(kanbeDic) ; AddFilesToHaikuImage system data KanBe dic : $(kanbeDic) ;
AddFilesToHaikuImage beos etc KanBe dic canna : $(kanbeDicCanna) ; AddFilesToHaikuImage system data KanBe dic canna : $(kanbeDicCanna) ;
AddDirectoryToHaikuImage beos etc KanBe dic group ; AddDirectoryToHaikuImage system data KanBe dic group ;
AddDirectoryToHaikuImage beos etc KanBe dic user ; AddDirectoryToHaikuImage system data KanBe dic user ;
local keymapFiles = [ GLOB [ FDirName $(HAIKU_TOP) src data etc keymaps ] local keymapFiles = [ GLOB [ FDirName $(HAIKU_TOP) src data etc keymaps ]
: *.keymap ] ; : *.keymap ] ;
keymapFiles = $(keymapFiles:BG=keymap) ; keymapFiles = $(keymapFiles:BG=keymap) ;
AddFilesToHaikuImage beos etc Keymap : $(keymapFiles) ; AddFilesToHaikuImage system data Keymaps : $(keymapFiles) ;
AddSymlinkToHaikuImage beos etc Keymap : Swedish : Finnish ; AddSymlinkToHaikuImage system data Keymaps : Swedish : Finnish ;
AddSymlinkToHaikuImage beos etc Keymap : Slovene : Croatian ; AddSymlinkToHaikuImage system data Keymaps : Slovene : Croatian ;
AddSymlinkToHaikuImage beos etc Keymap : US-International : Brazilian ; AddSymlinkToHaikuImage system data Keymaps : US-International : Brazilian ;
local timezones = [ FTimeZoneBinaries $(HAIKU_TIME_ZONE_SOURCES) : : true ] ; local timezones = [ FTimeZoneBinaries $(HAIKU_TIME_ZONE_SOURCES) : : true ] ;
for timezone in $(timezones) { for timezone in $(timezones) {
local dir = [ on $(timezone) return $(RELATIVE_TIMEZONE_DIR) ] ; 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 ; local driverSettingsFiles = <driver-settings>kernel ;
@@ -390,7 +391,7 @@ AddFilesToHaikuImage common boot post_install : $(postInstallFiles) ;
AddFilesToHaikuImage common settings : <post-install>fresh_install ; AddFilesToHaikuImage common settings : <post-install>fresh_install ;
# boot loader # boot loader
AddFilesToHaikuImage beos system : zbeos ; AddFilesToHaikuImage system : haiku_loader ;
# boot module links # boot module links
AddBootModuleSymlinksToHaikuImage AddBootModuleSymlinksToHaikuImage
@@ -405,48 +406,48 @@ AddBootModuleSymlinksToHaikuImage
; ;
# add-ons # add-ons
AddFilesToHaikuImage beos system add-ons accelerants AddFilesToHaikuImage system add-ons accelerants
: $(BEOS_ADD_ONS_ACCELERANTS) ; : $(SYSTEM_ADD_ONS_ACCELERANTS) ;
AddFilesToHaikuImage beos system add-ons opengl AddFilesToHaikuImage system add-ons opengl
: $(X86_ONLY)Mesa\ Software\ Renderer ; : $(X86_ONLY)Mesa\ Software\ Renderer ;
AddFilesToHaikuImage beos system add-ons Translators AddFilesToHaikuImage system add-ons Translators
: $(BEOS_ADD_ONS_TRANSLATORS) ; : $(SYSTEM_ADD_ONS_TRANSLATORS) ;
AddFilesToHaikuImage beos system add-ons mail_daemon inbound_protocols : POP3 IMAP ; AddFilesToHaikuImage system add-ons mail_daemon inbound_protocols : POP3 IMAP ;
AddFilesToHaikuImage beos system add-ons mail_daemon outbound_protocols : SMTP ; AddFilesToHaikuImage 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 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 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 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 system add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
AddFilesToHaikuImage beos system add-ons media plugins AddFilesToHaikuImage system add-ons media plugins
: $(BEOS_ADD_ONS_MEDIA_PLUGINS) ; : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ;
AddFilesToHaikuImage beos system add-ons Tracker AddFilesToHaikuImage system add-ons Tracker
: FileType-F ZipOMatic-Z Open\ Target\ Folder-T ; : FileType-F ZipOMatic-Z Open\ Target\ Folder-T ;
AddSymlinkToHaikuImage beos system add-ons Tracker AddSymlinkToHaikuImage system add-ons Tracker
: /boot/beos/preferences/Backgrounds : Background-B ; : /boot/system/preferences/Backgrounds : Background-B ;
AddSymlinkToHaikuImage beos system add-ons Tracker AddSymlinkToHaikuImage system add-ons Tracker
: /boot/beos/apps/TextSearch : TextSearch-G ; : /boot/system/apps/TextSearch : TextSearch-G ;
AddSymlinkToHaikuImage beos system add-ons Tracker AddSymlinkToHaikuImage system add-ons Tracker
: /boot/beos/apps/DiskUsage : DiskUsage-I ; : /boot/system/apps/DiskUsage : DiskUsage-I ;
AddFilesToHaikuImage beos system add-ons input_server devices AddFilesToHaikuImage system add-ons input_server devices
: <input>keyboard <input>mouse <input>wacom ; : <input>keyboard <input>mouse <input>wacom ;
AddFilesToHaikuImage beos system add-ons input_server filters : screen_saver ; AddFilesToHaikuImage system add-ons input_server filters : screen_saver ;
AddFilesToHaikuImage beos system add-ons kernel network AddFilesToHaikuImage system add-ons kernel network
: <net>notifications stack ; : <net>notifications stack ;
AddFilesToHaikuImage beos system add-ons kernel network devices AddFilesToHaikuImage system add-ons kernel network devices
: $(BEOS_NETWORK_DEVICES) ; : $(SYSTEM_NETWORK_DEVICES) ;
AddFilesToHaikuImage beos system add-ons kernel network datalink_protocols AddFilesToHaikuImage system add-ons kernel network datalink_protocols
: $(BEOS_NETWORK_DATALINK_PROTOCOLS) ; : $(SYSTEM_NETWORK_DATALINK_PROTOCOLS) ;
AddFilesToHaikuImage beos system add-ons kernel network ppp AddFilesToHaikuImage system add-ons kernel network ppp
: $(BEOS_NETWORK_PPP) ; : $(SYSTEM_NETWORK_PPP) ;
AddFilesToHaikuImage beos system add-ons kernel network protocols AddFilesToHaikuImage system add-ons kernel network protocols
: $(BEOS_NETWORK_PROTOCOLS) ; : $(SYSTEM_NETWORK_PROTOCOLS) ;
AddFilesToHaikuImage beos system add-ons Print : $(BEOS_ADD_ONS_PRINT) ; AddFilesToHaikuImage system add-ons Print : $(SYSTEM_ADD_ONS_PRINT) ;
AddFilesToHaikuImage beos system add-ons Print transport AddFilesToHaikuImage system add-ons Print transport
: $(BEOS_ADD_ONS_PRINT_TRANSPORT) ; : $(SYSTEM_ADD_ONS_PRINT_TRANSPORT) ;
AddFilesToHaikuImage beos system add-ons Screen\ Savers AddFilesToHaikuImage system add-ons Screen\ Savers
: $(BEOS_ADD_ONS_SCREENSAVERS) ; : $(SYSTEM_ADD_ONS_SCREENSAVERS) ;
AddFilesToHaikuImage beos system add-ons disk_systems AddFilesToHaikuImage system add-ons disk_systems
: <disk_system>intel <disk_system>bfs ; : <disk_system>intel <disk_system>bfs ;
# create directories that will remain empty # 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 Tracker ;
AddDirectoryToHaikuImage home config add-ons Screen\ Savers ; AddDirectoryToHaikuImage home config add-ons Screen\ Savers ;
AddDirectoryToHaikuImage home config add-ons Translators ; AddDirectoryToHaikuImage home config add-ons Translators ;
AddDirectoryToHaikuImage beos etc synth ; AddDirectoryToHaikuImage system data synth ;
AddDirectoryToHaikuImage beos system add-ons input_server methods ; AddDirectoryToHaikuImage system add-ons input_server methods ;
# optional # optional
AddFilesToHaikuImage optional beos system add-ons input_server methods : canna ; AddFilesToHaikuImage optional system add-ons input_server methods : canna ;
# printers # printers
AddDirectoryToHaikuImage home config settings printers Preview 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 ; : home-config-settings-printers-save-as-pdf.rdef ;
# licenses # licenses
CopyDirectoryToHaikuImage beos etc CopyDirectoryToHaikuImage system data
: [ FDirName $(HAIKU_TOP) data etc licenses ] : [ FDirName $(HAIKU_TOP) data etc licenses ]
: licenses : -x .svn ; : licenses : -x .svn ;
@@ -512,14 +513,14 @@ MakeLocate $(alternativeSystemLibsZip) : $(HAIKU_OUTPUT_DIR) ;
# collect the targets we would install in the lib directory # collect the targets we would install in the lib directory
local alternativeSystemLibs ; local alternativeSystemLibs ;
local libTargets = [ FFilesInHaikuImageDirectory beos system lib ] ; local libTargets = [ FFilesInHaikuImageDirectory system lib ] ;
local libTarget ; local libTarget ;
for libTarget in $(libTargets) { for libTarget in $(libTargets) {
alternativeSystemLibs += [ on $(libTarget) return $(TARGET) ] ; alternativeSystemLibs += [ on $(libTarget) return $(TARGET) ] ;
} }
# collect the symlinks we would install in the lib directory # collect the symlinks we would install in the lib directory
libTargets = [ FSymlinksInHaikuImageDirectory beos system lib ] ; libTargets = [ FSymlinksInHaikuImageDirectory system lib ] ;
local tmpAlternativeLibDir local tmpAlternativeLibDir
= [ FDirName $(HAIKU_OUTPUT_DIR) tmp alternativeLibs ] ; = [ FDirName $(HAIKU_OUTPUT_DIR) tmp alternativeLibs ] ;
for libTarget in $(libTargets) { 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 # install the alternative libs in the right directory
UnzipArchiveToHaikuImage beos system lib $(libSubDir) UnzipArchiveToHaikuImage system lib $(libSubDir)
: $(otherAlternativeSystemLibsZip) ; : $(otherAlternativeSystemLibsZip) ;
} }
+10 -12
View File
@@ -288,10 +288,10 @@ rule AddDriversToContainer container : relativeDirectoryTokens : targets
{ {
# AddDriversToContainer <container> : <relative directory> : <targets> ; # AddDriversToContainer <container> : <relative directory> : <targets> ;
# #
local directoryTokens = beos system add-ons kernel drivers dev local directoryTokens = system add-ons kernel drivers dev
$(relativeDirectoryTokens) ; $(relativeDirectoryTokens) ;
AddFilesToContainer $(container) : beos system add-ons kernel drivers bin AddFilesToContainer $(container) : system add-ons kernel drivers bin
: $(targets) ; : $(targets) ;
# If the image shall only be updated, we don't add any symlinks. # 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> ; # AddNewDriversToContainer <container> : <directory> : <targets> ;
# #
local directoryTokens = beos system add-ons kernel drivers local directoryTokens = system add-ons kernel drivers
$(relativeDirectoryTokens) ; $(relativeDirectoryTokens) ;
AddFilesToContainer $(container) : $(directoryTokens) AddFilesToContainer $(container) : $(directoryTokens)
@@ -356,7 +356,7 @@ rule AddBootModuleSymlinksToContainer container : targets
local name = $(target:BS) ; local name = $(target:BS) ;
local linkTarget = [ FDirName /boot $(installDir:G=) $(name) ] ; local linkTarget = [ FDirName /boot $(installDir:G=) $(name) ] ;
AddSymlinkToContainer $(container) : beos system add-ons kernel boot AddSymlinkToContainer $(container) : system add-ons kernel boot
: $(linkTarget) : $(name) ; : $(linkTarget) : $(name) ;
} }
} }
@@ -751,7 +751,7 @@ rule AddEntryToHaikuImageUserGroupFile file : entry
Always $(file) ; Always $(file) ;
MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ; MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
BuildHaikuImageUserGroupFile $(file) ; BuildHaikuImageUserGroupFile $(file) ;
AddFilesToHaikuImage beos etc : $(file) ; AddFilesToHaikuImage system etc : $(file) ;
} }
HAIKU_IMAGE_USER_GROUP_ENTRIES on $(file) = $(allEntries) ; HAIKU_IMAGE_USER_GROUP_ENTRIES on $(file) = $(allEntries) ;
@@ -805,7 +805,7 @@ rule AddLicenseToHaikuImage file : name : searchPath
name = ; 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... # 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) ; Depends $(image) : $(archive) ;
#MakeLocateDebug $(image) ; #MakeLocateDebug $(image) ;
ARCHIVE_IMAGE_OFFSET on $(image) = $(HAIKU_BOOT_ARCHIVE_IMAGE_OFFSET) ; 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 ; FLOPPY_IMAGE_BLOCK_SIZE on $(image) = 2 ;
} }
BuildFloppyBootImage1 $(image) : $(zbeos) $(archive) ; BuildFloppyBootImage1 $(image) : $(haikuLoader) $(archive) ;
} }
actions BuildFloppyBootImage1 actions BuildFloppyBootImage1
@@ -1075,11 +1075,9 @@ actions BuildFloppyBootImage1
$(RM) $(<) $(RM) $(<)
# make an empty image # make an empty image
dd if=/dev/zero of=$(<) bs=$(FLOPPY_IMAGE_BLOCK_SIZE)k count=1440 dd if=/dev/zero of=$(<) bs=$(FLOPPY_IMAGE_BLOCK_SIZE)k count=1440
# add zbeos # add haiku_loader
dd if=$(>[1]) of=$(<) conv=notrunc dd if=$(>[1]) of=$(<) conv=notrunc
# add the boot drivers tgz archive # 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 dd if=$(>[2]) of=$(<) bs=$(ARCHIVE_IMAGE_OFFSET)k seek=1 conv=notrunc
} }
+20 -19
View File
@@ -102,10 +102,10 @@ if [ IsOptionalHaikuImagePackageAdded Beam ] {
if [ IsOptionalHaikuImagePackageAdded BeBook ] { if [ IsOptionalHaikuImagePackageAdded BeBook ] {
InstallOptionalHaikuImagePackage bebook_20081026 InstallOptionalHaikuImagePackage bebook_20081026
: http://haiku-files.org/files/optional-packages/bebook_20081026.zip : http://haiku-files.org/files/optional-packages/bebook_20081026.zip
: beos documentation : system documentation
; ;
AddSymlinkToHaikuImage home Desktop 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 ] { if [ IsOptionalHaikuImagePackageAdded Bluetooth ] {
local bluetoothDrivers = h2generic ; local bluetoothDrivers = h2generic ;
AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ; AddDriversToHaikuImage bluetooth : $(bluetoothDrivers) ;
AddFilesToHaikuImage beos system servers : bluetooth_server ; AddFilesToHaikuImage system servers : bluetooth_server ;
AddFilesToHaikuImage beos system lib : libbluetooth.so ; AddFilesToHaikuImage system lib : libbluetooth.so ;
AddFilesToHaikuImage beos system add-ons kernel network devices : bluetooth ; AddFilesToHaikuImage system add-ons kernel network devices : bluetooth ;
AddFilesToHaikuImage beos system add-ons kernel network protocols : l2cap ; AddFilesToHaikuImage system add-ons kernel network protocols : l2cap ;
AddFilesToHaikuImage beos system add-ons kernel bluetooth : btCoreData ; AddFilesToHaikuImage system add-ons kernel bluetooth : btCoreData ;
AddFilesToHaikuImage beos preferences : Bluetooth ; AddFilesToHaikuImage system preferences : Bluetooth ;
AddFilesToHaikuImage beos bin : bt_dev_info bt_discovery ; AddFilesToHaikuImage system bin : bt_dev_info bt_discovery ;
AddSymlinkToHaikuImage home config be Preferences : /boot/beos/preferences/Bluetooth ; AddSymlinkToHaikuImage home config be Preferences
: /boot/system/preferences/Bluetooth ;
if [ IsOptionalHaikuImagePackageAdded Development ] { if [ IsOptionalHaikuImagePackageAdded Development ] {
AddSymlinkToHaikuImage develop lib x86 : /system/lib/libbluetooth.so ; 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 ; AddFilesToHaikuImage develop lib x86 : libposix_error_mapper.a ;
# cc and c++ wrapper scripts # 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 # mkdepend build tool, which is part of the Haiku source tree
# (same as make, but make is already included independent of the # (same as make, but make is already included independent of the
# Development package) # Development package)
AddFilesToHaikuImage beos bin : mkdepend ; AddFilesToHaikuImage system bin : mkdepend ;
# skeleton makefile and makefile-engine # skeleton makefile and makefile-engine
local makefileEngineFiles = local makefileEngineFiles =
@@ -520,10 +521,10 @@ if [ IsOptionalHaikuImagePackageAdded Tar ] {
# UserlandFS # UserlandFS
if [ IsOptionalHaikuImagePackageAdded UserlandFS ] { if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
# kernel module # kernel module
AddFilesToHaikuImage beos system add-ons kernel file_systems : userlandfs ; AddFilesToHaikuImage system add-ons kernel file_systems : userlandfs ;
# server # server
AddFilesToHaikuImage beos system servers : userlandfs_server ; AddFilesToHaikuImage system servers : userlandfs_server ;
# libs # libs
local userlandfsLibs = local userlandfsLibs =
@@ -531,7 +532,7 @@ if [ IsOptionalHaikuImagePackageAdded UserlandFS ] {
libuserlandfs_haiku_kernel.so libuserlandfs_haiku_kernel.so
libuserlandfs_fuse.so libuserlandfs_fuse.so
; ;
AddFilesToHaikuImage beos system lib : $(userlandfsLibs) ; AddFilesToHaikuImage system lib : $(userlandfsLibs) ;
# development goodies # development goodies
if [ IsOptionalHaikuImagePackageAdded Development ] { if [ IsOptionalHaikuImagePackageAdded Development ] {
@@ -602,17 +603,17 @@ if [ IsOptionalHaikuImagePackageAdded VLC ] {
# Welcome # Welcome
if [ IsOptionalHaikuImagePackageAdded Welcome ] { if [ IsOptionalHaikuImagePackageAdded Welcome ] {
CopyDirectoryToHaikuImage beos documentation CopyDirectoryToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs welcome ] : [ FDirName $(HAIKU_TOP) docs welcome ]
: welcome : -x .svn ; : welcome : -x .svn ;
CopyDirectoryToHaikuImage beos documentation CopyDirectoryToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs userguide ] : [ FDirName $(HAIKU_TOP) docs userguide ]
: userguide : -x .svn ; : userguide : -x .svn ;
AddFilesToHaikuImage beos documentation AddFilesToHaikuImage system documentation
: [ FDirName $(HAIKU_TOP) docs Haiku-doc.css ] : [ FDirName $(HAIKU_TOP) docs Haiku-doc.css ]
: Haiku-doc.css ; : Haiku-doc.css ;
AddSymlinkToHaikuImage home Desktop AddSymlinkToHaikuImage home Desktop
: /boot/beos/documentation/welcome/welcome.html : Welcome ; : /boot/system/documentation/welcome/welcome.html : Welcome ;
} }
+4 -4
View File
@@ -83,17 +83,17 @@ SetUpdateHaikuImageOnly 1 ;
# has been added, like for "kernel"). # has been added, like for "kernel").
HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel = 1 ; 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 # Note, that this also makes the image depend on the target, i.e. it is
# automatically updated when the image is built. # 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. # 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. # Add timezone and keymap settings.
AddSymlinkToHaikuImage home config 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 ; AddFilesToHaikuImage home config settings : <keymap>US-International : Key_map ;
# Adds the source directories src/kits/storage and src/tests/servers/debug # Adds the source directories src/kits/storage and src/tests/servers/debug
+2 -2
View File
@@ -8,7 +8,7 @@
#HAIKU_INSTALL_DIR = /Haiku ; #HAIKU_INSTALL_DIR = /Haiku ;
# Install Haiku on device /dev/sda57. Be sure you know what you're doing! # 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_IMAGE_NAME = sda57 ;
#HAIKU_DONT_CLEAR_IMAGE = 1 ; #HAIKU_DONT_CLEAR_IMAGE = 1 ;
@@ -19,7 +19,7 @@
# Add symlink/file (timezone and keymap settings) to the image. # Add symlink/file (timezone and keymap settings) to the image.
#AddSymlinkToHaikuImage home config 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 #AddFilesToHaikuImage home config settings : <keymap>US-International
# : Key_map ; # : Key_map ;
+1 -1
View File
@@ -135,7 +135,7 @@ if [ -f $copyrightsFile ]; then
$rmAttrs -f $copyrightAttrs $rmAttrs -f $copyrightAttrs
touch $copyrightAttrs touch $copyrightAttrs
$addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs $addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
$copyAttrs $copyrightAttrs ${tPrefix}beos/apps/AboutSystem $copyAttrs $copyrightAttrs ${tPrefix}system/apps/AboutSystem
fi fi
# generate the attribute stores # generate the attribute stores
+1 -1
View File
@@ -207,7 +207,7 @@ if [ ! $updateOnly ]; then
$rmAttrs -f $copyrightAttrs $rmAttrs -f $copyrightAttrs
touch $copyrightAttrs touch $copyrightAttrs
$addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs $addattr -f $copyrightsFile COPYRIGHTS $copyrightAttrs
$copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}beos/apps/AboutSystem $copyAttrs ${sPrefix}$copyrightAttrs ${tPrefix}system/apps/AboutSystem
fi fi
fi fi
+13 -13
View File
@@ -20,7 +20,7 @@ launch() {
echo There is no "$toLaunch" echo There is no "$toLaunch"
fi fi
return 0 return 0
} }
# launchscript <script path> # launchscript <script path>
@@ -54,13 +54,13 @@ exec </dev/null
exec >/dev/null 2>&1 exec >/dev/null 2>&1
# Standard locations of boot files # Standard locations of boot files
SCRIPTS=beos/system/boot SCRIPTS=system/boot
SERVERS=beos/system/servers SERVERS=system/servers
# clean the shared memory dir # clean the shared memory dir
shmDir=/boot/var/shared_memory shmDir=/boot/var/shared_memory
rm -rf $shmDir rm -rf $shmDir
mkdir $shmDir mkdir -p $shmDir
chmod 777 $shmDir chmod 777 $shmDir
# Set up the environment # Set up the environment
@@ -77,7 +77,7 @@ if [ "$iw" = "yes" ]; then
fi fi
# Sets timezone etc. # Sets timezone etc.
runprog beos/bin/clockconfig runprog system/bin/clockconfig
# Launch servers # Launch servers
@@ -105,18 +105,18 @@ fi
# Launch Terminal or consoled depending on $SAFEMODE # Launch Terminal or consoled depending on $SAFEMODE
if [ "$SAFEMODE" != "yes" ]; then if [ "$SAFEMODE" != "yes" ]; then
if [ -e /etc/users ]; then if [ -e /etc/users ]; then
launch beos/system/Login launch system/Login
# nothing more # nothing more
else else
launch beos/system/Tracker launch system/Tracker
launch beos/system/Deskbar launch system/Deskbar
# install ProcessController in the deskbar # install ProcessController in the deskbar
(sleep 7; /boot/beos/apps/ProcessController -deskbar) & (sleep 7; /boot/system/apps/ProcessController -deskbar) &
fi fi
launch beos/apps/Terminal launch system/apps/Terminal
else else
launch beos/bin/consoled launch system/bin/consoled
fi fi
if [ "$SAFEMODE" != "yes" ]; then if [ "$SAFEMODE" != "yes" ]; then
@@ -124,7 +124,7 @@ if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/midi_server launch $SERVERS/midi_server
fi fi
# Launch Print Server # Launch Print Server
if [ "$SAFEMODE" != "yes" ]; then if [ "$SAFEMODE" != "yes" ]; then
launch $SERVERS/print_server launch $SERVERS/print_server
fi fi
@@ -135,7 +135,7 @@ if [ "$SAFEMODE" != "yes" ]; then
fi fi
# Check for daily saving time # Check for daily saving time
launch beos/bin/dstcheck launch system/bin/dstcheck
if [ "$SAFEMODE" != "yes" ]; then if [ "$SAFEMODE" != "yes" ]; then
# Start user boot script # Start user boot script
+6 -6
View File
@@ -72,15 +72,15 @@ fi
# Launch Terminal or consoled depending on $SAFEMODE # Launch Terminal or consoled depending on $SAFEMODE
if [ "$SAFEMODE" != "yes" ]; then if [ "$SAFEMODE" != "yes" ]; then
if [ -x /boot/beos/apps/Installer ]; then if [ -x /boot/system/apps/Installer ]; then
/boot/beos/apps/Installer /boot/system/apps/Installer
#/boot/beos/apps/Terminal -x /boot/beos/apps/Installer #/boot/system/apps/Terminal -x /boot/system/apps/Installer
else else
/boot/beos/apps/Terminal /boot/system/apps/Terminal
fi fi
#launch beos/apps/Terminal #launch system/apps/Terminal
else else
launch beos/bin/consoled launch system/bin/consoled
fi fi
# sync disks # sync disks
+6 -6
View File
@@ -42,13 +42,13 @@ export BE_DEFAULT_CPLUS_FLAGS=""
if [ "$SAFEMODE" != "yes" ] if [ "$SAFEMODE" != "yes" ]
then then
export PATH=.:$HOME/config/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS 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/beos/system/lib" 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/beos/system/add-ons" export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/system/add-ons"
else else
export PATH=.:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS 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/beos/system/lib" export LIBRARY_PATH="%A/lib:/boot/common/lib:/boot/system/lib"
export ADDON_PATH="%A/add-ons:/boot/beos/system/add-ons" export ADDON_PATH="%A/add-ons:/boot/system/add-ons"
fi fi
# media kit # media kit
+34 -19
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. * Distributed under the terms of the MIT License.
*/ */
#ifndef _FIND_DIRECTORY_H #ifndef _FIND_DIRECTORY_H
@@ -15,22 +15,21 @@ typedef enum {
B_TRASH_DIRECTORY, B_TRASH_DIRECTORY,
/* System directories */ /* System directories */
B_BEOS_DIRECTORY = 1000, B_SYSTEM_DIRECTORY = 1000,
B_BEOS_SYSTEM_DIRECTORY, B_SYSTEM_ADDONS_DIRECTORY = 1002,
B_BEOS_ADDONS_DIRECTORY, B_SYSTEM_BOOT_DIRECTORY,
B_BEOS_BOOT_DIRECTORY, B_SYSTEM_FONTS_DIRECTORY,
B_BEOS_FONTS_DIRECTORY, B_SYSTEM_LIB_DIRECTORY,
B_BEOS_LIB_DIRECTORY, B_SYSTEM_SERVERS_DIRECTORY,
B_BEOS_SERVERS_DIRECTORY, B_SYSTEM_APPS_DIRECTORY,
B_BEOS_APPS_DIRECTORY, B_SYSTEM_BIN_DIRECTORY,
B_BEOS_BIN_DIRECTORY, B_SYSTEM_ETC_DIRECTORY,
B_BEOS_ETC_DIRECTORY, B_SYSTEM_DOCUMENTATION_DIRECTORY,
B_BEOS_DOCUMENTATION_DIRECTORY, B_SYSTEM_PREFERENCES_DIRECTORY,
B_BEOS_PREFERENCES_DIRECTORY, B_SYSTEM_TRANSLATORS_DIRECTORY,
B_BEOS_TRANSLATORS_DIRECTORY, B_SYSTEM_MEDIA_NODES_DIRECTORY,
B_BEOS_MEDIA_NODES_DIRECTORY, B_SYSTEM_SOUNDS_DIRECTORY,
B_BEOS_SOUNDS_DIRECTORY, B_SYSTEM_DATA_DIRECTORY,
B_BEOS_DATA_DIRECTORY,
/* Common directories, shared among all users. */ /* Common directories, shared among all users. */
B_COMMON_DIRECTORY = 2000, B_COMMON_DIRECTORY = 2000,
@@ -54,7 +53,6 @@ typedef enum {
B_COMMON_SOUNDS_DIRECTORY, B_COMMON_SOUNDS_DIRECTORY,
B_COMMON_DATA_DIRECTORY, B_COMMON_DATA_DIRECTORY,
/* User directories. These are interpreted in the context /* User directories. These are interpreted in the context
of the user making the find_directory call. */ of the user making the find_directory call. */
B_USER_DIRECTORY = 3000, B_USER_DIRECTORY = 3000,
@@ -75,8 +73,25 @@ typedef enum {
/* Global directories. */ /* Global directories. */
B_APPS_DIRECTORY = 4000, B_APPS_DIRECTORY = 4000,
B_PREFERENCES_DIRECTORY, 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; } directory_which;
#ifdef __cplusplus #ifdef __cplusplus
+54 -31
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. * Distributed under the terms of the MIT license.
* *
* Authors: * Authors:
@@ -67,50 +67,54 @@ static const rgb_color kLinkBlue = { 80, 80, 200, 255 };
class AboutApp : public BApplication { class AboutApp : public BApplication {
public: public:
AboutApp(void); AboutApp();
}; };
class AboutWindow : public BWindow { class AboutWindow : public BWindow {
public: public:
AboutWindow(void); AboutWindow();
bool QuitRequested(void);
virtual bool QuitRequested();
}; };
class AboutView : public BView { class AboutView : public BView {
public: public:
AboutView(const BRect &r); AboutView(const BRect& frame);
~AboutView(void); ~AboutView();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
virtual void Pulse(); virtual void Pulse();
virtual void FrameResized(float width, float height); virtual void FrameResized(float width, float height);
virtual void Draw(BRect update); virtual void Draw(BRect updateRect);
virtual void MessageReceived(BMessage *msg); virtual void MessageReceived(BMessage* msg);
virtual void MouseDown(BPoint pt); virtual void MouseDown(BPoint point);
void AddCopyrightEntry(const char *name, const char *text, void AddCopyrightEntry(const char* name,
const Licenses& licenses, const char *url); const char* text, const Licenses& licenses,
void AddCopyrightEntry(const char *name, const char *text, const char* url);
const char *url = NULL); void AddCopyrightEntry(const char* name,
void AddCopyrightEntry(const BMessage& packageDescription); const char* text, const char* url = NULL);
void PickRandomHaiku(); void AddCopyrightEntry(
const BMessage& packageDescription);
void PickRandomHaiku();
private: private:
void _AddCopyrightsFromAttribute(); status_t _GetLicensesPath(BPath& path);
void _AddCopyrightsFromAttribute();
BStringView *fMemView; BStringView* fMemView;
BTextView *fUptimeView; BTextView* fUptimeView;
BView *fInfoView; BView* fInfoView;
HyperTextView *fCreditsView; HyperTextView* fCreditsView;
BBitmap *fLogo; BBitmap* fLogo;
BPoint fDrawPoint; BPoint fDrawPoint;
bigtime_t fLastActionTime; bigtime_t fLastActionTime;
BMessageRunner *fScrollRunner; BMessageRunner* fScrollRunner;
BQuery fAppsQuery; BQuery fAppsQuery;
}; };
@@ -548,7 +552,6 @@ AboutView::AboutView(const BRect &rect)
"(sorry!)" "(sorry!)"
"\n\n"); "\n\n");
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange); fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuOrange);
fCreditsView->Insert("Special Thanks To:\n"); fCreditsView->Insert("Special Thanks To:\n");
@@ -558,6 +561,12 @@ AboutView::AboutView(const BRect &rect)
// copyrights for various projects we use // 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.SetSize(be_bold_font->Size() + 4);
font.SetFace(B_BOLD_FACE); font.SetFace(B_BOLD_FACE);
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen); 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 " "kernel and all code that applications may link against, is "
"distributed under the terms of the "); "distributed under the terms of the ");
fCreditsView->InsertHyperText("MIT license", fCreditsView->InsertHyperText("MIT license",
new OpenFileAction("/etc/licenses/MIT")); new OpenFileAction(mitPath.Path()));
fCreditsView->Insert(". Some system libraries contain third party code " fCreditsView->Insert(". Some system libraries contain third party code "
"distributed under the LGPL license. You can find the copyrights " "distributed under the LGPL license. You can find the copyrights "
"to third party code below.\n\n"); "to third party code below.\n\n");
@@ -997,6 +1006,9 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
fCreditsView->Insert(text); fCreditsView->Insert(text);
fCreditsView->Insert("\n"); fCreditsView->Insert("\n");
BPath licensesPath;
_GetLicensesPath(licensesPath);
if (licenses.CountLicenses() > 0) { if (licenses.CountLicenses() > 0) {
if (licenses.CountLicenses() > 1) if (licenses.CountLicenses() > 1)
fCreditsView->Insert("Licenses: "); fCreditsView->Insert("Licenses: ");
@@ -1005,7 +1017,7 @@ AboutView::AddCopyrightEntry(const char *name, const char *text,
for (int32 i = 0; i < licenses.CountLicenses(); i++) { for (int32 i = 0; i < licenses.CountLicenses(); i++) {
const char* license = licenses.LicenseAt(i); const char* license = licenses.LicenseAt(i);
BString licensePath("/etc/licenses/"); BString licensePath(licensesPath.Path());
licensePath += license; licensePath += license;
if (i > 0) 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 void
AboutView::_AddCopyrightsFromAttribute() AboutView::_AddCopyrightsFromAttribute()
{ {
+14 -14
View File
@@ -2,21 +2,21 @@
PCWorld.cpp PCWorld.cpp
ProcessController © 2000, Georges-Edouard Berenger, All Rights Reserved. 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 This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. 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, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
@@ -126,7 +126,7 @@ PCApplication::ReadyToRun()
be_roster->GetAppList(kSignature, &list); be_roster->GetAppList(kSignature, &list);
long count = list.CountItems(); long count = list.CountItems();
if (count > 1) { 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)); BMessenger* otherme = new BMessenger(NULL, (team_id)list.ItemAt(i));
BMessage* message = new BMessage(B_QUIT_REQUESTED); BMessage* message = new BMessage(B_QUIT_REQUESTED);
otherme->SendMessage(message); otherme->SendMessage(message);
@@ -150,7 +150,7 @@ PCApplication::ArgvReceived(int32 argc, char **argv)
} while (be_roster->IsRunning(kTrackerSig) && k-- > 0); } while (be_roster->IsRunning(kTrackerSig) && k-- > 0);
} }
remove("/boot/home/config/settings/Tracker/tracker_shelf"); 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) { } else if (argc == 2 && strcmp(argv[1], "-deskbar") == 0) {
BDeskbar deskbar; BDeskbar deskbar;
if (!gInDeskbar && !deskbar.HasItem(kDeskbarItemName)) if (!gInDeskbar && !deskbar.HasItem(kDeskbarItemName))
@@ -3,19 +3,19 @@
Copyright (C) 2004 beunited.org Copyright (C) 2004 beunited.org
Copyright (c) 2006 Haiku, Inc. All Rights Reserved. Copyright (c) 2006 Haiku, Inc. All Rights Reserved.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version. 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, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
@@ -311,21 +311,21 @@ ProcessController::MessageReceived(BMessage *message)
break; break;
case 'Trac': case 'Trac':
launch(kTrackerSig, "/boot/beos/system/Tracker"); launch(kTrackerSig, "/boot/system/Tracker");
break; break;
case 'Dbar': case 'Dbar':
launch(kDeskbarSig, "/boot/beos/system/Deskbar"); launch(kDeskbarSig, "/boot/system/Deskbar");
break; break;
case 'Term': case 'Term':
launch(kTerminalSig, "/boot/beos/apps/Terminal"); launch(kTerminalSig, "/boot/system/apps/Terminal");
break; break;
case 'AlDb': case 'AlDb':
{ {
if (!be_roster->IsRunning(kDeskbarSig)) if (!be_roster->IsRunning(kDeskbarSig))
launch(kDeskbarSig, "/boot/beos/system/Deskbar"); launch(kDeskbarSig, "/boot/system/Deskbar");
BDeskbar deskbar; BDeskbar deskbar;
if (gInDeskbar || deskbar.HasItem (kDeskbarItemName)) if (gInDeskbar || deskbar.HasItem (kDeskbarItemName))
deskbar.RemoveItem (kDeskbarItemName); deskbar.RemoveItem (kDeskbarItemName);
@@ -652,7 +652,7 @@ thread_popup(void *arg)
// CPU Load section // CPU Load section
TeamBarMenu* CPUPopup = new TeamBarMenu("Threads and CPU Usage", infos, systemInfo.used_teams); 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) { 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); 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'); BMessage* kill_team = new BMessage('KlTm');
+1 -1
View File
@@ -52,7 +52,7 @@
/* The default value of the PATH variable. */ /* The default value of the PATH variable. */
#ifndef DEFAULT_PATH_VALUE #ifndef DEFAULT_PATH_VALUE
#define 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 #endif
/* The value for PATH when invoking `command -p'. This is only used when /* The value for PATH when invoking `command -p'. This is only used when
+1 -1
View File
@@ -12,7 +12,7 @@ SubDirSysHdrs [ FDirName $(HAIKU_TOP) src bin gawk intl ] ;
# all interested apps can link against. # all interested apps can link against.
UsePrivateHeaders debug ; UsePrivateHeaders debug ;
SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR=\\\"/boot/beos/etc/locale\\\" SubDirCcFlags -DHAVE_CONFIG_H -DLOCALEDIR=\\\"/etc/locale\\\"
-DMI_OUT=1 ; -DMI_OUT=1 ;
# filter warnings we don't want here # filter warnings we don't want here
+1 -1
View File
@@ -4,7 +4,7 @@ SubDir HAIKU_TOP src bin grep src ;
TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS) TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
: -Wall -Wmissing-prototypes -Wsign-compare ] ; : -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) lib ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ; SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
+1 -1
View File
@@ -2,7 +2,7 @@
/* config.h. Generated by configure. */ /* config.h. Generated by configure. */
/* config.h.in. Generated from configure.in by autoheader. */ /* 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 LIBDIR "/boot/develop/lib/"
#define INCLUDEDIR "/boot/develop/headers/" #define INCLUDEDIR "/boot/develop/headers/"
+16 -16
View File
@@ -228,7 +228,7 @@ public:
#ifdef USE_INLINE_IM #ifdef USE_INLINE_IM
void DrawIMString(void); void DrawIMString(void);
#endif #endif
private: private:
void init(BRect); void init(BRect);
@@ -265,7 +265,7 @@ public:
private: private:
scrollbar_T *gsb; scrollbar_T *gsb;
float ignoreValue; float ignoreValue;
}; };
@@ -718,7 +718,7 @@ VimWindow::QuitRequested()
#ifdef FEAT_MBYTE #ifdef FEAT_MBYTE
km.csi_escape = false; km.csi_escape = false;
#endif #endif
write_port(gui.vdcmp, VimMsg::Key, &km, sizeof(km)); write_port(gui.vdcmp, VimMsg::Key, &km, sizeof(km));
return false; return false;
@@ -1323,7 +1323,7 @@ VimTextAreaView::MessageReceived(BMessage *m)
msg.AddFloat("be:height_reply", FILL_Y(1)); msg.AddFloat("be:height_reply", FILL_Y(1));
IMData.messenger->SendMessage(&msg); IMData.messenger->SendMessage(&msg);
} }
break; break;
case B_INPUT_METHOD_STOPPED: case B_INPUT_METHOD_STOPPED:
delete IMData.messenger; delete IMData.messenger;
delete IMData.message; 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); FILL_X(col + cells) - PEN_WIDTH, FILL_Y(row + 1) - PEN_WIDTH);
FillRect(r, B_SOLID_LOW); FillRect(r, B_SOLID_LOW);
} }
BFont font; BFont font;
this->GetFont(&font); this->GetFont(&font);
if(!font.IsFixed()) if(!font.IsFixed())
@@ -1527,7 +1527,7 @@ VimTextAreaView::mchInsertLines(int row, int num_lines)
dest.top = FILL_Y(row + num_lines); dest.top = FILL_Y(row + num_lines);
dest.right = FILL_X(gui.scroll_region_right + 1) - PEN_WIDTH; dest.right = FILL_X(gui.scroll_region_right + 1) - PEN_WIDTH;
dest.bottom = FILL_Y(gui.scroll_region_bot + 1) - PEN_WIDTH; dest.bottom = FILL_Y(gui.scroll_region_bot + 1) - PEN_WIDTH;
if (gui.vimWindow->Lock()) { if (gui.vimWindow->Lock()) {
/* Clear one column more for when bold has spilled over */ /* Clear one column more for when bold has spilled over */
CopyBits(source, dest); CopyBits(source, dest);
@@ -1567,7 +1567,7 @@ void VimTextAreaView::DrawIMString(void)
IMData.row + IMData.count, W_WIDTH(curwin), GUI_MON_NOCLEAR); IMData.row + IMData.count, W_WIDTH(curwin), GUI_MON_NOCLEAR);
bool confirmed = false; bool confirmed = false;
msg->FindBool("be:confirmed", &confirmed); msg->FindBool("be:confirmed", &confirmed);
if (confirmed) if (confirmed)
return; return;
rgb_color hcolor = HighColor(), lcolor = LowColor(); rgb_color hcolor = HighColor(), lcolor = LowColor();
msg->FindString("be:string", &str); msg->FindString("be:string", &str);
@@ -1613,7 +1613,7 @@ void VimTextAreaView::DrawIMString(void)
pos.x += cn; pos.x += cn;
} }
IMData.count = (int)pos.y; IMData.count = (int)pos.y;
SetHighColor(hcolor); SetHighColor(hcolor);
SetLowColor(lcolor); SetLowColor(lcolor);
} }
@@ -2039,7 +2039,7 @@ gui_mch_init()
if (gui.vdcmp < B_OK) if (gui.vdcmp < B_OK)
return FAIL; return FAIL;
get_key_map(&keyMap, &keyMapChars); get_key_map(&keyMap, &keyMapChars);
gui.vimWindow = new VimWindow(); /* hidden and locked */ gui.vimWindow = new VimWindow(); /* hidden and locked */
if (!gui.vimWindow) if (!gui.vimWindow)
return FAIL; return FAIL;
@@ -2538,7 +2538,7 @@ gui_mch_get_font(
*/ */
if(*name!='\0') { if(*name!='\0') {
end = (char_u *)strchr((char *)name, '/'); end = (char_u *)strchr((char *)name, '/');
if (!end) if (!end)
strncpy(family, (char *)name, len = strlen((char*)name)); strncpy(family, (char *)name, len = strlen((char*)name));
else else
strncpy(family, (char *)name, len = end - name); strncpy(family, (char *)name, len = end - name);
@@ -2549,7 +2549,7 @@ gui_mch_get_font(
if(*name!='\0') { if(*name!='\0') {
end = (char_u *)strchr((char *)name, '/'); end = (char_u *)strchr((char *)name, '/');
if (!end) if (!end)
strncpy(style, (char *)name, len = strlen((char*)name)); strncpy(style, (char *)name, len = strlen((char*)name));
else else
strncpy(style, (char *)name, len = end - name); strncpy(style, (char *)name, len = end - name);
@@ -2562,7 +2562,7 @@ gui_mch_get_font(
size = atof((char *)name); size = atof((char *)name);
if (size > 0) font->SetSize(size); if (size > 0) font->SetSize(size);
} }
font->SetSpacing(B_FIXED_SPACING); font->SetSpacing(B_FIXED_SPACING);
font->SetEncoding(B_UNICODE_UTF8); font->SetEncoding(B_UNICODE_UTF8);
@@ -2730,7 +2730,7 @@ gui_mch_get_color(
char line[LINE_LEN]; char line[LINE_LEN];
char_u *fname; 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) if (fname == NULL)
return INVALCOLOR; return INVALCOLOR;
@@ -2940,7 +2940,7 @@ gui_mch_settitle(
gui_mch_draw_hollow_cursor(guicolor_T color) gui_mch_draw_hollow_cursor(guicolor_T color)
{ {
gui_mch_set_fg_color(color); gui_mch_set_fg_color(color);
BRect r; BRect r;
r.left = FILL_X(gui.col); r.left = FILL_X(gui.col);
r.top = FILL_Y(gui.row); r.top = FILL_Y(gui.row);
@@ -3553,8 +3553,8 @@ im_set_position(int row, int col)
} }
return; return;
} }
int int
im_get_status() im_get_status()
{ {
return(1); return(1);
File diff suppressed because it is too large Load Diff
+9 -11
View File
@@ -68,7 +68,7 @@ class CopyLoopControl {
// inform that a file error occurred while copying <name> // inform that a file error occurred while copying <name>
// returns true if user decided to continue // 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; bool optional = false) = 0;
virtual bool CheckUserCanceled() = 0; virtual bool CheckUserCanceled() = 0;
@@ -82,10 +82,10 @@ class CopyLoopControl {
// for files: save original attributes on file. // for files: save original attributes on file.
}; };
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry, virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir, const char *destName, const BDirectory *destDir, bool srcIsDir,
bool dstIsDir) = 0; bool dstIsDir) = 0;
// override to always overwrite, never overwrite, let user decide, // override to always overwrite, never overwrite, let user decide,
// compare dates, etc. // compare dates, etc.
virtual bool SkipEntry(const BEntry *, bool file) = 0; virtual bool SkipEntry(const BEntry *, bool file) = 0;
@@ -123,8 +123,8 @@ class TrackerCopyLoopControl : public CopyLoopControl {
virtual bool CheckUserCanceled(); virtual bool CheckUserCanceled();
// returns true if canceled // returns true if canceled
virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry, virtual OverwriteMode OverwriteOnConflict(const BEntry *srcEntry,
const char *destName, const BDirectory *destDir, bool srcIsDir, const char *destName, const BDirectory *destDir, bool srcIsDir,
bool dstIsDir); bool dstIsDir);
virtual bool SkipEntry(const BEntry *, bool file); virtual bool SkipEntry(const BEntry *, bool file);
@@ -137,7 +137,7 @@ class TrackerCopyLoopControl : public CopyLoopControl {
}; };
inline inline
TrackerCopyLoopControl::TrackerCopyLoopControl(thread_id thread) TrackerCopyLoopControl::TrackerCopyLoopControl(thread_id thread)
: fThread(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 FSIsTrashDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsPrintersDir(const BEntry *); _IMPEXP_TRACKER bool FSIsPrintersDir(const BEntry *);
_IMPEXP_TRACKER bool FSIsDeskDir(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 bool FSIsHomeDir(const BEntry *);
_IMPEXP_TRACKER void FSMoveToTrash(BObjectList<entry_ref> *srcList, BList *pointList = NULL, _IMPEXP_TRACKER void FSMoveToTrash(BObjectList<entry_ref> *srcList, BList *pointList = NULL,
bool async = true); 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 // a document; to open documents with the preferred app, pase 0 in <application> and
// stuff all the document refs into <refsReceived> // stuff all the document refs into <refsReceived>
// Consider having silent mode that does not show alerts, just returns error code // Consider having silent mode that does not show alerts, just returns error code
_IMPEXP_TRACKER status_t FSOpenWith(BMessage *listOfRefs); _IMPEXP_TRACKER status_t FSOpenWith(BMessage *listOfRefs);
// runs the Open With window; pas a list of refs // 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 // 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 // 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 // will be read directly without first trying the native one
ReadAttrResult GetAttrInfo(const BNode *, const char *hostAttrName, const char *foreignAttrName, ReadAttrResult GetAttrInfo(const BNode *, const char *hostAttrName, const char *foreignAttrName,
type_code * = NULL, size_t * = NULL); type_code * = NULL, size_t * = NULL);
+89 -89
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright 2007-2008 Haiku. * Copyright 2007-2009 Haiku.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -41,7 +41,7 @@
#include <Joystick.h> #include <Joystick.h>
#define JOYSTICKPATH "/dev/joystick/" #define JOYSTICKPATH "/dev/joystick/"
#define JOYSTICKFILEPATH "/boot/beos/etc/joysticks/" #define JOYSTICKFILEPATH "/boot/system/data/joysticks/"
#define JOYSTICKFILESETTINGS "/boot/home/config/settings/joysticks/" #define JOYSTICKFILESETTINGS "/boot/home/config/settings/joysticks/"
#define SELECTGAMEPORTFIRST "Select a game port first" #define SELECTGAMEPORTFIRST "Select a game port first"
@@ -54,47 +54,47 @@ ShowMessage(char* string)
} }
JoyWin::JoyWin(BRect frame, const char *title) 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), B_NOT_ZOOMABLE), fSystemUsedSelect(false),
fJoystick(new BJoystick) 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)); "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)); "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"); "gamePort");
fGamePortL->SetSelectionMessage(new BMessage(PORT_SELECTED)); fGamePortL->SetSelectionMessage(new BMessage(PORT_SELECTED));
fGamePortL->SetInvocationMessage(new BMessage(PORT_INVOKE)); fGamePortL->SetInvocationMessage(new BMessage(PORT_INVOKE));
fConControllerL = new BListView(BRect(175.00,30.00,370.00,250.00), fConControllerL = new BListView(BRect(175.00,30.00,370.00,250.00),
"conController"); "conController");
fConControllerL->SetSelectionMessage(new BMessage(JOY_SELECTED)); fConControllerL->SetSelectionMessage(new BMessage(JOY_SELECTED));
fConControllerL->SetInvocationMessage(new BMessage(JOY_INVOKE)); 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"); "Game Port");
fGamePortS->SetFont(be_bold_font); 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"); "Connected Controller");
fConControllerS->SetFont(be_bold_font); 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)); "Disabled", "Disabled", new BMessage(DISABLEPORT));
BBox *box = new BBox( Bounds(),"box", B_FOLLOW_ALL, BBox *box = new BBox( Bounds(),"box", B_FOLLOW_ALL,
B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE, B_WILL_DRAW | B_FRAME_EVENTS | B_FULL_UPDATE_ON_RESIZE,
B_PLAIN_BORDER); B_PLAIN_BORDER);
box->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); box->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
// Add listViews with their scrolls // 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)); 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)); B_WILL_DRAW, false, true));
// Adding object // Adding object
@@ -104,7 +104,7 @@ JoyWin::JoyWin(BRect frame, const char *title)
box->AddChild(fProbeButton); box->AddChild(fProbeButton);
box->AddChild(fCalibrateButton); box->AddChild(fCalibrateButton);
AddChild(box); AddChild(box);
SetSizeLimits(400, 600, Bounds().Height(), Bounds().Height()); SetSizeLimits(400, 600, Bounds().Height(), Bounds().Height());
/* Add all the devices */ /* Add all the devices */
@@ -112,14 +112,14 @@ JoyWin::JoyWin(BRect frame, const char *title)
for (int32 i = 0; i < nr;i++) { for (int32 i = 0; i < nr;i++) {
//BString str(path.Path()); //BString str(path.Path());
char buf[B_OS_NAME_LENGTH]; 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->AddItem(new PortItem(buf));
} }
fGamePortL->Select(0); fGamePortL->Select(0);
/* Add the joysticks specifications */ /* Add the joysticks specifications */
_AddToList(fConControllerL, JOY_SELECTED, JOYSTICKFILEPATH); _AddToList(fConControllerL, JOY_SELECTED, JOYSTICKFILEPATH);
_GetSettings(); _GetSettings();
} }
@@ -131,18 +131,18 @@ JoyWin::~JoyWin()
} }
void void
JoyWin::MessageReceived(BMessage *message) JoyWin::MessageReceived(BMessage *message)
{ {
// message->PrintToStream(); // message->PrintToStream();
switch(message->what) switch(message->what)
{ {
case DISABLEPORT: case DISABLEPORT:
break; break;
{ {
PortItem *item = _GetSelectedItem(fGamePortL); PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) { if (item != NULL) {
//ToDo: item->SetEnabled(true); //ToDo: item->SetEnabled(true);
//don't work as you can't select a item that are disabled //don't work as you can't select a item that are disabled
if(fCheckbox->Value()) { if(fCheckbox->Value()) {
item->SetEnabled(false); item->SetEnabled(false);
@@ -150,16 +150,16 @@ JoyWin::MessageReceived(BMessage *message)
} else { } else {
item->SetEnabled(true); item->SetEnabled(true);
_SelectDeselectJoystick(fConControllerL, true); _SelectDeselectJoystick(fConControllerL, true);
_PerformProbe(item->Text()); _PerformProbe(item->Text());
} }
} //else } //else
//printf("We have a null value\n"); //printf("We have a null value\n");
break; break;
} }
case PORT_SELECTED: case PORT_SELECTED:
{ {
PortItem *item = _GetSelectedItem(fGamePortL); PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) { if (item != NULL) {
fSystemUsedSelect = true; fSystemUsedSelect = true;
if (item->IsEnabled()) { if (item->IsEnabled()) {
@@ -171,17 +171,17 @@ JoyWin::MessageReceived(BMessage *message)
fCheckbox->SetValue(true); fCheckbox->SetValue(true);
_SelectDeselectJoystick(fConControllerL, false); _SelectDeselectJoystick(fConControllerL, false);
} }
if (_CheckJoystickExist(item->Text()) == B_ERROR) { if (_CheckJoystickExist(item->Text()) == B_ERROR) {
if (_ShowCantFindFileMessage(item->Text()) == B_OK) { if (_ShowCantFindFileMessage(item->Text()) == B_OK) {
_PerformProbe(item->Text()); _PerformProbe(item->Text());
} }
} else { } else {
BString str(_FindFilePathForSymLink(JOYSTICKFILESETTINGS, BString str(_FindFilePathForSymLink(JOYSTICKFILESETTINGS,
item)); item));
if (str != NULL) { if (str != NULL) {
BString str(_FixPathToName(str.String())); BString str(_FixPathToName(str.String()));
int32 id = _FindStringItemInList(fConControllerL, int32 id = _FindStringItemInList(fConControllerL,
new PortItem(str.String())); new PortItem(str.String()));
if (id > -1) { if (id > -1) {
fConControllerL->Select(id); fConControllerL->Select(id);
@@ -195,11 +195,11 @@ JoyWin::MessageReceived(BMessage *message)
} }
break; break;
} }
case PROBE: case PROBE:
case PORT_INVOKE: case PORT_INVOKE:
{ {
PortItem *item = _GetSelectedItem(fGamePortL); PortItem *item = _GetSelectedItem(fGamePortL);
if (item != NULL) { if (item != NULL) {
//printf("invoke.. inte null\n"); //printf("invoke.. inte null\n");
_PerformProbe(item->Text()); _PerformProbe(item->Text());
@@ -215,7 +215,7 @@ JoyWin::MessageReceived(BMessage *message)
PortItem *portname = _GetSelectedItem(fGamePortL); PortItem *portname = _GetSelectedItem(fGamePortL);
if (portname != NULL && controllerName != NULL) { if (portname != NULL && controllerName != NULL) {
portname->SetJoystickName(BString(controllerName->Text())); portname->SetJoystickName(BString(controllerName->Text()));
BString str = portname->GetOldJoystickName(); BString str = portname->GetOldJoystickName();
if (str != NULL) { if (str != NULL) {
BString strOldFile(JOYSTICKFILESETTINGS); BString strOldFile(JOYSTICKFILESETTINGS);
@@ -225,21 +225,21 @@ JoyWin::MessageReceived(BMessage *message)
} }
BString strLinkPlace(JOYSTICKFILESETTINGS); BString strLinkPlace(JOYSTICKFILESETTINGS);
strLinkPlace.Append(portname->Text()); strLinkPlace.Append(portname->Text());
BString strLinkTo(JOYSTICKFILEPATH); BString strLinkTo(JOYSTICKFILEPATH);
strLinkTo.Append(controllerName->Text()); strLinkTo.Append(controllerName->Text());
BDirectory *dir = new BDirectory(); BDirectory *dir = new BDirectory();
dir->CreateSymLink(strLinkPlace.String(), dir->CreateSymLink(strLinkPlace.String(),
strLinkTo.String(), NULL); strLinkTo.String(), NULL);
} else } else
ShowMessage(SELECTGAMEPORTFIRST); ShowMessage(SELECTGAMEPORTFIRST);
} }
fSystemUsedSelect = false; fSystemUsedSelect = false;
break; break;
} }
case CALIBRATE: case CALIBRATE:
case JOY_INVOKE: case JOY_INVOKE:
{ {
@@ -255,18 +255,18 @@ JoyWin::MessageReceived(BMessage *message)
Check for a device, and show calibrate window if so Check for a device, and show calibrate window if so
*/ */
} }
} else } else
ShowMessage(SELECTGAMEPORTFIRST); ShowMessage(SELECTGAMEPORTFIRST);
break; break;
} }
default: default:
BWindow::MessageReceived(message); BWindow::MessageReceived(message);
break; break;
} }
} }
bool bool
JoyWin::QuitRequested() JoyWin::QuitRequested()
{ {
_ApplyChanges(); _ApplyChanges();
@@ -276,9 +276,9 @@ JoyWin::QuitRequested()
//---------------------- Private ---------------------------------// //---------------------- Private ---------------------------------//
status_t status_t
JoyWin::_AddToList(BListView *list, uint32 command, JoyWin::_AddToList(BListView *list, uint32 command,
const char* rootPath, BEntry *rootEntry = NULL) const char* rootPath, BEntry *rootEntry = NULL)
{ {
BDirectory root; BDirectory root;
if ( rootEntry != NULL ) if ( rootEntry != NULL )
@@ -287,7 +287,7 @@ JoyWin::_AddToList(BListView *list, uint32 command,
root.SetTo( rootPath ); root.SetTo( rootPath );
else else
return B_ERROR; return B_ERROR;
BEntry entry; BEntry entry;
while ((root.GetNextEntry(&entry)) > B_ERROR ) { while ((root.GetNextEntry(&entry)) > B_ERROR ) {
if (entry.IsDirectory()) { if (entry.IsDirectory()) {
@@ -305,7 +305,7 @@ JoyWin::_AddToList(BListView *list, uint32 command,
status_t status_t
JoyWin::_Calibrate() JoyWin::_Calibrate()
{ {
CalibWin* calibw; CalibWin* calibw;
BRect rect(100, 100, 500, 400); BRect rect(100, 100, 500, 400);
@@ -316,7 +316,7 @@ JoyWin::_Calibrate()
} }
status_t status_t
JoyWin::_PerformProbe(const char* path) JoyWin::_PerformProbe(const char* path)
{ {
status_t err = B_ERROR; status_t err = B_ERROR;
@@ -324,16 +324,16 @@ JoyWin::_PerformProbe(const char* path)
if (err != B_OK) { if (err != B_OK) {
return err; 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); B_MODAL_APP_WINDOW_FEEL, B_NOT_RESIZABLE | B_NOT_ZOOMABLE);
mesgw->Show(); mesgw->Show();
int32 number = fConControllerL->CountItems(); int32 number = fConControllerL->CountItems();
PortItem *item; PortItem *item;
for (int i = 0; i < number; i++) { for (int i = 0; i < number; i++) {
// Do a search in JOYSTICKFILEPATH with item->Text() find the string // Do a search in JOYSTICKFILEPATH with item->Text() find the string
// that starts with "gadget" (tex gadget = "GamePad Pro") remove // that starts with "gadget" (tex gadget = "GamePad Pro") remove
// spacing and the "=" ty to open this one, if failed move to next and // spacing and the "=" ty to open this one, if failed move to next and
// try to open.. list those that suxesfully work // try to open.. list those that suxesfully work
fConControllerL->Select(i); fConControllerL->Select(i);
@@ -347,7 +347,7 @@ JoyWin::_PerformProbe(const char* path)
// don't find message) // don't find message)
} }
mesgw->Hide(); mesgw->Hide();
//Need a if !found then show this message. else list joysticks. //Need a if !found then show this message. else list joysticks.
_ShowNoCompatibleJoystickMessage(); _ShowNoCompatibleJoystickMessage();
return B_OK; return B_OK;
@@ -355,7 +355,7 @@ JoyWin::_PerformProbe(const char* path)
status_t status_t
JoyWin::_ApplyChanges() JoyWin::_ApplyChanges()
{ {
BString str = _BuildDisabledJoysticksFile(); BString str = _BuildDisabledJoysticksFile();
//ToDo; Save the string as the file "disabled_joysticks" under settings //ToDo; Save the string as the file "disabled_joysticks" under settings
@@ -365,23 +365,23 @@ JoyWin::_ApplyChanges()
status_t 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) // same name disabled (/boot/home/config/settings/disabled_joysticks)
return B_OK; return B_OK;
} }
status_t status_t
JoyWin::_CheckJoystickExist(const char* path) JoyWin::_CheckJoystickExist(const char* path)
{ {
BString str(JOYSTICKFILESETTINGS); BString str(JOYSTICKFILESETTINGS);
str << path; str << path;
BFile file; BFile file;
status_t status = file.SetTo(str.String(), B_READ_ONLY | B_FAIL_IF_EXISTS); status_t status = file.SetTo(str.String(), B_READ_ONLY | B_FAIL_IF_EXISTS);
if (status == B_FILE_EXISTS || status == B_OK) if (status == B_FILE_EXISTS || status == B_OK)
return B_OK; return B_OK;
else else
@@ -390,7 +390,7 @@ JoyWin::_CheckJoystickExist(const char* path)
status_t status_t
JoyWin::_ShowProbeMesage(const char* device) JoyWin::_ShowProbeMesage(const char* device)
{ {
BString str("An attempt will be made to probe the port '"); BString str("An attempt will be made to probe the port '");
str << device << "' to try to figure out what kind of joystick (if any) "; 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"); BAlert *alert = new BAlert("test1", str.String(), "Probe", "Cancel");
alert->SetShortcut(1, B_ESCAPE); alert->SetShortcut(1, B_ESCAPE);
int32 bindex = alert->Go(); int32 bindex = alert->Go();
if (bindex == 0) if (bindex == 0)
return B_OK; return B_OK;
else 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 status_t
JoyWin::_ShowCantFindFileMessage(const char* port) JoyWin::_ShowCantFindFileMessage(const char* port)
{ {
BString str("The file '"); BString str("The file '");
str << _FixPathToName(port).String() << "' used by '" << port; str << _FixPathToName(port).String() << "' used by '" << port;
str << "' cannot be found.\n Do you want to "; str << "' cannot be found.\n Do you want to ";
str << "try to auto-detect a joystick for this port?"; str << "try to auto-detect a joystick for this port?";
BAlert *alert = new BAlert("test1", str.String(), "Stop", "Probe"); BAlert *alert = new BAlert("test1", str.String(), "Stop", "Probe");
alert->SetShortcut(1, B_ENTER); alert->SetShortcut(1, B_ENTER);
int32 bindex = alert->Go(); int32 bindex = alert->Go();
@@ -435,25 +435,25 @@ JoyWin::_ShowNoCompatibleJoystickMessage()
BString str("There where no compatible joysticks detected on this game"); BString str("There where no compatible joysticks detected on this game");
str << " port. Try another port, or ask the manufacture of your jostick"; str << " port. Try another port, or ask the manufacture of your jostick";
str << " for a driver designed for Haiku or BeOS."; str << " for a driver designed for Haiku or BeOS.";
BAlert *alert = new BAlert("test1", str.String(), "Ok"); BAlert *alert = new BAlert("test1", str.String(), "Ok");
alert->SetShortcut(0, B_ENTER); alert->SetShortcut(0, B_ENTER);
alert->Go(); alert->Go();
} }
void 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 "); BString str("There does not appear to be a ");
str << joy << " device connected to the port '" << port << "'."; str << joy << " device connected to the port '" << port << "'.";
BAlert *alert = new BAlert("test1", str.String(), "Stop"); BAlert *alert = new BAlert("test1", str.String(), "Stop");
alert->SetShortcut(0, B_ENTER); alert->SetShortcut(0, B_ENTER);
alert->Go(); alert->Go();
} }
// Use this function to get a string of disabled ports // Use this function to get a string of disabled ports
BString BString
JoyWin::_BuildDisabledJoysticksFile() JoyWin::_BuildDisabledJoysticksFile()
{ {
@@ -472,7 +472,7 @@ JoyWin::_BuildDisabledJoysticksFile()
PortItem* PortItem*
JoyWin::_GetSelectedItem(BListView* list) JoyWin::_GetSelectedItem(BListView* list)
{ {
int32 id = list->CurrentSelection(); int32 id = list->CurrentSelection();
if (id > -1) { if (id > -1) {
@@ -485,7 +485,7 @@ JoyWin::_GetSelectedItem(BListView* list)
BString BString
JoyWin::_FixPathToName(const char* port) JoyWin::_FixPathToName(const char* port)
{ {
BString temp(port); BString temp(port);
temp = temp.Remove(0, temp.FindLast('/') + 1) ; temp = temp.Remove(0, temp.FindLast('/') + 1) ;
@@ -494,7 +494,7 @@ JoyWin::_FixPathToName(const char* port)
void void
JoyWin::_SelectDeselectJoystick(BListView* list, bool enable) JoyWin::_SelectDeselectJoystick(BListView* list, bool enable)
{ {
list->DeselectAll(); list->DeselectAll();
int32 number = fGamePortL->CountItems(); int32 number = fGamePortL->CountItems();
@@ -507,7 +507,7 @@ JoyWin::_SelectDeselectJoystick(BListView* list, bool enable)
int32 int32
JoyWin::_FindStringItemInList(BListView *view, PortItem *item) JoyWin::_FindStringItemInList(BListView *view, PortItem *item)
{ {
PortItem *strItem; PortItem *strItem;
int32 number = view->CountItems(); int32 number = view->CountItems();
@@ -523,7 +523,7 @@ JoyWin::_FindStringItemInList(BListView *view, PortItem *item)
BString BString
JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item) JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item)
{ {
BPath path(symLinkPath); BPath path(symLinkPath);
path.Append(item->Text()); path.Append(item->Text());
@@ -541,7 +541,7 @@ JoyWin::_FindFilePathForSymLink(const char* symLinkPath, PortItem *item)
status_t status_t
JoyWin::_FindStick(const char* name) JoyWin::_FindStick(const char* name)
{ {
BJoystick *stick = new BJoystick(); BJoystick *stick = new BJoystick();
return stick->Open(name); return stick->Open(name);
@@ -549,15 +549,15 @@ JoyWin::_FindStick(const char* name)
const char* const char*
JoyWin::_FindSettingString(const char* name, const char* strPath) JoyWin::_FindSettingString(const char* name, const char* strPath)
{ {
//Make a BJoystick try open it //Make a BJoystick try open it
BString str; BString str;
BPath path(strPath); BPath path(strPath);
path.Append(name); 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); //status_t err = find_directory(B_COMMON_ETC_DIRECTORY, &path);
// if (err == B_OK) { // if (err == B_OK) {
//BString str(path.Path()); //BString str(path.Path());
@@ -579,19 +579,19 @@ JoyWin::_FindSettingString(const char* name, const char* strPath)
printf("getline %s \n", str.String()); printf("getline %s \n", str.String());
//Test to open joystick with x number //Test to open joystick with x number
}*/ }*/
return ""; return "";
} else } else
printf("BFile.SetTo error: %s, Path = %s\n", strerror(err), str.String()); printf("BFile.SetTo error: %s, Path = %s\n", strerror(err), str.String());
// } else // } else
// printf("find_directory error: %s\n", strerror(err)); // printf("find_directory error: %s\n", strerror(err));
// delete file; // delete file;
return ""; return "";
} }
/* /*
//Function to get a line from a file //Function to get a line from a file
bool bool
JoyWin::_GetLine(BString& string) JoyWin::_GetLine(BString& string)
{ {
// Fill up the buffer with the first chunk of code // Fill up the buffer with the first chunk of code
@@ -612,14 +612,14 @@ JoyWin::_GetLine(BString& string)
string = destination; string = destination;
return true; return true;
} }
string += fBuffer[fPositionInBuffer]; string += fBuffer[fPositionInBuffer];
fPositionInBuffer++; fPositionInBuffer++;
} }
// Once the buffer runs out, grab some more and start again // 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; fPositionInBuffer = 0;
} }
return false; return false;
} }
*/ */
+18 -17
View File
@@ -108,10 +108,10 @@ KeymapWindow::KeymapWindow()
create_directory(path.Path(), S_IRWXU | S_IRWXG | S_IRWXO); create_directory(path.Path(), S_IRWXU | S_IRWXG | S_IRWXO);
} }
BMessenger messenger(this); BMessenger messenger(this);
fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, &ref, fOpenPanel = new BFilePanel(B_OPEN_PANEL, &messenger, &ref,
B_FILE_NODE, false, NULL); 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); B_FILE_NODE, false, NULL);
BScreen screen(this); BScreen screen(this);
@@ -165,7 +165,7 @@ KeymapWindow::~KeymapWindow(void)
} }
bool bool
KeymapWindow::QuitRequested() KeymapWindow::QuitRequested()
{ {
be_app->PostMessage(B_QUIT_REQUESTED); be_app->PostMessage(B_QUIT_REQUESTED);
@@ -173,12 +173,12 @@ KeymapWindow::QuitRequested()
} }
void void
KeymapWindow::MessageReceived(BMessage* message) KeymapWindow::MessageReceived(BMessage* message)
{ {
switch (message->what) { switch (message->what) {
case B_SIMPLE_DATA: case B_SIMPLE_DATA:
case B_REFS_RECEIVED: case B_REFS_RECEIVED:
{ {
entry_ref ref; entry_ref ref;
int32 i = 0; int32 i = 0;
@@ -357,7 +357,7 @@ KeymapWindow::_CreateMenu()
for (int32 i = 0; i < numFamilies; i++) { for (int32 i = 0; i < numFamilies; i++) {
if (get_font_family(i, &family, &flags) == B_OK) { if (get_font_family(i, &family, &flags) == B_OK) {
BMenuItem *item = BMenuItem *item =
new BMenuItem(family, new BMessage(kMsgMenuFontChanged)); new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
fFontMenu->AddItem(item); fFontMenu->AddItem(item);
@@ -420,7 +420,7 @@ KeymapWindow::_AddKeyboardLayouts(BMenu* menu)
path.Append("KeyboardLayouts"); path.Append("KeyboardLayouts");
BDirectory directory; BDirectory directory;
if (directory.SetTo(path.Path()) == B_OK) { if (directory.SetTo(path.Path()) == B_OK) {
entry_ref ref; entry_ref ref;
while (directory.GetNextRef(&ref) == B_OK) { while (directory.GetNextRef(&ref) == B_OK) {
@@ -489,7 +489,7 @@ KeymapWindow::_SwitchShortcutKeys()
//! Saves previous map to the "Key_map" file. //! Saves previous map to the "Key_map" file.
void void
KeymapWindow::_RevertKeymap() KeymapWindow::_RevertKeymap()
{ {
entry_ref ref; entry_ref ref;
@@ -512,7 +512,7 @@ KeymapWindow::_RevertKeymap()
} }
void void
KeymapWindow::_UseKeymap() KeymapWindow::_UseKeymap()
{ {
entry_ref ref; entry_ref ref;
@@ -538,15 +538,16 @@ KeymapWindow::_FillSystemMaps()
while ((item = fSystemListView->RemoveItem(static_cast<int32>(0)))) while ((item = fSystemListView->RemoveItem(static_cast<int32>(0))))
delete item; delete item;
// TODO: common keymaps!
BPath path; BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK) if (find_directory(B_SYSTEM_DATA_DIRECTORY, &path) != B_OK)
return; return;
path.Append("Keymap"); path.Append("Keymaps");
BDirectory directory; BDirectory directory;
entry_ref ref; entry_ref ref;
if (directory.SetTo(path.Path()) == B_OK) { if (directory.SetTo(path.Path()) == B_OK) {
while (directory.GetNextRef(&ref) == B_OK) { while (directory.GetNextRef(&ref) == B_OK) {
fSystemListView->AddItem(new KeymapListItem(ref)); fSystemListView->AddItem(new KeymapListItem(ref));
@@ -555,7 +556,7 @@ KeymapWindow::_FillSystemMaps()
} }
void void
KeymapWindow::_FillUserMaps() KeymapWindow::_FillUserMaps()
{ {
BListItem* item; BListItem* item;
@@ -632,7 +633,7 @@ KeymapWindow::_GetActiveKeymapName()
bool bool
KeymapWindow::_SelectCurrentMap(BListView* view) KeymapWindow::_SelectCurrentMap(BListView* view)
{ {
if (fCurrentMapName.Length() <= 0) if (fCurrentMapName.Length() <= 0)
return false; return false;
for (int32 i = 0; i < view->CountItems(); i++) { for (int32 i = 0; i < view->CountItems(); i++) {
+94 -107
View File
@@ -9,21 +9,14 @@
*/ */
/* /*
Exceptions: Exceptions:
doesn't calc "Time in" time. 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.
*/ */
#include "ZoneView.h" #include "ZoneView.h"
#include "TimeMessages.h"
#include "TZDisplay.h"
#include "TimeWindow.h"
#include <stdio.h>
#include <stdlib.h>
#include <Button.h> #include <Button.h>
#include <Directory.h> #include <Directory.h>
@@ -41,9 +34,11 @@
#include <View.h> #include <View.h>
#include <Window.h> #include <Window.h>
#include <syscalls.h>
#include <stdio.h> #include "TimeMessages.h"
#include <stdlib.h> #include "TZDisplay.h"
#include "TimeWindow.h"
class TZoneItem : public BStringItem { class TZoneItem : public BStringItem {
@@ -52,10 +47,10 @@ class TZoneItem : public BStringItem {
: BStringItem(text), fZone(new BPath(zone)) { } : BStringItem(text), fZone(new BPath(zone)) { }
~TZoneItem() { delete fZone; } ~TZoneItem() { delete fZone; }
const char *Zone() const { return fZone->Leaf(); } const char *Zone() const { return fZone->Leaf(); }
const char *Path() const { return fZone->Path(); } const char *Path() const { return fZone->Path(); }
private: private:
BPath *fZone; BPath *fZone;
}; };
@@ -83,14 +78,14 @@ TimeZoneView::_Revert()
BPath parent; BPath parent;
fCurrentZone = fOldZone; 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")) if (BMenuItem* item = fRegionPopUp->FindItem("Others"))
item->SetMarked(true); item->SetMarked(true);
czone = FillCityList("Others"); czone = FillCityList("Others");
} else { } else if (fCurrentZone.GetParent(&parent) == B_OK) {
fCurrentZone.GetParent(&parent);
if (BMenuItem* item = fRegionPopUp->FindItem(parent.Leaf())) if (BMenuItem* item = fRegionPopUp->FindItem(parent.Leaf()))
item->SetMarked(true); item->SetMarked(true);
czone = FillCityList(parent.Path()); czone = FillCityList(parent.Path());
@@ -124,9 +119,10 @@ TimeZoneView::AttachedToWindow()
fCityList->SetTarget(this); fCityList->SetTarget(this);
fRegionPopUp->SetTargetForItems(this); fRegionPopUp->SetTargetForItems(this);
// update displays // update displays
BPath parent; BPath parent;
if (strcmp(fCurrentZone.Leaf(), "Greenwich") != 0) { if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), "Greenwich") != 0) {
fCurrentZone.GetParent(&parent); fCurrentZone.GetParent(&parent);
int32 czone = FillCityList(parent.Path()); int32 czone = FillCityList(parent.Path());
if (czone > -1) { if (czone > -1) {
@@ -148,24 +144,27 @@ TimeZoneView::AttachedToWindow()
void void
TimeZoneView::MessageReceived(BMessage *message) TimeZoneView::MessageReceived(BMessage *message)
{ {
int32 change; switch (message->what) {
switch(message->what) {
case B_OBSERVER_NOTICE_CHANGE: case B_OBSERVER_NOTICE_CHANGE:
{
int32 change;
message->FindInt32(B_OBSERVE_WHAT_CHANGE, &change); message->FindInt32(B_OBSERVE_WHAT_CHANGE, &change);
switch(change) { switch(change) {
case H_TM_CHANGED: case H_TM_CHANGED:
UpdateDateTime(message); UpdateDateTime(message);
break; break;
default: default:
BView::MessageReceived(message); BView::MessageReceived(message);
break; break;
} }
break; break;
}
case H_REGION_CHANGED: case H_REGION_CHANGED:
ChangeRegion(message); ChangeRegion(message);
break; break;
case H_SET_TIME_ZONE: case H_SET_TIME_ZONE:
{ {
SetTimeZone(); SetTimeZone();
@@ -182,8 +181,8 @@ TimeZoneView::MessageReceived(BMessage *message)
case H_CITY_CHANGED: case H_CITY_CHANGED:
SetPreview(); SetPreview();
break; break;
default: default:
BView::MessageReceived(message); BView::MessageReceived(message);
break; break;
@@ -225,7 +224,7 @@ TimeZoneView::InitView()
BRect frameLeft(Bounds()); BRect frameLeft(Bounds());
frameLeft.right = frameLeft.Width() / 2.0; frameLeft.right = frameLeft.Width() / 2.0;
frameLeft.InsetBy(10.0f, 10.0f); frameLeft.InsetBy(10.0f, 10.0f);
BMenuField *menuField = new BMenuField(frameLeft, "regions", NULL, fRegionPopUp, false); BMenuField *menuField = new BMenuField(frameLeft, "regions", NULL, fRegionPopUp, false);
AddChild(menuField); AddChild(menuField);
menuField->ResizeToPreferred(); menuField->ResizeToPreferred();
@@ -237,11 +236,11 @@ TimeZoneView::InitView()
fCityList = new BListView(frameLeft, "cityList", B_SINGLE_SELECTION_LIST); fCityList = new BListView(frameLeft, "cityList", B_SINGLE_SELECTION_LIST);
fCityList->SetSelectionMessage(new BMessage(H_CITY_CHANGED)); fCityList->SetSelectionMessage(new BMessage(H_CITY_CHANGED));
fCityList->SetInvocationMessage(new BMessage(H_SET_TIME_ZONE)); fCityList->SetInvocationMessage(new BMessage(H_SET_TIME_ZONE));
BScrollView *scrollList = new BScrollView("scrollList", fCityList, BScrollView *scrollList = new BScrollView("scrollList", fCityList,
B_FOLLOW_ALL, 0, false, true); B_FOLLOW_ALL, 0, false, true);
AddChild(scrollList); AddChild(scrollList);
// right side // right side
BRect frameRight(Bounds()); BRect frameRight(Bounds());
frameRight.left = frameRight.Width() / 2.0; frameRight.left = frameRight.Width() / 2.0;
@@ -252,21 +251,21 @@ TimeZoneView::InitView()
fCurrent = new TTZDisplay(frameRight, "currentTime", "Current time:"); fCurrent = new TTZDisplay(frameRight, "currentTime", "Current time:");
AddChild(fCurrent); AddChild(fCurrent);
fCurrent->ResizeToPreferred(); fCurrent->ResizeToPreferred();
frameRight.top = fCurrent->Frame().bottom + 10.0; frameRight.top = fCurrent->Frame().bottom + 10.0;
fPreview = new TTZDisplay(frameRight, "previewTime", "Preview time:"); fPreview = new TTZDisplay(frameRight, "previewTime", "Preview time:");
AddChild(fPreview); AddChild(fPreview);
fPreview->ResizeToPreferred(); fPreview->ResizeToPreferred();
// set button // set button
fSetZone = new BButton(frameRight, "setTimeZone", "Set Time Zone", fSetZone = new BButton(frameRight, "setTimeZone", "Set Time Zone",
new BMessage(H_SET_TIME_ZONE)); new BMessage(H_SET_TIME_ZONE));
AddChild(fSetZone); AddChild(fSetZone);
fSetZone->SetEnabled(false); fSetZone->SetEnabled(false);
fSetZone->ResizeToPreferred(); fSetZone->ResizeToPreferred();
fSetZone->MoveTo(frameRight.right - fSetZone->Bounds().Width(), 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() TimeZoneView::BuildRegionMenu()
{ {
BPath path; BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK) if (_GetTimezonesPath(path) != B_OK)
return; return;
path.Append("timezones");
// get current region // get current region
BPath region; BPath region;
fCurrentZone.GetParent(&region); fCurrentZone.GetParent(&region);
bool markit; bool markit;
BEntry entry; BEntry entry;
BMenuItem *item; BMenuItem *item;
@@ -296,13 +293,13 @@ TimeZoneView::BuildRegionMenu()
if (entry.IsDirectory()) { if (entry.IsDirectory()) {
path.SetTo(&entry); path.SetTo(&entry);
itemtext = path.Leaf(); itemtext = path.Leaf();
// skip Etc directory // skip Etc directory
if (itemtext.Compare("Etc", 3) == 0) if (itemtext.Compare("Etc", 3) == 0)
continue; continue;
markit = itemtext.Compare(region.Leaf()) == 0; markit = itemtext.Compare(region.Leaf()) == 0;
// add Ocean to oceans :) // add Ocean to oceans :)
if (itemtext.Compare("Atlantic", 8) == 0 if (itemtext.Compare("Atlantic", 8) == 0
||itemtext.Compare("Pacific", 7) == 0 ||itemtext.Compare("Pacific", 7) == 0
@@ -311,7 +308,7 @@ TimeZoneView::BuildRegionMenu()
// underscores are spaces // underscores are spaces
itemtext = itemtext.ReplaceAll('_', ' '); itemtext = itemtext.ReplaceAll('_', ' ');
BMessage *msg = new BMessage(H_REGION_CHANGED); BMessage *msg = new BMessage(H_REGION_CHANGED);
msg->AddString("region", path.Path()); msg->AddString("region", path.Path());
@@ -324,7 +321,8 @@ TimeZoneView::BuildRegionMenu()
msg->AddString("region", "Others"); msg->AddString("region", "Others");
item = new BMenuItem("Others", msg); 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); fRegionPopUp->AddItem(item);
} }
@@ -341,29 +339,24 @@ TimeZoneView::FillCityList(const char *area)
} }
BStringItem *city; BStringItem *city;
int32 index = -1; int32 index = -1;
if (strcmp(area, "Others") != 0) { if (strcmp(area, "Others") != 0) {
// Enter time zones directory. Find subdir with name that matches string // Enter time zones directory. Find subdir with name that matches string
// stored in area. Enter subdirectory and count the items. For each item, // 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; BPath path;
if (find_directory(B_BEOS_ETC_DIRECTORY, &path) != B_OK) _GetTimezonesPath(path);
return 0;
path.Append("timezones"); BPath areaPath(area);
BDirectory zoneDir(path.Path());
BPath Area(area);
BDirectory zoneDir(path.Path());
BDirectory cityDir; BDirectory cityDir;
BString city_name; BString city_name;
BEntry entry; BEntry entry;
// locate subdirectory:
//locate subdirectory: if (zoneDir.Contains(areaPath.Leaf(), B_DIRECTORY_NODE)) {
if (zoneDir.Contains(Area.Leaf(), B_DIRECTORY_NODE)) { cityDir.SetTo(&zoneDir, areaPath.Leaf());
cityDir.SetTo(&zoneDir, Area.Leaf());
// There is a subdir with a name that matches 'area'. That's the one!! // 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 // Iterate over the items in the subdir, fill listview with TZoneItems
@@ -377,15 +370,21 @@ TimeZoneView::FillCityList(const char *area)
city_name.ReplaceAll("_", " "); city_name.ReplaceAll("_", " ");
city = new TZoneItem(city_name.String(), zone.Path()); city = new TZoneItem(city_name.String(), zone.Path());
fCityList->AddItem(city); fCityList->AddItem(city);
if (strcmp(fCurrentZone.Leaf(), zone.Leaf()) == 0) if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), zone.Leaf()) == 0)
index = fCityList->IndexOf(city); index = fCityList->IndexOf(city);
} }
} }
} }
} else { } 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); fCityList->AddItem(city);
if (strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) { if (fCurrentZone.Leaf() != NULL
&& strcmp(fCurrentZone.Leaf(), "Greenwich") == 0) {
index = fCityList->IndexOf(city); index = fCityList->IndexOf(city);
} }
} }
@@ -406,44 +405,21 @@ TimeZoneView::ChangeRegion(BMessage *message)
void void
TimeZoneView::ReadTimeZoneLink() TimeZoneView::ReadTimeZoneLink()
{ {
BEntry tzLink; char tzFileName[B_PATH_NAME_LENGTH];
#if TARGET_PLATFORM_HAIKU
extern status_t _kern_get_tzfilename(char *filename, size_t length, bool *_isGMT);
char tzFileName[B_OS_PATH_LENGTH];
bool isGMT; 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); 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"); if (!tzLink.Exists()) {
tzLink.SetTo(path.Path(), true); 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 // we need something in the current zone
fCurrentZone.SetTo(&tzLink); fCurrentZone.SetTo(&tzLink);
fOldZone.SetTo(&tzLink); fOldZone.SetTo(&tzLink);
@@ -463,14 +439,14 @@ TimeZoneView::SetPreview()
// calc preview time // calc preview time
time_t current = time(0); time_t current = time(0);
struct tm *ltime = localtime(&current); struct tm *ltime = localtime(&current);
// update prview // update prview
fPreview->SetText(item->Text()); fPreview->SetText(item->Text());
fPreview->SetTime(ltime->tm_hour, ltime->tm_min); fPreview->SetTime(ltime->tm_hour, ltime->tm_min);
// set timezone back to current // set timezone back to current
SetTimeZone(fCurrentZone.Path()); SetTimeZone(fCurrentZone.Path());
fSetZone->SetEnabled((strcmp(fCurrent->Text(), item->Text()) != 0)); fSetZone->SetEnabled((strcmp(fCurrent->Text(), item->Text()) != 0));
} }
} }
@@ -480,10 +456,10 @@ void
TimeZoneView::SetCurrent(const char *text) TimeZoneView::SetCurrent(const char *text)
{ {
SetTimeZone(fCurrentZone.Path()); SetTimeZone(fCurrentZone.Path());
time_t current = time(0); time_t current = time(0);
struct tm *ltime = localtime(&current); struct tm *ltime = localtime(&current);
fCurrent->SetText(text); fCurrent->SetText(text);
fCurrent->SetTime(ltime->tm_hour, ltime->tm_min); fCurrent->SetTime(ltime->tm_hour, ltime->tm_min);
} }
@@ -498,27 +474,27 @@ TimeZoneView::SetTimeZone()
3) call settz() 3) call settz()
4) call set_timezone from OS.h passing path to timezone file 4) call set_timezone from OS.h passing path to timezone file
*/ */
// get path to current link // get path to current link
// update/create timezone symlink in B_USER_SETTINGS_DIRECTORY // update/create timezone symlink in B_USER_SETTINGS_DIRECTORY
BPath path; BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
return; return;
path.Append("timezone"); path.Append("timezone");
// build target for new link // build target for new link
int32 selection = fCityList->CurrentSelection(); int32 selection = fCityList->CurrentSelection();
if (selection < 0) if (selection < 0)
return; return;
BPath target(((TZoneItem *)fCityList->ItemAt(selection))->Path()); BPath target(((TZoneItem *)fCityList->ItemAt(selection))->Path());
// remove old // remove old
BEntry entry(path.Path()); BEntry entry(path.Path());
if (entry.Exists()) if (entry.Exists())
entry.Remove(); entry.Remove();
// create new // create new
BDirectory dir(target.Path()); BDirectory dir(target.Path());
if (dir.CreateSymLink(path.Path(), target.Path(), NULL) != B_OK) if (dir.CreateSymLink(path.Path(), target.Path(), NULL) != B_OK)
@@ -526,15 +502,15 @@ TimeZoneView::SetTimeZone()
// update environment // update environment
SetTimeZone(target.Path()); SetTimeZone(target.Path());
// update display // update display
time_t current = time(0); time_t current = time(0);
struct tm *ltime = localtime(&current); struct tm *ltime = localtime(&current);
char tza[B_PATH_NAME_LENGTH]; char tza[B_PATH_NAME_LENGTH];
sprintf(tza, "%s", target.Path()); sprintf(tza, "%s", target.Path());
set_timezone(tza); set_timezone(tza);
// disable button // disable button
fSetZone->SetEnabled(false); fSetZone->SetEnabled(false);
@@ -546,7 +522,7 @@ TimeZoneView::SetTimeZone()
fMinute = ltime->tm_min; fMinute = ltime->tm_min;
fCurrentZone.SetTo(target.Path()); fCurrentZone.SetTo(target.Path());
SetCurrent(((TZoneItem *)fCityList->ItemAt(selection))->Text()); SetCurrent(((TZoneItem *)fCityList->ItemAt(selection))->Text());
} }
void void
@@ -556,3 +532,14 @@ TimeZoneView::SetTimeZone(const char *zone)
tzset(); 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");
}
+5 -3
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. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@@ -25,7 +25,7 @@ class TimeZoneView : public BView {
public: public:
TimeZoneView(BRect frame); TimeZoneView(BRect frame);
virtual ~TimeZoneView(); virtual ~TimeZoneView();
virtual void AttachedToWindow(); virtual void AttachedToWindow();
virtual void MessageReceived(BMessage *message); virtual void MessageReceived(BMessage *message);
bool CheckCanRevert(); bool CheckCanRevert();
@@ -45,13 +45,15 @@ class TimeZoneView : public BView {
// returns index of current zone // returns index of current zone
int32 FillCityList(const char *area); int32 FillCityList(const char *area);
status_t _GetTimezonesPath(BPath& path);
private: private:
BPopUpMenu *fRegionPopUp; BPopUpMenu *fRegionPopUp;
BListView *fCityList; BListView *fCityList;
BButton *fSetZone; BButton *fSetZone;
TTZDisplay *fCurrent; TTZDisplay *fCurrent;
TTZDisplay *fPreview; TTZDisplay *fPreview;
int32 fHour; int32 fHour;
int32 fMinute; int32 fMinute;
BPath fCurrentZone; BPath fCurrentZone;
+1 -1
View File
@@ -42,7 +42,7 @@ static const char *kSignature = "application/x-vnd.Haiku-debug_server";
// paths to the apps used for debugging // paths to the apps used for debugging
static const char *kConsoledPath = "/bin/consoled"; 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"; static const char *kGDBPath = "/bin/gdb";
+61 -68
View File
@@ -38,17 +38,10 @@
using std::nothrow; using std::nothrow;
using namespace BPrivate; using namespace BPrivate;
//------------------------------------------------------------------------------
// Private local function declarations
//------------------------------------------------------------------------------
static bool larger_index(const recent_entry *entry1, const recent_entry *entry2); static bool larger_index(const recent_entry *entry1, const recent_entry *entry2);
//------------------------------------------------------------------------------
// TRoster
//------------------------------------------------------------------------------
/*! /*!
\class TRoster \class TRoster
\brief Implements the application roster. \brief Implements the application roster.
@@ -79,10 +72,10 @@ const bigtime_t kMaximalEarlyPreRegistrationPeriod = 60000000LL;
//! Applications living in this tree are considered "vital system apps". //! Applications living in this tree are considered "vital system apps".
static const char *const kVitalSystemAppPathPrefix static const char *const kVitalSystemAppPathPrefix
= "/boot/beos/system/servers"; = "/boot/system/servers";
//! Applications living in this tree are considered "system apps". //! 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 // get_default_roster_settings_file
/*! \brief Returns the path to the default roster settings. /*! \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. The object is completely initialized and ready to handle requests.
*/ */
TRoster::TRoster() TRoster::TRoster()
: fLock("roster"), :
fRegisteredApps(), fLock("roster"),
fEarlyPreRegisteredApps(), fRegisteredApps(),
fIARRequestsByID(), fEarlyPreRegisteredApps(),
fIARRequestsByToken(), fIARRequestsByID(),
fActiveApp(NULL), fIARRequestsByToken(),
fWatchingService(), fActiveApp(NULL),
fRecentApps(), fWatchingService(),
fRecentDocuments(), fRecentApps(),
fRecentFolders(), fRecentDocuments(),
fLastToken(0), fRecentFolders(),
fShuttingDown(false) fLastToken(0),
fShuttingDown(false)
{ {
_LoadRosterSettings(); _LoadRosterSettings();
} }
@@ -178,7 +172,7 @@ PRINT(("full registration: %d\n", fullReg));
// check the parameters // check the parameters
team_id otherTeam = -1; team_id otherTeam = -1;
uint32 token = 0; uint32 token = 0;
uint32 launchFlags = flags & B_LAUNCH_MASK; uint32 launchFlags = flags & B_LAUNCH_MASK;
BEntry entry(&ref); BEntry entry(&ref);
if (!entry.Exists()) if (!entry.Exists())
@@ -262,7 +256,7 @@ PRINT(("added to early pre-regs, token: %lu\n", token));
// add to recent apps if successful // add to recent apps if successful
if (signature && signature[0] != '\0') if (signature && signature[0] != '\0')
fRecentApps.Add(signature, flags); fRecentApps.Add(signature, flags);
else else
fRecentApps.Add(&ref, flags); fRecentApps.Add(&ref, flags);
// fRecentApps.Print(); // fRecentApps.Print();
@@ -972,7 +966,7 @@ TRoster::HandleGetRecentApps(BMessage *request)
if (!error) if (!error)
error = fRecentApps.Get(maxCount, &reply); error = fRecentApps.Get(maxCount, &reply);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1003,7 +997,7 @@ TRoster::HandleAddToRecentDocuments(BMessage *request)
if (!error) if (!error)
error = fRecentDocuments.Add(&ref, appSig); error = fRecentDocuments.Add(&ref, appSig);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1034,7 +1028,7 @@ TRoster::HandleAddToRecentFolders(BMessage *request)
if (!error) if (!error)
error = fRecentFolders.Add(&ref, appSig); error = fRecentFolders.Add(&ref, appSig);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1062,7 +1056,7 @@ TRoster::HandleAddToRecentApps(BMessage *request)
if (!error) if (!error)
error = fRecentApps.Add(appSig); error = fRecentApps.Add(appSig);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1086,7 +1080,7 @@ TRoster::HandleLoadRecentLists(BMessage *request)
if (!error) if (!error)
error = _LoadRosterSettings(filename); error = _LoadRosterSettings(filename);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1110,7 +1104,7 @@ TRoster::HandleSaveRecentLists(BMessage *request)
if (!error) if (!error)
error = _SaveRosterSettings(filename); error = _SaveRosterSettings(filename);
reply.AddInt32("result", error); reply.AddInt32("result", error);
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
@@ -1368,7 +1362,7 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
} }
// debug server // debug server
RosterAppInfo *info = RosterAppInfo *info =
fRegisteredApps.InfoFor("application/x-vnd.haiku-debug_server"); fRegisteredApps.InfoFor("application/x-vnd.haiku-debug_server");
if (info) if (info)
vitalSystemApps.insert(info->team); vitalSystemApps.insert(info->team);
@@ -1411,7 +1405,7 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
if (error != B_OK) { if (error != B_OK) {
userApps.MakeEmpty(true); userApps.MakeEmpty(true);
systemApps.MakeEmpty(true); systemApps.MakeEmpty(true);
} }
return error; return error;
} }
@@ -1691,7 +1685,7 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
status_t error = request->FindInt32("max count", &maxCount); status_t error = request->FindInt32("max count", &maxCount);
// Look for optional file type(s) // Look for optional file type(s)
if (!error) { if (!error) {
type_code typeFound; type_code typeFound;
status_t typeError = request->GetInfo("file type", &typeFound, &fileTypesCount); status_t typeError = request->GetInfo("file type", &typeFound, &fileTypesCount);
if (!typeError) if (!typeError)
typeError = typeFound == B_STRING_TYPE ? B_OK : B_BAD_TYPE; typeError = typeFound == B_STRING_TYPE ? B_OK : B_BAD_TYPE;
@@ -1730,18 +1724,18 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
fileTypesCount, appSig, &reply); fileTypesCount, appSig, &reply);
D(fRecentDocuments.Print()); D(fRecentDocuments.Print());
break; break;
case B_REG_GET_RECENT_FOLDERS: case B_REG_GET_RECENT_FOLDERS:
error = fRecentFolders.Get(maxCount, (const char**)fileTypes, error = fRecentFolders.Get(maxCount, (const char**)fileTypes,
fileTypesCount, appSig, &reply); fileTypesCount, appSig, &reply);
D(fRecentFolders.Print()); D(fRecentFolders.Print());
break; break;
default: default:
D(PRINT(("WARNING: TRoster::_HandleGetRecentEntries(): unexpected " D(PRINT(("WARNING: TRoster::_HandleGetRecentEntries(): unexpected "
"request->what value of 0x%lx\n", request->what))); "request->what value of 0x%lx\n", request->what)));
error = B_BAD_VALUE; error = B_BAD_VALUE;
break; break;
} }
} }
reply.AddInt32("result", error); reply.AddInt32("result", error);
@@ -1753,10 +1747,10 @@ TRoster::_HandleGetRecentEntries(BMessage *request)
delete fileTypes; delete fileTypes;
fileTypes = NULL; fileTypes = NULL;
} }
request->SendReply(&reply); request->SendReply(&reply);
FUNCTION_END(); FUNCTION_END();
} }
/*! /*!
@@ -1803,7 +1797,7 @@ TRoster::_LoadRosterSettings(const char *path)
const char *settingsPath const char *settingsPath
= path ? path : get_default_roster_settings_file(_path); = path ? path : get_default_roster_settings_file(_path);
RosterSettingsCharStream stream; RosterSettingsCharStream stream;
status_t error; status_t error;
BFile file; BFile file;
@@ -1822,24 +1816,24 @@ TRoster::_LoadRosterSettings(const char *path)
ssize_t bytes = file.Read(data, size); ssize_t bytes = file.Read(data, size);
error = bytes < 0 ? bytes : (bytes == size ? B_OK : B_FILE_ERROR); error = bytes < 0 ? bytes : (bytes == size ? B_OK : B_FILE_ERROR);
} }
if (!error) if (!error)
error = stream.SetTo(std::string(data)); error = stream.SetTo(std::string(data));
delete[] data; delete[] data;
if (!error) { if (!error) {
// Clear the current lists as // Clear the current lists as
// we'll be manually building them up // we'll be manually building them up
fRecentDocuments.Clear(); fRecentDocuments.Clear();
fRecentFolders.Clear(); fRecentFolders.Clear();
fRecentApps.Clear(); fRecentApps.Clear();
// Now we just walk through the file and read in the info // Now we just walk through the file and read in the info
while (true) { while (true) {
status_t streamError; status_t streamError;
char str[B_PATH_NAME_LENGTH]; char str[B_PATH_NAME_LENGTH];
// (RecentDoc | RecentFolder | RecentApp) // (RecentDoc | RecentFolder | RecentApp)
streamError = stream.GetString(str); streamError = stream.GetString(str);
if (!streamError) { if (!streamError) {
@@ -1849,17 +1843,17 @@ TRoster::_LoadRosterSettings(const char *path)
etApp, etApp,
etSomethingIsAmiss, etSomethingIsAmiss,
} type; } type;
if (strcmp(str, "RecentDoc") == 0) { if (strcmp(str, "RecentDoc") == 0) {
type = etDoc; type = etDoc;
} else if (strcmp(str, "RecentFolder") == 0) { } else if (strcmp(str, "RecentFolder") == 0) {
type = etFolder; type = etFolder;
} else if (strcmp(str, "RecentApp") == 0) { } else if (strcmp(str, "RecentApp") == 0) {
type = etApp; type = etApp;
} else { } else {
type = etSomethingIsAmiss; type = etSomethingIsAmiss;
} }
switch (type) { switch (type) {
case etDoc: case etDoc:
case etFolder: case etFolder:
@@ -1868,18 +1862,18 @@ TRoster::_LoadRosterSettings(const char *path)
std::list<recent_entry*> *list = (type == etDoc) std::list<recent_entry*> *list = (type == etDoc)
? &fRecentDocuments.fEntryList ? &fRecentDocuments.fEntryList
: &fRecentFolders.fEntryList; : &fRecentFolders.fEntryList;
char path[B_PATH_NAME_LENGTH]; char path[B_PATH_NAME_LENGTH];
char app[B_PATH_NAME_LENGTH]; char app[B_PATH_NAME_LENGTH];
char rank[B_PATH_NAME_LENGTH]; char rank[B_PATH_NAME_LENGTH];
entry_ref ref; entry_ref ref;
uint32 index = 0; uint32 index = 0;
// Convert the given path to an entry ref // Convert the given path to an entry ref
streamError = stream.GetString(path); streamError = stream.GetString(path);
if (!streamError) if (!streamError)
streamError = get_ref_for_path(path, &ref); streamError = get_ref_for_path(path, &ref);
// Add a new entry to the list for each application // Add a new entry to the list for each application
// signature and rank we find // signature and rank we find
while (!streamError) { while (!streamError) {
@@ -1902,22 +1896,22 @@ TRoster::_LoadRosterSettings(const char *path)
if (!streamError) { if (!streamError) {
printf("pushing entry, leaf == '%s', app == '%s', index == %ld\n", printf("pushing entry, leaf == '%s', app == '%s', index == %ld\n",
entry->ref.name, entry->sig.c_str(), entry->index); entry->ref.name, entry->sig.c_str(), entry->index);
list->push_back(entry); list->push_back(entry);
} }
} }
if (streamError) { if (streamError) {
printf("entry error 0x%lx\n", streamError); printf("entry error 0x%lx\n", streamError);
if (streamError != RosterSettingsCharStream::kEndOfLine if (streamError != RosterSettingsCharStream::kEndOfLine
&& streamError != RosterSettingsCharStream::kEndOfStream) && streamError != RosterSettingsCharStream::kEndOfStream)
stream.SkipLine(); stream.SkipLine();
} }
break; break;
} }
case etApp: case etApp:
{ {
char app[B_PATH_NAME_LENGTH]; char app[B_PATH_NAME_LENGTH];
@@ -1929,24 +1923,24 @@ TRoster::_LoadRosterSettings(const char *path)
stream.SkipLine(); stream.SkipLine();
break; break;
} }
default: default:
// Something was amiss; skip to the next line // Something was amiss; skip to the next line
stream.SkipLine(); stream.SkipLine();
break; break;
} }
} }
if (streamError == RosterSettingsCharStream::kEndOfStream) if (streamError == RosterSettingsCharStream::kEndOfStream)
break; break;
} }
// Now we must sort our lists of documents and folders by the // Now we must sort our lists of documents and folders by the
// indicies we read for each entry (largest index first) // indicies we read for each entry (largest index first)
fRecentDocuments.fEntryList.sort(larger_index); fRecentDocuments.fEntryList.sort(larger_index);
fRecentFolders.fEntryList.sort(larger_index); fRecentFolders.fEntryList.sort(larger_index);
printf("----------------------------------------------------------------------\n"); printf("----------------------------------------------------------------------\n");
fRecentDocuments.Print(); fRecentDocuments.Print();
printf("----------------------------------------------------------------------\n"); printf("----------------------------------------------------------------------\n");
@@ -1957,7 +1951,7 @@ TRoster::_LoadRosterSettings(const char *path)
} }
if (error) if (error)
D(PRINT(("WARNING: TRoster::_LoadRosterSettings(): error loading roster settings " 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; return error;
} }
@@ -1970,7 +1964,7 @@ TRoster::_SaveRosterSettings(const char *path)
status_t error; status_t error;
FILE* file; FILE* file;
file = fopen(settingsPath, "w+"); file = fopen(settingsPath, "w+");
error = file ? B_OK : errno; error = file ? B_OK : errno;
if (!error) { if (!error) {
@@ -1989,19 +1983,18 @@ TRoster::_SaveRosterSettings(const char *path)
"with error 0x%lx\n", saveError))); "with error 0x%lx\n", saveError)));
fclose(file); fclose(file);
} }
return error; return error;
} }
//------------------------------------------------------------------------------ // #pragma mark - Private local functions
// Private local functions
//------------------------------------------------------------------------------
/*! \brief Returns true if entry1's index is larger than entry2's index. /*! \brief Returns true if entry1's index is larger than entry2's index.
Also returns true if either entry is \c NULL. Also returns true if either entry is \c NULL.
Used for sorting the recent entry lists loaded from disk into the Used for sorting the recent entry lists loaded from disk into the
proper order. proper order.
*/ */
+8 -8
View File
@@ -22,7 +22,7 @@ local librootFunctions =
strtol.o strtol.o
; ;
AddResources zbeos : boot_loader.rdef ; AddResources haiku_loader : boot_loader.rdef ;
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) : KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
boot_platform_$(TARGET_BOOT_PLATFORM).o 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) ; BuildCoffLoader boot_loader_$(TARGET_BOOT_PLATFORM)_coff : boot_loader_$(TARGET_BOOT_PLATFORM) ;
rule BuildZbeos { rule BuildBiosLoader {
local zbeos = $(1) ; local haikuLoader = $(1) ;
local bootLoader = $(2) ; local bootLoader = $(2) ;
Depends $(zbeos) : $(bootLoader) ; Depends $(haikuLoader) : $(bootLoader) ;
MakeLocateDebug $(zbeos) ; MakeLocateDebug $(haikuLoader) ;
on $(1) ResAttr $(1) : $(RESFILES) : false ; on $(1) ResAttr $(1) : $(RESFILES) : false ;
if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] { if ! [ on $(1) return $(DONT_USE_BEOS_RULES) ] {
@@ -82,15 +82,15 @@ rule BuildZbeos {
} }
} }
actions BuildZbeos { actions BuildBiosLoader {
rm -f $(1) rm -f $(1)
$(TARGET_OBJCOPY) -O binary $(2) $(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 # 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 arch $(TARGET_ARCH) ;
SubInclude HAIKU_TOP src system boot loader ; SubInclude HAIKU_TOP src system boot loader ;
+3 -3
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. * Distributed under the terms of the MIT License.
*/ */
@@ -24,11 +24,11 @@
#endif #endif
#define KERNEL_IMAGE "kernel_" BOOT_ARCH #define KERNEL_IMAGE "kernel_" BOOT_ARCH
#define KERNEL_PATH "beos/system/" KERNEL_IMAGE #define KERNEL_PATH "system/" KERNEL_IMAGE
static const char *sPaths[] = { static const char *sPaths[] = {
"beos/system/add-ons/kernel", "system/add-ons/kernel",
"home/config/add-ons/kernel", "home/config/add-ons/kernel",
NULL NULL
}; };
+2 -2
View File
@@ -22,7 +22,7 @@
/* /*
* generate boot floppy: * generate boot floppy:
* cd src/system/boot/platform/atari_m68k/ ; make fixup_tos_floppy_chksum; cd - * 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 * src/system/boot/platform/atari_m68k/fixup_tos_floppy_chksum ~/floppy.img
* generate .prg: * 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 * 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: unimpl:
.string "Unimplemented." .string "Unimplemented."
msg_j1: msg_j1:
.string "jumping to zbeos." .string "jumping to haiku_loader."
shell_end: shell_end:
+1 -1
View File
@@ -22,7 +22,7 @@
* The offset of the partition in 512 byte blocks must be written at * The offset of the partition in 512 byte blocks must be written at
* position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does * position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does
* that) or otherwise the code can't find the partition. * 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 * (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 * 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset
* in 512 byte blocks and dl - BIOS ID of the boot drive. * in 512 byte blocks and dl - BIOS ID of the boot drive.
+24 -25
View File
@@ -5,7 +5,7 @@
; partitions. The offset of the partition in 512 byte blocks must be written at ; partitions. The offset of the partition in 512 byte blocks must be written at
; position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does ; position PARTITION_OFFSET_OFFSET (32 bit little endian; makebootable does
; that) or otherwise the code can't find the partition. ; 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 ; (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 ; 0x10000) and entered at 0x:1000:0x0200 with parameters eax - partition offset
; in 512 byte blocks and dl - BIOS ID of the boot drive. ; in 512 byte blocks and dl - BIOS ID of the boot drive.
@@ -29,7 +29,7 @@
; BFS definitions ; 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_MAGIC2 0xdd121031
%assign SUPER_BLOCK_MAGIC3 0x15b6830e %assign SUPER_BLOCK_MAGIC3 0x15b6830e
@@ -92,14 +92,14 @@
; 16 bit code ; 16 bit code
SECTION SECTION .text
BITS 16 BITS 16
ORG BOOT_BLOCK_START_ADDRESS ; start code at 0x7c00 ORG BOOT_BLOCK_START_ADDRESS ; start code at 0x7c00
; nicer way to get the size of a structure ; nicer way to get the size of a structure
%define sizeof(s) s %+ _size %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 %macro nstruc 1-2 1
resb sizeof(%1) * %2 resb sizeof(%1) * %2
%endmacro %endmacro
@@ -265,7 +265,7 @@ start:
; save the BIOS drive ID ; save the BIOS drive ID
mov [bios_drive_id], dl mov [bios_drive_id], dl
; check for BIOS int 0x13 (disk services) extensions ; check for BIOS int 0x13 (disk services) extensions
mov ah, CHECK_DISK_EXTENSIONS_PRESENT mov ah, CHECK_DISK_EXTENSIONS_PRESENT
mov bx, 0x55aa mov bx, 0x55aa
@@ -328,7 +328,7 @@ _writeString:
int BIOS_VIDEO_SERVICES int BIOS_VIDEO_SERVICES
jmp .loop jmp .loop
.loopend .loopend:
ret ret
@@ -437,8 +437,8 @@ readBlocks:
push ax push ax
pop es pop es
mov bx, bp mov bx, bp
; block count to ax ; block count to ax
mov ax, di ; count mov ax, di ; count
mov dl, [bios_drive_id] mov dl, [bios_drive_id]
@@ -507,7 +507,7 @@ readBuffer:
pushad pushad
xchg eax, edi ; block index to eax xchg eax, edi ; block index to eax
mov ebp, esi ; buffer pointer to ebp mov ebp, esi ; buffer pointer to ebp
call readOneBlock call readOneBlock
popad popad
@@ -525,7 +525,7 @@ readBuffer:
and eax, eax and eax, eax
jz .next_indirect_block jz .next_indirect_block
.more_blocks: .more_blocks:
; compute blocks_left ; compute blocks_left
xchg eax, ecx ; save eax xchg eax, ecx ; save eax
@@ -549,7 +549,7 @@ readBuffer:
; adjust read_offset ; adjust read_offset
add eax, 2 add eax, 2
; success ; success
mov di, [sReadBufferStack] mov di, [sReadBufferStack]
mov byte [di + PushadStack.eax], 1 mov byte [di + PushadStack.eax], 1
@@ -607,7 +607,7 @@ readBufferInit:
; position si at the 1st block run ; position si at the 1st block run
lea si, [inode + BFSInode.data + DataStream.direct] lea si, [inode + BFSInode.data + DataStream.direct]
; buffer address ; buffer address
xor ebp, ebp xor ebp, ebp
mov bp, buffer mov bp, buffer
@@ -631,7 +631,7 @@ kReadErrorString db "read error", 0
kBadSuperBlockMagicString db "bad superblock magic", 0 kBadSuperBlockMagicString db "bad superblock magic", 0
kNotADirectoryString db "not a directory", 0 kNotADirectoryString db "not a directory", 0
kBadInodeMagicString db "bad inode magic", 0 kBadInodeMagicString db "bad inode magic", 0
kNoZbeosString db "zbeos not found", 0 kNoZbeosString db "haiku_loader not found", 0
%else %else
kErrorString db "Failed to load OS. Press any key to reboot..." kErrorString db "Failed to load OS. Press any key to reboot..."
db 0 db 0
@@ -639,9 +639,8 @@ kErrorString db "Failed to load OS. Press any key to reboot..."
; the path to the boot loader ; the path to the boot loader
kPathComponents: kPathComponents:
pathComponent "beos"
pathComponent "system" pathComponent "system"
pathComponent "zbeos" pathComponent "haiku_loader"
db 0 db 0
@@ -716,7 +715,7 @@ readBootLoader:
xor edx, edx xor edx, edx
mov dl, [bios_drive_id] mov dl, [bios_drive_id]
; ds, es ; ds, es
push 0x07c0 push 0x07c0
pop ds pop ds
push 0x1000 push 0x1000
@@ -783,7 +782,7 @@ continueMain:
.not_found: .not_found:
error kNoZbeosString error kNoZbeosString
.read_loop: .read_loop:
; read the next B+ tree node ; read the next B+ tree node
@@ -840,8 +839,8 @@ continueMain:
popa popa
jne .skip_key jne .skip_key
; keys are equal ; keys are equal
; get the current index ; get the current index
pop dx ; pop previous key length pop dx ; pop previous key length
@@ -893,13 +892,13 @@ readInode:
; administrative part (not the small data section), which easily fits into ; administrative part (not the small data section), which easily fits into
; one disk block. ; one disk block.
call readOneBlock call readOneBlock
cmp dword [inode + BFSInode.magic1], INODE_MAGIC1 cmp dword [inode + BFSInode.magic1], INODE_MAGIC1
je .no_error je .no_error
error kBadInodeMagicString error kBadInodeMagicString
.no_error .no_error:
popad popad
ret ret
@@ -913,7 +912,7 @@ readInode:
; eax: disk block number, where the block run begins ; eax: disk block number, where the block run begins
blockRunToDiskBlock: blockRunToDiskBlock:
push ecx push ecx
; run.allocation_group << superblock.ag_shift ; run.allocation_group << superblock.ag_shift
mov cl, [superblock + SuperBlock.ag_shift] mov cl, [superblock + SuperBlock.ag_shift]
mov eax, [si + BlockRun.allocation_group] mov eax, [si + BlockRun.allocation_group]
@@ -922,7 +921,7 @@ blockRunToDiskBlock:
; add run.start ; add run.start
xor ecx, ecx xor ecx, ecx
mov cx, [si + BlockRun.start] mov cx, [si + BlockRun.start]
add eax, ecx add eax, ecx
pop ecx pop ecx
@@ -972,7 +971,7 @@ _writeInt32:
jl .digit jl .digit
add dl, 'a' - '0' - 10 add dl, 'a' - '0' - 10
.digit: .digit:
add dl, '0' add dl, '0'
; prepend the digit to the string ; prepend the digit to the string
@@ -990,7 +989,7 @@ _writeInt32:
popad popad
ret ret
; check whether we are small enough ; check whether we are small enough
end: end:
%if end - start > 1024 %if end - start > 1024
Binary file not shown.
@@ -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. * Distributed under the terms of the MIT License.
*/ */
@@ -100,7 +100,7 @@ print_item_at(int32 line, MenuItem *item, bool clearHelp = true)
printf(" "); printf(" ");
printf(item->Label()); printf(item->Label());
if (item->Submenu() && item->Submenu()->Type() == CHOICE_MENU) { if (item->Submenu() && item->Submenu()->Type() == CHOICE_MENU) {
// show the current choice (if any) // show the current choice (if any)
const char *text = " (Current: "; const char *text = " (Current: ";
@@ -203,7 +203,7 @@ draw_menu(Menu *menu)
print_centered(2, "Haiku Boot Loader"); print_centered(2, "Haiku Boot Loader");
console_set_color(kCopyrightColor, kBackgroundColor); console_set_color(kCopyrightColor, kBackgroundColor);
print_centered(4, "Copyright 2004-2008 Haiku Inc."); print_centered(4, "Copyright 2004-2009 Haiku Inc.");
if (menu->Title()) { if (menu->Title()) {
console_set_cursor(kOffsetX, kFirstLine - 2); console_set_cursor(kOffsetX, kFirstLine - 2);
@@ -459,7 +459,7 @@ run_menu(Menu *menu)
// #pragma mark - // #pragma mark -
void void
platform_generic_update_text_menu_item(Menu *menu, MenuItem *item) platform_generic_update_text_menu_item(Menu *menu, MenuItem *item)
{ {
if (menu->IsHidden()) if (menu->IsHidden())
+3 -3
View File
@@ -45,9 +45,9 @@ static struct {
const char *path; const char *path;
const char *target; const char *target;
} sPredefinedLinks[] = { } sPredefinedLinks[] = {
{"/system", "/boot/beos/system"}, {"/system", "/boot/system"},
{"/bin", "/boot/beos/bin"}, {"/bin", "/boot/system/bin"},
{"/etc", "/boot/beos/etc"}, {"/etc", "/boot/system/etc"},
{"/var", "/boot/var"}, {"/var", "/boot/var"},
{"/tmp", "/boot/var/tmp"}, {"/tmp", "/boot/var/tmp"},
{NULL} {NULL}
+33 -34
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. * Distributed under the terms of the MIT license.
*/ */
@@ -30,28 +32,25 @@
/* Haiku system directories */ /* Haiku system directories */
/* os root dir; just stick to 'beos' for now */ #define SYSTEM "system"
#define SYSTEM "beos"
//#define SYSTEM "haiku" // :)
//#define SYSTEM "os"
static const char *kSystemDirectories[] = { static const char *kSystemDirectories[] = {
SYSTEM, // B_BEOS_DIRECTORY SYSTEM, // B_SYSTEM_DIRECTORY
SYSTEM "/system", SYSTEM, // B_BEOS_SYSTEM_DIRECTORY
SYSTEM "/system/add-ons", SYSTEM "/add-ons",
SYSTEM "/system/boot", SYSTEM "/boot",
SYSTEM "/etc/fonts", SYSTEM "/fonts",
SYSTEM "/system/lib", SYSTEM "/lib",
SYSTEM "/system/servers", SYSTEM "/servers",
SYSTEM "/apps", SYSTEM "/apps",
SYSTEM "/bin", SYSTEM "/bin",
SYSTEM "/etc", SYSTEM "/etc",
SYSTEM "/documentation", SYSTEM "/documentation",
SYSTEM "/preferences", SYSTEM "/preferences",
SYSTEM "/system/add-ons/Translators", SYSTEM "/add-ons/Translators",
SYSTEM "/system/add-ons/media", SYSTEM "/add-ons/media",
SYSTEM "/etc/sounds", SYSTEM "/data/sounds",
SYSTEM "/etc", SYSTEM "/data",
}; };
/* Common directories, shared among users */ /* Common directories, shared among users */
@@ -79,7 +78,7 @@ static const char *kCommonDirectories[] = {
"var", // B_COMMON_VAR_DIRECTORY "var", // B_COMMON_VAR_DIRECTORY
COMMON "/add-ons/Translators", COMMON "/add-ons/Translators",
COMMON "/add-ons/media", COMMON "/add-ons/media",
COMMON "/sounds", COMMON "/data/sounds",
COMMON "/data", COMMON "/data",
}; };
@@ -99,7 +98,7 @@ static const char *kUserDirectories[] = {
HOME "/config/settings/printers", HOME "/config/settings/printers",
HOME "/config/add-ons/Translators", HOME "/config/add-ons/Translators",
HOME "/config/add-ons/media", HOME "/config/add-ons/media",
HOME "/config/sounds", HOME "/config/data/sounds",
HOME "/config/data", HOME "/config/data",
HOME "/config/cache", HOME "/config/cache",
}; };
@@ -208,23 +207,23 @@ find_directory(directory_which which, dev_t device, bool createIt,
break; break;
/* Haiku system directories */ /* Haiku system directories */
case B_BEOS_DIRECTORY: case B_SYSTEM_DIRECTORY:
case B_BEOS_SYSTEM_DIRECTORY: case B_BEOS_SYSTEM_DIRECTORY:
case B_BEOS_ADDONS_DIRECTORY: case B_SYSTEM_ADDONS_DIRECTORY:
case B_BEOS_BOOT_DIRECTORY: case B_SYSTEM_BOOT_DIRECTORY:
case B_BEOS_FONTS_DIRECTORY: case B_SYSTEM_FONTS_DIRECTORY:
case B_BEOS_LIB_DIRECTORY: case B_SYSTEM_LIB_DIRECTORY:
case B_BEOS_SERVERS_DIRECTORY: case B_SYSTEM_SERVERS_DIRECTORY:
case B_BEOS_APPS_DIRECTORY: case B_SYSTEM_APPS_DIRECTORY:
case B_BEOS_BIN_DIRECTORY: case B_SYSTEM_BIN_DIRECTORY:
case B_BEOS_ETC_DIRECTORY: case B_SYSTEM_ETC_DIRECTORY:
case B_BEOS_DOCUMENTATION_DIRECTORY: case B_SYSTEM_DOCUMENTATION_DIRECTORY:
case B_BEOS_PREFERENCES_DIRECTORY: case B_SYSTEM_PREFERENCES_DIRECTORY:
case B_BEOS_TRANSLATORS_DIRECTORY: case B_SYSTEM_TRANSLATORS_DIRECTORY:
case B_BEOS_MEDIA_NODES_DIRECTORY: case B_SYSTEM_MEDIA_NODES_DIRECTORY:
case B_BEOS_SOUNDS_DIRECTORY: case B_SYSTEM_SOUNDS_DIRECTORY:
case B_BEOS_DATA_DIRECTORY: case B_SYSTEM_DATA_DIRECTORY:
template = kSystemDirectories[which - B_BEOS_DIRECTORY]; template = kSystemDirectories[which - B_SYSTEM_DIRECTORY];
break; break;
/* Common directories, shared among users */ /* Common directories, shared among users */
+6 -7
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. * Distributed under the terms of the MIT License.
* *
* Copyright 2002, Manuel J. Petit. All rights reserved. * Copyright 2002, Manuel J. Petit. All rights reserved.
@@ -65,22 +65,22 @@ search_path_for_type(image_type type)
":/bin" ":/bin"
":/boot/apps" ":/boot/apps"
":/boot/preferences" ":/boot/preferences"
":/boot/beos/apps" ":/boot/system/apps"
":/boot/beos/preferences" ":/boot/system/preferences"
":/boot/develop/tools/gnupro/bin"; ":/boot/develop/tools/gnupro/bin";
case B_LIBRARY_IMAGE: case B_LIBRARY_IMAGE:
return "%A/lib" return "%A/lib"
":/boot/home/config/lib" ":/boot/home/config/lib"
// TODO: Remove! // TODO: Remove!
":/boot/common/lib:/boot/beos/system/lib"; ":/boot/common/lib:/boot/system/lib";
case B_ADD_ON_IMAGE: case B_ADD_ON_IMAGE:
return "%A/add-ons" return "%A/add-ons"
":/boot/home/config/add-ons" ":/boot/home/config/add-ons"
// TODO: Remove! // TODO: Remove!
":/boot/common/add-ons" ":/boot/common/add-ons"
":/boot/beos/system/add-ons"; ":/boot/system/add-ons";
default: default:
return NULL; return NULL;
@@ -395,8 +395,7 @@ runtime_loader(void *_args)
gProgramArgs->env[i] += relocationOffset; gProgramArgs->env[i] += relocationOffset;
} }
if (!strcmp(gProgramArgs->program_path, if (!strcmp(gProgramArgs->program_path, "/boot/system/runtime_loader")) {
"/boot/beos/system/runtime_loader")) {
// TODO: this is a (temporary) work-around for bug #2273 which causes // 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 // the cache's mutex to be locked twice when starting the runtime_loader
// itself. // itself.