BeBounce Demo App for Haiku?

From the MacTech days I always found the demo “BeBounce” impressive → Opening the BeBox
The sources can be found e.g. here →
PulkoMandy's BeOS software archive
Unfortunately I don’t have the know how to adapt the project for the Paladin C++ IDE and to get it built. Has someone already done that (or is so nice to do it) and can provide me with the adapted project?
bebounce_screen

1 Like

Try building it with make normally : )

Unfortunately comes with make the same error messages as in the IDE.

Depends on which version that was downloaded, but the one I tried the makefile had zero chance of working because it was assuming the compiler was mwcc, and probably had powerpc/bigendian resources files. Sometimes we forget that BeOS spent almost the first 10 years not using gcc, and never had gcc on non Intel platforms :wink:

To build it, you can probably edit the make file. mwcc needs to be changed to gcc for sure, and I would remove the parts trying to link the resource file because it probably isn’g going to work.

This is closer to working, but you probably also need libroot.so and libbbe.so linked in too.

#
# app makefile
#
# Copyright (C) 1994 Be Inc.  All Rights Reserved
#

CC			= gcc
LD			= ld
APP_NAME		= BeBounce
TARGET		= $(APP_NAME)
CFLAGS		= -c
LDFLAGS		= 

OBJS			= \
	Crunch.o \
	main.o

$(TARGET): $(OBJ_DIR) $(OBJS) 
	$(LD) -o $@ $(OBJS) $(LDFLAGS)

$(OBJ_DIR):
	@-mkdir $(OBJ_DIR)

.SUFFIXES: .o .cpp .c

.cpp.o: $(OBJ_DIR)
	$(CC) -o $@ $(CFLAGS) $<

.c.o: $(OBJ_DIR)
	$(CC) -o $@ $(CFLAGS) $<

clean:
	rm -f $(APP_NAME) *.o 

I can’t test this, so YMMV.

OK, what I have done:

  1. Downloaded → http://mirror.pulkomandy.tk/unsorted/ftp.beos.hu/ftp.beos.hu/pub/beos/development/samples/application_kit/BeBounce.zip
  2. Extracted & adjusted in the make file the line with the include
    from →

    include /boot/develop/etc/makefile-engine

    to →

    include /system/develop/etc/makefile-engine
  3. Executed make →
    Which responds with:

#include <Roster.h>

(Haiku is binary, but not source compatible with BeOS so a few minor adjustments are normal.)

1 Like

Thx. the undeclared be_roster problem is solved, but the remaining problems are still there :frowning:

You can check the api docs for the references you need.

In this case: The Haiku Book: MessageQueue.h File Reference

So
#include <MessageQueue.h>

Ah, very good. Thank you very much. The App is builded and it can be started.
Unfortunately only once and not twice. But definitely a good starting point for further research from me.

1 Like

You need to have the B_MULTIPLE_LAUNCH flag set on the application resources to launch multiple instance. You can add the flag by editing the binary you generated in the FileTypes app, but I assume that it must be set in the BeBounce.rsrc file included in the zip so you should be able to set that flag by including the resource file in your Makefile:

RSRCS= BeBounce.rsrc

Thanks for the great support in the round. The flag was now the last missing adjustment.

2 Likes

I’ve recently added more detailed documentation for the lauch flags : )

https://www.haiku-os.org/docs/api/Roster_8h.html#a96b4b12d6c74ab6c535fefd51f8e54cb

2 Likes

When I first installed Haiku, I looked for BeBounce and was kind of sad it wasn’t there.

1 Like

OK, so what this demo app for ?

When you’ve cleaned it all up nicely, you could submit a PR to HaikuArchives: :slight_smile:

It’s just a demo. From the ReadMe:

This project demonstrates interapplication communication. When the application
starts, a ball bounces in a window. By starting another copy, the ball can
bounce between the two applications.

3 Likes

I see - thanks.
Nice.